{
  "msearch_template": {
    "documentation": {
      "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch-template",
      "description": "Run multiple templated searches"
    },
    "stability": "stable",
    "visibility": "public",
    "headers": {
      "accept": [
        "application/json"
      ],
      "content_type": [
        "application/x-ndjson"
      ]
    },
    "url": {
      "paths": [
        {
          "path": "/_msearch/template",
          "methods": [
            "GET",
            "POST"
          ]
        },
        {
          "path": "/{index}/_msearch/template",
          "methods": [
            "GET",
            "POST"
          ],
          "parts": {
            "index": {
              "type": "list",
              "description": "A comma-separated list of index names to use as default"
            }
          }
        }
      ]
    },
    "params": {
      "search_type": {
        "type": "enum",
        "options": [
          "query_then_fetch",
          "dfs_query_then_fetch"
        ],
        "description": "Search operation type"
      },
      "typed_keys": {
        "type": "boolean",
        "default": false,
        "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
      },
      "max_concurrent_searches": {
        "type": "long",
        "description": "Controls the maximum number of concurrent searches the multi search api will execute"
      },
      "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
      },
      "project_routing": {
        "type": "string",
        "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. Only supported in serverless."
      }
    },
    "body": {
      "description": "The request definitions (metadata-search request definition pairs), separated by newlines",
      "required": true,
      "serialize": "bulk"
    }
  }
}
