How to convert and use an API query into equivalent SQL query in a java class

Hello Sir,
I am executing simple SQL queries from my java class and they are giving me equivalent result as I am executing queries from my java class like this
boolean ret1=stat.execute("select name from index_name");

I just want to know that
In Kibana console i am using this query given below

POST _sql?format=txt
  "query": "select name from index_name"

How do i write its equivanlent SQL query in my java class
what should i add in my SQL query for this(POST _sql?format=txt) part

If you really want to use SQL to query elasticsearch, you can use the Low Level client to run whatever HTTP call against an elasticsearch cluster.

Instead I'd use the High Level client and run a "normal" search query.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.