Hi Stamatis,
I personally like the current way things work. If we added the ability
to set a custom score on ConstantScoreQuery, then we'd end up with two
ways to do the same thing, which I like to avoid whenever possible.
On Sun, Dec 8, 2019 at 10:07 PM Stamatis Zampetakis wrote:
>
> Small reminder. Any input on this?
>
> Thanks,
> Stamatis
>
> On Mon, Dec 2, 2019 at 12:10 PM Stamatis Zampetakis
> 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
> >
--
Adrien
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org