# Kept include\_in\_all:false in mapping?

**URL:** <https://discuss.elastic.co/t/kept-include-in-all-false-in-mapping/75494>\
**Category:** Elasticsearch\
**Created:** [February 17, 2017, 1:02pm UTC](https://discuss.elastic.co/t/kept-include-in-all-false-in-mapping/75494 "2017-02-17T13:02:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 17, 2017, 1:02pm UTC](https://discuss.elastic.co/t/kept-include-in-all-false-in-mapping/75494/1 "2017-02-17T13:02:22Z")

</div>

Hi,

If i kept include\_in\_all:False for a field in mapping then whether that field is searchable or not?  
If i kept include\_in\_all:True in mapping and index:false for a field whether i can able to search the  
the field?

Thanks..

---

<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:** [February 17, 2017, 2:53pm UTC](https://discuss.elastic.co/t/kept-include-in-all-false-in-mapping/75494/2 "2017-02-17T14:53:18Z")

</div>

Hi @Yaswanth,

`include_in_all` just prevents this field from being added to a somewhat magic field, called `_all` that is used as a catch-all field if you do simple queries and don't specify in which fields Elasticsearch should look. So if you set `include_in_all` to `false` these searches will indeed not find the respective documents anymore (see also the [Definitive Guide](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/search-lite.html#all-field-intro)).

The gist is that you need you specify that you want to search in that specific field. Then everything is fine. If you - however - also set `index:false` you're telling Elasticsearch that you do not want to index this field and it is thus _not_ searchable.

Daniel

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 17, 2017, 3:39pm UTC](https://discuss.elastic.co/t/kept-include-in-all-false-in-mapping/75494/3 "2017-02-17T15:39:44Z")

</div>

Thanks 🙂 @danielmitterdorfer

---

<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:** [March 17, 2017, 3:40pm UTC](https://discuss.elastic.co/t/kept-include-in-all-false-in-mapping/75494/4 "2017-03-17T15:40:10Z")

</div>

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