gpt4 book ai didi

elasticsearch - Elasticsearch _mapping API不会告诉我未分析哪些字段

转载 作者:行者123 更新时间:2023-12-02 23:27:20 24 4
gpt4 key购买 nike

我试图阻止Elasticsearch分析文档中的某些字段。
我发布了此映射:

{
"properties" : {
"f1" : {
"index" : "not_analyzed",
"include_in_all" : false,
"type" : "string"
},
"f2" : {
"index" : "not_analyzed",
"include_in_all" : false,
"type" : "string"
},
"f3" : {
"index" : "not_analyzed",
"include_in_all" : false,
"type" : "string"
}
}
}
然后我ping映射端点,它不会告诉我那些字段
是否分析:
{
"myindex" : {
"mappings" : {
"mytype" : {
"properties" : {
"f1" : {
"type" : "keyword",
"include_in_all" : false
},
"f2" : {
"type" : "keyword",
"include_in_all" : false
},
"f3" : {
"type" : "keyword",
"include_in_all" : false
}
}
}
}
}
}
在示例中,我已经看到查询_mapping API似乎可以判断是否分析了哪些字段。

最佳答案

在Elasticsearch 5.0及更高版本中,有一种分离已分析和未分析内容的新方法:

  • Strings are dead, long live strings!
  • Keyword datatype

  • 但是,总结一下:

    不分析
  • 关键字
  • 文本分析

  • 现在将具有3个值的索引属性:“否”,“已分析”,“未分析”简化为"is"和“否”

    关于elasticsearch - Elasticsearch _mapping API不会告诉我未分析哪些字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41369021/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com