{
  "search_template": {
    "documentation": {
      "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template",
      "description": "Run a search with a search template"
    },
    "stability": "stable",
    "visibility": "public",
    "headers": {
      "accept": [
        "application/json"
      ],
      "content_type": [
        "application/json"
      ]
    },
    "url": {
      "paths": [
        {
          "path": "/_search/template",
          "methods": [
            "GET",
            "POST"
          ]
        },
        {
          "path": "/{index}/_search/template",
          "methods": [
            "GET",
            "POST"
          ],
          "parts": {
            "index": {
              "type": "list",
              "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
            }
          }
        }
      ]
    },
    "params": {
      "ignore_unavailable": {
        "type": "boolean",
        "default": false,
        "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
      },
      "ignore_throttled": {
        "deprecated": {
          "version": "7.16.0",
          "description": "This parameter is deprecated because frozen indices have been deprecated."
        },
        "type": "boolean",
        "default": true,
        "description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled"
      },
      "allow_no_indices": {
        "type": "boolean",
        "default": true,
        "description": "Whether to allow (1) wildcard index expressions that match no indices and (2) requests where the final resolved set is empty."
      },
      "expand_wildcards": {
        "type": "list",
        "options": [
          "open",
          "closed",
          "hidden",
          "none",
          "all"
        ],
        "default": "open",
        "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
      },
      "preference": {
        "type": "string",
        "description": "Specify the node or shard the operation should be performed on (default: random)"
      },
      "routing": {
        "type": "list",
        "description": "A comma-separated list of specific routing values"
      },
      "scroll": {
        "type": "time",
        "description": "Specify how long a consistent view of the index should be maintained for scrolled search"
      },
      "search_type": {
        "type": "enum",
        "options": [
          "query_then_fetch",
          "dfs_query_then_fetch"
        ],
        "description": "Search operation type"
      },
      "explain": {
        "type": "boolean",
        "default": false,
        "description": "Specify whether to return detailed information about score computation as part of a hit"
      },
      "profile": {
        "type": "boolean",
        "default": false,
        "description": "Specify whether to profile the query execution"
      },
      "typed_keys": {
        "type": "boolean",
        "default": false,
        "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
      },
      "rest_total_hits_as_int": {
        "type": "boolean",
        "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response",
        "default": false
      },
      "ccs_minimize_roundtrips": {
        "type": "boolean",
        "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution",
        "default": true
      }
    },
    "body": {
      "description": "The search definition template and its params",
      "required": true
    }
  }
}
