lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Giles <>
Subject Default AND for multi-field queries...
Date Tue, 07 Oct 2003 22:01:11 GMT
As with many people, I want the default query behavior to be AND (instead 
of OR).  However, I'm also (always) creating multi-field queries.  I don't 
see a way to accomplish this cleanly in the API.  It would be great if 
MultiFieldQueryParser had a constructor that took an array of fields (i.e. 
String[]).  That would solve the problem (and seems like a mistaken 
omission).  It would also be nice if QueryParser allowed you to parse a 
query once, and then alter the field setting and generate different 
queries.  As it stands (from my read of the API), I have to loop through my 
list of fields (6 of them) and create a new QueryParser each time.  Parsing 
the same query 6 times is pretty ugly.  Perhaps there is a better way that 
I'm missing.


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

View raw message