Menu
Search models (GET)
Search models
/_plugins/_knn/models/_searchUse it in a workflow
- Add a step and choose the OpenSearch connector.
- Pick the Search models (GET) action (under knn).
- Fill in the fields below, then reference the result from later steps as
{{searchModelsGet.response.data}}.
Request
Query parameters
_sourcearray<string>Set to `true` or `false` to return the `_source` field or not, or a list of fields to return.
_source_excludesarray<string>List of fields to exclude from the returned `_source` field.
_source_includesarray<string>List of fields to extract and return from the `_source` field.
allow_no_indicesbooleanWhether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified).
allow_partial_search_resultsbooleanIndicate if an error should be returned if there is a partial search failure or timeout.
Default true
analyze_wildcardbooleanSpecify whether wildcard and prefix queries should be analyzed.
Default false
analyzerstringThe analyzer to use for the query string.
batched_reduce_sizeinteger (int32)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.
Default 512
ccs_minimize_roundtripsbooleanIndicates whether network round-trips should be minimized as part of cross-cluster search requests execution.
Default true
default_operatorstringThe default operator for query string query (AND or OR).
dfstringThe field to use as default where no field prefix is given in the query string.
docvalue_fieldsarray<string>A comma-separated list of fields to return as the docvalue representation of a field for each hit.
expand_wildcardsoneOfWhether to expand wildcard expression to concrete indexes that are open, closed or both.
explainbooleanSpecify whether to return detailed information about score computation as part of a hit.
frominteger (int32)Starting offset.
Default 0
ignore_throttledbooleanWhether specified concrete, expanded or aliased indexes should be ignored when throttled.
ignore_unavailablebooleanWhether specified concrete indexes should be ignored when unavailable (missing or closed).
lenientbooleanSpecify whether format-based query failures (such as providing text to a numeric field) should be ignored.
max_concurrent_shard_requestsinteger (int32)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.
Default 5
pre_filter_shard_sizeinteger (int32)Threshold that enforces a pre-filter round-trip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter round-trip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method, that is if date filters are mandatory to match but the shard bounds and the query are disjoint.
preferencestringSpecify the node or shard the operation should be performed on.
Default "random"
qstringQuery in the Lucene query string syntax.
request_cachebooleanSpecify if request cache should be used for this request or not, defaults to index level setting.
rest_total_hits_as_intbooleanIndicates whether `hits.total` should be rendered as an integer or an object in the rest search response.
Default false
routingoneOfA comma-separated list of specific routing values.
scrollstringSpecify how long a consistent view of the index should be maintained for scrolled search.
search_typeoneOfSearch operation type.
seq_no_primary_termbooleanSpecify whether to return sequence number and primary term of the last modification of each hit.
sizeinteger (int32)Number of hits to return.
Default 10
sortarray<string>A comma-separated list of <field>:<direction> pairs.
statsarray<string>Specific 'tag' of the request for logging and statistical purposes.
stored_fieldsarray<string>A comma-separated list of stored fields to return.
suggest_fieldstringSpecify which field to use for suggestions.
suggest_modestringSpecify suggest mode.
One ofalwaysmissingpopular
suggest_sizeinteger (int32)How many suggestions to return in response.
suggest_textstringThe source text for which the suggestions should be returned.
terminate_afterinteger (int32)The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
timeoutstringOperation timeout.
track_scoresbooleanWhether to calculate and return scores even if they are not used for sorting.
track_total_hitsbooleanIndicate if the number of documents that match the query should be tracked.
typed_keysbooleanSpecify whether aggregation and suggester names should be prefixed by their respective types in the response.
versionbooleanWhether to return document version as part of a hit.
prettybooleanWhether to pretty-format the returned JSON response.
Default false
humanbooleanWhether to return human-readable values for statistics.
Default false
error_tracebooleanWhether to include the stack trace of returned errors.
Default false
sourcestringThe URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
filter_pathoneOfA comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
Response
Returns 200 with a any. Read it in later steps with {{searchModelsGet.response.data.<field>}}.
Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.