Documentation ¶
Overview ¶
Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
Index ¶
- Variables
- type Msearch
- func (r *Msearch) AllowNoIndices(allownoindices bool) *Msearch
- func (r *Msearch) AllowPartialSearchResults(allowpartialsearchresults bool) *Msearch
- func (r *Msearch) CcsMinimizeRoundtrips(ccsminimizeroundtrips bool) *Msearch
- func (r Msearch) Do(providedCtx context.Context) (*Response, error)
- func (r *Msearch) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Msearch
- func (r *Msearch) Header(key, value string) *Msearch
- func (r *Msearch) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Msearch) IgnoreThrottled(ignorethrottled bool) *Msearch
- func (r *Msearch) IgnoreUnavailable(ignoreunavailable bool) *Msearch
- func (r *Msearch) Index(index string) *Msearch
- func (r *Msearch) MaxConcurrentSearches(maxconcurrentsearches string) *Msearch
- func (r *Msearch) MaxConcurrentShardRequests(maxconcurrentshardrequests string) *Msearch
- func (r Msearch) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Msearch) PreFilterShardSize(prefiltershardsize string) *Msearch
- func (r *Msearch) Raw(raw io.Reader) *Msearch
- func (r *Msearch) Request(req *Request) *Msearch
- func (r *Msearch) RestTotalHitsAsInt(resttotalhitsasint bool) *Msearch
- func (r *Msearch) SearchType(searchtype searchtype.SearchType) *Msearch
- func (r *Msearch) TypedKeys(typedkeys bool) *Msearch
- func (r *Msearch) WaitForCheckpoints(waitforcheckpoints ...int64) *Msearch
- type NewMsearch
- type Request
- 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 Msearch ¶
type Msearch struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Msearch
Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
func (*Msearch) AllowNoIndices ¶
AllowNoIndices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. API name: allow_no_indices
func (*Msearch) AllowPartialSearchResults ¶
AllowPartialSearchResults If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results` which is true by default. API name: allow_partial_search_results
func (*Msearch) CcsMinimizeRoundtrips ¶
CcsMinimizeRoundtrips If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. API name: ccs_minimize_roundtrips
func (Msearch) Do ¶
Do runs the request through the transport, handle the response and returns a msearch.Response
func (*Msearch) ExpandWildcards ¶
func (r *Msearch) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Msearch
ExpandWildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. API name: expand_wildcards
func (*Msearch) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Msearch) IgnoreThrottled ¶
IgnoreThrottled If true, concrete, expanded or aliased indices are ignored when frozen. API name: ignore_throttled
func (*Msearch) IgnoreUnavailable ¶
IgnoreUnavailable If true, missing or closed indices are not included in the response. API name: ignore_unavailable
func (*Msearch) Index ¶
Index A single target to search. If the target is an index alias, it must resolve to a single index. API Name: index
func (*Msearch) MaxConcurrentSearches ¶
MaxConcurrentSearches Maximum number of concurrent searches the multi search API can execute. API name: max_concurrent_searches
func (*Msearch) MaxConcurrentShardRequests ¶
MaxConcurrentShardRequests Maximum number of concurrent shard requests that each sub-search request executes per node. API name: max_concurrent_shard_requests
func (Msearch) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Msearch) PreFilterShardSize ¶
PreFilterShardSize Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. API name: pre_filter_shard_size
func (*Msearch) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*Msearch) RestTotalHitsAsInt ¶
RestTotalHitsAsInt If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. API name: rest_total_hits_as_int
func (*Msearch) SearchType ¶
func (r *Msearch) SearchType(searchtype searchtype.SearchType) *Msearch
SearchType Indicates whether global term and document frequencies should be used when scoring returned documents. API name: search_type
func (*Msearch) TypedKeys ¶
TypedKeys Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. API name: typed_keys
func (*Msearch) WaitForCheckpoints ¶
WaitForCheckpoints A comma separated list of checkpoints. When configured, the search API will only be executed on a shard after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause Elasticsearch to immediately execute the search. API name: wait_for_checkpoints
type NewMsearch ¶
type NewMsearch func() *Msearch
NewMsearch type alias for index.
func NewMsearchFunc ¶
func NewMsearchFunc(tp elastictransport.Interface) NewMsearch
NewMsearchFunc returns a new instance of Msearch with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶ added in v8.11.0
type Request = []types.MsearchRequestItem
Request holds the request body struct for the package msearch
type Response ¶
type Response struct {
Docs []types.MsearchResponseItem `json:"docs"`
}
Response holds the response body struct for the package msearch