环境:
ES版本:6.5
1.查询索引
curl -H "Content-Type: application/json" -XPOST "http://192.168.1.135:19200/_xpack/sql?format=txt&pretty" -d'
{
"query": "SELECT * FROM vacc_update where id=1",
"fetch_size": 5
}
'
2.通过命令行模式查询
./elasticsearch-sql-cli http://elastic:[email protected]:19200 ##带账号密码的
./elasticsearch-sql-cli http://192.168.1.135:19200 ##不带账号密码的
通过sql查询es数据
猜你喜欢
转载自www.cnblogs.com/hxlasky/p/11727388.html
今日推荐
周排行