lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: Query across multiple fields scenario not handled by "MultiFieldQueryParser"
Date Mon, 19 Jul 2004 09:02:29 GMT
On Sunday 18 July 2004 18:39, Thomas Pl├╝mpe wrote:

> Does anybody here know which changes I
> would have to make to QueryParser.jj to get the functionality described?

I haven't tried it but I guess you need to change the getXXXQuery() methods so 
they return a BooleanQuery. For example, getFieldQuery currently might return 
a TermQuery; you'll need to change that so it returns a BooleanQuery with two 
TermQuerys. These two queries would have the same term, but a different 

Another approach is to leave QueryParser alone and modify the query after it 
has been parsed by recursively iterating over the parsed query, replacing 
e.g. TermQuerys with BooleanQuerys (just like described above).


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

View raw message