2

我想将文档关键字索引为数组数据类型,而不是字符串,例如:keywords:['key1', 'key2',...]并且从弹性搜索文档中,您可以将关键字字段作为字符串:

PUT my_index
{
  "mappings": {
    "_doc": {
      "properties": {
        "tags": {
          "type":  "keyword"
        }
      }
    }
  }
}

我应该怎么办?

4

1 回答 1

1

在弹性搜索文档中有一个“数组数据类型”,你可以使用这个映射吗?

https://www.elastic.co/guide/en/elasticsearch/reference/current/array.html

于 2018-05-21T19:09:03.597 回答