0
votes

I have tried creating query for exact term match, but now I am trying to achieve something like this. Suppose someone tries to search a phrase called "Test Solr", the results should first show the items that are having the exact term "Test Solr" adjacent to each other. Then the precedence should be to show the items that are having both the terms "Test" and "Solr" anywhere in the content and finally the content having either "Test" or "Solr" should be shown. Has anyone tried creating a query like this?

1

1 Answers

1
votes

Have a look at Phrase slop in the dismax query parser, it scores documents with query terms in proximity higher than others.