abdess
(Abdessamad)
May 12, 2021, 3:31pm
1
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?
dadoonet
(David Pilato)
May 12, 2021, 4:51pm
2
This works:
DELETE test
POST test/_doc
{
"name": "chnik"
}
GET test/_search
{
"query": {
"multi_match": {
"query": "china",
"fields": [ "name" ],
"fuzziness": 2
}
}
}
1 Like
abdess
(Abdessamad)
May 12, 2021, 6:25pm
3
Thanks it works
but what means "fuzziness": 2 in the query?
dadoonet
(David Pilato)
May 13, 2021, 5:16am
4
1 Like
system
(system)
Closed
June 10, 2021, 5:17am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.