I am wondering how can I add the minimal_should_match parameter to SOLR Nested Boolean query?
I tried the next syntax, but it didn’t work:
{
"query": {
"bool": {
"should": [
{"edismax": {"df": "phones", "query": "111 222 333"}}
{"edismax": {"df": "phones2", "query": "111 222 333"}}
],
"mm": 2
}
}
}
I also tried to change the "mm" parameter to "minimal_should_match" like it works in Elastic, but it still doesn’t work.
Any thoughts? Should I implement this functionality by myself (query component or query parser) or I have a syntax error?
Thanks
2
Answers
Replace your
mm
withminimum_should_match
then recheck it if it works.I hope it helps!
There are multiple issues in your query, like:
Proper syntax should be more like:
Also please report the exact errors from the parser, because "It does not work" does not help us helping you 😉