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.
332b27a7e8304eaaf473752432a3f244?d=identicon&s=25 Neville Burnell (Guest)
on 2007-02-23 09: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
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2007-02-23 15:47
(Received via mailing list)
On 2/23/07, Neville Burnell <Neville.Burnell@bmsoft.com.au> 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
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2007-02-23 16:20
(Received via mailing list)
On 2/23/07, Neville Burnell <Neville.Burnell@bmsoft.com.au> 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.