How to give a property a higher ranking/relevance in Search results

Vote:
 

Hi,

I'm using EPiServer Find to index/search a custom collection of Organisations.  An Organisation is made up of Organisation Name, Address, Phone etc..

When a person does a search I would like to give the Organisation Name property a higher search ranking in the results e.g.  If I were to search for "Abbey", I would like to see the organisations such as "Abbey Insurance Co" appear higher in the search rankings than any organisations with an address of "Abbey Road", "Abbey Street" for example.

I have tried using the "BoostMatching" method (http://find.episerver.com/Documentation/dotnet-api-boosting-with-filters) to give the Organisation matches a greater relevance, but this appears to only work if I supply an exact match for the field.

Any suggestions?

Regards,

#73466
Jul 23, 2013 12:43
Vote:
 

Got the answer to this, need to supply the relative importance to the property that need to appear higher in the rankings in my scenario the Organisation Name...

 

 

var result = SearchClient.Instance.Search<Organisation>(Language.English)

                                            .For(query)

                                            .InField(x => x.OrganisationName, 5)

                                            .InFields(x => x.Address, x => x.Phone)                                           

                                            .GetResult();

#73506
Jul 25, 2013 11:06
* 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.