younifyd
Menu

Termvectors (POST /{index}/_termvectors/{id})

Termvectors

POST/{index}/_termvectors/{id}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Termvectors (POST /{index}/_termvectors/{id}) action (under core).
  3. Fill in the fields below, then reference the result from later steps as {{termvectorsPostIndexTermvectorsId.response.data}}.

Request

Path parameters

idstringrequired

The unique identifier of the document.

indexstringrequired

The name of the index containing the document.

Query parameters

field_statisticsboolean

If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.

Default true

fieldsoneOf

A comma-separated list or a wildcard expression specifying the fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.

offsetsboolean

If `true`, the response includes term offsets.

Default true

payloadsboolean

If `true`, the response includes term payloads.

Default true

positionsboolean

If `true`, the response includes term positions.

Default true

preferencestring

Specifies the node or shard on which the operation should be performed. See [preference query parameter]({{site.url}}{{site.baseurl}}/api-reference/search-apis/search/#the-preference-query-parameter) for a list of available options. By default the requests are routed randomly to available shard copies (primary or replica), with no guarantee of consistency across repeated queries.

realtimeboolean

If `true`, the request is real time as opposed to near real time.

Default true

routingoneOf

A custom value used to route operations to a specific shard.

term_statisticsboolean

If `true`, the response includes term frequency and document frequency.

Default false

versioninteger (int64)

If `true`, returns the document version as part of a hit.

version_typeoneOf

The specific version type.

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 an object. Read it in later steps with {{termvectorsPostIndexTermvectorsId.response.data.<field>}}.

foundboolean
_idstring

The unique identifier for a resource.

_indexstring
term_vectorsobject
tookinteger (int64)
_versioninteger (int64)
_typestring

The type of document or resource.

json
{
  "found": false,
  "_index": "string",
  "took": 0,
  "_version": 0,
  "_id": "string",
  "term_vectors": {},
  "_type": "string"
}

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.