Can we customized the overall result score using java?


(Sam-4) #1

Hi

I have question regarding result score:

  1. On which basis elastic search will calculate the over result score,can
    we manipulate(customized) over all result score.

  2. what is score mode and how can we define it.

Thanks

--


(Derry O' Sullivan) #2

Hi Sam,

It's worth checking out the custom scoring:
http://www.elasticsearch.org/guide/reference/query-dsl/custom-score-query.html

and explanation docs:
http://www.elasticsearch.org/guide/reference/api/explain.html

to see how a score is calculated and also how you can change/create your
own custom scoring.

On 25 September 2012 10:22, sam mishra.sameek@gmail.com wrote:

Hi

I have question regarding result score:

  1. On which basis elastic search will calculate the over result score,can
    we manipulate(customized) over all result score.

  2. what is score mode and how can we define it.

Thanks

--

--


(Derry O' Sullivan) #3

For java, you can take an existing querybuilder object and wrap it in a
customScore script e.g:
customScoreQuery(qb1).param("param1", 0.3).param("param2",
0.9).script("doc.score * (doc['count'].value/doc['numVotes'].value)");

Check out the customScoreBuilder doc
http://es-java-doc.medcl.net/org/elasticsearch/index/query/CustomScoreQueryBuilder.html

On 25 September 2012 10:26, Derry O' Sullivan derryos@gmail.com wrote:

Hi Sam,

It's worth checking out the custom scoring:

http://www.elasticsearch.org/guide/reference/query-dsl/custom-score-query.html

and explanation docs:
http://www.elasticsearch.org/guide/reference/api/explain.html

to see how a score is calculated and also how you can change/create your
own custom scoring.

On 25 September 2012 10:22, sam mishra.sameek@gmail.com wrote:

Hi

I have question regarding result score:

  1. On which basis elastic search will calculate the over result score,can
    we manipulate(customized) over all result score.

  2. what is score mode and how can we define it.

Thanks

--

--


(Sam-4) #4

I am using elastic-search 0.16.2 and impossible to move higher version for
now ,can you suggest another option.

On Tuesday, September 25, 2012 2:52:59 PM UTC+5:30, sam wrote:

Hi

I have question regarding result score:

  1. On which basis elastic search will calculate the over result score,can
    we manipulate(customized) over all result score.

  2. what is score mode and how can we define it.

Thanks

--


(Derry O' Sullivan) #5

Hi Sam,

I'm a pretty new ES user so not sure about backwards compatibility with the
Java jar for 0.16.2. If you don't have customScoreQueryBuilder classes,
i'll defer to one of the ES experts!

On 25 September 2012 10:33, sam mishra.sameek@gmail.com wrote:

I am using elastic-search 0.16.2 and impossible to move higher version for
now ,can you suggest another option.

On Tuesday, September 25, 2012 2:52:59 PM UTC+5:30, sam wrote:

Hi

I have question regarding result score:

  1. On which basis elastic search will calculate the over result score,can
    we manipulate(customized) over all result score.

  2. what is score mode and how can we define it.

Thanks

--

--


(system) #6