minimum should match for only for few fields

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

minimum should match for only for few fields

Vincenzo D'Amore
Hi All,

Not sure if what I'm asking is possible, but I'm looking for a way to
define minimum should match ("mm") only for few fields in a query.

And if possibile, is there any chance to configure this behaviour in a
request handler in solrconfig.xml?

Best regards,
Vincenzo
Reply | Threaded
Open this post in threaded view
|

Re: minimum should match for only for few fields

Erick Erickson
By definition mm is applied across all the fields you define in "df"
in your edismax handler.

You can always override df on a per-query basis, but there's no way
that I know of to say "mm really only applies to fields a, b, c even
though df is set to a, b, c, d, e, f....


Best,
Erick

On Mon, Nov 13, 2017 at 2:22 AM, Vincenzo D'Amore <[hidden email]> wrote:

> Hi All,
>
> Not sure if what I'm asking is possible, but I'm looking for a way to
> define minimum should match ("mm") only for few fields in a query.
>
> And if possibile, is there any chance to configure this behaviour in a
> request handler in solrconfig.xml?
>
> Best regards,
> Vincenzo
Reply | Threaded
Open this post in threaded view
|

Re: minimum should match for only for few fields

Emir Arnautović
In reply to this post by Vincenzo D'Amore
Hi Vincenzo,
It is not perfect, but you could achieve something similar using _query_ hook, e.g.:

&defType=lucene&q=_query_:”{defType=edismax qf=‘f1 f2’ mm=‘2’}my query” OR _query_:”{defType=edismax qf=‘f3 f4’ mm=‘1’}my query”

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 13 Nov 2017, at 11:22, Vincenzo D'Amore <[hidden email]> wrote:
>
> Hi All,
>
> Not sure if what I'm asking is possible, but I'm looking for a way to
> define minimum should match ("mm") only for few fields in a query.
>
> And if possibile, is there any chance to configure this behaviour in a
> request handler in solrconfig.xml?
>
> Best regards,
> Vincenzo