赞
踩
获取index和type
- 1.查看index
- curl -X GET 'ip地址:9200/_cat/indices?v'
-
- 2.查看type
- curl -X GET 'http://ip地址:9200/_mapping?pretty=true'
- curl -X GET "ip地址:9200/index名/type名/id?pretty"
- eg:curl -X GET "192.168.61.150:9200/punishment/enterprise/1?pretty"
curl -X PUT "ip地址:9200/index名/type名/id?pretty" -H 'Content-Type: application/json' -d'{"name": "名称"}'
- curl -X POST "ip地址:9200/index名/type名/id/_update?pretty" -H 'Content-Type: application/json' -d'
- {
- "doc": { "name": "名称" }
- }'
- eg:curl -X POST "192.168.61.150:9200/punishment/enterprise/1/_update?pretty" -H 'Content-Type: application/json' -d'
- {
- "doc": { "name": "123456789" }
- }'
curl -X DELETE "ip地址:9200/index名/type名/id?pretty"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。