How to do advanced search using "OR" in solr dismax

How can you specify a query such as "java with (developer OR programmer)" using the solr dismax ...

It works with the standard solr handler, but not with dadax

+3
source share
3 answers

The default for dismax is OR (optional), and if you want the conditions to be mandatory, you must add a plus sign in front of them. Therefore, assuming that your request should contain “java with”, something like “+ java + with a developer-programmer” should work.

mm , . - 100%, , , . ,

+2

, . Dismax Lucene QueryParser. .

. mm, .

0

This may be a little off topic, but it seems that the words of the programmer and developer are synonyms and are best placed in the synonyms file, effectively neutralizing the need for the instruction type “programmer or developer”. Otherwise, the minimum match setting should be the closest. The best route to go would be to upgrade to a new version of solr with EDISMAX, as this will support standard and dull syntax.

0
source

Source: https://habr.com/ru/post/1751718/


All Articles