ElasticsearchDSL
ElasticsearchDSL copied to clipboard
It is not possible to set field at function_score random_score
According to elasticsearch documentation:
It was possible to set a seed without setting a field, but this has been deprecated as this requires loading fielddata on the _id field which consumes a lot of memory.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-random
We need to have optional parameter field at addRandomFunction method, as deprecated case and required field in the future major releases of library.