elastic / elasticsearch-java

Official Elasticsearch Java Client
Apache License 2.0
408 stars 237 forks source link

Add ES|QL helpers #762

Closed swallez closed 5 months ago

swallez commented 5 months ago

Adds helpers for ES|QL.

The ES|QL result format is meant to be compact: it is composed of a metadata part giving field names and their types and a 2D array of values, which isn't easy to use in application code.

This PR provides adapters that convert the ES|QL JSON result format into higher level types that are easier to use. Two adapters are provided:

Along with adapters, additional methods in ElasticsearchEsqlClient provide simple way to send queries using just a string and optional parameters when you don't need to specify additional request details.