Documentation ¶
Overview ¶
Allows to execute several search template operations in one request.
Index ¶
- Variables
- type MsearchTemplate
- func (r *MsearchTemplate) CcsMinimizeRoundtrips(ccsminimizeroundtrips bool) *MsearchTemplate
- func (r MsearchTemplate) Do(providedCtx context.Context) (*Response, error)
- func (r *MsearchTemplate) Header(key, value string) *MsearchTemplate
- func (r *MsearchTemplate) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *MsearchTemplate) Index(index string) *MsearchTemplate
- func (r *MsearchTemplate) MaxConcurrentSearches(maxconcurrentsearches string) *MsearchTemplate
- func (r MsearchTemplate) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *MsearchTemplate) Raw(raw io.Reader) *MsearchTemplate
- func (r *MsearchTemplate) Request(req *Request) *MsearchTemplate
- func (r *MsearchTemplate) RestTotalHitsAsInt(resttotalhitsasint bool) *MsearchTemplate
- func (r *MsearchTemplate) SearchType(searchtype searchtype.SearchType) *MsearchTemplate
- func (r *MsearchTemplate) TypedKeys(typedkeys bool) *MsearchTemplate
- type NewMsearchTemplate
- 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 MsearchTemplate ¶
type MsearchTemplate struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *MsearchTemplate
Allows to execute several search template operations in one request.
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
func (*MsearchTemplate) CcsMinimizeRoundtrips ¶
func (r *MsearchTemplate) CcsMinimizeRoundtrips(ccsminimizeroundtrips bool) *MsearchTemplate
CcsMinimizeRoundtrips If `true`, network round-trips are minimized for cross-cluster search requests. API name: ccs_minimize_roundtrips
func (MsearchTemplate) Do ¶
func (r MsearchTemplate) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a msearchtemplate.Response
func (*MsearchTemplate) Header ¶
func (r *MsearchTemplate) Header(key, value string) *MsearchTemplate
Header set a key, value pair in the MsearchTemplate headers map.
func (*MsearchTemplate) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*MsearchTemplate) Index ¶
func (r *MsearchTemplate) Index(index string) *MsearchTemplate
Index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*`. API Name: index
func (*MsearchTemplate) MaxConcurrentSearches ¶
func (r *MsearchTemplate) MaxConcurrentSearches(maxconcurrentsearches string) *MsearchTemplate
MaxConcurrentSearches Maximum number of concurrent searches the API can run. API name: max_concurrent_searches
func (MsearchTemplate) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*MsearchTemplate) Raw ¶
func (r *MsearchTemplate) Raw(raw io.Reader) *MsearchTemplate
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*MsearchTemplate) Request ¶
func (r *MsearchTemplate) Request(req *Request) *MsearchTemplate
Request allows to set the request property with the appropriate payload.
func (*MsearchTemplate) RestTotalHitsAsInt ¶
func (r *MsearchTemplate) RestTotalHitsAsInt(resttotalhitsasint bool) *MsearchTemplate
RestTotalHitsAsInt If `true`, the response returns `hits.total` as an integer. If `false`, it returns `hits.total` as an object. API name: rest_total_hits_as_int
func (*MsearchTemplate) SearchType ¶
func (r *MsearchTemplate) SearchType(searchtype searchtype.SearchType) *MsearchTemplate
SearchType The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. API name: search_type
func (*MsearchTemplate) TypedKeys ¶
func (r *MsearchTemplate) TypedKeys(typedkeys bool) *MsearchTemplate
TypedKeys If `true`, the response prefixes aggregation and suggester names with their respective types. API name: typed_keys
type NewMsearchTemplate ¶
type NewMsearchTemplate func() *MsearchTemplate
NewMsearchTemplate type alias for index.
func NewMsearchTemplateFunc ¶
func NewMsearchTemplateFunc(tp elastictransport.Interface) NewMsearchTemplate
NewMsearchTemplateFunc returns a new instance of MsearchTemplate 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.RequestItem
Request holds the request body struct for the package msearchtemplate
type Response ¶
type Response struct { Responses []types.MsearchResponseItem `json:"responses"` Took int64 `json:"took"` }
Response holds the response body struct for the package msearchtemplate