# elasticsearch.exceptions.RequestError: RequestError(400, 'search\_phase\_execution\_exception', '\[match\] analyzer \[name\_phonetic\] not found')

**URL:** <https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572>\
**Category:** Elasticsearch\
**Created:** [November 18, 2021, 10:20am UTC](https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572 "2021-11-18T10:20:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pk5859](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@pk5859](https://discuss.elastic.co/u/pk5859)\
**Post date:** [November 18, 2021, 10:20am UTC](https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572/1 "2021-11-18T10:20:59Z")

</div>

```auto
Mapping example-

    spouseNameQuery = {
        "match": {
            "Spouse_Name": {
                # "query": input_dict['Spouse_Name'],
                "query": val,
                "analyzer": "name_phonetic",
                "prefix_length": 1,
                "minimum_should_match": "100%"
            }
        }
    }

    body = {"query": {"bool": Dict_all}, "highlight": {
        "fields": {
            "Home_Address": {}, "Email_Id": {}, "Mobile_No": {}, "BankAcDetails": {}
        }
    }}
    print("The elastic query is:-\n", body)
    res = client.search(index=_index,body=body, size=2000, request_timeout=30)

```

---

<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:** [November 18, 2021, 12:13pm UTC](https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572/2 "2021-11-18T12:13:47Z")

</div>

Welcome!

Where/how did you define this `name_phonetic` analyzer?

---

<div class="post-metadata">

**Author:** ![pk5859](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@pk5859](https://discuss.elastic.co/u/pk5859)\
**Post date:** [November 18, 2021, 12:46pm UTC](https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572/3 "2021-11-18T12:46:23Z")

</div>

yes i have defined it in the schema/mapping like this:

```auto
"analyzer": {
            
                        "name_phonetic": {
                            "filter": [
                                "icu_normalizer",
                                "icu_folding",
                                "punct_white",
                                "phonetic",
                                "lowercase",
                                "trim"
                            ],
                            "tokenizer": "standard"
                        },

```

---

<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:** [November 18, 2021, 2:03pm UTC](https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572/4 "2021-11-18T14:03:40Z")

</div>

I think that you are running the query against an index which does not have this analyzer.

If you still can't fix the problem, 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:** [December 16, 2021, 2:03pm UTC](https://discuss.elastic.co/t/elasticsearch-exceptions-requesterror-requesterror-400-search-phase-execution-exception-match-analyzer-name-phonetic-not-found/289572/5 "2021-12-16T14:03:56Z")

</div>

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