关于mapping设置里 index取值问题?

来源:4-7 -mapping文档说明

simons_fan

2018-12-26

{
  "settings": {
    "number_of_replicas": 0
  },
  "mappings": {
    "movie": {
      "dynamic": false,
      "properties": {
        "id": {
          "type": "long"
        },
        "description": {
          "type": "text",
          "index": "analyzed"
        },
        "layoutDesc" : {
          "type": "text",
          "index": "analyzed"
        }
      }
    }
  }
}

老师,请问下,我看到别人的mapping里这样设置的,这里的 “index”: "analyzed"表示什么意思啊? index取值不应该只有true|false吗?

写回答

1回答

rockybean

2018-12-27

你的说法是对的,analyzed 是 5.0 之前的配置,你看到的别人这种用法是不对的

https://www.elastic.co/guide/en/elasticsearch/reference/2.4/mapping-index.html

https://www.elastic.co/guide/en/elasticsearch/reference/6.6/mapping-index.html

0
1
simons_fan
好的,感谢解答
2018-12-27
共1条回复

Elastic Stack从入门到实践,动手搭建数据分析系统

有了Elastic Stack,不用写一行代码,你也可以玩转大数据分析!

1361 学习 · 397 问题

查看课程