How to insert document in index using SQL Query in elasticsearch

Hi All.

i have written SQL Query Like below:-

{"query":"select * from index02 where id=121"


Obove is working fine but i want to insert docs inside current index02:-1:
{"query":"insert into index02 values(122)"

How can i do like above?


You can't use Elasticsearch SQL to insert documents.
You need to use the Index Documents API instead or the bulk API.

Hi @dadoonet.


so we can say that...ES only allow to search query by using SQL Syntax?
We can't perform insert/update/delete by using sql syntax in elastic search index?.

That's the current status indeed.

Hi @dadoonet .

Thank you so much .

we hope that full sql support will come soon.

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