Publish a List as Catalog and consume
it in Search Results WebPart
Context: I wanted to publish a list as
Catalog and later wanted to consume list’s data in a ‘Search Results’ webpart.
The following diagram shows bird’s eye view of my problem;
- Publish List as Catalog
- First create Site Columns as those will later be used as managed properties in the Search schema and will be consumed in the Results Search web part. Go to (Site Settings -> Site Columns).
- Create a custom list named a ‘Cars’.
- Add the Site Columns into the Cars list. Add also some dummy data in the list.
- Now go to the (Site Settings-> Site Collection Features-> Enable ‘Cross-Site Collection Publishing’).
- Now enable the Catalog Settings by going to (List (Cars)-> List Settings-> Catalog Settings). On the Catalog Setting page, select ‘Enable this library as catalog’ as shown below;
- Now the Site Collection A with a list ‘Cars’ is ready to be consumed into the Site Collection B. Let’s now go to the Site Collection B and add ‘Search Results webpart’.
- Setup Site Collection to Consume list catalog
- Before you add the webpart, first go to your Search Service and add the ‘Site Collection A’ url in the Content Sources (Search Service Application-> Content Sources) and start a full crawl by right clicking the content source.
- Go to the Site Collection B and activate a Site Collection feature ‘SharePoint Server Publishing Infrastructure’.
- Now go to (Site Settings -> Manage site features -> Activate ‘SharePoint Server Publishing’).
- Once it is activated, you will find ‘Manage catalog connection’ option added into the Site Administration group.
- Go to ‘Manage catalog connections’, click catalog ‘connect to catalog’. SharePoint will show number of catalogs to be consumed as shown in the figure. Click connect on your publishing catalog list.
Your Site
collection is now ready to consume the List catalog ‘Cars.
- Attach list with Search Results WebPart
- Before you add the webpart, first go to your Search Service and add the ‘Site Collection A’ url in the Content Sources (Search Service Application --> Content Sources) and start a full crawl by right clicking the content source.
- Go to the webpart properties and click change query.
- Select the list and click ‘Test query’ button. You will immediately get a preview of the search results as shown below;
- Click Apply button to finalize the changes and Save your page to see the ‘Search Result’ webpart working.








No comments:
Post a Comment