Interface EsqlResponse

All Superinterfaces:
AutoCloseable, Closeable, org.elasticsearch.core.Releasable

public interface EsqlResponse extends org.elasticsearch.core.Releasable
An ES|QL Response object.

Iterator based access to values of type T has the following properties:

  1. single-value is of type T
  2. multi-value is of type List<T>
  3. absent value is null

This response object should be closed when the consumer of its values is finished. Closing the response object invalidates any iterators of its values. An invalidated iterator, if not already exhausted, will eventually throw an IllegalStateException. Once a response object is closed, calling rows(), column(int), or operating on an Iterable return from the aforementioned value accessor methods, results in an IllegalStateException.

  • Method Summary

    Modifier and Type
    Method
    Description
    column(int columnIndex)
    Returns an iterable over the values in the given column.
    List<? extends ColumnInfo>
    Returns the column info.
    Returns an iterable that allows to iterator over the values in all rows of the response, this is the rows-iterator.

    Methods inherited from interface org.elasticsearch.core.Releasable

    close
  • Method Details

    • columns

      List<? extends ColumnInfo> columns()
      Returns the column info.
    • rows

      Returns an iterable that allows to iterator over the values in all rows of the response, this is the rows-iterator. A further iterator can be retrieved from the rows-iterator, which iterates over the actual values in the row, one row at a time, column-wise from left to right.
    • column

      Iterable<Object> column(int columnIndex)
      Returns an iterable over the values in the given column.