Customising scoring algorithm in elasticsearch with scoring script or building my own Lucene Scorer?

I'm using elasticsearch to do some similarity comparison among process
models. The core similarity algorithm should be specialized for my process
models, which means, as my imagined, I should customize the score algorithm
in elasticsearch.

As I known, the scoring in ES is based on Lucene score algorithm. Although
Lucene's DefaultSimilarity works quite well on most of the cases and one
can use other similarities in ES like BM25,DRF, such customizing usually
extending the existed Lucene classes or overriding its methods to change or
disable some weights in my opinion.

In my case, I'd like to make some specialized math things which should be
used as scoring and seems to be different with the base Lucene score
algorithm. what confused me is, it seems that there are two options for me,
one is, I can configurate custom scoring script in ES, the other one is I
should build my own Lucene scorer.

Can anybody give me some advice on which approach I should take? or is
there any missunderstanding I have. Since I have not very clear about ES
and Lucene, maybe there are some other ways to solve my questions and more
suitable in my case. Thanks a lot!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

It kinda depends how complex your scoring algorithm needs to be. If it is
just an algorithm based on the values contained in fields in each doc, then
a custom_score script may be what you want. If it is more complex, then you
may need to implement your own similarity module.

clint

On 12 September 2013 21:52, 少爷允之 chang.zhang29@googlemail.com wrote:

I'm using elasticsearch to do some similarity comparison among process
models. The core similarity algorithm should be specialized for my process
models, which means, as my imagined, I should customize the score algorithm
in elasticsearch.

As I known, the scoring in ES is based on Lucene score algorithm. Although
Lucene's DefaultSimilarity works quite well on most of the cases and one
can use other similarities in ES like BM25,DRF, such customizing usually
extending the existed Lucene classes or overriding its methods to change or
disable some weights in my opinion.

In my case, I'd like to make some specialized math things which should be
used as scoring and seems to be different with the base Lucene score
algorithm. what confused me is, it seems that there are two options for me,
one is, I can configurate custom scoring script in ES, the other one is I
should build my own Lucene scorer.

Can anybody give me some advice on which approach I should take? or is
there any missunderstanding I have. Since I have not very clear about ES
and Lucene, maybe there are some other ways to solve my questions and more
suitable in my case. Thanks a lot!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for your advice.
As I imagined, the scoring algorithm should based on the values of fields
and further work on these values, maybe more complex. You said, maybe I
need to implement my own similarity module, is that mean, I should write my
scripts which are responsible for scoring and then build in ES as a plugin
like this example showed:
GitHub - imotov/elasticsearch-native-script-example: Example of Now Deprecated Native Script Plugin for Elasticsearch. So it is
possible that I don't need to do something in Lucene? I think that will be
easier for me. Thanks!

在 2013年9月13日星期五UTC+2上午11时35分10秒,Clinton Gormley写道:

It kinda depends how complex your scoring algorithm needs to be. If it is
just an algorithm based on the values contained in fields in each doc, then
a custom_score script may be what you want. If it is more complex, then you
may need to implement your own similarity module.

clint

On 12 September 2013 21:52, 少爷允之 <chang....@googlemail.com <javascript:>>wrote:

I'm using elasticsearch to do some similarity comparison among process
models. The core similarity algorithm should be specialized for my process
models, which means, as my imagined, I should customize the score algorithm
in elasticsearch.

As I known, the scoring in ES is based on Lucene score algorithm.
Although Lucene's DefaultSimilarity works quite well on most of the cases
and one can use other similarities in ES like BM25,DRF, such customizing
usually extending the existed Lucene classes or overriding its methods to
change or disable some weights in my opinion.

In my case, I'd like to make some specialized math things which should be
used as scoring and seems to be different with the base Lucene score
algorithm. what confused me is, it seems that there are two options for me,
one is, I can configurate custom scoring script in ES, the other one is I
should build my own Lucene scorer.

Can anybody give me some advice on which approach I should take? or is
there any missunderstanding I have. Since I have not very clear about ES
and Lucene, maybe there are some other ways to solve my questions and more
suitable in my case. Thanks a lot!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.