we've been using ElasticSearch for approximately 2 years. We've developed a plugin that computes a custom similarity between a query and some documents. We use the plugin in order to quickly find duplicate records in our database. Our plugin is a custom script extending the AbstractSearchScript class.
We are in the process of migrating to ElasticSearch 5.x (we are currently using 1.4).
However, we've encountered a problem - we are currently using the SearchContext.current() method to access the query information, in particular we need to access analyzed fields.
This method seems to have been removed.
Is there another way to access the query information within a plugin?