Fuzzy search can't get result


(Makeyang) #1

mapping is:
"companyName": {
"type": "string",
"index": "not_analyzed"
}
doc is:
{"companyName":"屈臣氏有限责任公司"}

query 1 is:
QueryBuilders.fuzzyQuery("companyName", "屈臣氏有限责任公司")
this query can get doc
query 2 is:
QueryBuilders.fuzzyQuery("companyName", "屈臣氏有限责").fuzziness(Fuzziness.TWO)
this query can't get doc

why?
in definitive guide Fuzziness.TWO 2 for strings of more than five characters
the doc and query 2 is only 4 characters, why can't I get doc?


(system) #2