lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Giles <mgi...@visionstudio.com>
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.

-Mike



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message