lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bourne71 <gary...@live.com>
Subject Generating Query
Date Wed, 12 Aug 2009 09:09:09 GMT

Hi,

I am trying to build a query that looks like the following:
url:(+news +politics)^1.5 content:(+news +politics)^2.0

But I can't seems to find any reference to it. I try hardcoding it like the
following:
BooleanQuery query = new BooleanQuery();
query.add(new TermQuery(new Term(field, "+news +politics")),
BooleanClause.Occur.SHOULD);

But with this, the query doesn't seems to provide any response or effect. By
right its suppose to boost the field of the page that contain both of the
word in it.

Can anyone advise me on how to create this type of query? Thanks
-- 
View this message in context: http://www.nabble.com/Generating-Query-tp24931880p24931880.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message