Query that return similar words

I have a document that contains "chnik" word in a field and i want to return it in the result if i search for "china" word.

Query used:

    {
      "query": {
        "query_string": {
    			"query": "*china* *chin* OR china~ chin~ chi*~"
    		}
      }
    }

but this query doesn't return the document that contains "chnik" word.
Any help?

This works:

DELETE test 
POST test/_doc
{
  "name": "chnik"
}
GET test/_search
{
  "query": {
    "multi_match": {
      "query": "china",
      "fields": [ "name" ],
      "fuzziness": 2
    }
  }
}
1 Like

Thanks it works

but what means "fuzziness": 2 in the query?

Have a look at Fuzzy query | Elasticsearch Guide [7.12] | Elastic

1 Like

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