younifyd
Menu

Search models (GET)

Search models

GET/_plugins/_knn/models/_search

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Search models (GET) action (under knn).
  3. 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_indicesboolean

Whether 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_resultsboolean

Indicate if an error should be returned if there is a partial search failure or timeout.

Default true

analyze_wildcardboolean

Specify whether wildcard and prefix queries should be analyzed.

Default false

analyzerstring

The 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_roundtripsboolean

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

Default true

default_operatorstring

The default operator for query string query (AND or OR).

dfstring

The 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_wildcardsoneOf

Whether to expand wildcard expression to concrete indexes that are open, closed or both.

explainboolean

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

frominteger (int32)

Starting offset.

Default 0

ignore_throttledboolean

Whether specified concrete, expanded or aliased indexes should be ignored when throttled.

ignore_unavailableboolean

Whether specified concrete indexes should be ignored when unavailable (missing or closed).

lenientboolean

Specify 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.

preferencestring

Specify the node or shard the operation should be performed on.

Default "random"

qstring

Query in the Lucene query string syntax.

request_cacheboolean

Specify if request cache should be used for this request or not, defaults to index level setting.

rest_total_hits_as_intboolean

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

Default false

routingoneOf

A comma-separated list of specific routing values.

scrollstring

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

search_typeoneOf

Search operation type.

seq_no_primary_termboolean

Specify 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_fieldstring

Specify which field to use for suggestions.

suggest_modestring

Specify suggest mode.

One ofalwaysmissingpopular

suggest_sizeinteger (int32)

How many suggestions to return in response.

suggest_textstring

The 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.

timeoutstring

Operation timeout.

track_scoresboolean

Whether to calculate and return scores even if they are not used for sorting.

track_total_hitsboolean

Indicate if the number of documents that match the query should be tracked.

typed_keysboolean

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

versionboolean

Whether to return document version as part of a hit.

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A 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.

Was this page helpful?