在尝试将映射映射到索引时,我找不到任何关于如何在 elasticsearch 中构造字符串数组的示例。
我拥有的字段映射:
:tags {:type :array :store true}
我得到的错误:
{:type "mapper_parsing_exception",
:reason "No handler for type [array] declared on field [tags]"}
在尝试将映射映射到索引时,我找不到任何关于如何在 elasticsearch 中构造字符串数组的示例。
我拥有的字段映射:
:tags {:type :array :store true}
我得到的错误:
{:type "mapper_parsing_exception",
:reason "No handler for type [array] declared on field [tags]"}
在 Elasticsearch 中,没有专用的数组类型。默认情况下,任何字段都可以包含零个或多个值,但是,数组中的所有值必须是相同的数据类型。
因此,您不必在映射中指定任何特定内容来存储值数组。
有关更多信息,请查看: https ://www.elastic.co/guide/en/elasticsearch/reference/current/array.html
写吧
:tags { "type" : "text" }
它适用于 Elasticsearch 中的存储数组。