lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: Weighted queries
Date Fri, 06 Aug 2004 15:16:30 GMT
On Friday 06 August 2004 16:54, Eric Jain wrote:

>    (title:foo^4 OR abstract:foo^2 OR content:foo) AND
>    (title:bar^4 OR abstract:bar^2 OR content:bar)

That's not the way MultiFieldQueryParser will rewrite your query. To get this 
kind of query you have to parse it with QueryParser and then iterate 
recursivly (in case of BooleanQuery) over it, using Java's "instanceof". Each 
term needs to be replaced with a BooleanQuery over all the fields you want to 
search in.


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

View raw message