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


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();

Your Answer

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

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