# Issues while search results having special charecters

**URL:** <https://discuss.elastic.co/t/issues-while-search-results-having-special-charecters/362687>\
**Category:** Elasticsearch\
**Created:** [July 8, 2024, 9:37am UTC](https://discuss.elastic.co/t/issues-while-search-results-having-special-charecters/362687 "2024-07-08T09:37:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NSGokul](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@NSGokul](https://discuss.elastic.co/u/NSGokul)\
**Post date:** [July 8, 2024, 9:37am UTC](https://discuss.elastic.co/t/issues-while-search-results-having-special-charecters/362687/1 "2024-07-08T09:37:49Z")

</div>

I'm working on an Elasticsearch application for searching person data, including names in both English and French. I've completed the data indexing process.

**Current Issue:**

1. **Case Sensitivity:** Searching for "Francois" doesn't match documents containing "françois" or "François."
2. **Special Characters:** Names with accents (e.g., François) don't match searches without them (e.g., francois).
3. **Removing ASCII Characters:** My current approach of removing ASCII characters during search hinders accurate matching for French names.

**Desired Outcome:**

I want to achieve case-insensitive and special character-insensitive matching for French names in my Elasticsearch search. This means:

- Searching for "francois" should match documents containing "Francois," "françois," and potentially variations like "francois" (depending on the approach).
- Accents and other relevant special characters in French names should not affect search results.

Is there a way to achieve this?

---

<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, 2024, 9:51am UTC](https://discuss.elastic.co/t/issues-while-search-results-having-special-charecters/362687/2 "2024-07-08T09:51:42Z")

</div>

Welcome.

Have a look at [Language analyzers | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html#french-analyzer)

That will help you to build this.

---

<div class="post-metadata">

**Author:** ![NSGokul](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@NSGokul](https://discuss.elastic.co/u/NSGokul)\
**Post date:** [July 8, 2024, 10:13am UTC](https://discuss.elastic.co/t/issues-while-search-results-having-special-charecters/362687/3 "2024-07-08T10:13:51Z")

</div>

Hi @dadoonet  
I've tried analyzers . The following is the analyzer I am using

```auto
**filters**
 "french_stop": {
              "type": "stop",
              "stopwords": "_french_"
            },
             "french_stemmer": {
              "name": "french",
              "type": "stemmer"
            },
        "french_elision": {
              "type": "elision",
              "articles": [
                "l",
                "m",
                "t",
                "qu",
                "n",
                "s",
                "j",
                "d",
                "c",
                "jusqu",
                "quoiqu",
                "lorsqu",
                "puisqu"
              ],
              "articles_case": "true"
            },
**Analyzer**
 "french": {
              "filter": [
                "lowercase",
                "french_stop",
                "french_stemmer",
                "french_elision"
              ],
              "tokenizer": "standard"
            }
          }

```

and I will share the result from the analyze api

 ![Screenshot from 2024-07-08 15-37-14](https://us1.discourse-cdn.com/elastic/original/3X/b/3/b3e94d3c51b9477ff05dda317980005ec734a00e.png)

This one not cover my expected results -\>  
If the input is **francois** then I want to match the records which contains **françois** as an exact match (right now its working with fuzziness).  
Is there anything I am missing in my analyzers?

---

<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, 2024, 11:04am UTC](https://discuss.elastic.co/t/issues-while-search-results-having-special-charecters/362687/4 "2024-07-08T11:04:44Z")

</div>

You need to add an asciifolding token filter as well.

And the test what happens when you analyze `françois` with the `french` analyzer.
