lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Constant score queries
Date Fri, 06 Aug 2010 10:46:54 GMT
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ří <splichal@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.
>
> splichal@tovek.cz
>
> +420 606671930
>
>
>
> --
>
> Jiří Šplíchal
>
> TOVEK, spol. s r.o.
>
> splichal@tovek.cz <mailto:splichal@tovek.cz>
>
> +420 606671930
>
>
>
>

---------------------------------------------------------------------
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