lz-mn
May 31, 2022, 9:43am
1
Hi, I'm trying to write a search query to:
perform an ANN search on a dense vector field
re-rank the returned documents to weight more recent documents higher, according to a custom exponential decay function applied to a 'date' field.
What is the best practice for doing this - using the query rescorer? Does Elasticsearch have built-in support for time weighting?
Thanks!
mayya
(Mayya Sharipova)
June 2, 2022, 6:17pm
2
At the moment _knn_search
endpoint doesn't support rescorers. So you would need to that on your application side.
But we are working on combining _search and _knn_search endpoints, which means there will be an option to use rescorer.
For time weighting, you can either use 1) script_score
query with decay functions on date fields or 2) function_score
query's decay functions
system
(system)
Closed
June 30, 2022, 6:17pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.