Question

I am quite new to SharePoint 2013 and I have been working lately with the Content Search Web Part. However I haven't been able to make possible a filtering through a custom column that I have on a specified document library. Can someone guide me to settle up the CSWP so that the custom column can appear on the Query Filter in Advanced Options?

To be in context: I have a Document Library called 'Files'. That document library has the predefined columns (Title, Description, dateCreated), and I have added a new column named 'Topic' which is of type 'Choice' (menu to choose from). I want my search filter to throw back the files that contain one of the options of this column. I'll appreciate a lot any help. Thanks!

Was it helpful?

Solution

You'll need to make sure that your custom column is a Managed Property in your Search Schema. By default, all site columns are also created as Managed Properties, but if you created the custom column in the document library itself, it won't be in the Search Schema as a Managed Property, it will just be a Crawled Property.

In Central Admin, go to your Search Service Application > Search Schema, then create a Managed Property (i.e MyTopic) and map it to the already existing Crawled Property. Make sure to set the Managed Property as Searchable, Refinable, etc. Run a full crawl and you should be able to now see your custom property in the CSWP.

Alternately, you can create a site column and then add that site column into your document library. Having the site column will create the Managed Property by default. You'll still need to go into the Search Schema and set the Managed Property to be Searchable and Refinable, but it saves you the step of mapping to a Crawled Property.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top