asyncqueryget

package
v9.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Get async ES|QL query results. Get the current status and available results or stored results for an ES|QL asynchronous query. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type AsyncQueryGet

type AsyncQueryGet struct {
	// contains filtered or unexported fields
}

func New

Get async ES|QL query results. Get the current status and available results or stored results for an ES|QL asynchronous query. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.

https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-esql-async-query-get

func (AsyncQueryGet) Do

func (r AsyncQueryGet) Do(providedCtx context.Context) (Response, error)

Do runs the request through the transport, handle the response and returns a asyncqueryget.Response

func (*AsyncQueryGet) DropNullColumns

func (r *AsyncQueryGet) DropNullColumns(dropnullcolumns bool) *AsyncQueryGet

DropNullColumns Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results. If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns. API name: drop_null_columns

func (*AsyncQueryGet) ErrorTrace

func (r *AsyncQueryGet) ErrorTrace(errortrace bool) *AsyncQueryGet

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*AsyncQueryGet) FilterPath

func (r *AsyncQueryGet) FilterPath(filterpaths ...string) *AsyncQueryGet

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*AsyncQueryGet) Header

func (r *AsyncQueryGet) Header(key, value string) *AsyncQueryGet

Header set a key, value pair in the AsyncQueryGet headers map.

func (*AsyncQueryGet) HttpRequest

func (r *AsyncQueryGet) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*AsyncQueryGet) Human

func (r *AsyncQueryGet) Human(human bool) *AsyncQueryGet

Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human

func (AsyncQueryGet) IsSuccess

func (r AsyncQueryGet) IsSuccess(providedCtx context.Context) (bool, error)

IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.

func (*AsyncQueryGet) KeepAlive

func (r *AsyncQueryGet) KeepAlive(duration string) *AsyncQueryGet

KeepAlive The period for which the query and its results are stored in the cluster. When this period expires, the query and its results are deleted, even if the query is still ongoing. API name: keep_alive

func (AsyncQueryGet) Perform

func (r AsyncQueryGet) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*AsyncQueryGet) Pretty

func (r *AsyncQueryGet) Pretty(pretty bool) *AsyncQueryGet

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*AsyncQueryGet) WaitForCompletionTimeout

func (r *AsyncQueryGet) WaitForCompletionTimeout(duration string) *AsyncQueryGet

WaitForCompletionTimeout The period to wait for the request to finish. By default, the request waits for complete query results. If the request completes during the period specified in this parameter, complete query results are returned. Otherwise, the response returns an `is_running` value of `true` and no results. API name: wait_for_completion_timeout

type NewAsyncQueryGet

type NewAsyncQueryGet func(id string) *AsyncQueryGet

NewAsyncQueryGet type alias for index.

func NewAsyncQueryGetFunc

func NewAsyncQueryGetFunc(tp elastictransport.Interface) NewAsyncQueryGet

NewAsyncQueryGetFunc returns a new instance of AsyncQueryGet with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Response

type Response = []byte

func NewResponse

func NewResponse() Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL