Wednesday, May 8, 2013

SharePoint 2013 Search: Removing Non-Items from BCS Search Results


When you crawl an external content type (via BCS/BDC), there are usually two items (sometimes four) that are added to the index that do not actually represent external data items. These are included in the content source search results and will appear as empty results when using a customized display template:

(Click on image to see larger view)

You can usually see the "non-items" in the Search Result Preview of the Query Builder dialog of the Result Source:



Luckily, these entries are considered "folders" and thus the IsContainer managed property of these items are "true". Therefore, you can easily remove these items from your search results by modifying the query of your Result Source.

Simply add IsContainer:false to the query text of your Result Source:

 
This cleans up your BCS search result items very nicely:



Search on!

For a complete BCS end-to-end scenario, check out Chapter 11 of my walkthrough guide:

NOW AVAILABLE!!!

No comments:

Post a Comment

Matched Content