Expand my Community achievements bar.

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.