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 trying to implement "find similar results" in fast search for sharepoint 2010. Im using the docvector manage property and similarTo property(KeywordQuery property) for this. I hv to pass the docvector value of the result to the Query.But i dont know how ...? Can any1 help me to pass this manage property value to the Query.

link: Find Similar http://msdn.microsoft.com/en-us/library/ff521597.aspx

share|improve this question
add comment

1 Answer 1

If you are using the KeywordQuery class, here is a snippet that should get you what you want:

    // instantiate a KeywordQuery object first

    keywordQuery.SimilarType = SimilarType.Find;

    // I'm just using some example values here to ilustrate the usage of the SimilarTo property.    
    keywordQuery.SimilarTo ="[social services, 1][interior renovations, 1][ministry, 0.707107]";                
    keywordQuery.SortSimilar = true;                        
    keywordQuery.QueryText = "projectnumber=12345";

    // perform the query
    ResultTableCollection keywordQuerySearchResults = keywordQuery.Execute();
share|improve this answer
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.