赞
踩
(可选)在Console界面,执行命令创建待存储数据的索引,并指定自定义映射来定义数据类型。
如果待导入数据的集群已存在可用的索引,则不需要再创建索引;如果待导入数据的集群不存在可用的索引,则需要参考如下示例创建索引。
例如:在Console界面,执行如下命令,创建索引“my_store”,并指定自定义映射来定义数据类型。
7.x之前版本PUT /my_store
{
"settings": {
"number_of_shards": 1
},
"mappings": {
"products": {
"properties": {
"productName": {
"type": "text"
},
"size": {
"type": "keyword"
}
}
}
}
}
7.x之后版本
PUT /my_store
{
"settings": {
"number_of_shards": 1
},
"mappings": {
"properties": {
"productName": {
"type": "text"
},
"size": {
"type": "keyword"
}
}
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。