I see, thank you! This explains a lot. Jiri -----Original Message----- From: Michael McCandless [mailto:luc...@mikemccandless.com] Sent: Friday, August 06, 2010 12:47 PM To: java-user@lucene.apache.org Subject: Re: Constant score queries
The score will be 1.0 even if the boost isn't, when you use ConstantScore*Query as the sole top-level query. The boost only impacts how much weight is associated with this query's matches when it's a sub-query mixed in with other sub-queries. EG if you make a BooleanQuery, and add ConstantScoreQuery as a SHOULD clause, and then add something else, eg TermQuery, then if you change the boost of the ConstantScoreQuery you should see that impact which docs/scores are returned. Mike 2010/8/6 Šplíchal Jiří <splic...@tovek.cz>: > Hello, > > > > I am working with ConstantScoreQuery and ConstantScoreRangeQuery. Both shoud > according to the description > > return the value of their boost as score for all matching documents. > > However I always get the score 1.0 and also in the > TestConstantScoreRangeQuery. testBoost() method, > > the boost is set to 100, but the test checks that the score is 1.0f. > > > > So how should the constant score queries work in real? > > Thank you > > > > -- > > Jiří Šplíchal > > TOVEK, spol. s r.o. > > splic...@tovek.cz > > +420 606671930 > > > > -- > > Jiří Šplíchal > > TOVEK, spol. s r.o. > > splic...@tovek.cz <mailto:splic...@tovek.cz> > > +420 606671930 > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org