I think but I might be wrong that you can use a function_score with a script 
and run a script like :

"script_score" : {
    "script" : "_score > 1.0 ? 1.0 : _score"
}



-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 27 mai 2014 à 13:56:32, [email protected] ([email protected]) a écrit:

Sadly, this doesn't work, as max_boost only cuts the scores off at that point. 

Am Dienstag, 27. Mai 2014 13:37:22 UTC+2 schrieb David Pilato:
May be using function_score? 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#_using_function_score

The new score can be restricted to not exceed a certain limit by setting the 
max_boostparameter. The default for max_boost is FLT_MAX.



-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 27 mai 2014 à 13:34:26, [email protected] ([email protected]) a écrit:

Hello,

is it possible to normalize the scores of a query so that the highest scoring 
document gets a score of 1 and the others a scaled score < 1? 

Thanks
--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/281e7890-01f1-4bcf-bc0f-7a2c95e407be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/ce14b963-d7a6-4abb-9bad-ae23c135af04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/etPan.5384c700.79e2a9e3.28b%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to