Enable Soundex query

I am using elasticsearch 7.0.1 and trying to enable soundex query

  1. First I tried to add following config in elasticsearch.yml
    index:
    analysis:
    analyzer:
    search_soundex:
    type: custom
    tokenizer: soundex_filter
    filter:
    soundex_filter:
    type: phonetic
    encoder: soundex
    replace: true

But it gave an error as "Caused by: java.lang.IllegalArgumentException: node settings must not contain any index level settings"

  1. Then I removed above settings and added following while in PUT request of creating the index
    {
    "settings": {
    "analysis": {
    "analyzer": {
    "search_soundex": {
    "type": "custom",
    "tokenizer": "soundex_filter",
    "filter": [{
    "soundex_filter": {
    "type": "phonetic",
    "encoder": "soundex",
    "replace": true }
    }]
    }
    }
    }
    }
    }

But that also gave following error
{"error":{"root_cause":[{"type":"settings_exception","reason":"Failed to load settings from [{"analysis":{"analyzer":{"search_soundex":{"filter":[{"soundex_filter":{"replace":true,"type":"phonetic","encoder":"soundex"}}],"type":"custom","tokenizer":"soundex_filter"}}}}]"}],"type":"settings_exception","reason":"Failed to load settings from [{"analysis":{"analyzer":{"search_soundex":{"filter":[{"soundex_filter":{"replace":true,"type":"phonetic","encoder":"soundex"}}],"type":"custom","tokenizer":"soundex_filter"}}}}]","caused_by":{"type":"illegal_state_exception","reason":"only value lists are allowed in serialized settings"}},"status":500}

Can somebody please help

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