标签:区分大小写 orm ping elastics 解决 analysis asc col tom
Elastic 默认是区分大小写查询的,比如:
{ "foo": "BàR" }
查询的时候 通过“bar”是查询不到的,需要在
"settings": { "analysis": { "normalizer": { "my_normalizer": { "type": "custom", "filter": ["lowercase", "asciifolding"] } } } }, "mappings": { "type": { "properties": { "foo": { "type": "keyword", "normalizer": "my_normalizer" } } } }
这样就可以解决大小写的问题。
ES 6.0 官网资料:https://www.elastic.co/guide/en/elasticsearch/reference/6.0/normalizer.html
标签:区分大小写 orm ping elastics 解决 analysis asc col tom
原文地址:https://www.cnblogs.com/chong-zuo3322/p/14036861.html