# Do I need to turn analyzer off for match all query?

**URL:** <https://discuss.elastic.co/t/do-i-need-to-turn-analyzer-off-for-match-all-query/132546>\
**Category:** Elasticsearch\
**Created:** [May 19, 2018, 1:32am UTC](https://discuss.elastic.co/t/do-i-need-to-turn-analyzer-off-for-match-all-query/132546 "2018-05-19T01:32:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hooman\_Bahreini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hooman_bahreini/32/29500_2.png) [@Hooman\_Bahreini](https://discuss.elastic.co/u/Hooman_Bahreini)\
**Post date:** [May 19, 2018, 1:32am UTC](https://discuss.elastic.co/t/do-i-need-to-turn-analyzer-off-for-match-all-query/132546/1 "2018-05-19T01:32:44Z")

</div>

I want to get the latest record added to ElasticSearch.

If I use a query like this:

```
{
  "query": {
    "match_all": {}
  },
  "size": 1,
  "sort": [
    {
      "_timestamp": {
        "order": "desc"
      }
    }
  ]
}

```

Would ElasticSearch score all the documents based on relevance? I mean do I need to explicitly tell ElasticSearch that "Do not analyze/score" match\_all query to improve the performance?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 25, 2018, 9:25am UTC](https://discuss.elastic.co/t/do-i-need-to-turn-analyzer-off-for-match-all-query/132546/2 "2018-05-25T09:25:25Z")

</div>

Hi,

no, the `match_all` query [does not score documents](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html).

Daniel

---

<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:** [June 22, 2018, 9:25am UTC](https://discuss.elastic.co/t/do-i-need-to-turn-analyzer-off-for-match-all-query/132546/3 "2018-06-22T09:25:35Z")

</div>

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