ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

It is not possible to set field at function_score random_score #965

Closed epicentrm closed 3 years ago

epicentrm commented 3 years ago

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.

epicentrm commented 3 years ago

Sorry, will move it to Elasticsearch-DSL repo