Custom scoring algorithm and Explanation extending.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom scoring algorithm and Explanation extending.

Vadim Gindin
Hello

1. I would like to use my custom scoring algorithm. Is it make sense to use
Lucene with other scoring algorithm? What is the best way for that -
implement Similarity and own Queries?


2. I'm reasearching Elasticsearch/Lucene capabilities. Elastichsearch
contains request parameter "explain" that uses Lucene's Explanation class
under the hood. But this class covers only scoring aspects. I would like to
include matching logic details there. It seems a good place but this class
is final..

Regards,
Vadim Gindin
Reply | Threaded
Open this post in threaded view
|

Re: Custom scoring algorithm and Explanation extending.

Adrien Grand
Hi Vadim,

Le jeu. 16 nov. 2017 à 18:09, Vadim Gindin <[hidden email]> a écrit :

> 1. I would like to use my custom scoring algorithm. Is it make sense to use
> Lucene with other scoring algorithm? What is the best way for that -
> implement Similarity and own Queries?
>

It really depends what you are after. Similarity is the right entry point
if you want to configure how term queries compute their score based on
index statistics. If this is not flexible enough for you then you will need
to implement a custom query.


> 2. I'm reasearching Elasticsearch/Lucene capabilities. Elastichsearch
> contains request parameter "explain" that uses Lucene's Explanation class
> under the hood. But this class covers only scoring aspects. I would like to
> include matching logic details there. It seems a good place but this class
> is final..
>

Well, you can already do that today, just add sub explanations and put what
you need in the explanation description. If the float value is irrelevant,
you can just pass a dummy value.
Reply | Threaded
Open this post in threaded view
|

Re: Custom scoring algorithm and Explanation extending.

Vadim Gindin
Thank's a lot!

On Mon, Nov 20, 2017 at 11:22 PM, Adrien Grand <[hidden email]> wrote:

> Hi Vadim,
>
> Le jeu. 16 nov. 2017 à 18:09, Vadim Gindin <[hidden email]> a écrit
> :
>
> > 1. I would like to use my custom scoring algorithm. Is it make sense to
> use
> > Lucene with other scoring algorithm? What is the best way for that -
> > implement Similarity and own Queries?
> >
>
> It really depends what you are after. Similarity is the right entry point
> if you want to configure how term queries compute their score based on
> index statistics. If this is not flexible enough for you then you will need
> to implement a custom query.
>
>
> > 2. I'm reasearching Elasticsearch/Lucene capabilities. Elastichsearch
> > contains request parameter "explain" that uses Lucene's Explanation class
> > under the hood. But this class covers only scoring aspects. I would like
> to
> > include matching logic details there. It seems a good place but this
> class
> > is final..
> >
>
> Well, you can already do that today, just add sub explanations and put what
> you need in the explanation description. If the float value is irrelevant,
> you can just pass a dummy value.
>