# Index: no but field still searchable? ES 2.3.x

**URL:** https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814
**Category:** Elasticsearch
**Created:** [October 12, 2016, 2:08pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814 "2016-10-12T14:08:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Blight](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Blight](https://discuss.elastic.co/u/Blight)
#### Post date: [October 12, 2016, 2:08pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814/1 "2016-10-12T14:08:38Z")

</div>

Hi,

I have one field that has "index": "no", but I can see that it's still searchable in Kibana, what could be the issue? I can't find the problem here, it's running on ES 2.3. By still searchable in Kibana it's because I see that the zoom icon on the field is black and not greyed when your field is not searchable.

Field mapping:

```
{  
  app-2016.10.12:{  
    mappings:{  
      app-syslog:{  
        response:{  
          full_name:"response",
          mapping:{  
            response:{  
              type:"string",
              index:"no"
            }
          }
        }
      }
    }
  }
}

```

This is the template I'm using:

```
{
    "order": 0,
    "template": "*",
    "mappings": {
        "app-syslog": {
            "properties": {
                "request": { "index": "no", "type": "string" },
                "response": { "index": "no", "type": "string" }
            }
        },
        "_default_": {
            "_all": {
                "enabled": true
            },
            "_source": {
                "enabled": true
            },
            "dynamic_templates": [
                {
                    "notanalyzed": {
                        "match": "*",
                        "match_mapping_type": "string",
                        "mapping": {
                            "type": "string",
                            "index": "not_analyzed",
                            "include_in_all": true
                        }
                    }
                }
            ]
        }
    }
}
```

---

<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: [October 12, 2016, 2:20pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814/2 "2016-10-12T14:20:44Z")

</div>

I guess it's because Kibana is using `_all` field?  
If you search for `request:XYZ` instead of `XYZ` you should see that this field is not searchable.

My 2 cents.

---

<div class="post-metadata">

### Author: ![Blight](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Blight](https://discuss.elastic.co/u/Blight)
#### Post date: [October 12, 2016, 2:25pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814/3 "2016-10-12T14:25:17Z")

</div>

I thought that too, but the doc says that index: no disables "include\_in\_all" by default.

[https://www.elastic.co/guide/en/elasticsearch/reference/2.3/include-in-all.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/include-in-all.html)

---

<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: [October 12, 2016, 3:21pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814/4 "2016-10-12T15:21:42Z")

</div>

Yeah my bad. Not supposed to be indexed at all.

I did not reproduce your issue:

```auto
DELETE test
PUT test
PUT test/type/_mapping
{
  "type": {
    "properties": {
      "request": {
        "index": "no",
        "type": "string"
      },
      "response": {
        "type": "string"
      }
    }
  }
}
PUT test/type/1
{
  "request": "abc",
  "response": "def"
}
GET test/_search
{
  "query": {
    "query_string": {
      "query": "abc"
    }
  }
}
GET test/_search
{
  "query": {
    "query_string": {
      "query": "def"
    }
  }
}

```

Your mapping looks super strange to me:

```auto
{  
  app-2016.10.12:{  
    mappings:{  
      app-syslog:{  
        response:{  
          full_name:"response",
          mapping:{  
            response:{  
              type:"string",
              index:"no"
            }
          }
        }
      }
    }
  }
}

```

It does not look at all at what it should be (see my example)

---

<div class="post-metadata">

### Author: ![Blight](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@Blight](https://discuss.elastic.co/u/Blight)
#### Post date: [October 12, 2016, 6:25pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814/5 "2016-10-12T18:25:12Z")

</div>

Thank you, going to try this method if I can reproduce 🙂

---

<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, 10:12pm UTC](https://discuss.elastic.co/t/index-no-but-field-still-searchable-es-2-3-x/62814/6 "2017-07-05T22:12:57Z")

</div>


