首页 > 解决方案 > Elasticsearch 映射 - asciifolding 过滤器

问题描述

我有一个映射:

{
    "settings": {
        "index": {
            "refresh_interval": "-1",
            "number_of_shards": "4",
            "number_of_replicas": "1",
            "analysis": {
                "analyzer": {
                    "lower_ascii": {
                        "filter": [
                            "lowercase",
                            "asciifolding"
                        ],
                        "type": "custom",
                        "tokenizer": "standard"
                    }
                }
            }
        }
    },
    "mappings": {
        "doc": {
            "dynamic": "strict",
            "properties": {
                "field_name": {
                    "type": "text",
                    "analyzer": "lower_ascii",
                    "fielddata": true
                }
            }
        }
    }
}

映射中设置了 asciifolding 和小写过滤器。但是该字段的值不是ASCII也不是小写的?有诸如“Námestie Ludvíka Svobodu”之类的原始字符串......我是否遗漏了什么或不理解它?谢谢你的帮助。

标签: elasticsearchmappingascii

解决方案


推荐阅读