searchTemplateedit

client.searchTemplate([params, [callback]])

Check the API Conventions and the elasticsearch docs for more information pertaining to this method.

Params

ignoreUnavailable

Boolean — Whether specified concrete indices should be ignored when unavailable (missing or closed)

ignoreThrottled

Boolean — Whether specified concrete, expanded or aliased indices should be ignored when throttled

allowNoIndices

Boolean — Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

[expandWildcards=open]

String — Whether to expand wildcard expression to concrete indices that are open, closed or both.

Options
  • "open"
  • "closed"
  • "none"
  • "all"

preference

String — Specify the node or shard the operation should be performed on (default: random)

routing

String, String[], Boolean — A comma-separated list of specific routing values

scroll

DurationString — Specify how long a consistent view of the index should be maintained for scrolled search

searchType

String — Search operation type

Options
  • "query_then_fetch"
  • "query_and_fetch"
  • "dfs_query_then_fetch"
  • "dfs_query_and_fetch"

explain

Boolean — Specify whether to return detailed information about score computation as part of a hit

profile

Boolean — Specify whether to profile the query execution

typedKeys

Boolean — Specify whether aggregation and suggester names should be prefixed by their respective types in the response

restTotalHitsAsInt

Boolean — Indicates whether hits.total should be rendered as an integer or an object in the rest search response

[ccsMinimizeRoundtrips=true]

Boolean — Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution

index

String, String[], Boolean — A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

type

String, String[], Boolean — A comma-separated list of document types to search; leave empty to perform the operation on all types

body

Object, JSON — The request body, as either JSON or a JSON serializable object. See the elasticsearch docs for details about what can be specified here.

back to top