November Happy Hour will be moved to Thursday December 5th.

UnifiedSearchQuery MatchSummary property

Vote:
 
We're trying to build a search for a versioned EPiServer document repository using the UnifiedSearchQuery class. We ideally need to be able to search both the free text of the documents and properties contained within the Summary dictionary. Using the UnifiedSearchQuery class and the MatchSummary property only appears to give the ability to match properties using an AND style query rather than an OR which seems to be a large limitation. i.e. Summary[Property1] = query AND Summary[Property2] = query rather than Summary[Property1] = query OR Summary[Property2] = query The only way I can see to get what I need at the moment is to run three queries, one on the free text, one on Property1 and one on Property2 and then combine the results, do some calculations to make the rank relevance appropriate and return the distinct results to the user. Am I missing something or is there another way completely to do this? Has anyone else come across this before? Thanks, Justin
#12775
Sep 15, 2006 13:20
Vote:
 

How do you actually use the match summary property?!

I'm trying to assign a dictionary to it, but I can't as it's read only, what am I doing wrong?! 

 

UnifiedSearchQuery query = new UnifiedSearchQuery();
Dictionary<string, string> match = new Dictionary(string, string);
match.Add("Description", searchtext);
query.MatchSummary = match; 

#19932
May 14, 2008 19:49
Vote:
 

The MatchSummary dictionary is already initialized.

UnifiedSearchQuery query = new UnifiedSearchQuery();
query.MatchSummary.Add("Kevin", "Pang");

#22352
Aug 03, 2008 15:56
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.