# Custom analyzer don't match with ASCII folding filter values

**URL:** <https://discuss.elastic.co/t/custom-analyzer-dont-match-with-ascii-folding-filter-values/208576>\
**Category:** Elasticsearch\
**Created:** [November 19, 2019, 8:15pm UTC](https://discuss.elastic.co/t/custom-analyzer-dont-match-with-ascii-folding-filter-values/208576 "2019-11-19T20:15:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faruk](https://avatars.discourse-cdn.com/v4/letter/f/ebca7d/32.png) [@faruk](https://discuss.elastic.co/u/faruk)\
**Post date:** [November 19, 2019, 8:15pm UTC](https://discuss.elastic.co/t/custom-analyzer-dont-match-with-ascii-folding-filter-values/208576/1 "2019-11-19T20:15:21Z")

</div>

I'm using a custom rebuilt turkish analyzer like this:

```auto
"analysis": {
      "filter":{
        "turkish_lowercase": {
          "type": "lowercase",
          "language": "turkish"
        },
        "turkish_stop": {
          "type": "stop",
          "stopwords": "_turkish_" 
        },
        "my_ascii_folder":{
          "type" : "asciifolding",
          "preserve_original" : true
        }
      },
      "analyzer": {
        "rebuilt_turkish": {
          "tokenizer": "standard",
          "filter": [
            "turkish_lowercase",
            "my_ascii_folder"
          ]
        }
      }
    }

```

My data is in turkish language. I'm using data folding to match for all possible inputs(for example assuming _icralik_ and _ıcralık_ as same, **ı is a different vowel than i** )

My text contains this sentence:

> ...kartlarının borcundan dolayı _ **icralık duruma** _ düşmesi üzerine...

When I test my text with the **\_analyze** api using my custom analyzer, I get this result as I expected ( **icralık** is the original version inside the text and **icralik** is the folded one):

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/2/a2a1a6779552091ba768d9fda0314278f3eb751f.png)

When I search for **"icralık duruma"** I can get the result without a problem:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/0/106b6fc740eae4710bcb7fe8306eff6a95daabc5.png)

But when I execute the same search query with folded text **"icralik duruma"** I get no results:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/4/04aab223cf4bcff61d220d405807d9335ba7ba36.png)

What am I doing wrong?

---

<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:** [December 17, 2019, 8:15pm UTC](https://discuss.elastic.co/t/custom-analyzer-dont-match-with-ascii-folding-filter-values/208576/2 "2019-12-17T20:15:24Z")

</div>

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