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 Chris Hostetter <ho...@fucit.org> on 2010/07/03 03:03:04 UTC
Re: problem with formulating a negative query
: thanks for your explanations. But why are all docs being *removed* from the
: set of all docs that contain R in their topic field? This would correspond to
: a boolean AND and would stand in conflict with the clause q.op=OR. This seems
: a bit strange to me.
Erick's explanation might have been a tad missleading ... it's not an
ordered operation, AND, OR, and NOT are just syntactic-sugar for modifying
the MUST, MUST_NOT, and SHOULD. The default op of "OR" only affects the
first clause of your query (R) because it doesn't have any modifiers --
the second clause has that NOT modifier so your query is effectivley...
topic:R -topic:[* TO *]
...which by definition can't match anything.
-Hoss
Re: problem with formulating a negative query
Posted by Sascha Szott <sz...@zib.de>.
Hi,
Chris Hostetter wrote:
> AND, OR, and NOT are just syntactic-sugar for modifying
> the MUST, MUST_NOT, and SHOULD. The default op of "OR" only affects the
> first clause of your query (R) because it doesn't have any modifiers --
Thanks for pointing that out!
-Sascha
> the second clause has that NOT modifier so your query is effectivley...
>
> topic:R -topic:[* TO *]
>
> ...which by definition can't match anything.
>
> -Hoss
>