lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Isakson" <>
Subject RE: QueryParser searches
Date Tue, 10 Dec 2002 16:30:50 GMT
Hi Roy,

One of the things I do with my query tool is show the user what happened to the query after
it went through the query parser and analyzer. You might try producing your Query object then
dump it out somewhere for examination using the Query.toString(String defaultField) method.

I get results like:

report AND title:search
+report +title:search

report AND title:search OR as
+report +title:search
Note that here "as" is a stop word, so the query is the same

(report OR HaPPy) AND (title:SeArCH OR Ju?k)
+(report happy) +(title:search Ju?k)
Notice the analyzer normalized the case of all the tokens except the one with the wildcard

Eric D. Isakson        SAS Institute Inc.
Application Developer  SAS Campus Drive
XML Technologies       Cary, NC 27513
(919) 531-3639

-----Original Message-----
From: []
Sent: Tuesday, December 10, 2002 11:00 AM
To: ''
Subject: QueryParser searches

Hey guys,

We have a question about how the QueryParser class optimizes searches, if it
does at all.  We have some searches that are taking an abnormal amount of
time.  Our search string specifies 3-4 fields separated by ORs with a single
term each, and another field searching for many terms separated by a bunch
of ORs.  So it looks kind of like this:

Field1:( term1 term2 term3 term4 ... termN ) && ( Field2: termx || Field3:
termy || Field4: termz ) )

Does the QueryParser class do anything to optimize its search for this?  Or
is there a better way to do this?



This email and any attachments are confidential and may be 
legally privileged. No confidentiality or privilege is waived 
or lost by any transmission in error.  If you are not the 
intended recipient you are hereby notified that any use, 
printing, copying or disclosure is strictly prohibited.  
Please delete this email and any attachments, without 
printing, copying, forwarding or saving them and notify the 
sender immediately by reply e-mail.  Zurich Capital Markets 
and its affiliates reserve the right to monitor all e-mail 
communications through its networks.  Unless otherwise 
stated, any pricing information in this e-mail is indicative 
only, is subject to change and does not constitute an offer 
to enter into any transaction at such price and any terms in 
relation to any proposed transaction are indicative only and 
subject to express final confirmation.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message