The query parsing is not strict Boolean logic, here's a great
writeup on the topic:
https://lucidworks.com/blog/2011/12/28/why-not-and-or-and-not/

The outer "+" is simply the entire clause (of which there is only one)
must be present, i.e. it's the whole query.

My guess as to why the counts are the same with and without the fl
term is that it's present only in docs with term2 and term3 in them
perhaps?

Best,
Erick

Best,
Erick

On Tue, Mar 15, 2016 at 12:22 AM, Modassar Ather <modather1...@gmail.com> wrote:
> Hi,
>
> Kindly help me understand the parsed queries of following three queries.
> How these parsed queries can be interpreted for boolean logic.
> Please ignore the boost part.
>
> *Query : *fl:term1 OR fl:term2 AND fl:term3
> *"parsedquery_toString" : *"boost(+(fl:term1 +fl:term2
> +fl:term3),int(doc_wt))",
> *matches : *50685
>
> The above query seems to be ignoring the fl:term1 as the result of fl:term2
> AND fl:term3 is exactly 50685.
>
> *Query : *fl:term1 OR (fl:term2 AND fl:term3)
> *parsedquery_toString:* "boost(+(fl:term1 (+fl:term2
> +fl:term3)),int(doc_wt))",
> *matches : *809006
>
> *Query : *(fl:term1 OR fl:term2) AND fl:term3
> *parsedquery_toString:* "boost(+(+(fl:term1 fl:term2)
> +fl:term3),int(doc_wt))",
> *matches : *293949
>
> Per my understanding the terms having + is a must and must be present in
> the document whereas a term without it may or may not be present but query
> one seems to be ignoring the first term completely.
> How the outer plus defines the behavior. E.g. *outer +* in query +(fl:term1
> +fl:term2 +fl:term3)
>
> Thanks,
> Modassar

Reply via email to