lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Patterson <jdp2...@gmail.com>
Subject Re: Mixing non scored an scored queries
Date Tue, 15 Jul 2008 16:15:28 GMT



Karl Wettin wrote:
> 
> 
> I think all you need to do is to create a custom query (sounds like  
> you want a clone of TermQuery) that uses a Scorer that always return 1f.
> 
> 

Actually, I just thought that it would probably be better to create an
adapter Query that always returns a constant score.  That way instead of
being restricted to working with TermQuery you could wrap any type of query.

new ConstantScoreQuery(myExistingQuery, 1.0f);


-- 
View this message in context: http://www.nabble.com/Mixing-non-scored-an-scored-queries-tp18460018p18469178.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