# Return Results With Diatrics

**URL:** <https://discuss.elastic.co/t/return-results-with-diatrics/278123>\
**Category:** Elasticsearch\
**Created:** [July 8, 2021, 2:31am UTC](https://discuss.elastic.co/t/return-results-with-diatrics/278123 "2021-07-08T02:31:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbobbala](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@hbobbala](https://discuss.elastic.co/u/hbobbala)\
**Post date:** [July 8, 2021, 2:31am UTC](https://discuss.elastic.co/t/return-results-with-diatrics/278123/1 "2021-07-08T02:31:18Z")

</div>

Hi All,  
I'm trying to return results for names with Diacritics . I want to be able to search using regular characters and receive all results, including names with diacritics (Example: want to search for Jose and return all results with Jóse).  
I have updated my settings to the following:

```auto
{
            "analysis": {
          "filter": {
            "edge_ngram_filter": {
              "type": "edgeNGram",
              "min_gram": "1",
              "max_gram": "25"
            },
             "my_ascii_folding": {
                "type": "asciifolding",
                "preserve_original": "true"
              } 
          },
          "normalizer": {
            "keyword_normalizer": {
              "filter": [
                "lowercase"
              ],
              "type": "custom",
              "char_filter": []
            }
          },
          "analyzer": {
            "input_analyzer": {
              "filter": [
                "lowercase",
                "my_ascii_folding"
              ],
              "type": "custom",
              "tokenizer": "whitespace"
            },
            "autocomplete": {
              "filter": [
                "lowercase", 
                "edge_ngram_filter"             
              ],
              "type": "custom",
              "tokenizer": "whitespace"
            },
            "email_analyzer": {
              "tokenizer": "email_tokenizer"
            }
          },
          "tokenizer": {
            "email_tokenizer": {
              "type": "uax_url_email"
            }
          }
        }
        }

```

The following is the sample mapping:

```auto
"lastName": {
            "type": "text",
            "fields": {
              "aggregation": {
                "type": "keyword"
              },
              "keyword": {
                "type": "keyword",
                "normalizer": "keyword_normalizer"
              }
            },
            "analyzer": "autocomplete",
            "search_analyzer": "input_analyzer"
          }

```

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 8, 2021, 6:18am UTC](https://discuss.elastic.co/t/return-results-with-diatrics/278123/2 "2021-07-08T06:18:05Z")

</div>

It looks good but you need to add the `asciifolding` filter to the `autocomplete` analyzer.

And I'd:

- remove `preserve_original`
- first do the `asciifolding` and then `edge_gram` (for performance)

If it doesn't work, could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can **copy and paste in Kibana dev console** , click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<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:** [August 5, 2021, 6:18am UTC](https://discuss.elastic.co/t/return-results-with-diatrics/278123/3 "2021-08-05T06:18:12Z")

</div>

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