We have setup a cross site collection publishing environment with a content type, hub a authoring site and a publishing site.

The authoring sites contains several catalogs based on custom content types. One of the content types (Product) has a property where we store a link to a document library called Productdocuments. Productdocuments is also set up as a catalog in order to be able to search it's elemnts.

There will be created a folder for each product in the Productdocument library (yes, I know about the recommendations about not using folders in Sharepoint, but using folders caters for a very userfriendly way of mass uploading product documents. By using metadata one would have to manually categorize each document on upload which isn't very user friendly, hence folders).

We have created category and item pages for the different catalogs. The item page for the Product Content Type should display the files in the mapped folder of the linked Document Library.

I have tried to add a Content Search Web Part to the Item Page for Products and by specifying the Productdocuments catalog as result source and adding the IsDocument:True parameter from keyword filter I can get the CSWP to display only the files on the doc lib.

Using a variant of Ivans script shown on http://gallery.technet.microsoft.com/office/Get-Crawled-Property-names-9e8fc5e0 I have found that the folder is stored in the crawled property FileDirRef. I have created a managed metadata owstaxidFileDirRef mapped to FileDirRef to be able to add this a criteria in the CSWP.

My query now looks like

IsDocument:True owstaxidFileDirRef:myFolder

where myFolder is one of the folders in the Productdocument document library.

What am I missing here?

UPDATE: Using the Sharepoint Search Service Tool (SSST) I actually have found that owstaxidFileDirRef doesn't contain any values even after adding new item to the Productdocument doclib, reindex the list and running a full crawl. I created an alternate Productdocument doclib which had a lookup column to the Product catalog so I could link document to Products with metadata. I reindexed that catalog, did a full crawl and SSST actually shows that the lookup column contains values. But using this property in the CSWP search query produces no results.

Your Answer

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

Browse other questions tagged or ask your own question.