Expand my Community achievements bar.

Attention: Experience League Community will undergo scheduled maintenance on Tuesday, August 20th between 10-11 PM PDT. During this time, the Community and its content will not be accessible. We apologize for any inconvenience this may cause.

Solr Results boosted according to keyword match

Avatar

Level 2

Does anyone worked on the solr search to boost the result based on maximum search keyword match? Actually I am doing query on Solr to get the result based on multiple keywords search and need to boost the result based on maximum matches keyword. Let say my search term is field:("suresh" or "ramesh" or "vikas"). Now if any result match all three word then should come first. If any any result match only two word then come 2nd position and so on. Thanks !

1 Reply

Avatar

Community Advisor

You can use Phrase Slop in the dismax query parser, it scores documents with query terms in proximity higher than others.