# Query\_string still returns results although \_all field is disabled

**URL:** <https://discuss.elastic.co/t/query-string-still-returns-results-although--all-field-is-disabled/80916>\
**Category:** Elasticsearch\
**Created:** [April 2, 2017, 7:50am UTC](https://discuss.elastic.co/t/query-string-still-returns-results-although--all-field-is-disabled/80916 "2017-04-02T07:50:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [April 2, 2017, 7:50am UTC](https://discuss.elastic.co/t/query-string-still-returns-results-although--all-field-is-disabled/80916/1 "2017-04-02T07:50:19Z")

</div>

Hello.

My environment is _elasticsearch 5.3.0_.

I am testing queries through kibana to see what happens if the \_all field is disabled. To save memory space, I am thinking of disabling **all field** but result of query string was not the same as written in the [document](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-all-field.html#disabling-all-field).

I have a indice which has \_all field disabled as below.

```
{
  "indice1": {
    "mappings": {
      "type1": {
        "_all": {
          "enabled": false
        },
        "properties": {
          "text": {
            "type": "text"
          }
        }
      }
    }
  }
}

```

However, after I indexed document as below,

```
POST indice1/type1
{
  "text" : "渡辺" 
}

```

and do a **query\_string** , I expect no hits but there is one.

```
GET indice1/type1/_search
{
  "query" : {
    "query_string" : {
      "query" : "渡辺"
    }
  }
}

```

Result

```
{
  "took": 9,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 0.51623213,
    "hits": [
      {
        "_index": "indice1",
        "_type": "type1",
        "_id": "AVstmBVkFzCqOmarGmV1",
        "_score": 0.51623213,
        "_source": {
          "text": "渡辺"
        }
      }
    ]
  }
}

```

Result is also shown on Kibana discovery as well.

I though there should be no hits. **Am I understanding the query\_string wrongly?**

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2017, 8:29am UTC](https://discuss.elastic.co/t/query-string-still-returns-results-although--all-field-is-disabled/80916/2 "2017-04-02T08:29:43Z")

</div>

I know that this is expected for 6.0 version as we will remove \_all field but will keep the feature of searching inside the document whichever field.

I don't know if this is supposed to work already in 5.3 though.

---

<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:** [April 30, 2017, 8:29am UTC](https://discuss.elastic.co/t/query-string-still-returns-results-although--all-field-is-disabled/80916/3 "2017-04-30T08:29:43Z")

</div>

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