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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to