Elasticsearch rescore plugin how to get query object from context?

I want to write a custom Elasticsearch rescore plugin, Similar to using Levenshtein algorithm to calculate the similarity between the original query string and the query result. But how do I get the query object? It seems that I cannot retrieve the Query object from the RescoreContext and QueryShardContext

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.