Can't get proper result from elasticsearch based on query and document tokenization Can't get proper result from elasticsearch based on query and document tokenization elasticsearch elasticsearch

Can't get proper result from elasticsearch based on query and document tokenization


I found this DevTicks post by Ricardo Heck which solved my problem.enter the link for more detailed description

I changed my mapping setting like this:

    "mappings": {    "_doc": {      "properties": {        "title": {          "type": "text",          "analyzer": "autocomplete",          "search_analyzer": "autocomplete_search",          "fields": {            "ngram": {              "type": "text",              "analyzer": "autocomplete"            }          }        }      }    }  }

And now I get doc "آلمان خوب است" by searching the term "آلمانی".