lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <m...@apache.org>
Subject Re: How can I use FunctionScoreQuery to replace CustomScoreQuery?
Date Tue, 29 Jan 2019 13:34:35 GMT
I proposed to implement  DoubleValuesSource  with the custom logic, which
gives a scoring. But one can not search by DoubleValuesSource  one needs a
query for this, since a query provides a "selectivity" choosing certain
docs, and rejecting others.And a way to get the query is to wrap a base
query (in the worst case it's MatchAllDocsQuery) and custom
DoubleValuesSource by calling  FunctionScoreQuery.boostByValue(Query,
DoubleValuesSource).

On Sun, Jan 27, 2019 at 9:34 PM MarcoR <grumpyrodriguez@protonmail.com>
wrote:

> Thanks Mikhail,
>
> I'm afraid I don't understand your suggestion though.
>
> I worked more on DoubleValuesSource.fromField's implementation since
> sending
> my first email. As far as I can see, I need to write custom code in my
> DoubleValuesSource implementation and it will be used by the FilterScorer
> of
> FunctionScoreQuery. So I have one potential solution.
>
> I am curious about your suggestion. What do you mean when you say custom
> code can run custom logic, then it can wrap a query? The way
> FunctionScoreQuery is designed, whatever custom logic I'm supposed to
> introduce should go into DoubleValuesSource. Your suggestion seems to
> differ
> from that. Could you explain a bit more please?
>
> Thanks!
> Marco
>
>
>
> --
> Sent from:
> http://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

-- 
Sincerely yours
Mikhail Khludnev

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