I am using elasticsearch dsl to search on elasticsearch : https://elasticsearch-dsl.readthedocs.org/en/latest/
How can i enable track_scores for the query ?
I know its supported in elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_track_scores
Just dont know how to do the same in Elasticsearch-dsl
I found this mentioned in the documentation:
http://elasticsearch-dsl.readthedocs.org/en/latest/search_dsl.html#extra-properties-and-parameters
s = s.extra(track_scores=True)
This worked.
来源:https://stackoverflow.com/questions/33799486/how-to-enable-track-scores-in-elasticsearch-dsl-python