lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Pl├╝mpe <>
Subject Re: Query across multiple fields scenario not handled by "MultiFieldQueryParser"
Date Tue, 20 Jul 2004 09:39:18 GMT

> > 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 
> field.
> 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).
many thanks for your advice. Although I was hoping not to have to
implement the change (as it has apparently been done), I guess this is
enough to get me going.


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

View raw message