Is it possible to integrate SQL query into ElasticSearch Java API

I have to search some data using JAVA API. I can do the same using X_PACK Sql query. Same needs to be done through JAVA API. I have searched a lot but didn't find the reult.
My Sql Query is like:
select map.serviceName as name, count(map.serviceName) as noOfTimesApiUsed, avg(map.executionTimeInSeconds) as averageTime from auditlogs where map.orgId = 'XXXXX' group by map.serviceName order by noOfTimesApiUsed desc

Please help to change the query in JAVA code.

Hi @Barun_Kumar,
There is the option of the Elasticsearch JDBC driver that you can find more info about here.

this is somehow license related and can be done in Platinum licensed version only. Is it?

Correct. You need to activate the trial or enter a platinum license number. You can activate a free trial of the commercial features via Kibana (Management -> License) or via the API.

See Subscriptions about the different features available.

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