elasticsearch的restful API和Java API
本人现在使用的是elasticsearch 5.2.1的,服务器IP为192.168.5.182.所以在Java API和jar包中会有所不同. 常用的restful API如下: http://192.168.5.182:9200/_cat/health?v 健康检查http://192.168.5.182:9200/_cat/indices?v 查看索引PUT http://192.168.5.182:9200/test_index?pretty 添加索引DELETE http://192.168.5.182:9200/test_index 删除索引PUT http://192.168.5.182:9200/ecommerce/product/1BODY { "name":"zhonghua yagao", "desc":"caoben zhiwu", "price":40, "producer":"zhonghua producer", "tags":["qingxin"] } 为索引添加数据,ecommerce索引,product type,1 IDGET http://192...