lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <daniel.na...@t-online.de>
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.

Regards
 Daniel


---------------------------------------------------------------------
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