# \_all field as not analyzed

**URL:** <https://discuss.elastic.co/t/-all-field-as-not-analyzed/55522>\
**Category:** Elasticsearch\
**Created:** [July 14, 2016, 1:02pm UTC](https://discuss.elastic.co/t/-all-field-as-not-analyzed/55522 "2016-07-14T13:02:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![augusto-altman](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@augusto-altman](https://discuss.elastic.co/u/augusto-altman)\
**Post date:** [July 14, 2016, 1:02pm UTC](https://discuss.elastic.co/t/-all-field-as-not-analyzed/55522/1 "2016-07-14T13:02:07Z")

</div>

Hello everybody,

How can I set the \_all field as a not analyzed field?

The thing is I'm receiving documents with dynamic data structures (so I don't know on before hand the fields that I'm storing) and I need to perform queries over all the fields.

For example I may have indexed:

```
DOC_1
{
    a: 'sdf-sdf-qas-bn'
    b: 'hello world'
}

DOC_2
{
    b: 'rty-cv--laksd-sdf'
    c: 'good bye world'
    e: 'sdf-sdf-qas-bn'
}

DOC_3
{
    zzz: 'zzz33'
    k: 'a-sdf-sdf-qas-bn'
}

```

So in such case if I perform a query for getting a document that contains the string 'sdf-sdf-qas-bn' I want to receive DOC\_1 and DOC\_2

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 14, 2016, 9:52pm UTC](https://discuss.elastic.co/t/-all-field-as-not-analyzed/55522/2 "2016-07-14T21:52:44Z")

</div>

> [@augusto-altman](#):
>
> How can I set the \_all field as a not analyzed field?

You cannot set analysis on fields like `_all`, `_source`, `_id` etc.

---

<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:35pm UTC](https://discuss.elastic.co/t/-all-field-as-not-analyzed/55522/3 "2017-07-05T22:35:24Z")

</div>


