lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stamatis Zampetakis <zabe...@gmail.com>
Subject Re: Use custom score in ConstantScoreQuery
Date Sun, 08 Dec 2019 21:06:41 GMT
Small reminder. Any input on this?

Thanks,
Stamatis

On Mon, Dec 2, 2019 at 12:10 PM Stamatis Zampetakis <zabetak@gmail.com>
wrote:

> Hi all,
>
> Currently ConstantScoreQuery [1] returns a constant score equal to 1 for
> every document that matches the query.
>
> I would like to use the ConstantScoreQuery but with a different score
> value that I can pass explicitly (via the constructor for instance).
>
> This change may also benefit some other parts of Lucene where a
> ConstantScoreQuery is wrapped around a BoostQuery simply for returning a
> score of zero [2][3].
>
> Does this change make sense? Shall I create a JIRA for it?
>
> Best,
> Stamatis
>
> [1]
> https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
> [2]
> https://github.com/apache/lucene-solr/blob/1d238c844e45f088a942aec14750c186c7a66d92/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java#L253
> [3]
> https://github.com/apache/lucene-solr/blob/1d238c844e45f088a942aec14750c186c7a66d92/lucene/core/src/java/org/apache/lucene/search/BoostQuery.java#L97
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message