# Mapping Properties : Index : false

**URL:** https://discuss.elastic.co/t/mapping-properties-index-false/134706
**Category:** Elasticsearch
**Created:** [June 5, 2018, 10:49pm UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706 "2018-06-05T22:49:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Clems](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Clems](https://discuss.elastic.co/u/Clems)
#### Post date: [June 5, 2018, 10:49pm UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706/1 "2018-06-05T22:49:30Z")

</div>

Hi everyone,  
In my mapping properties, for one of the fields, I added "index : false" , but ElasticSearch is still indexing it and this field is still searchable. However, when I ask for the mapping, I do have:

_"name" : {  
"type" : "text",  
"index" : false  
},_

Do I need to add something else to make it unindexed and unsearchable ?  
Thank you,  
Clement

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [June 5, 2018, 10:56pm UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706/2 "2018-06-05T22:56:07Z")

</div>

When I do this in v6.2

```auto
PUT test
{
  "mappings": {
    "doc": {
      "properties": {
        "name": {
          "type": "text",
          "index": false
        }
      }
    }
  }
}

PUT test/doc/1
{
  "name": "find me if you can"
}

POST test/doc/_search
{
  "query": {
    "match": {
      "name": "find"
    }
  }
}

```

I get an error message saying "Cannot search on field [name] since it is not indexed."

Which version are you using? Can you provide your mapping and the query?

---

<div class="post-metadata">

### Author: ![Clems](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Clems](https://discuss.elastic.co/u/Clems)
#### Post date: [June 5, 2018, 11:10pm UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706/3 "2018-06-05T23:10:34Z")

</div>

Thank you for your fast reply!  
I'm using Elasticsearch 6.2, and i forgot to mention that i'm also using Elasticquent.

My bad, I do have the same error when I query on this field. So this field is really unsearchable.

But is it normal that the field "name" and it's value still appear in the results among the other fields when I query : "[http://localhost:9200/myIndex/\_search?q=Mediolanum](http://localhost:9200/myIndex/_search?q=Mediolanum)" for example ? Is it possible to completely remove so I can free some space on the future Elasticsearch server.

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [June 5, 2018, 11:43pm UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706/4 "2018-06-05T23:43:03Z")

</div>

> [@Clems](#):
>
> But is it normal that the field "name" and it's value still appear in the results among the other fields

Yes. By default the entire document is stored in the special field `_source` as it was passed to elasticsearch. It is done independently from indexing, so your mapping doesn't have any effect on how source is stored.

There are few ways to remove these fields from the source. The fastest way would be not to send these fields to elasticsearch in the first place. If your indexing layer is inflexible, you can [remove](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/remove-processor.html) such fields using ingest node. Or you can [exclude fields](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/mapping-source-field.html#include-exclude) from the source when the source is stored.

---

<div class="post-metadata">

### Author: ![Clems](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Clems](https://discuss.elastic.co/u/Clems)
#### Post date: [June 6, 2018, 6:25am UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706/5 "2018-06-06T06:25:01Z")

</div>

Thank very much! It's clear to me now

---

<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 4, 2018, 6:25am UTC](https://discuss.elastic.co/t/mapping-properties-index-false/134706/6 "2018-07-04T06:25:05Z")

</div>

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