Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

Regards

Joachim

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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.

share|improve this answer
    
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. –  Joachim Rosskopf Oct 22 '12 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 Oct 22 '12 at 12:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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