{
  "termvectors": {
    "documentation": {
      "url": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html",
      "description": "Get term vector information"
    },
    "stability": "stable",
    "visibility": "public",
    "headers": {
      "accept": [
        "application/json"
      ],
      "content_type": [
        "application/json"
      ]
    },
    "url": {
      "paths": [
        {
          "path": "/{index}/_termvectors/{id}",
          "methods": [
            "GET",
            "POST"
          ],
          "parts": {
            "index": {
              "type": "string",
              "description": "The index in which the document resides."
            },
            "id": {
              "type": "string",
              "description": "The id of the document, when not specified a doc param should be supplied."
            }
          }
        },
        {
          "path": "/{index}/_termvectors",
          "methods": [
            "GET",
            "POST"
          ],
          "parts": {
            "index": {
              "type": "string",
              "description": "The index in which the document resides."
            }
          }
        }
      ]
    },
    "params": {
      "term_statistics": {
        "type": "boolean",
        "description": "Specifies if total term frequency and document frequency should be returned.",
        "default": false
      },
      "field_statistics": {
        "type": "boolean",
        "description": "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.",
        "default": true
      },
      "fields": {
        "type": "list",
        "description": "A comma-separated list of fields to return."
      },
      "offsets": {
        "type": "boolean",
        "description": "Specifies if term offsets should be returned.",
        "default": true
      },
      "positions": {
        "type": "boolean",
        "description": "Specifies if term positions should be returned.",
        "default": true
      },
      "payloads": {
        "type": "boolean",
        "description": "Specifies if term payloads should be returned.",
        "default": true
      },
      "preference": {
        "type": "string",
        "description": "Specify the node or shard the operation should be performed on (default: random)."
      },
      "routing": {
        "type": "list",
        "description": "Specific routing value."
      },
      "realtime": {
        "type": "boolean",
        "default": true,
        "description": "Specifies if request is real-time as opposed to near-real-time (default: true)."
      },
      "version": {
        "type": "long",
        "description": "Explicit version number for concurrency control"
      },
      "version_type": {
        "type": "enum",
        "options": [
          "internal",
          "external",
          "external_gte"
        ],
        "description": "Specific version type"
      }
    },
    "body": {
      "description": "Define parameters and or supply a document to get termvectors for. See documentation.",
      "required": false
    }
  }
}
