Forum: Ferret bug with boolean query evaluation containing parenthesis and

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Neville B. (Guest)
on 2007-02-23 10:44
(Received via mailing list)
Hi,

The following [simplified] query works well, however a variation which
includes parenthesis seems to fail, in that it returns hits which should
be excluded by the NOT term.

This is surprising because in this simple case, the parenthesis
shouldn't change the Boolean evaluation  ... any pointers?

Working Query:  field1:value1 AND NOT field2:value2
Failing Query:    field1:value1 AND ( NOT field2:value2 )

Kind Regards

Neville
David B. (Guest)
on 2007-02-23 16:47
(Received via mailing list)
On 2/23/07, Neville B. <removed_email_address@domain.invalid> wrote:
> Failing Query:    field1:value1 AND ( NOT field2:value2 )
This is a carry over from Lucene. Currently queries must have at least
one positive clause. So a search for;

    NOT field2:value2

will return nothing. So ANDing this clause with another clause will
also return nothing. NOT clauses are more like filters than real
boolean clauses I guess. You are correct to say this is surprising and
it is something I should probably fix but it isn't urgent. I'll put it
on my TODO list.

Cheers,
Dave
David B. (Guest)
on 2007-02-23 17:20
(Received via mailing list)
On 2/23/07, Neville B. <removed_email_address@domain.invalid> wrote:
> Working Query:  field1:value1 AND NOT field2:value2
> Failing Query:    field1:value1 AND ( NOT field2:value2 )

Ok, I decided to fix this after all. Look out for the next release. I
still have a few more bugs to fix but it should be out some time over
the weekend.
This topic is locked and can not be replied to.