Documentation
¶
Overview ¶
Get async SQL search results. Get the current status and available results for an async SQL search or stored synchronous SQL search.
If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.
Index ¶
- Variables
- type GetAsync
- func (r *GetAsync) Delimiter(delimiter string) *GetAsync
- func (r GetAsync) Do(providedCtx context.Context) (*Response, error)
- func (r *GetAsync) ErrorTrace(errortrace bool) *GetAsync
- func (r *GetAsync) FilterPath(filterpaths ...string) *GetAsync
- func (r *GetAsync) Format(format string) *GetAsync
- func (r *GetAsync) Header(key, value string) *GetAsync
- func (r *GetAsync) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetAsync) Human(human bool) *GetAsync
- func (r GetAsync) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *GetAsync) KeepAlive(duration string) *GetAsync
- func (r GetAsync) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetAsync) Pretty(pretty bool) *GetAsync
- func (r *GetAsync) WaitForCompletionTimeout(duration string) *GetAsync
- type NewGetAsync
- type Response
Constants ¶
This section is empty.
Variables ¶
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 GetAsync ¶
type GetAsync struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetAsync
Get async SQL search results. Get the current status and available results for an async SQL search or stored synchronous SQL search.
If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.
https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html
func (*GetAsync) Delimiter ¶
Delimiter The separator for CSV results. The API supports this parameter only for CSV responses. API name: delimiter
func (GetAsync) Do ¶
Do runs the request through the transport, handle the response and returns a getasync.Response
func (*GetAsync) ErrorTrace ¶ added in v8.14.0
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*GetAsync) FilterPath ¶ added in v8.14.0
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*GetAsync) Format ¶
Format The format for the response. You must specify a format using this parameter or the `Accept` HTTP header. If you specify both, the API uses this parameter. API name: format
func (*GetAsync) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetAsync) Human ¶ added in v8.14.0
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 (GetAsync) IsSuccess ¶
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 (*GetAsync) KeepAlive ¶
KeepAlive The retention period for the search and its results. It defaults to the `keep_alive` period for the original SQL search. API name: keep_alive
func (GetAsync) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*GetAsync) Pretty ¶ added in v8.14.0
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*GetAsync) WaitForCompletionTimeout ¶
WaitForCompletionTimeout The period to wait for complete results. It defaults to no timeout, meaning the request waits for complete search results. API name: wait_for_completion_timeout
type NewGetAsync ¶
NewGetAsync type alias for index.
func NewGetAsyncFunc ¶
func NewGetAsyncFunc(tp elastictransport.Interface) NewGetAsync
NewGetAsyncFunc returns a new instance of GetAsync with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Response ¶ added in v8.7.0
type Response struct { // Columns Column headings for the search results. Each object is a column. Columns []types.Column `json:"columns,omitempty"` // Cursor The cursor for the next set of paginated results. // For CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP // header. Cursor *string `json:"cursor,omitempty"` // Id Identifier for the search. // This value is returned only for async and saved synchronous searches. // For CSV, TSV, and TXT responses, this value is returned in the `Async-ID` // HTTP header. Id string `json:"id"` // IsPartial If `true`, the response does not contain complete search results. // If `is_partial` is `true` and `is_running` is `true`, the search is still // running. // If `is_partial` is `true` but `is_running` is `false`, the results are // partial due to a failure or timeout. // This value is returned only for async and saved synchronous searches. // For CSV, TSV, and TXT responses, this value is returned in the // `Async-partial` HTTP header. IsPartial bool `json:"is_partial"` // IsRunning If `true`, the search is still running. // If `false`, the search has finished. // This value is returned only for async and saved synchronous searches. // For CSV, TSV, and TXT responses, this value is returned in the // `Async-partial` HTTP header. IsRunning bool `json:"is_running"` // Rows The values for the search results. Rows [][]json.RawMessage `json:"rows"` }
Response holds the response body struct for the package getasync