You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Thomas Kurz <th...@salzburgresearch.at> on 2013/11/28 16:34:56 UTC
problems with boolean query
Hi all!
I have a question regarding boolean queries. What I want to reach:
Return all documents where string-field „access" has value ‚allow*‘ or is not set.
My query:
fq = (access:Allow*) OR (-access:*)
But I got only the results where the field has value ‚allow*‘.
I am using solr 4.3.1 with the edismax query parser.
I am looking forward to get some hints, why the query might be failing.
Best regards and many thanks!
Thomas
--
Thomas Kurz
Forschung & Entwicklung / KMT
Salzburg Research Forschungsgesellschaft mbH
Jakob-Haringer-Straße 5/3 | 5020 Salzburg, Austria
T: +43.662.2288-253 | F: -222
thomas.kurz@salzburgresearch.at
http://www.salzburgresearch.at
Re: problems with boolean query
Posted by tkurz <tk...@apache.org>.
Thank you very mutch! That fixed the problem!
--
View this message in context: http://lucene.472066.n3.nabble.com/problems-with-boolean-query-tp4103770p4103839.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: problems with boolean query
Posted by Jack Krupansky <ja...@basetechnology.com>.
Yeah, purely negative sub-queries have had problems, so rewrite:
fq = (access:Allow*) OR (-access:*)
as
fq = (access:Allow*) OR (*:* -access:*)
-- Jack Krupansky
-----Original Message-----
From: Thomas Kurz
Sent: Thursday, November 28, 2013 10:34 AM
To: solr-user@lucene.apache.org
Subject: problems with boolean query
Hi all!
I have a question regarding boolean queries. What I want to reach:
Return all documents where string-field „access" has value ‚allow*‘ or is
not set.
My query:
fq = (access:Allow*) OR (-access:*)
But I got only the results where the field has value ‚allow*‘.
I am using solr 4.3.1 with the edismax query parser.
I am looking forward to get some hints, why the query might be failing.
Best regards and many thanks!
Thomas
--
Thomas Kurz
Forschung & Entwicklung / KMT
Salzburg Research Forschungsgesellschaft mbH
Jakob-Haringer-Straße 5/3 | 5020 Salzburg, Austria
T: +43.662.2288-253 | F: -222
thomas.kurz@salzburgresearch.at
http://www.salzburgresearch.at