You could use the dismax (or edismax) query parser along with the phrase
boosting parameters:
1)
https://solr.apache.org/guide/8_10/the-dismax-query-parser.html#pf-phrase-fields-parameter

2)
https://solr.apache.org/guide/8_10/the-dismax-query-parser.html#ps-phrase-slop-parameter


Using the default PS should be fine to satisfy your use case.
If you include a multi-field search in the game, then be careful as you may
get unexpected behaviours (scoring becomes much more complex)

Cheers
--------------------------
Alessandro Benedetti
Apache Lucene/Solr Committer
Director, R&D Software Engineer, Search Consultant

www.sease.io


On Mon, 1 Nov 2021 at 17:08, Thamizhazhagan B <thamizhazhagan....@kp.org>
wrote:

> Hi,
>
> To achieve the below requirement, thought to use "Shingle filter". Can you
> please correct if I am wrong.
>
> User input: solr query analysis
>
> Results :  (in same order) - exact match at top following by partial match
> then by individual words
>
> Solr query analysis is the best practice
> solr query is good for analysis
> query analysis in solr is good
> solr is key player in search world
> query your requirements
> analysis always gives better results
>
> Raised stack overflow question also in this topic: How to do partial
> phrase matching with boosting in Solr - Stack Overflow<
> https://stackoverflow.com/questions/69663271/how-to-do-partial-phrase-matching-with-boosting-in-solr
> >
>
> Can you please help?
>
> Thanks,
> Thamizh
>
> From: Thamizhazhagan B
> Sent: Wednesday, October 13, 2021 3:42 AM
> To: us...@solr.apache.org
> Subject: Boost query with phrase slop
>
> Hi,
>
> We would like to order search results as below:
>
> User input: solr query analysis
>
> Results :  (in same order) - exact match at top following by partial match
> then by individual words
>
> Solr query analysis is the best practice
> solr query is good for analysis
> query analysis in solr is good
> solr is key player in search world
> query your requirements
> analysis always gives better results
>
> Thought of using Phrase slop. Can you please suggest any reference to
> address above ask?
>
> Thanks,
> Thamizh
>
> NOTICE TO RECIPIENT:  If you are not the intended recipient of this
> e-mail, you are prohibited from sharing, copying, or otherwise using or
> disclosing its contents.  If you have received this e-mail in error, please
> notify the sender immediately by reply e-mail and permanently delete this
> e-mail and any attachments without reading, forwarding or saving them.
> v.173.295  Thank you.
>

Reply via email to