仅供自己作学习笔记,详情请移步es官方文档
9.记录------sql插件
安装sql插件以后,就有两种方式查询数据
-
还是url里面直接使用
_sql
+"sql查询语句"
curl -XPOST http://172.16.150.149:29200/_sql?pretty -d "SELECT * FROM facebook" { "took" : 1, "timed_out" : false, "_shards" : { "total" : 3, "successful" : 3, "failed" : 0 }, "hits" : { "total" : 4, "max_score" : 1.0, "hits" : [ { "_index" : "facebook", "_type" : "blog", "_id" : "pretty", "_score" : 1.0, "_source" : { "title" : "website", "text" : "blog is making", "date" : "2018/1016" } }, { "_index" : "facebook", "_type" : "blog", "_id" : "AWZ668ZcHFL4sAFl7IMI", "_score" : 1.0, "_source" : { "title" : "website", "text" : "blog is making", "date" : "2018/1016" } }, { "_index" : "fa