【问题标题】:Elastic Search mapping bad mappingElasticsearch 映射和映射
【发布时间】:2012-07-11 07:57:50
【问题描述】:

我对弹性搜索索引有以下映射。我将其发布(“PUT”)到http://abc.com/test/article/_mapping

{
    "article": {
        "settings": {
            "analysis": {
                "analyzer": {
                    "stem": {
                        "tokenizer": "standard",
                        "filter": [
                            "standard",
                            "lowercase",
                            "stop",
                            "porter_stem"
                        ]
                    }
                }
            }
        },
        "mappings": {
            "properties": {
                "DocumentID": {
                    "type": "string"
                },
                "ContentSource": {
                    "type": "integer"
                },
                "ContentType": {
                    "type": "integer"
                },
                "PageTitle": {
                    "type": "string",
                    "analyzer": "stem"
                },
                "ContentBody": {
                    "type": "string",
                    "analyzer": "stem"
                },
                "URL": {
                    "type": "string"
                }
            }
        }
    }
}

我收到来自 Elastic Search 的 OK 消息。但是当我去 http://abc.com/test/article/_mapping 时,我看不到映射的设置。我看到的只有这个

{  "article" : {   "properties" : {   }  }}

在为分析器添加设置部分之前,我已经完成了这项工作。任何帮助表示赞赏!

【问题讨论】:

    标签: json mapping elasticsearch


    【解决方案1】:

    我想通了。第一个“文章”字符串需要删除。并且“PUT”应该针对http://abc.com/index

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-09-27
      • 2019-05-18
      • 1970-01-01
      • 2020-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多