环境:
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:elastic@192.168.1.135:19200 ##带账号密码的
./elasticsearch-sql-cli http://192.168.1.135:19200 ##不带账号密码的