Documentation ¶
Index ¶
- type Option
- func AllowNoIndices(b bool) Option
- func AllowPartialSearchResults(b bool) Option
- func AnalyzeWildcard(b bool) Option
- func Analyzer(a string) Option
- func BatchedReduceSize(b string) Option
- func CcsMinimizeRoundtrips(b bool) Option
- func DefaultOperator(d operator.Operator) Option
- func Df(d string) Option
- func ErrorTrace(b bool) Option
- func ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) Option
- func FilterPath(filterpath ...string) Option
- func ForceSyntheticSource(b bool) Option
- func Human(b bool) Option
- func IgnoreThrottled(b bool) Option
- func IgnoreUnavailable(b bool) Option
- func Lenient(b bool) Option
- func MaxConcurrentShardRequests(m string) Option
- func MinCompatibleShardNode(m string) Option
- func PreFilterShardSize(p string) Option
- func Preference(p string) Option
- func Pretty(b bool) Option
- func Q(q string) Option
- func RequestCache(b bool) Option
- func RestTotalHitsAsInt(b bool) Option
- func Routing(r string) Option
- func Scroll(duration string) Option
- func SearchType(searchtype searchtype.SearchType) Option
- func SourceExcludes_(sourceexcludes ...string) Option
- func SourceIncludes_(sourceincludes ...string) Option
- func SuggestField(field string) Option
- func SuggestMode(suggestmode suggestmode.SuggestMode) Option
- func SuggestSize(suggestsize string) Option
- func SuggestText(suggesttext string) Option
- func TypedKeys(typedkeys bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
func 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 AllowPartialSearchResults ¶
AllowPartialSearchResults If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. API name: allow_partial_search_results
func AnalyzeWildcard ¶
AnalyzeWildcard If true, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified. API name: analyze_wildcard
func Analyzer ¶
Analyzer Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified. API name: analyzer
func BatchedReduceSize ¶
BatchedReduceSize The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. API name: batched_reduce_size
func CcsMinimizeRoundtrips ¶
CcsMinimizeRoundtrips If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. API name: ccs_minimize_roundtrips
func DefaultOperator ¶
DefaultOperator The default operator for query string query: AND or OR. This parameter can only be used when the `q` query string parameter is specified. API name: default_operator
func Df ¶
Df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified. API name: df
func ErrorTrace ¶
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func ExpandWildcards ¶
func ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) Option
ExpandWildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. API name: expand_wildcards
func FilterPath ¶
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func ForceSyntheticSource ¶
ForceSyntheticSource Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. API name: force_synthetic_source
func Human ¶
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 IgnoreThrottled ¶
IgnoreThrottled If `true`, concrete, expanded or aliased indices will be ignored when frozen. API name: ignore_throttled
func IgnoreUnavailable ¶
IgnoreUnavailable If `false`, the request returns an error if it targets a missing or closed index. API name: ignore_unavailable
func Lenient ¶
Lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can only be used when the `q` query string parameter is specified. API name: lenient
func MaxConcurrentShardRequests ¶
MaxConcurrentShardRequests Defines the number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. API name: max_concurrent_shard_requests
func MinCompatibleShardNode ¶
MinCompatibleShardNode The minimum version of the node that can handle the request Any handling node with a lower version will fail the request. API name: min_compatible_shard_node
func 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 (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: the request targets more than 128 shards; the request targets one or more read-only index; the primary sort of the query targets an indexed field. API name: pre_filter_shard_size
func Preference ¶
Preference Nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: `_only_local` to run the search only on shards on the local node; `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method; `_only_nodes:<node-id>,<node-id>` to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; `_prefer_nodes:<node-id>,<node-id>` to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; `_shards:<shard>,<shard>` to run the search only on the specified shards; `<custom-string>` (any string that does not start with `_`) to route searches with the same `<custom-string>` to the same shards in the same order. API name: preference
func Pretty ¶
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func Q ¶
Q Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. API name: q
func RequestCache ¶
RequestCache If `true`, the caching of search results is enabled for requests where `size` is `0`. Defaults to index level settings. API name: request_cache
func RestTotalHitsAsInt ¶
RestTotalHitsAsInt Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. API name: rest_total_hits_as_int
func Scroll ¶
Scroll Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed `1d` (24 hours). You can change this limit using the `search.max_keep_alive` cluster-level setting. API name: scroll
func SearchType ¶
func SearchType(searchtype searchtype.SearchType) Option
SearchType How distributed term frequencies are calculated for relevance scoring. API name: search_type
func SourceExcludes_ ¶
SourceExcludes_ A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. API name: _source_excludes
func SourceIncludes_ ¶
SourceIncludes_ A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. API name: _source_includes
func SuggestField ¶
SuggestField Specifies which field to use for suggestions. API name: suggest_field
func SuggestMode ¶
func SuggestMode(suggestmode suggestmode.SuggestMode) Option
SuggestMode Specifies the suggest mode. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. API name: suggest_mode
func SuggestSize ¶
SuggestSize Number of suggestions to return. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. API name: suggest_size
func SuggestText ¶
SuggestText The source text for which the suggestions should be returned. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. API name: suggest_text