更新时间:2023-02-08 19:22:49
删除现有索引
curl -XDELETE "http://hostname:9200/index/type"
删除现有的河流配置索引
curl -XDELETE "http://hostname:9200/_river"
创建映射索引
curl -XPUT "http://hostname:9200/index/type/_mapping" -d'
{
"allnews": {
"properties": {
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"link": {
"type": "string"
},
"state": {
"type": "string",
"index" : "not_analyzed"
},
"title": {
"type": "string"
}
}
}
}'
河插件配置同步mongodb到弹性搜索。
After these steps put the river plugin config sync mongodb to elasticsearch.
HOpe它有帮助..!
HOpe it helps..!