# Accessing analyzed query in scoring plugin

**URL:** <https://discuss.elastic.co/t/accessing-analyzed-query-in-scoring-plugin/38983>\
**Category:** Elasticsearch\
**Created:** [January 12, 2016, 1:46pm UTC](https://discuss.elastic.co/t/accessing-analyzed-query-in-scoring-plugin/38983 "2016-01-12T13:46:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gennady\_Andreev](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gennady\_Andreev](https://discuss.elastic.co/u/Gennady_Andreev)\
**Post date:** [January 12, 2016, 1:46pm UTC](https://discuss.elastic.co/t/accessing-analyzed-query-in-scoring-plugin/38983/1 "2016-01-12T13:46:43Z")

</div>

Hello.

I am trying to write a plugin that scores documents based on their similarity to search query (to use Elasticsearch as a translation memory database engine). I am aware of elasticsearch-entity-resolution-plugin, but it does not use analyzing.

I expect that all queries I will need will be match and multi\_match with just one text. In the scoring function I need access to the results of analysis of the query for all fields I'm searching (including relative positions of all tokens) and data from the same fields in the document being scored. In fact, I don't even need the tokens themselves, only knowledge of which of them are the same.

Is it at all possible to get this data and if it is, how can I do it? I only managed to get tokens of the document being scored, and they seem unordered.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:25pm UTC](https://discuss.elastic.co/t/accessing-analyzed-query-in-scoring-plugin/38983/2 "2017-07-05T23:25:11Z")

</div>


