xxx.xxx.xxx.xxx:安装ES对应服务器的地址。
1、查询es中有总共有多少个索引。(get请求)
http://xxx.xxx.xxx.xxx:9200/_cat/indices?v
2、查询当前索引(index_name)的详细信息。(get请求)
http://192.168.3.11:9200/km_docxxx.xxx.xxx.xxx:9200/index_name
3、查询当前索引(index_name)下的所有存储数据。(get请求)
http://xxx.xxx.xxx.xxx:9200/index_name/_search
4、查询当前索引(index_name)下_id为ABC的数据。(get请求)
http://xxx.xxx.xxx.xxx:9200/index_name/_doc/ABC
5、删除当前索引(index_name)下_id为ABC的数据。(delete请求)
http://xxx.xxx.xxx.xxx:9200/index_name/_doc/ABC
6、新增当前索引(index_name)下的mapping属性值。(put请求)
http://xxx.xxx.xxx.xxx:9200/index_name/_mapping
body中传入的json串:
{
"properties": {
"新增属性1": {
"type": "text"
},
"新增属性2": {
"type": "text"
}
}
}