# "doc\_values: False" not working for simple\_query\_string

**URL:** <https://discuss.elastic.co/t/doc-values-false-not-working-for-simple-query-string/237310>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 1:42pm UTC](https://discuss.elastic.co/t/doc-values-false-not-working-for-simple-query-string/237310 "2020-06-16T13:42:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool\_arun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_arun/32/70465_2.png) [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Post date:** [June 16, 2020, 1:42pm UTC](https://discuss.elastic.co/t/doc-values-false-not-working-for-simple-query-string/237310/1 "2020-06-16T13:42:49Z")

</div>

Hi, I've set "doc\_values": false for some fields because of this when I try to use this in simple\_query\_string it's not searching over those fields, but if I remove the fields parameter from simple\_query\_string it searches over that field.

```auto
**mapping:**
    {
      "name": {
            "properties": { 
                     "type":"keyword",
                     "doc_values":False
              }
    }

**document**
    { "name": "riswan"}

**query**

    { 
      "simple_query_string": {
            "query": "riswan",
            "fields": ["name"] //not working
      }
    }

  { 
      "simple_query_string": {
            "query": "riswan",
            "fields": [] //working
      }
    }

```

---

<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 14, 2020, 1:54pm UTC](https://discuss.elastic.co/t/doc-values-false-not-working-for-simple-query-string/237310/2 "2020-07-14T13:54:08Z")

</div>

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