- 查看mapping:
1curl -XGET '127.0.0.1:9200/【your-index】/_mapping' - 为现有mapping添加新属性:
123//给tags添加 age 属性:curl -X PUT 'http://127.0.0。1:9200/【your-index】/_mapping/【your-type-if-exists】' -H 'content-type:application/json' -d '{"properties":{"tags":{"type":"object","properties":{"age":{"type":"long"}}}}}'
3. 迁移旧index的数据到新index:
1curl -X POST 'http://127.0.0.1:9200/_reindex' -H 'content-type:application/json' -d '{"source":{"index":"【your-old-index】"},"dest":{"index":"【your-new-index】"}}'
4. 删除index:
1curl -X DELETE 'http://127.0.0.1:9200/【your-index】'