I have built a custom search connector to crawl and index external content types. That works quite well. I find the index entities in the search center as well through using the API of SearchServiceApplicationProxy.

But now I want to know, what is the easiest way to narrow the result of a KeywordQuery to just get results from an certain Entity-Type (e.g just the "Products" of the external system, not the "Customers"). That means I want to query by the Name and Namespace of the Entity (in conjunction with an some other search terms).

Do I have to create a managed property myself based on some crawled property? Or is there a way to fill for example the "ContentType" or "ContentClass" property from the BCS-connector? Thank you in advance.



2 Answers 2


For this you will need to make a custom property and then create a scope on that property, looking for a specific value.

I have had a play on a similar set up just now and I can't find a way to do it another way.

It's a small workaround but it works.

  • I did it exactly that way now. By using a DefaultValue in the .bdcm-Model it is completely declerative. I mapped the new CrawledProperty now to the ManagedProperty "contentclass". This mapping is done via PS-Cmdlet in our setup-script. I'dont think it is required to build a scope. I use just a HiddenConstraint in my KeywordQuery. Thank you very much. Commented Oct 22, 2012 at 11:39
  • The scope just creates a copy of the data and puts less stress on the server, that is why I suggested it.
    – Hugh Wood
    Commented Oct 22, 2012 at 12:28

The properties you are looking for are already automatically created for you by SharePoint, "EntityName" and "EntityNamespace". You don't even need to create the managed properties and map them. Take a look at Search Service Administration page in the Central Administration and "Metadata properties" section.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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