2

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!

3

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.

  • Thanks for your quick response. I followed your steps and the column now appears on the CSWP. I just have one more concern: My original column is of type 'Choice' (menu to choose from), what type of Managed Property is the right one to select while I can only choose between: Text, Integer, Decimal, Date and Time, Yes/No, Double Precision Float, Binary. – user31620 Jul 16 '14 at 19:28
  • Right - Choice does not exist as a search property type. You would use a Text field type in Search, and then depending on how you need to filter you probably will just use the Manual Value option in the CSWP to put in the text string that you are filtering for. – Robin Jul 16 '14 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.