I believe the top scores will be unchanged. Even if they were changed, they'd all be changed by a constant factor, and would not alter the order of your hits even if you sort by score.
Mike 2010/8/6 Šplíchal Jiří <splic...@tovek.cz>: > Hello, > > just one more question in order to understand how the score is computed: > Boost factor of queries is applied only for sub-queries? So if I change the > boost factor of any TopLevel query, the score will remain unchanged? > > Jiri > > -----Original Message----- > From: Šplíchal Jiří [mailto:splic...@tovek.cz] > Sent: Friday, August 06, 2010 1:15 PM > To: java-user@lucene.apache.org > Subject: RE: Constant score queries > > 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 > > > --------------------------------------------------------------------- > 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