# Autocomplete search and sort on the same field

**URL:** <https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289>\
**Category:** Elasticsearch\
**Created:** [October 25, 2017, 7:58pm UTC](https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289 "2017-10-25T19:58:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![darrenm](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@darrenm](https://discuss.elastic.co/u/darrenm)\
**Post date:** [October 25, 2017, 7:58pm UTC](https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289/1 "2017-10-25T19:58:45Z")

</div>

Is there a way to apply autocomplete (edge\_ngram tokenizer) and case insensitive search on the same string field?

For general search/sort we have been using (i'm using yaml format here for easier reading)

```
normalizer:
                    case_insensitive:
                        type: custom
                        filter:
                          - lowercase
                          - asciifolding

```

as in

```
my_field:
                    type: keyword
                    normalizer: case_insensitive

```

but trying to add edge\_ngram, I'm not sure what to do or if that can even be done?

We require case insensitive sorting and partial word search on the same field(s).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 27, 2017, 3:07pm UTC](https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289/2 "2017-10-27T15:07:14Z")

</div>

why dont you try a [multi field](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/multi-fields.html) - no need to mix fields up which serve different use-cases

---

<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:** [November 24, 2017, 3:07pm UTC](https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289/3 "2017-11-24T15:07:14Z")

</div>

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