# In which order matched\_queries are reported?

**URL:** <https://discuss.elastic.co/t/in-which-order-matched-queries-are-reported/200498>\
**Category:** Elasticsearch\
**Created:** [September 20, 2019, 9:52pm UTC](https://discuss.elastic.co/t/in-which-order-matched-queries-are-reported/200498 "2019-09-20T21:52:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![germax](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@germax](https://discuss.elastic.co/u/germax)\
**Post date:** [September 20, 2019, 9:52pm UTC](https://discuss.elastic.co/t/in-which-order-matched-queries-are-reported/200498/1 "2019-09-20T21:52:02Z")

</div>

Names of named queries are written to "matched\_queries" field in the search output. Is it true that the order of names corresponds to the score the named query has? After some testing it seems sorted (highest -\> lowest) but the official documentation say nothing about it.

My goal is to identify the field that gives the best match to a query.

---

<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:** [October 18, 2019, 9:52pm UTC](https://discuss.elastic.co/t/in-which-order-matched-queries-are-reported/200498/2 "2019-10-18T21:52:05Z")

</div>

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