Logic operator with dismax
Hi. i have a problem with logic operator OR in dismax query search. some days ago the query worked well. now it returns me anything (0 documents) i explain: the query is: http://localhost:8983/solr/select/?q= 1324OR4322OR2324OR%20hello+worlddefType=dismaxqf=code%20title the schema has the fields: code title i want to search the docs with hello world in the title, plus the docs with the codes 1324,4322,2324 (even if they don't have hello world in the title). the result is the query returns to me the docs with these codes AND hello world in the title (logic AND, not OR) the default operator in the schema is OR what's happened?? thank you -- Gastone Penzo *www.solr-italia.it* The first italian blog dedicated to Apache Solr
Re: Logic operator with dismax
Hello, The Dismax search handler doesn't have the concept of a logical operator in terms of OR-AND but rather uses a feature called Min-Should-Match (or mm). This parameter specifies the absolute number or percentage of the entered terms that you need them to match. To have an OR-like effect you can specify an mm=0% and for AND-like an mm=100% should work. More information can be found here: http://wiki.apache.org/solr/DisMaxQParserPlugin#mm_.28Minimum_.27Should.27_Match.29 On 21 March 2011 11:46, Gastone Penzo gastone.pe...@gmail.com wrote: Hi. i have a problem with logic operator OR in dismax query search. some days ago the query worked well. now it returns me anything (0 documents) i explain: the query is: http://localhost:8983/solr/select/?q= 1324OR4322OR2324OR%20hello+worlddefType=dismaxqf=code%20title the schema has the fields: code title i want to search the docs with hello world in the title, plus the docs with the codes 1324,4322,2324 (even if they don't have hello world in the title). the result is the query returns to me the docs with these codes AND hello world in the title (logic AND, not OR) the default operator in the schema is OR what's happened?? thank you -- Gastone Penzo *www.solr-italia.it* The first italian blog dedicated to Apache Solr
Re: Logic operator with dismax
Dismax does not support boolean queries, you may try using Extended Dismax for the boolean support. https://issues.apache.org/jira/browse/SOLR-1553 Regards, Jayendra On Mon, Mar 21, 2011 at 8:24 AM, Savvas-Andreas Moysidis savvas.andreas.moysi...@googlemail.com wrote: Hello, The Dismax search handler doesn't have the concept of a logical operator in terms of OR-AND but rather uses a feature called Min-Should-Match (or mm). This parameter specifies the absolute number or percentage of the entered terms that you need them to match. To have an OR-like effect you can specify an mm=0% and for AND-like an mm=100% should work. More information can be found here: http://wiki.apache.org/solr/DisMaxQParserPlugin#mm_.28Minimum_.27Should.27_Match.29 On 21 March 2011 11:46, Gastone Penzo gastone.pe...@gmail.com wrote: Hi. i have a problem with logic operator OR in dismax query search. some days ago the query worked well. now it returns me anything (0 documents) i explain: the query is: http://localhost:8983/solr/select/?q= 1324OR4322OR2324OR%20hello+worlddefType=dismaxqf=code%20title the schema has the fields: code title i want to search the docs with hello world in the title, plus the docs with the codes 1324,4322,2324 (even if they don't have hello world in the title). the result is the query returns to me the docs with these codes AND hello world in the title (logic AND, not OR) the default operator in the schema is OR what's happened?? thank you -- Gastone Penzo *www.solr-italia.it* The first italian blog dedicated to Apache Solr