
启动ElasticSearch,双击elasticsearch.bat (注意把jdk安装到没有空格的路径中,否则无法启动ElasticSearch,会闪退)
1、命令行:
C:\WINDOWS\system32>curl -X GET "localhost:9200/_cat/health?v" 检查健康状况
curl -X GET "localhost:9200/_cat/nodes?v" 查看节点
curl -X GET "localhost:9200/_cat/indices?v" 查看索引
curl -X PUT "localhost:9200/test" 加入索引
curl -X DELETE "localhost:9200/test" 删除索引

2、使用PostMan:
查索引 GET localhost:9200/_cat/indices?v
新建索引 PUT localhost:9200/test
插入数据 PUT localhost:9200/test/_doc/1
查数据 GET localhost:9200/test/_doc/1
搜索(没有参数) GET localhost:9200/test/_search
查title字段包含互联网的:GET localhost:9200/test/_search?q=title:互联网
查content字段 GET localhost:9200/test/_search?q=content:运营实习
title字段和content字段都查 GET localhost:9200/test/_search + JSON
1、查索引:localhost:9200/_cat/indices?v 
2、新建索引:localhost:9200/test 
查索引: 3、插入数据 PUTlocalhost:9200/test/_doc/1 。_doc(占位),id是1。JSON格式发送。  4、查数据:GETlocalhost:9200/test/_doc/1
 5、删除数据:DELETElocalhost:9200/test/_doc/1
6、搜索(没有参数) localhost:9200/test/_search  查title字段包含互联网的: localhost:9200/test/_search?q=title:互联网  查content字段包含运营实习的:先分词,包含“运营”和“实习”都可以被搜索到。localhost:9200/test/_search?q=content:运营实习
 title字段和content字段都查:字段是fields localhost:9200/test/_search +如下JSON 
|