# Can't query an edge\_ngram field in \_all

**URL:** <https://discuss.elastic.co/t/cant-query-an-edge-ngram-field-in--all/53603>\
**Category:** Elasticsearch\
**Created:** [June 22, 2016, 3:28am UTC](https://discuss.elastic.co/t/cant-query-an-edge-ngram-field-in--all/53603 "2016-06-22T03:28:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codenoble](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/codenoble/32/10467_2.png) [@Codenoble](https://discuss.elastic.co/u/Codenoble)\
**Post date:** [June 22, 2016, 3:28am UTC](https://discuss.elastic.co/t/cant-query-an-edge-ngram-field-in--all/53603/1 "2016-06-22T03:28:53Z")

</div>

So I'm setting up an index and I'd like to have a single search that would do a partial-word `edge_ngram` search for one field and a more normal search of the rest of the fields. From what I understand this should be easy to do by just matching on `_all`. However I just can't seem to make it work.

I have been able to get the desired results from a `bool` query that searches `_all` and the specific ngram field separately but that seems hackey and I'm guessing there's just something simple that I'm missing.

Here is just a minimal example to show what I'm doing and how it's not working for me.

> <https://gist.github.com/adamcrown/a600fc587c2c4abd4b67b2812e6e8f7d>

And my StackOverflow question in case you'd rather answer there:

> <https://stackoverflow.com/questions/37958011/cant-query-an-edge-ngram-field-in-all>

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Codenoble](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/codenoble/32/10467_2.png) [@Codenoble](https://discuss.elastic.co/u/Codenoble)\
**Post date:** [June 22, 2016, 6:44am UTC](https://discuss.elastic.co/t/cant-query-an-edge-ngram-field-in--all/53603/2 "2016-06-22T06:44:25Z")

</div>

For anybody who may run into this later, I found an [answer on Stack Overflow](http://stackoverflow.com/questions/37958011/cant-query-an-edge-ngram-field-in-all/37960064).

I was assuming that the tokenized values were added to `_all` but it seems that the original values are added to `_all` and then tokenized as a whole. So I just had to set the tokenizer on `_all`.

---

<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:41pm UTC](https://discuss.elastic.co/t/cant-query-an-edge-ngram-field-in--all/53603/3 "2017-07-05T22:41:31Z")

</div>


