# Accent-insensitive search

**URL:** <https://discuss.elastic.co/t/accent-insensitive-search/218404>\
**Category:** Elasticsearch\
**Created:** [February 7, 2020, 8:36pm UTC](https://discuss.elastic.co/t/accent-insensitive-search/218404 "2020-02-07T20:36:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielchodusov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielchodusov/32/35786_2.png) [@danielchodusov](https://discuss.elastic.co/u/danielchodusov)\
**Post date:** [February 7, 2020, 8:36pm UTC](https://discuss.elastic.co/t/accent-insensitive-search/218404/1 "2020-02-07T20:36:25Z")

</div>

Hi, after spending hours trying to figure out I need a help with:

**How to search accent-insensitive + case insensitive?**

I have created an index:

```auto
curl -X PUT "localhost:9200/my_index?pretty" -H 'Content-Type: application/json' -d'
{
  "settings": {
    "analysis": {
      "analyzer": {
        "foo": { 
          "type": "custom",
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "asciifolding"
          ]
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "text": {
        "type": "text",
        "analyzer": "foo", 
        "search_analyzer": "foo" 
      }
    }
  }
}
'

```

Insert data:

```auto
curl -X PUT "localhost:9200/my_index/_doc/1?pretty" -H 'Content-Type: application/json' -d'
{
  "text": "Perlová" 
}
'

```

And then try to search the steet name:

```auto
curl -X GET "localhost:9200/my_index/_search?pretty" -H 'Content-Type: application/json' -d'
{
  "query": {
    "match": {
      "text": {
        "query": "perlova"
      }
    }
  }
}
'

```

I would expected to get the result, but nothing is found. It works only If I write the exact word with all accents, but I also need the street to be found, when I search it without accent. Any help would be appreciated. Thank you.

---

<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:** [February 10, 2020, 5:12pm UTC](https://discuss.elastic.co/t/accent-insensitive-search/218404/2 "2020-02-10T17:12:02Z")

</div>

I tried it on 7.5.2:

```auto
DELETE /my_index
PUT /my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "foo": { 
          "type": "custom",
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "asciifolding"
          ]
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "text": {
        "type": "text",
        "analyzer": "foo", 
        "search_analyzer": "foo" 
      }
    }
  }
}
PUT /my_index/_doc/1?refresh=true
{
  "text": "Perlová" 
}
GET /my_index/_search
{
  "query": {
    "match": {
      "text": {
        "query": "perlova"
      }
    }
  }
}

```

And I got back:

```auto
{
  "took" : 0,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 0.2876821,
    "hits" : [
      {
        "_index" : "my_index",
        "_type" : "_doc",
        "_id" : "1",
        "_score" : 0.2876821,
        "_source" : {
          "text" : "Perlová"
        }
      }
    ]
  }
}

```

---

<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 9, 2020, 5:13pm UTC](https://discuss.elastic.co/t/accent-insensitive-search/218404/3 "2020-03-09T17:13:36Z")

</div>

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