Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: discuss

QueryParser bug

 

 

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded


edwardbetts at gmail

Jun 28, 2008, 1:03 AM

Post #1 of 2 (924 views)
Permalink
QueryParser bug

I've got default_boolop set to 'AND'. I pass QueryParser a query like
"category:(a OR b OR c)" and I get no results. It works if I pass two
categories: "category:(a OR b)" or if I write my query as "category:(a
OR (b OR c))".

How do I see the tree of Query objects that the QueryParser has generated?

--
Edward.

_______________________________________________
KinoSearch mailing list
KinoSearch [at] rectangular
http://www.rectangular.com/mailman/listinfo/kinosearch


marvin at rectangular

Jul 1, 2008, 2:12 PM

Post #2 of 2 (794 views)
Permalink
Re: QueryParser bug [In reply to]

On Jun 28, 2008, at 1:03 AM, Edward Betts wrote:

> I've got default_boolop set to 'AND'. I pass QueryParser a query like
> "category:(a OR b OR c)" and I get no results. It works if I pass two
> categories: "category:(a OR b)" or if I write my query as "category:(a
> OR (b OR c))".

Thanks for the report. The problem should be fixed by r3553.

> How do I see the tree of Query objects that the QueryParser has
> generated?


Each Query subclass has a custom to_string() method defined. It's
imperfect (and definitely not for round-trip serialization), but
that's what I use to debug,and in this case it worked fine. When a
QueryParser with a default boolop of 'AND' parsed this string:

a OR b OR c

... the output of $query_parser->tree($qstring)->to_string looked like
this...

((a OR b) AND c)

... and it was easy to identify the problematic code in
QueryParser.c. After r3553, to_string yields this, which is correct:

(a OR b OR c)

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


_______________________________________________
KinoSearch mailing list
KinoSearch [at] rectangular
http://www.rectangular.com/mailman/listinfo/kinosearch

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.