{
    "openapi": "3.0.2",
    "info": {
        "title": "swagger-4-es (elasticsearch)",
        "description": "This Swagger UI page runs through the basic [Elasticsearch](https://www.elastic.co/) API end points (it also works for [Opensearch](https://opensearch.org/) end points). It is intended to be used as a first introduction for anybody looking to pick upsome elasticsearch knowledge. \n\nThe page runs through the basics of index management and the key `CRUD` operations. It then goes on to document a number of the more complex features. Sample payloads and responses have been provided for each endpoint to assist in the learning process. Every CRUD end point requires that you specify an index name as a path parameter. For instructions on how to setup a elasticsearch cluster and connect up this Swagger UI page - head over to the [swagger-4-es](https://www.swarmee.net/swagger%204%20es/) page.",
        "version": "1.0"
    },
    "servers": [{
        "url": "https://localhost/"
    }],
    "paths": {
        "/_cluster/health": {
            "get": {
                "tags": [
                    "\ud83c\udf8a Cluster Basics"
                ],
                "summary": "Retrieve Cluster Health",
                "description": "Retrieve Cluster Health \n\nIdeally your cluster is green (which means no unreplicated shards) \n\nYellow means you have some unreplicated shards - if you create an index it may by default have mulitple shards.",
                "operationId": "retrieve_cluster_health__cluster_health_get",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "cluster_name": "swarmee",
                                            "status": "yellow",
                                            "timed_out": false,
                                            "number_of_nodes": 1,
                                            "number_of_data_nodes": 1,
                                            "discovered_master": true,
                                            "active_primary_shards": 1,
                                            "active_shards": 1,
                                            "relocating_shards": 0,
                                            "initializing_shards": 0,
                                            "unassigned_shards": 2,
                                            "delayed_unassigned_shards": 0,
                                            "number_of_pending_tasks": 0,
                                            "number_of_in_flight_fetch": 0,
                                            "task_max_waiting_in_queue_millis": 0,
                                            "active_shards_percent_as_number": 33.33333333333333
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_cat/indices": {
            "get": {
                "tags": [
                    "\u2728 Index Operations"
                ],
                "summary": "List Indices",
                "description": "`cat` stands for Compact and Aligned Text - there are many elasticserch endpoints under `_cat` \n\nThese endpoints are meant for humans to read as the text is neatly aligned in columns. \n\nHowever they have evolved to have a format parameter so you can get `json` back from them also.\n\nThis `cat` endpoint list indices and provides their state \n\nThe **v** parameter toggles the column headings on and off in the column view.  ",
                "operationId": "list_indices__cat_indices_get",
                "parameters": [{
                        "required": false,
                        "schema": {
                            "title": "V",
                            "type": "boolean"
                        },
                        "name": "v",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "allOf": [{
                                "$ref": "#/components/schemas/format_types"
                            }],
                            "default": "column"
                        },
                        "name": "format",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": [{
                                                "health": "green",
                                                "status": "open",
                                                "index": "country",
                                                "uuid": "jNi87tzhRgyDCnyqSeaWDQ",
                                                "pri": "1",
                                                "rep": "0",
                                                "docs.count": "0",
                                                "docs.deleted": "0",
                                                "store.size": "208b",
                                                "pri.store.size": "208b"
                                            },
                                            {
                                                "health": "green",
                                                "status": "open",
                                                "index": "test",
                                                "uuid": "Xk6o3Nv6QnqG2POSufHJaA",
                                                "pri": "1",
                                                "rep": "0",
                                                "docs.count": "0",
                                                "docs.deleted": "0",
                                                "store.size": "208b",
                                                "pri.store.size": "208b"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/": {
            "get": {
                "tags": [
                    "\u2728 Index Operations"
                ],
                "summary": "View Index Details",
                "description": "View the aliases, mappings and settings for an index.\n\n_**Aliases**_ are similar to table views from sql land - i.e. they don't hold data - they just point to one or more indexes. \n\n_**Mappings**_ defines the type of each field and how it is indexes \n\n_**Settings**_ defines the index level configuration.   ",
                "operationId": "view_index_details__index___get",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Index",
                        "type": "string"
                    },
                    "example": "country",
                    "name": "index",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "country": {
                                                "aliases": {},
                                                "mappings": {},
                                                "settings": {
                                                    "index": {
                                                        "creation_date": "1631913972854",
                                                        "number_of_shards": "1",
                                                        "number_of_replicas": "0",
                                                        "uuid": "yQ8dF5otQ5SKHyWQYlr9Jw",
                                                        "version": {
                                                            "created": "135217827"
                                                        },
                                                        "provided_name": "country"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "put": {
                "tags": [
                    "\u2728 Index Operations"
                ],
                "summary": "Create Index",
                "description": "Create an empty index in elasticsearch with a predefined configuration. \n\nOver time you will probably want to look at index templates - however you need to understand the fundamentals of index settings. \n\nBelow are a number of index configurations. ",
                "operationId": "create_index__index___put",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Index",
                        "type": "string"
                    },
                    "example": "country",
                    "name": "index",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "simple_index_creation": {
                                    "summary": "A simple index setting configuration",
                                    "description": "A **simple** index configuration. In this example we are just setting the number of shards and replicas",
                                    "value": {
                                        "settings": {
                                            "index": {
                                                "number_of_replicas": 0
                                            }
                                        }
                                    }
                                },
                                "complex_index_creation": {
                                    "summary": "A more complex index settings configuration",
                                    "description": "A more **complex** index settings example",
                                    "value": {
                                        "settings": {
                                            "index": {
                                                "codec": "best_compression",
                                                "number_of_replicas": 0,
                                                "number_of_shards": 1,
                                                "refresh_interval": "30s"
                                            }
                                        }
                                    }
                                },
                                "custom_analyzer_index_creation": {
                                    "summary": "A custom analyzer index configuration",
                                    "description": "This example highlights how to apply a custom analyzer to a specific field.",
                                    "value": {
                                        "mappings": {
                                            "properties": {
                                                "name": {
                                                    "type": "text",
                                                    "analyzer": "custom_analyzer",
                                                    "fields": {
                                                        "keyword": {
                                                            "type": "keyword",
                                                            "ignore_above": 256
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "settings": {
                                            "analysis": {
                                                "analyzer": {
                                                    "custom_analyzer": {
                                                        "tokenizer": "standard",
                                                        "filter": [
                                                            "lowercase",
                                                            "stopword_filter",
                                                            "snowball_filter"
                                                        ]
                                                    }
                                                },
                                                "filter": {
                                                    "snowball_filter": {
                                                        "type": "snowball"
                                                    },
                                                    "stopword_filter": {
                                                        "type": "stop",
                                                        "stopwords": [
                                                            "a",
                                                            "the",
                                                            "republic"
                                                        ]
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "nested_index_creation": {
                                    "summary": "A nested index configuration",
                                    "description": "Illustration on how to basically create subdocuments in elasticsearch",
                                    "value": {
                                        "mappings": {
                                            "properties": {
                                                "gdp": {
                                                    "type": "nested",
                                                    "properties": {
                                                        "amount": {
                                                            "type": "long"
                                                        },
                                                        "year": {
                                                            "type": "long"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true,
                                            "shards_acknowledged": true,
                                            "index": "country"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "delete": {
                "tags": [
                    "\u2728 Index Operations"
                ],
                "summary": "Delete Index",
                "description": "Delete an index (and all documents contained within the index)\n\nThese types of endpoints support asterisk (`*`) as a wild. \n\nThis is really helpful when you need to delete indices which have the date in the index name. E.g.; \n\n``` bash\ncurl -X 'DELETE' 'https://localhost/2020-01-*-applogs/' \n```\nBut be careful.",
                "operationId": "delete_index__index___delete",
                "parameters": [{
                    "description": "Index to be deleted",
                    "required": true,
                    "schema": {
                        "title": "The index name",
                        "type": "string",
                        "description": "Index to be deleted"
                    },
                    "example": "country",
                    "name": "index",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_settings": {
            "put": {
                "tags": [
                    "\u2728 Index Operations"
                ],
                "summary": "Update Index Settings",
                "description": "Update an existing indexes settings. \n\nFor example you might want to build an index with settings optimised for speed, however once its built you might want to optimise for redundancy (e.g. increasing the number of replicates), \n\n**Not** all index settings can be changed once an index is created.  ",
                "operationId": "update_index_settings__index___settings_put",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Index",
                        "type": "string"
                    },
                    "example": "country",
                    "name": "index",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "update_index_setting": {
                                    "summary": "A update to an index setting",
                                    "description": "A **simple** update index setting example",
                                    "value": {
                                        "index": {
                                            "number_of_replicas": 2
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_update/{_id}": {
            "post": {
                "tags": [
                    "\ud83e\udd73 Update Documents"
                ],
                "summary": "Update Document",
                "description": "Inserting a document with an existing document _id will replace the existing document - So\nif you need to replace a whole document with a existing document just use the create document \nwith `_id` end point.\nThere are two types of updates `doc` and `script`:\n\n- doc is used to add or update specific fields\n- script is used to perform more complex updates (e.g. adding an item to an existing list)",
                "operationId": "update_document__index___update___id__post",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": true,
                        "schema": {
                            "title": "Documemt _id",
                            "type": "string"
                        },
                        "name": "_id",
                        "in": "path"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "update_document_new_field": {
                                    "summary": "Add a field to a document",
                                    "description": "Add one additional field to a elasticsearch document",
                                    "value": {
                                        "doc": {
                                            "newField": "newFieldValue"
                                        }
                                    }
                                },
                                "update_document_script_remove_field": {
                                    "summary": "Remove a field from a document",
                                    "description": "Remove a field from one elasticsearch document",
                                    "value": {
                                        "script": "ctx._source.remove('newField')"
                                    }
                                },
                                "update_document_add_list": {
                                    "summary": "Add a list to a document",
                                    "description": "Add a list to an existing document",
                                    "value": {
                                        "doc": {
                                            "newList": [
                                                1,
                                                3,
                                                45,
                                                777
                                            ]
                                        }
                                    }
                                },
                                "update_document_add_item_to_list_if_not_present": {
                                    "summary": "Add an item to a list if not already present",
                                    "description": "Add an item to a list if not already present, note how the version number is not incremented and the result is `noop` when the value already exists in the list",
                                    "value": {
                                        "script": {
                                            "source": "/* first check to see if value is in the list */  if  (ctx._source.newList.contains(params.tag) != true) /* add it if not present */ {ctx._source.newList.add(params.tag)} else { ctx.op = 'none' }",
                                            "lang": "painless",
                                            "params": {
                                                "tag": 10000000000
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "UYIP9nsBc-WDXl5o2rS7",
                                            "_version": 4,
                                            "result": "updated",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 32,
                                            "_primary_term": 1
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_update_by_query": {
            "post": {
                "tags": [
                    "\ud83e\udd73 Update Documents"
                ],
                "summary": "Update By Query",
                "description": "Delete all documents that match a query. All of the powerful search language can be used here\nto identify what needs to be deleted. Depdending on the number of documents to be deleted you \nmay choose to submit this request synchronously or asynchronously based on the `wait_for_completion`\nflag. \n\nIf you choose asynchronously you are provided a `task_id` that you can use to manage the request\nat a later point.  ",
                "operationId": "update_by_query__index___update_by_query_post",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Wait For Completion",
                            "type": "boolean",
                            "default": false,
                            "desription": "submit asynchronously flag"
                        },
                        "name": "wait_for_completion",
                        "in": "query"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/update_operations__schema__search_model"
                            },
                            "examples": {
                                "update_document_by_query_add_new_field": {
                                    "summary": "Add a field to documents that meet query",
                                    "description": "Add one additional field to all documents that meet the query",
                                    "value": {
                                        "script": {
                                            "source": "ctx._source.bulkAddedField = 'updateByQuery'",
                                            "lang": "painless"
                                        },
                                        "query": {
                                            "match": {
                                                "subregion": "Asia"
                                            }
                                        }
                                    }
                                },
                                "update_document_by_query_remove_new_field": {
                                    "summary": "Remove a field from a document based on a query",
                                    "description": "Remove one  field to all documents that meet the query",
                                    "value": {
                                        "script": {
                                            "source": "ctx._source.remove('bulkAddedField')",
                                            "lang": "painless"
                                        },
                                        "query": {
                                            "match": {
                                                "subregion": "Asia"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response(sync)": {
                                        "summary": "JSON Response(sync)",
                                        "value": {
                                            "took": 139,
                                            "timed_out": false,
                                            "total": 3,
                                            "updated": 3,
                                            "deleted": 0,
                                            "batches": 1,
                                            "version_conflicts": 0,
                                            "noops": 0,
                                            "retries": {
                                                "bulk": 0,
                                                "search": 0
                                            },
                                            "throttled_millis": 0,
                                            "requests_per_second": -1,
                                            "throttled_until_millis": 0,
                                            "failures": []
                                        }
                                    },
                                    "JSON Response(async)": {
                                        "summary": "JSON Response(async)",
                                        "value": {
                                            "task": "houRpFPvSzSZe_TwFBhyFg:4125"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_doc/{_id}": {
            "get": {
                "tags": [
                    "\ud83c\udf89 Retrieve Documents"
                ],
                "summary": "Retrieve Document By Id",
                "description": "This end point simply retrieves a document based on the provided `_id`. \n\nNote the structure of the document returned:\n- At the top level we have various meta data about the document (e.g. `index` and `version`). \n\n- The original document is nested in a field called `_source`. ",
                "operationId": "retrieve_document_by_id__index___doc___id__get",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "example": "country",
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": true,
                        "schema": {
                            "title": " Id",
                            "type": "string"
                        },
                        "example": "1",
                        "name": "_id",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "1",
                                            "_version": 4,
                                            "_seq_no": 3,
                                            "_primary_term": 1,
                                            "found": true,
                                            "_source": {
                                                "name": "Afghanistan",
                                                "alpha2Code": "AF",
                                                "capital": "Kabul",
                                                "region": "Asia",
                                                "subregion": "Southern Asia",
                                                "area": 652230
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "post": {
                "tags": [
                    "\ud83d\ude80 Create Documents"
                ],
                "summary": "Create Document With Id",
                "description": "Store a document into elasticsearch while specifying an `_id` for the record.\n\nIf the index to store the document does not already exist it will be created \nwith the default settings and mapping parameters applied. \n\nIf the index and `_id` already exist then the document will be replaced. \n\nPlease see how the sample response differs (i.e. the `result` and `_version` fields)",
                "operationId": "create_document_with_id__index___doc___id__post",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "example": "country",
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": true,
                        "schema": {
                            "title": " Id",
                            "type": "string"
                        },
                        "example": "123456",
                        "name": "_id",
                        "in": "path"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/country_model"
                            },
                            "examples": {
                                "simple_single_country1": {
                                    "summary": "A simple country document (1)",
                                    "description": "A **simple** Afghanistan document with only a few fields",
                                    "value": {
                                        "name": "Afghanistan",
                                        "countryCode": "AF",
                                        "capital": "Kabul",
                                        "region": "Asia",
                                        "subregion": "Southern Asia",
                                        "area": 652230
                                    }
                                },
                                "simple_single_country2": {
                                    "summary": "A simple country document (2)",
                                    "description": "A **simple** Bahamas document with only a few fields",
                                    "value": {
                                        "name": "Commonwealth of the Bahamas",
                                        "countryCode": "BS",
                                        "capital": "Nassau",
                                        "area": 630,
                                        "region": "Americas"
                                    }
                                },
                                "simple_single_country3": {
                                    "summary": "A simple country document (3)",
                                    "description": "A **simple** Uganda document with only a few fields",
                                    "value": {
                                        "name": "Republic of Uganda",
                                        "countryCode": "UG",
                                        "capital": "Kampala",
                                        "region": "Africa"
                                    }
                                },
                                "simple_single_country4": {
                                    "summary": "A simple country document (4)",
                                    "description": "A **simple** Bermuda document with only a few fields",
                                    "value": {
                                        "name": "The Bermudas",
                                        "countryCode": "BM",
                                        "capital": "Hamilton",
                                        "region": "Americas",
                                        "gdp": [{
                                                "year": 2020,
                                                "amount": 8000000000
                                            },
                                            {
                                                "year": 2010,
                                                "amount": 6000000000
                                            }
                                        ]
                                    }
                                },
                                "simple_single_country5": {
                                    "summary": "A simple country document (5)",
                                    "description": "A **simple** Angola document with many fields of different types",
                                    "value": {
                                        "name": "Angola",
                                        "countryCode": "AO",
                                        "capital": "Luanda",
                                        "region": "Africa",
                                        "subregion": "Middle Africa",
                                        "latlng": [-12.5,
                                            18.5
                                        ],
                                        "area": 1246000,
                                        "gdp": [{
                                                "year": 2020,
                                                "amount": 62000000000
                                            },
                                            {
                                                "year": 2010,
                                                "amount": 83000000000
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response(Created)": {
                                        "summary": "JSON Response(Created)",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "1",
                                            "_version": 1,
                                            "result": "created",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 0,
                                            "_primary_term": 1
                                        }
                                    },
                                    "JSON Response(Updated)": {
                                        "summary": "JSON Response(Updated)",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "1",
                                            "_version": 2,
                                            "result": "updated",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 5,
                                            "_primary_term": 1
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "delete": {
                "tags": [
                    "\ud83e\udd84 Delete Documents"
                ],
                "summary": "Delete Document",
                "description": "Delete an individual document based on the document `_id`.",
                "operationId": "delete_document__index___doc___id__delete",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": true,
                        "schema": {
                            "title": " Id",
                            "type": "string"
                        },
                        "name": "_id",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "1",
                                            "_version": 5,
                                            "result": "deleted",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 13,
                                            "_primary_term": 1
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_doc": {
            "post": {
                "tags": [
                    "\ud83d\ude80 Create Documents"
                ],
                "summary": "Create Document Without Id",
                "description": "Store a document into elasticsearch, the `_id` for the record will be \ngenerated by elasticsearch. \n\nIf the index to store the document does not already exist it will be created \nwith the default settings and mappings. \n\nThe pipeline query string parameter identifies a series of `processesors` that should be applied to the document before indexing. For example appending in the index datetime to the source document. Pipelines are created using the `_ingest/pipeline` endpoints. \n\n\nThe HTTP response code is 201 for this request. ",
                "operationId": "create_document_without_id__index___doc_post",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "example": "country",
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pipeline",
                            "type": "string"
                        },
                        "name": "pipeline",
                        "in": "query"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/country_model"
                            },
                            "examples": {
                                "simple_single_country1": {
                                    "summary": "A simple country document (1)",
                                    "description": "A **simple** Afghanistan document with only a few fields",
                                    "value": {
                                        "name": "Afghanistan",
                                        "countryCode": "AF",
                                        "capital": "Kabul",
                                        "region": "Asia",
                                        "subregion": "Southern Asia",
                                        "area": 652230
                                    }
                                },
                                "simple_single_country2": {
                                    "summary": "A simple country document (2)",
                                    "description": "A **simple** Bahamas document with only a few fields",
                                    "value": {
                                        "name": "Commonwealth of the Bahamas",
                                        "countryCode": "BS",
                                        "capital": "Nassau",
                                        "area": 630,
                                        "region": "Americas"
                                    }
                                },
                                "simple_single_country3": {
                                    "summary": "A simple country document (3)",
                                    "description": "A **simple** Uganda document with only a few fields",
                                    "value": {
                                        "name": "Republic of Uganda",
                                        "countryCode": "UG",
                                        "capital": "Kampala",
                                        "region": "Africa"
                                    }
                                },
                                "simple_single_country4": {
                                    "summary": "A simple country document (4)",
                                    "description": "A **simple** Bermuda document with only a few fields",
                                    "value": {
                                        "name": "The Bermudas",
                                        "countryCode": "BM",
                                        "capital": "Hamilton",
                                        "region": "Americas",
                                        "gdp": [{
                                                "year": 2020,
                                                "amount": 8000000000
                                            },
                                            {
                                                "year": 2010,
                                                "amount": 6000000000
                                            }
                                        ]
                                    }
                                },
                                "simple_single_country5": {
                                    "summary": "A simple country document (5)",
                                    "description": "A **simple** Angola document with many fields of different types",
                                    "value": {
                                        "name": "Angola",
                                        "countryCode": "AO",
                                        "capital": "Luanda",
                                        "region": "Africa",
                                        "subregion": "Middle Africa",
                                        "latlng": [-12.5,
                                            18.5
                                        ],
                                        "area": 1246000,
                                        "gdp": [{
                                                "year": 2020,
                                                "amount": 62000000000
                                            },
                                            {
                                                "year": 2010,
                                                "amount": 83000000000
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "SoK49XsBc-WDXl5oTbQG",
                                            "_version": 1,
                                            "result": "created",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 6,
                                            "_primary_term": 1
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_bulk": {
            "post": {
                "tags": [
                    "\ud83d\ude80 Create Documents"
                ],
                "summary": "Create Documents In Bulk",
                "description": "Bulk load documents into elasticsearch, this endpoint is the most efficient method of push large volumes of data into elasticsearch.\nThe required input format is new line delimited json documents (```ndjson```). A sample new line delimited json file\ncan found [here](https://swagger-4-es.swarmee.net/bulk-country-data.ndjson). Please download it, then select it to submit it to\nthe _bulk endpoint. \n\nEach indexing request is made up of a pair of lines in the ```ndjson``` file - the first line describes the bulk action to be performed,\nindex target, _id and other associated metadata. The second line contains the source document.",
                "operationId": "create_documents_in_bulk__bulk_post",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "File",
                                "type": "string",
                                "format": "binary"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "took": 50,
                                            "errors": false,
                                            "items": [{
                                                    "index": {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "1",
                                                        "_version": 4,
                                                        "result": "updated",
                                                        "_shards": {
                                                            "total": 1,
                                                            "successful": 1,
                                                            "failed": 0
                                                        },
                                                        "_seq_no": 14,
                                                        "_primary_term": 1,
                                                        "status": 200
                                                    }
                                                },
                                                {
                                                    "index": {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "2",
                                                        "_version": 4,
                                                        "result": "updated",
                                                        "_shards": {
                                                            "total": 1,
                                                            "successful": 1,
                                                            "failed": 0
                                                        },
                                                        "_seq_no": 15,
                                                        "_primary_term": 1,
                                                        "status": 200
                                                    }
                                                },
                                                {
                                                    "index": {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "3",
                                                        "_version": 4,
                                                        "result": "updated",
                                                        "_shards": {
                                                            "total": 1,
                                                            "successful": 1,
                                                            "failed": 0
                                                        },
                                                        "_seq_no": 16,
                                                        "_primary_term": 1,
                                                        "status": 200
                                                    }
                                                },
                                                {
                                                    "index": {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "4",
                                                        "_version": 4,
                                                        "result": "updated",
                                                        "_shards": {
                                                            "total": 1,
                                                            "successful": 1,
                                                            "failed": 0
                                                        },
                                                        "_seq_no": 17,
                                                        "_primary_term": 1,
                                                        "status": 200
                                                    }
                                                },
                                                {
                                                    "index": {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "5",
                                                        "_version": 3,
                                                        "result": "updated",
                                                        "_shards": {
                                                            "total": 1,
                                                            "successful": 1,
                                                            "failed": 0
                                                        },
                                                        "_seq_no": 18,
                                                        "_primary_term": 1,
                                                        "status": 200
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_search": {
            "post": {
                "tags": [
                    "\ud83c\udf89 Retrieve Documents"
                ],
                "summary": "Retrieve Documents By Search",
                "description": "This is the most feature rich endpoint in elasticsearch - coming from sql the searches that you can\nperform will **blown your mind**. \n\nWe will just cover the basics here now - but lots more to come on this. \nA number of example query types have been provided. \n\nThis end point can also been used to sample some documents when submitted without a request body \n(i.e. with no search parameters). By default only ten documents will be returned. \n\nThe sample response shows illustrates the structure that will be returned. \nAt the top level we have details about the search execution (e.g. `took`, `timed_out` and shard details)\nThen we have a `hits` key which has summary details on the search (e.g. `max_score` and `total` hits)\nas well as sub `hits` key which lists the search results in score order.  ",
                "operationId": "retrieve_documents_by_search__index___search_post",
                "parameters": [{
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string"
                        },
                        "example": "country",
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Size",
                            "type": "integer",
                            "default": 10
                        },
                        "name": "size",
                        "in": "query"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/retrieve_operations__schema__search_model"
                            },
                            "examples": {
                                "match_all_query": {
                                    "summary": "A match all example",
                                    "value": {
                                        "query": {
                                            "match_all": {}
                                        }
                                    }
                                },
                                "query_string_query": {
                                    "summary": "A query string example",
                                    "value": {
                                        "query": {
                                            "query_string": {
                                                "query": "af"
                                            }
                                        }
                                    }
                                },
                                "match_query": {
                                    "summary": "A match query example",
                                    "description": "With the default mapping `Bermuda Republic` is not found and the name in the source document is `The Bermudas`. however when the index is created with the supplied mapping (which leverages a custom analyzer) then `Bermuda Republic` is a match for `The Bermudas`. The reason being is that the source document and the search terms are processed to both become `Bermuda`",
                                    "value": {
                                        "query": {
                                            "match": {
                                                "name": "Bermuda Republic"
                                            }
                                        }
                                    }
                                },
                                "range_query": {
                                    "summary": "A range query example",
                                    "description": "Basically return all country documents with an area of greater than or equal to `1`",
                                    "value": {
                                        "query": {
                                            "range": {
                                                "area": {
                                                    "gte": 1
                                                }
                                            }
                                        }
                                    }
                                },
                                "sub_document_query_without_nesting": {
                                    "summary": "Subdocument querying without index nesting",
                                    "description": "Subdocument querying without index nesting. This incorrectly returns `The Bermudas` document. \nBasically what is saved without index nesting is gdp.year = [`2010`, `2020`] and gdp.amount = [`6000000000`, `8000000000`].There is no correlation between the sub documents. ",
                                    "value": {
                                        "query": {
                                            "bool": {
                                                "must": [{
                                                        "range": {
                                                            "gdp.year": {
                                                                "lte": 2015
                                                            }
                                                        }
                                                    },
                                                    {
                                                        "range": {
                                                            "gdp.amount": {
                                                                "gte": 7000000000
                                                            }
                                                        }
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                },
                                "sub_document_query_with_nesting": {
                                    "summary": "Subdocument querying with index nesting configured",
                                    "description": "Subdocument querying with index nesting. This correctly does not return the `The Bermudas` document",
                                    "value": {
                                        "query": {
                                            "nested": {
                                                "path": "gdp",
                                                "query": {
                                                    "bool": {
                                                        "must": [{
                                                                "range": {
                                                                    "gdp.year": {
                                                                        "lte": 2015
                                                                    }
                                                                }
                                                            },
                                                            {
                                                                "range": {
                                                                    "gdp.amount": {
                                                                        "gte": 7000000000
                                                                    }
                                                                }
                                                            }
                                                        ]
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "took": 26,
                                            "timed_out": false,
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "skipped": 0,
                                                "failed": 0
                                            },
                                            "hits": {
                                                "total": {
                                                    "value": 3,
                                                    "relation": "eq"
                                                },
                                                "max_score": 0.036367644,
                                                "hits": [{
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "1",
                                                        "_score": 0.036367644,
                                                        "_source": {
                                                            "name": "Afghanistan",
                                                            "alpha2Code": "AF",
                                                            "capital": "Kabul",
                                                            "region": "Asia",
                                                            "subregion": "Southern Asia",
                                                            "area": 652230
                                                        }
                                                    },
                                                    {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "5",
                                                        "_score": 0.036367644,
                                                        "_source": {
                                                            "name": "Afghanistan",
                                                            "alpha2Code": "AF",
                                                            "capital": "Kabul",
                                                            "region": "Asia",
                                                            "subregion": "Southern Asia",
                                                            "area": 652230
                                                        }
                                                    },
                                                    {
                                                        "_index": "country",
                                                        "_type": "_doc",
                                                        "_id": "UIK69XsBc-WDXl5oS7Q1",
                                                        "_score": 0.036367644,
                                                        "_source": {
                                                            "name": "Afghanistan",
                                                            "alpha2Code": "AF",
                                                            "capital": "Kabul",
                                                            "region": "Asia",
                                                            "subregion": "Southern Asia",
                                                            "area": 652230
                                                        }
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_delete_by_query": {
            "post": {
                "tags": [
                    "\ud83e\udd84 Delete Documents"
                ],
                "summary": "Delete By Query",
                "description": "Delete all documents that match a query. All of the powerful search language can be used here\nto identify what needs to be deleted. Depdending on the number of documents to be deleted you \nmay choose to submit this request synchronously or asynchronously based on the `wait_for_completion`\nflag. \n\nIf you choose asynchronously you are provided a `task_id` that you can use to manage the request\nat a later point.  ",
                "operationId": "delete_by_query__index___delete_by_query_post",
                "parameters": [{
                        "description": "Index Name",
                        "required": true,
                        "schema": {
                            "title": "Index",
                            "type": "string",
                            "description": "Index Name"
                        },
                        "example": "country",
                        "name": "index",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Wait For Completion",
                            "type": "boolean",
                            "default": false,
                            "desription": "submit asynchronously flag"
                        },
                        "name": "wait_for_completion",
                        "in": "query"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/retrieve_operations__schema__search_model"
                            },
                            "examples": {
                                "query_string_query": {
                                    "summary": "A query string example",
                                    "value": {
                                        "query": {
                                            "query_string": {
                                                "query": "af"
                                            }
                                        }
                                    }
                                },
                                "match_all": {
                                    "summary": "A match all query example",
                                    "description": "A match all query.",
                                    "value": {
                                        "query": {
                                            "match_all": {}
                                        }
                                    }
                                },
                                "match_query": {
                                    "summary": "A match query example",
                                    "description": "A **normal** item works correctly.",
                                    "value": {
                                        "query": {
                                            "match": {
                                                "region": "asia"
                                            }
                                        }
                                    }
                                },
                                "range_query": {
                                    "summary": "A range query example",
                                    "description": "Basically return all country documents with an area of greater than or equal to `1`",
                                    "value": {
                                        "query": {
                                            "range": {
                                                "area": {
                                                    "gte": 1
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response(sync)": {
                                        "summary": "JSON Response(sync)",
                                        "value": {
                                            "took": 67,
                                            "timed_out": false,
                                            "total": 8,
                                            "deleted": 8,
                                            "batches": 1,
                                            "version_conflicts": 0,
                                            "noops": 0,
                                            "retries": {
                                                "bulk": 0,
                                                "search": 0
                                            },
                                            "throttled_millis": 0,
                                            "requests_per_second": -1,
                                            "throttled_until_millis": 0,
                                            "failures": []
                                        }
                                    },
                                    "JSON Response(async)": {
                                        "summary": "JSON Response(async)",
                                        "value": {
                                            "task": "houRpFPvSzSZe_TwFBhyFg:4125"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_analyze": {
            "post": {
                "tags": [
                    "\ud83d\udd25 Text Analysis"
                ],
                "summary": "Text Analysis",
                "description": "The *analyze* endpoint allows you test out how your data will be analyzed and indexed.\nThe default behaviour is for your search terms to be analyzed using the same analysis chain.\nE.g. if you split terms on dashes and lowercase the characters\nthe same processing will be applied at index time to the documents as well as at search time to\nthe searched terms. \n\n\nOut of the box elastic comes with 8 \"built-in\" analyzers, which are a pre configured combination of:\n- Character Filters, \n- Tokenizers, and\n- Token Filters  \n\nPopular analyzers include:\n- Standard - which tokenizes based on unicode text logic, removes punctuation and lowercases terms. \n- Keyword - which basically preforms no analysis, including no tokenization (e.g. a phase comes in and comes out a phase).\n- Simple - which tokenizes whenever it hits a character that is not a letter.\n- Stop - which removes stop words (based off the simple analyzer). \n\nIf the out of the box analyzers don't meet your requirements, you can create your own analysis chain (i.e. analyzer).\nWhich basically just involves stringing together the avaliable `Character Filters`, `Tokenizers` and `Token Filters`. \nExamples of each are provided below:\n<details><summary>Character Filters - preprocess characters before passed to tokenizer</summary>\nCharacter filters include: \n\n- **Mapping** - maps text (e.g. `:)` = good/happy). \n\n- **HTML Strip** - basically tries to remove HTML garbage from text before indexing. \n\n- **Pattern Replace** - firstly I've never had a need to use this character filter. It allows you to use regex to fiddle with the text. \n\n</p>\n</details>\n<details><summary>Tokenization - how the text is broken down into tokens</summary>\nAvaliable tokenizers include: \n\n- **Letter** (breaks on non leters) \n\n- **Standard** (grammer based tokenisation) - note however the apostrophe `s` is kept with the preceding word   \n\n- **Classic** (pretty good for english however `standard` is preferred now with most general language support) \n\n- **Ngram** (ngrams for all tokens) - default is min_gram 1 and max_gram 2 \n\n- **Edge_ngram** (ngrams from the edges) - default is min_gram 1 and max_gram 2  \n\n- **Keyword** (no tokenization) \n\n\n</p>\n</details>\n<details><summary>Token Filters - processing of tokens (add, modify, delete) from tokenizer</summary>\nAvaliable Token Filters include: \n\n- **Apostrophe** - removes apostrophe and text following the apostrophe (e.g. john's becomes john) \n\n- **Stopwords** - removes configured stopwords so they are not indexed. \n\n- **stemmer** - which supports a number of stemming algorithms. \n\n- **Snowball** - snowball stemming of terms. \n \n</p>\n</details>\n\n\n\nNote: including `\"explain\" : true` in the request payload will allow you to review the full analysis chain. ",
                "operationId": "text_analysis__analyze_post",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "Standard_Analyzer": {
                                    "summary": "Standard Analyzer",
                                    "description": "Standard analyzer, note the lowercasing and removal of non leters an numbers.",
                                    "value": {
                                        "analyzer": "standard",
                                        "text": "Johnny #5 is Alive!!"
                                    }
                                },
                                "Keyword_Analyzer": {
                                    "summary": "Keyword Analyzer",
                                    "description": "Basically no analysis, no lowercasing, no tokenization, no removing punctuation - (just phrase in phrase out). ",
                                    "value": {
                                        "analyzer": "keyword",
                                        "text": "Johnny #5 is Alive!!"
                                    }
                                },
                                "Stop_Analyzer": {
                                    "summary": "Stop Analyzer",
                                    "description": "Stop analyzer example. Note the removal of the term `The`.",
                                    "value": {
                                        "analyzer": "stop",
                                        "text": "Johnny #5 is Alive!!"
                                    }
                                },
                                "Mapping_Character_Filter": {
                                    "summary": "Mapping Character Filter",
                                    "description": "Map one or multiple characters to different text. In this example we are mapping emojis.",
                                    "value": {
                                        "char_filter": [{
                                            "type": "mapping",
                                            "mappings": [
                                                ":) => good",
                                                ":( => bad"
                                            ]
                                        }],
                                        "tokenizer": "standard",
                                        "text": "I feel :)"
                                    }
                                },
                                "HTML_Strip_Character_Filter": {
                                    "summary": "HTML Strip Character Filter",
                                    "description": "Remove HTML from text. Really helpful if you are scrapping and indexing the extracted html. You can see in the example that all the HTML tags are removed. ",
                                    "value": {
                                        "char_filter": [{
                                            "type": "html_strip"
                                        }],
                                        "tokenizer": "standard",
                                        "text": "<details><summary>Background</summary>\n        <b>interesting text</b>\n        </p>"
                                    }
                                },
                                "Pattern_Replace_Character_Filter": {
                                    "summary": "Pattern(regex) Replace Character Filter",
                                    "description": "Identify text to be replaced with a regex pattern. The example takes an account number string and creates a number from all the numbers contained in the string. ",
                                    "value": {
                                        "tokenizer": "standard",
                                        "char_filter": [{
                                            "pattern": "[^0-9]",
                                            "type": "pattern_replace",
                                            "replacement": ""
                                        }],
                                        "text": "#128-523-832-1 AUD"
                                    }
                                },
                                "Standard_Tokenizing": {
                                    "summary": "Standard Tokenizer",
                                    "description": "Grammer based tokenisation - note however the apostrophe `s` is kept with the preceding word in the example. This is the default configured tokenizer - really good value - you can get a long way with this tokenizerNote in the example we have also provided a lowercase filter to the analysis chain.",
                                    "value": {
                                        "tokenizer": "standard",
                                        "filter": [
                                            "lowercase"
                                        ],
                                        "text": "#1 A Driving Instructor's rule."
                                    }
                                },
                                "Simple_Tokenizing": {
                                    "summary": "Simple Tokenizer",
                                    "description": "If you don't want to use one of the default tokenisers you can make your own. Here we specify a few different tokenize on characters. \n \nThe example is intended to highlight this is actually harder than you think and users never type in what you expect.",
                                    "value": {
                                        "tokenizer": {
                                            "type": "char_group",
                                            "tokenize_on_chars": [
                                                "whitespace",
                                                "-",
                                                "\n",
                                                "."
                                            ]
                                        },
                                        "text": "... it was delicious,today  ..."
                                    }
                                },
                                "Classic_Tokenizier": {
                                    "summary": "Classic Tokenizer",
                                    "description": "Pretty good for english toeknization however `standard` is preferred now with more general language support). \nEach tokenizer comes with some configuration parameters. For example `max token length` for the classic tokenizer. ",
                                    "value": {
                                        "tokenizer": {
                                            "type": "classic",
                                            "max_token_length": 5
                                        },
                                        "text": "... it was delicious,Today  ..."
                                    }
                                },
                                "Ngram_Tokenizier": {
                                    "summary": "Ngram Tokenizer",
                                    "description": "Standard Ngram tokenization of each word. Noting for ngram matching you probably need to use a diffrent search time analyzer. \nCause the default behaviour will be to tokenize the search term through this analysis chain. ",
                                    "value": {
                                        "tokenizer": {
                                            "type": "ngram",
                                            "min_gram": 5,
                                            "max_gram": 6,
                                            "token_chars": [
                                                "letter",
                                                "digit"
                                            ]
                                        },
                                        "filter": [
                                            "lowercase"
                                        ],
                                        "text": [
                                            "... it was delicious,Today  ..."
                                        ]
                                    }
                                },
                                "Edge_Ngram_Tokenizier": {
                                    "summary": "Edge Ngram Tokenizer",
                                    "description": "Standard Edge Ngram tokenization of each word. Noting for ngram matching you probably need to use a diffrent search time analyzer. \nCause the default behaviour will be to tokenize the search term through this analysis chain. ",
                                    "value": {
                                        "tokenizer": {
                                            "type": "edge_ngram",
                                            "min_gram": 5,
                                            "max_gram": 12,
                                            "token_chars": [
                                                "letter",
                                                "digit"
                                            ]
                                        },
                                        "text": "... it was delicious,Today  ..."
                                    }
                                },
                                "Keyword_Tokenizier": {
                                    "summary": "Keyword Tokenizier",
                                    "description": "Keyword tokenizing is basically no tokenisation. However you may wish to pairkeyword tokenisation with a lower case filter, so whey you perform a term aggregation on the textvalues with mixed case will be merged together. Of note in the example is that the analyze endpoint does support a list of terms to analyze.",
                                    "value": {
                                        "tokenizer": {
                                            "type": "keyword"
                                        },
                                        "filter": [
                                            "lowercase"
                                        ],
                                        "text": [
                                            "John Smith",
                                            "john smith"
                                        ]
                                    }
                                },
                                "Simple_Pattern_Tokenizier": {
                                    "summary": "Simple Pattern Tokenizier",
                                    "description": "Tokenizing based on supplied simple patten. In this example we have some medicine and we want to strip the volumes out of the names",
                                    "value": {
                                        "tokenizer": {
                                            "type": "simple_pattern",
                                            "pattern": "[0123456789]{3,7}"
                                        },
                                        "filter": [
                                            "lowercase"
                                        ],
                                        "text": [
                                            "Ventolin 110mg",
                                            "Becloforte-1000-mg"
                                        ]
                                    }
                                },
                                "Character_Group_Tokenizer": {
                                    "summary": "Chracter Group Tokenizier",
                                    "description": "Super simple example of CSV tokenizing using the character group tokenizer",
                                    "value": {
                                        "tokenizer": {
                                            "type": "char_group",
                                            "tokenize_on_chars": [
                                                ","
                                            ]
                                        },
                                        "text": "James,Brown,Rules"
                                    }
                                },
                                "Apostrophe_Filter": {
                                    "summary": "Apostrophe Filter",
                                    "description": "Remove apostrophes and following text",
                                    "value": {
                                        "tokenizer": "standard",
                                        "filter": [{
                                            "type": "apostrophe"
                                        }],
                                        "text": [
                                            "John's runners",
                                            "the company's accounts"
                                        ]
                                    }
                                },
                                "Stopword_Filter": {
                                    "summary": "Stopword Filter",
                                    "description": "Remove configured stopwords",
                                    "value": {
                                        "tokenizer": "standard",
                                        "filter": [{
                                            "type": "stop",
                                            "ignore_case": true
                                        }],
                                        "text": "to be or not to be, that is the question"
                                    }
                                },
                                "Stemming_Snowball_Filter": {
                                    "summary": "Stemming Snowball Filter",
                                    "description": "Stemming of tokens using the snowball algorithm",
                                    "value": {
                                        "tokenizer": "standard",
                                        "filter": [{
                                                "type": "lowercase"
                                            },
                                            {
                                                "type": "snowball",
                                                "language": "english"
                                            }
                                        ],
                                        "text": "Tennis player's racquets"
                                    }
                                },
                                "Stemming_Kstem_Filter": {
                                    "summary": "Stemming Kstem Filter",
                                    "description": "Stemming of tokens using the Kstem algorithm. Equivalent to the `light_english` stemmer. . Most of these stemming algorithms assume that the text has already been lower cased. Hence why we have the lowercasign filter as the first filter.",
                                    "value": {
                                        "tokenizer": "standard",
                                        "filter": [{
                                                "type": "lowercase"
                                            },
                                            {
                                                "type": "kstem"
                                            }
                                        ],
                                        "text": "Tennis player's racquets"
                                    }
                                },
                                "Stemming_English_Filter": {
                                    "summary": "Stemming English Filter",
                                    "description": "Standard english stemming. Noting the additional filters applied. ",
                                    "value": {
                                        "tokenizer": "standard",
                                        "filter": [{
                                                "type": "lowercase"
                                            },
                                            {
                                                "type": "apostrophe"
                                            },
                                            {
                                                "type": "stemmer"
                                            }
                                        ],
                                        "text": "Tennis player's racquets"
                                    }
                                },
                                "Full_Custom_Analysis_Chain": {
                                    "summary": "Fully Custom Analysis Example",
                                    "description": "Example full custom analysis Chain. ",
                                    "value": {
                                        "char_filter": [{
                                            "type": "mapping",
                                            "mappings": [
                                                ":) => good",
                                                ":( => bad"
                                            ]
                                        }],
                                        "tokenizer": "standard",
                                        "filter": [{
                                                "type": "lowercase"
                                            },
                                            {
                                                "type": "stemmer",
                                                "language": "english"
                                            },
                                            {
                                                "type": "stop",
                                                "stopwords": [
                                                    "i'm"
                                                ]
                                            }
                                        ],
                                        "text": "I'm feeling :)"
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "tokens": [{
                                                    "token": "johnny",
                                                    "start_offset": 0,
                                                    "end_offset": 6,
                                                    "type": "<ALPHANUM>",
                                                    "position": 0
                                                },
                                                {
                                                    "token": "5",
                                                    "start_offset": 8,
                                                    "end_offset": 9,
                                                    "type": "<NUM>",
                                                    "position": 1
                                                },
                                                {
                                                    "token": "is",
                                                    "start_offset": 10,
                                                    "end_offset": 12,
                                                    "type": "<ALPHANUM>",
                                                    "position": 2
                                                },
                                                {
                                                    "token": "alive",
                                                    "start_offset": 13,
                                                    "end_offset": 18,
                                                    "type": "<ALPHANUM>",
                                                    "position": 3
                                                }
                                            ]
                                        }
                                    },
                                    "JSON Response(with explain equals True)": {
                                        "summary": "JSON Response(with explain equals True)",
                                        "value": {
                                            "detail": {
                                                "custom_analyzer": false,
                                                "analyzer": {
                                                    "name": "standard",
                                                    "tokens": [{
                                                            "token": "johnny",
                                                            "start_offset": 0,
                                                            "end_offset": 6,
                                                            "type": "<ALPHANUM>",
                                                            "position": 0,
                                                            "bytes": "[6a 6f 68 6e 6e 79]",
                                                            "positionLength": 1,
                                                            "termFrequency": 1
                                                        },
                                                        {
                                                            "token": "5",
                                                            "start_offset": 8,
                                                            "end_offset": 9,
                                                            "type": "<NUM>",
                                                            "position": 1,
                                                            "bytes": "[35]",
                                                            "positionLength": 1,
                                                            "termFrequency": 1
                                                        },
                                                        {
                                                            "token": "is",
                                                            "start_offset": 10,
                                                            "end_offset": 12,
                                                            "type": "<ALPHANUM>",
                                                            "position": 2,
                                                            "bytes": "[69 73]",
                                                            "positionLength": 1,
                                                            "termFrequency": 1
                                                        },
                                                        {
                                                            "token": "alive",
                                                            "start_offset": 13,
                                                            "end_offset": 18,
                                                            "type": "<ALPHANUM>",
                                                            "position": 3,
                                                            "bytes": "[61 6c 69 76 65]",
                                                            "positionLength": 1,
                                                            "termFrequency": 1
                                                        }
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_analyze": {
            "post": {
                "tags": [
                    "\ud83d\udd25 Text Analysis"
                ],
                "summary": "Text Analysis For Specific Index",
                "description": "Analyze how text would be analyzed for a specific index. \n\nIncluding `\"explain\" : true` in the request will allow you to review the full analysis chain. \n ",
                "operationId": "text_analysis_for_specific_index__index___analyze_post",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Index",
                        "type": "string"
                    },
                    "name": "index",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "Standard_Analyzer - The Bermudas": {
                                    "summary": "Standard (Default) Anayzer - The Bermudas.",
                                    "description": "Standard analyzer - `The Bermudas` is present in the source document.",
                                    "value": {
                                        "analyzer": "standard",
                                        "text": "The Bermudas"
                                    }
                                },
                                "Custom_Analyzer - The Bermudas": {
                                    "summary": "Custom Analyzer - The Bermudas.",
                                    "description": "Custom analyzer - `The Bermudas` is present in the source document.",
                                    "value": {
                                        "field": "name",
                                        "text": "The Bermudas"
                                    }
                                },
                                "Standard_Analyzer - Bermuda Republic": {
                                    "summary": "Standard (Default) Anayzer - Bermuda Republic",
                                    "description": "Standard analyzer - `Bermuda Republic` is present in the source document.",
                                    "value": {
                                        "analyzer": "standard",
                                        "text": "Bermuda Republic"
                                    }
                                },
                                "Custom_Analyzer - Bermuda Republic": {
                                    "summary": "Custom Analyzer - Bermuda Republic",
                                    "description": "Custom analyzer - `Bermuda Republic` is present in the source document.",
                                    "value": {
                                        "field": "name",
                                        "text": "Bermuda Republic"
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "tokens": [{
                                                    "token": "jumping",
                                                    "start_offset": 0,
                                                    "end_offset": 7,
                                                    "type": "<ALPHANUM>",
                                                    "position": 0
                                                },
                                                {
                                                    "token": "jack's",
                                                    "start_offset": 8,
                                                    "end_offset": 14,
                                                    "type": "<ALPHANUM>",
                                                    "position": 1
                                                },
                                                {
                                                    "token": "jumpers",
                                                    "start_offset": 15,
                                                    "end_offset": 22,
                                                    "type": "<ALPHANUM>",
                                                    "position": 2
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_index_template/{indexTemplateName}": {
            "get": {
                "tags": [
                    "\ud83d\udd06 Index Templates"
                ],
                "summary": "Retrieve Index Template",
                "description": "Retrieve a previously saved index template - based on the \nspecified index template name",
                "operationId": "retrieve_index_template__index_template__indexTemplateName__get",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Indextemplatename",
                        "type": "string"
                    },
                    "example": "country-index-template",
                    "name": "indexTemplateName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "index_templates": [{
                                                "name": "country-index-template",
                                                "index_template": {
                                                    "index_patterns": [
                                                        "country",
                                                        "country*"
                                                    ],
                                                    "template": {
                                                        "settings": {
                                                            "index": {
                                                                "number_of_shards": "1",
                                                                "codec": "best_compression",
                                                                "number_of_replicas": "0"
                                                            }
                                                        },
                                                        "mappings": {
                                                            "properties": {
                                                                "countryCode": {
                                                                    "type": "keyword"
                                                                }
                                                            }
                                                        }
                                                    },
                                                    "composed_of": [],
                                                    "priority": 1
                                                }
                                            }]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "put": {
                "tags": [
                    "\ud83d\udd06 Index Templates"
                ],
                "summary": "Save Index Template",
                "description": "This endpoint is used to save an index template into the cluster.\nOnce a template has been saved into the cluster all indexes created after that match the index pattern will have this template applied. ",
                "operationId": "save_index_template__index_template__indexTemplateName__put",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Indextemplatename",
                        "type": "string"
                    },
                    "example": "country-index-template",
                    "name": "indexTemplateName",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "simple_index_template_creation": {
                                    "summary": "A simple index template configuration",
                                    "description": "A **simple** index template configuration. In this example we set a few index settings and then proivde the mapping for one field.",
                                    "value": {
                                        "index_patterns": [
                                            "country",
                                            "country*"
                                        ],
                                        "priority": 1,
                                        "template": {
                                            "settings": {
                                                "number_of_shards": 1,
                                                "number_of_replicas": 0,
                                                "codec": "best_compression"
                                            },
                                            "mappings": {
                                                "properties": {
                                                    "countryCode": {
                                                        "type": "keyword"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "complex_index_template_creation": {
                                    "summary": "A index template with 'nested field' and a 'text analysis' analyzer",
                                    "description": "In this configuration we configure some text analysis of the name field, nesting for the gdp list, as well as provide some meta data around the template and allocate a priority to the application of the template",
                                    "value": {
                                        "index_patterns": [
                                            "country",
                                            "country*"
                                        ],
                                        "template": {
                                            "settings": {
                                                "number_of_shards": 1,
                                                "number_of_replicas": 0,
                                                "codec": "best_compression",
                                                "analysis": {
                                                    "analyzer": {
                                                        "custom_analyzer": {
                                                            "tokenizer": "standard",
                                                            "filter": [
                                                                "lowercase",
                                                                "stopword_filter",
                                                                "snowball_filter"
                                                            ]
                                                        }
                                                    },
                                                    "filter": {
                                                        "snowball_filter": {
                                                            "type": "snowball"
                                                        },
                                                        "stopword_filter": {
                                                            "type": "stop",
                                                            "stopwords": [
                                                                "a",
                                                                "the",
                                                                "republic"
                                                            ]
                                                        }
                                                    }
                                                }
                                            },
                                            "mappings": {
                                                "properties": {
                                                    "name": {
                                                        "type": "text",
                                                        "analyzer": "custom_analyzer",
                                                        "fields": {
                                                            "keyword": {
                                                                "type": "keyword",
                                                                "ignore_above": 256
                                                            }
                                                        }
                                                    },
                                                    "countryCode": {
                                                        "type": "keyword"
                                                    },
                                                    "gdp": {
                                                        "type": "nested",
                                                        "properties": {
                                                            "amount": {
                                                                "type": "long"
                                                            },
                                                            "year": {
                                                                "type": "long"
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "aliases": {
                                                "countries": {}
                                            }
                                        },
                                        "priority": 10,
                                        "version": 3,
                                        "_meta": {
                                            "description": "my complex template",
                                            "createdDate": "2020-01-01",
                                            "notes": "added priortiy as 10"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "delete": {
                "tags": [
                    "\ud83d\udd06 Index Templates"
                ],
                "summary": "Delete Index Template",
                "description": "Delete a previously saved index template - based on the index template name.       ",
                "operationId": "delete_index_template__index_template__indexTemplateName__delete",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Indextemplatename",
                        "type": "string"
                    },
                    "example": "country-index-template",
                    "name": "indexTemplateName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_index_template/": {
            "get": {
                "tags": [
                    "\ud83d\udd06 Index Templates"
                ],
                "summary": "Retrieve All Index Templates",
                "description": "Retrieve a list of all index templates.",
                "operationId": "retrieve_all_index_templates__index_template__get",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "index_templates": [{
                                                    "name": "country-index-template",
                                                    "index_template": {
                                                        "index_patterns": [
                                                            "country"
                                                        ],
                                                        "template": {
                                                            "settings": {
                                                                "index": {
                                                                    "number_of_shards": "1"
                                                                }
                                                            },
                                                            "mappings": {
                                                                "properties": {
                                                                    "host_name": {
                                                                        "type": "keyword"
                                                                    }
                                                                }
                                                            }
                                                        },
                                                        "version": 3,
                                                        "_meta": {
                                                            "description": "my first index template"
                                                        }
                                                    }
                                                },
                                                {
                                                    "name": "transaction-report",
                                                    "index_template": {
                                                        "index_patterns": [
                                                            "transaction-report"
                                                        ],
                                                        "template": {
                                                            "settings": {
                                                                "index": {
                                                                    "max_result_window": "20000",
                                                                    "codec": "best_compression",
                                                                    "refresh_interval": "30s",
                                                                    "analysis": {
                                                                        "analyzer": {
                                                                            "account_number_analyzer": {
                                                                                "char_filter": [
                                                                                    "account_number_filter"
                                                                                ],
                                                                                "tokenizer": "standard"
                                                                            }
                                                                        },
                                                                        "char_filter": {
                                                                            "account_number_filter": {
                                                                                "pattern": "[^0-9]",
                                                                                "type": "pattern_replace",
                                                                                "replacement": ""
                                                                            }
                                                                        }
                                                                    },
                                                                    "number_of_shards": "3",
                                                                    "number_of_replicas": "0"
                                                                }
                                                            },
                                                            "mappings": {
                                                                "properties": {
                                                                    "all": {
                                                                        "type": "text"
                                                                    },
                                                                    "role": {
                                                                        "type": "nested",
                                                                        "properties": {
                                                                            "roleType": {
                                                                                "copy_to": "all",
                                                                                "type": "text",
                                                                                "fields": {
                                                                                    "keyword": {
                                                                                        "ignore_above": 256,
                                                                                        "type": "keyword"
                                                                                    }
                                                                                }
                                                                            },
                                                                            "party": {
                                                                                "type": "nested",
                                                                                "properties": {
                                                                                    "address": {
                                                                                        "type": "nested",
                                                                                        "properties": {
                                                                                            "country": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "streetAddress": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "postcode": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "suburb": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "state": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "geolocation": {
                                                                                                "type": "geo_point"
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "identification": {
                                                                                        "type": "nested",
                                                                                        "properties": {
                                                                                            "identifier": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "identificationSubType": {
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "identificationType": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "gender": {
                                                                                        "copy_to": "all",
                                                                                        "type": "text",
                                                                                        "fields": {
                                                                                            "keyword": {
                                                                                                "ignore_above": 256,
                                                                                                "type": "keyword"
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "jobTitle": {
                                                                                        "copy_to": "all",
                                                                                        "type": "text",
                                                                                        "fields": {
                                                                                            "keyword": {
                                                                                                "ignore_above": 256,
                                                                                                "type": "keyword"
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "name": {
                                                                                        "type": "nested",
                                                                                        "properties": {
                                                                                            "fullName": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "partyId": {
                                                                                        "copy_to": "all",
                                                                                        "type": "text",
                                                                                        "fields": {
                                                                                            "keyword": {
                                                                                                "ignore_above": 256,
                                                                                                "type": "keyword"
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "partyType": {
                                                                                        "copy_to": "all",
                                                                                        "type": "text",
                                                                                        "fields": {
                                                                                            "keyword": {
                                                                                                "ignore_above": 256,
                                                                                                "type": "keyword"
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "account": {
                                                                                        "type": "nested",
                                                                                        "properties": {
                                                                                            "branchId": {
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "country": {
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "number": {
                                                                                                "copy_to": "all",
                                                                                                "analyzer": "account_number_analyzer",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "streetAddress": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "postcode": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "branchName": {
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "suburb": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "state": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            "network": {
                                                                                                "copy_to": "all",
                                                                                                "type": "text",
                                                                                                "fields": {
                                                                                                    "keyword": {
                                                                                                        "ignore_above": 256,
                                                                                                        "type": "keyword"
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    },
                                                                    "report": {
                                                                        "properties": {
                                                                            "reportType": {
                                                                                "type": "text",
                                                                                "fields": {
                                                                                    "keyword": {
                                                                                        "ignore_above": 256,
                                                                                        "type": "keyword"
                                                                                    }
                                                                                }
                                                                            },
                                                                            "submissionId": {
                                                                                "type": "keyword"
                                                                            },
                                                                            "reportNumber": {
                                                                                "type": "long"
                                                                            },
                                                                            "reporter": {
                                                                                "type": "text",
                                                                                "fields": {
                                                                                    "keyword": {
                                                                                        "ignore_above": 256,
                                                                                        "type": "keyword"
                                                                                    }
                                                                                }
                                                                            },
                                                                            "reporterId": {
                                                                                "type": "integer"
                                                                            },
                                                                            "processedDatetime": {
                                                                                "format": "yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd||strict_date_optional_time",
                                                                                "type": "date"
                                                                            }
                                                                        }
                                                                    },
                                                                    "transaction": {
                                                                        "properties": {
                                                                            "amount": {
                                                                                "type": "double"
                                                                            },
                                                                            "transactionDatetime": {
                                                                                "format": "yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd||strict_date_optional_time",
                                                                                "type": "date"
                                                                            },
                                                                            "direction": {
                                                                                "type": "text",
                                                                                "fields": {
                                                                                    "keyword": {
                                                                                        "ignore_above": 256,
                                                                                        "type": "keyword"
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_ingest/pipeline/{ingestPipelineName}": {
            "get": {
                "tags": [
                    "\ud83c\udf83 Ingest Pipelines"
                ],
                "summary": "Retrieve Ingest Pipeline",
                "description": "Retrieve a previously saved ingest pipeline - based on the \nspecified ingest pipeline name",
                "operationId": "retrieve_ingest_pipeline__ingest_pipeline__ingestPipelineName__get",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Ingestpipelinename",
                        "type": "string"
                    },
                    "example": "test-pipeline",
                    "name": "ingestPipelineName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "put": {
                "tags": [
                    "\ud83c\udf83 Ingest Pipelines"
                ],
                "summary": "Save Ingest Pipeline",
                "description": "This endpoint is used to save an ingest pipelines into the cluster state. ",
                "operationId": "save_ingest_pipeline__ingest_pipeline__ingestPipelineName__put",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Ingestpipelinename",
                        "type": "string"
                    },
                    "example": "test-pipeline",
                    "name": "ingestPipelineName",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "simple_pipeline": {
                                    "summary": "A simple pipeline configuration",
                                    "description": "Just adds a field to all documents.",
                                    "value": {
                                        "description": "Add field example",
                                        "processors": [{
                                            "set": {
                                                "description": "Add field processor",
                                                "field": "important-field",
                                                "value": "added-field"
                                            }
                                        }]
                                    }
                                },
                                "add_timestamp_pipeline": {
                                    "summary": "A timestamp pipeline configuration",
                                    "description": "Adds timestamp to documents. We also add a date processor to remove the nanos and milliseconds",
                                    "value": {
                                        "description": "Add timestamp to documents",
                                        "processors": [{
                                                "set": {
                                                    "field": "@timestamp",
                                                    "value": "{{_ingest.timestamp}}"
                                                }
                                            },
                                            {
                                                "date": {
                                                    "field": "@timestamp",
                                                    "target_field": "@timestamp",
                                                    "formats": [
                                                        "strict_date_optional_time_nanos"
                                                    ],
                                                    "output_format": "yyyy-MM-dd'T'HH:mm:ssZ"
                                                }
                                            }
                                        ]
                                    }
                                },
                                "allocate_document_to_datetime_index_pipeline": {
                                    "summary": "Allocate the document to a datetime index",
                                    "description": "Allocate the documentment to an index based on the indexing date time.",
                                    "value": {
                                        "description": "Add timestamp to documents",
                                        "processors": [{
                                                "set": {
                                                    "field": "@timestamp",
                                                    "value": "{{_ingest.timestamp}}"
                                                }
                                            },
                                            {
                                                "date_index_name": {
                                                    "field": "@timestamp",
                                                    "index_name_prefix": "country-",
                                                    "date_formats": [
                                                        "strict_date_optional_time_nanos"
                                                    ],
                                                    "date_rounding": "M",
                                                    "timezone": "Australia/Sydney"
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "delete": {
                "tags": [
                    "\ud83c\udf83 Ingest Pipelines"
                ],
                "summary": "Delete Ingest Pipeline",
                "description": "Delete a previously saved ingest pipeline - based on the ingest pipeline name.       ",
                "operationId": "delete_ingest_pipeline__ingest_pipeline__ingestPipelineName__delete",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Ingestpipelinename",
                        "type": "string"
                    },
                    "example": "test-pipeline",
                    "name": "ingestPipelineName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_ingest/pipeline/{ingestPipelineName}/_simulate": {
            "post": {
                "tags": [
                    "\ud83c\udf83 Ingest Pipelines"
                ],
                "summary": "Simulate Ingest Pipeline",
                "description": "Process a series of documents against a specified ingest pipeline. ",
                "operationId": "simulate_ingest_pipeline__ingest_pipeline__ingestPipelineName___simulate_post",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Ingestpipelinename",
                        "type": "string"
                    },
                    "example": "test-pipeline",
                    "name": "ingestPipelineName",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "simulation_of_ingest_pipeline": {
                                    "summary": "A simple ingest pipeline simulation.",
                                    "description": "Simulation of ingest pipeline.",
                                    "value": {
                                        "docs": [{
                                                "_index": "index",
                                                "_id": "id",
                                                "_source": {
                                                    "country": "Australia"
                                                }
                                            },
                                            {
                                                "_index": "index",
                                                "_id": "id",
                                                "_source": {
                                                    "country": "New Zealand"
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "template_output": {
                                        "size": "10",
                                        "query": {
                                            "match": {
                                                "name": "France"
                                            }
                                        },
                                        "from": "20"
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_aliases": {
            "post": {
                "tags": [
                    "\ud83d\udc9c Alias Operations"
                ],
                "summary": "Management Of Index Aliases",
                "description": "Create, update and delete index aliases",
                "operationId": "management_of_index_aliases__aliases_post",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "create_alias": {
                                    "summary": "A simple alias creation request",
                                    "description": "A **simple** alias creation request.",
                                    "value": {
                                        "actions": [{
                                            "add": {
                                                "index": "country-2021-*",
                                                "alias": "country"
                                            }
                                        }]
                                    }
                                },
                                "remove_alias": {
                                    "summary": "A index alias removal request",
                                    "description": "A **simple** alias removal request.",
                                    "value": {
                                        "actions": [{
                                            "remove": {
                                                "index": "country-2021-*",
                                                "alias": "country"
                                            }
                                        }]
                                    }
                                },
                                "replace_alias": {
                                    "summary": "Replace a index alias request",
                                    "description": "The aliases API allows you can perform multiple actions in a **single atomic** operation.",
                                    "value": {
                                        "actions": [{
                                                "remove": {
                                                    "index": "country-2021-*",
                                                    "alias": "country"
                                                }
                                            },
                                            {
                                                "add": {
                                                    "index": "country-2022-*",
                                                    "alias": "country"
                                                }
                                            }
                                        ]
                                    }
                                },
                                "filter_alias": {
                                    "summary": "Create a filter alias request",
                                    "description": "Create an filtered alias of an index.",
                                    "value": {
                                        "actions": [{
                                            "add": {
                                                "index": "country-2021-*",
                                                "alias": "country",
                                                "filter": {
                                                    "bool": {
                                                        "filter": [{
                                                            "range": {
                                                                "@timestamp": {
                                                                    "gte": "now-1d/d"
                                                                }
                                                            }
                                                        }]
                                                    }
                                                }
                                            }
                                        }]
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response(Success)": {
                                        "summary": "JSON Response(Success)",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    },
                                    "JSON Response(Failure)": {
                                        "summary": "JSON Response(Failure)",
                                        "value": {
                                            "error": {
                                                "root_cause": [{
                                                    "type": "index_not_found_exception",
                                                    "reason": "no such index [party]",
                                                    "index": "party",
                                                    "resource.id": "party",
                                                    "resource.type": "index_or_alias",
                                                    "index_uuid": "_na_"
                                                }],
                                                "type": "index_not_found_exception",
                                                "reason": "no such index [party]",
                                                "index": "party",
                                                "resource.id": "party",
                                                "resource.type": "index_or_alias",
                                                "index_uuid": "_na_"
                                            },
                                            "status": 404
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_alias": {
            "get": {
                "tags": [
                    "\ud83d\udc9c Alias Operations"
                ],
                "summary": "Retrieve All Index Aliases",
                "description": "Retrieve all index aliases",
                "operationId": "retrieve_all_index_aliases__alias_get",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response(Created)": {
                                        "summary": "JSON Response(Created)",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "1",
                                            "_version": 1,
                                            "result": "created",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 0,
                                            "_primary_term": 1
                                        }
                                    },
                                    "JSON Response(Updated)": {
                                        "summary": "JSON Response(Updated)",
                                        "value": {
                                            "_index": "country",
                                            "_type": "_doc",
                                            "_id": "1",
                                            "_version": 2,
                                            "result": "updated",
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "failed": 0
                                            },
                                            "_seq_no": 5,
                                            "_primary_term": 1
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_alias/{aliasName}": {
            "get": {
                "tags": [
                    "\ud83d\udc9c Alias Operations"
                ],
                "summary": "Retrieve A Specific Alias",
                "description": "Retrieve a specific index alias by name",
                "operationId": "retrieve_a_specific_alias__alias__aliasName__get",
                "parameters": [{
                    "description": "Index alias name",
                    "required": true,
                    "schema": {
                        "title": "Aliasname",
                        "type": "string",
                        "description": "Index alias name"
                    },
                    "name": "aliasName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "country-2021": {
                                                "aliases": {
                                                    "country": {
                                                        "filter": {
                                                            "bool": {
                                                                "filter": [{
                                                                    "range": {
                                                                        "@timestamp": {
                                                                            "gte": "now-1d/d"
                                                                        }
                                                                    }
                                                                }]
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_scripts/{searchTemplateName}": {
            "get": {
                "tags": [
                    "\ud83d\udc88 Search Templates"
                ],
                "summary": "Retrieve Search Template",
                "description": "Retrieve a previously saved search template - based on the \nsearch template name",
                "operationId": "retrieve_search_template__scripts__searchTemplateName__get",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Searchtemplatename",
                        "type": "string"
                    },
                    "example": "country-search-template",
                    "name": "searchTemplateName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "_id": "country-search-template",
                                            "found": true,
                                            "script": {
                                                "lang": "mustache",
                                                "source": "\n    {\"query\":{\"match\":{\"name\":\"{{searchTerms}}\"}},\n    \"from\":{{from}}{{^from}}0{{/from}},\n    \"size\":{{size}}{{^size}}10{{/size}}}\n    ",
                                                "options": {
                                                    "content_type": "application/json; charset=UTF-8"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "put": {
                "tags": [
                    "\ud83d\udc88 Search Templates"
                ],
                "summary": "Save Search Template",
                "description": "This endpoint is used to save a search template into the cluster. Templates are written in the [Mustache](https://mustache.github.io/) templating language. \nOnce a template has been saved into the cluster it can be used to perform queries. Search templates are really handy when you want to be able to\nsimplify the queries submited from your frontend application. Basically you can hide all of the complexity of the query. It also allows you to continue to \nmake tweaks to the queries without breaking the interface to the frontend.  ",
                "operationId": "save_search_template__scripts__searchTemplateName__put",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Searchtemplatename",
                        "type": "string"
                    },
                    "example": "country-search-template",
                    "name": "searchTemplateName",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "simple_search_template": {
                                    "summary": "A simple Search Template",
                                    "description": "A **simple** search template.",
                                    "value": {
                                        "script": {
                                            "lang": "mustache",
                                            "source": {
                                                "query": {
                                                    "match": {
                                                        "name": "{{name}}"
                                                    }
                                                },
                                                "from": "{{from}}{{^from}}0{{/from}}",
                                                "size": "{{size}}{{^size}}10{{/size}}"
                                            }
                                        }
                                    }
                                },
                                "search_template_with_mulitple_criteria": {
                                    "summary": "A Search Template with multiple crtiera",
                                    "description": "A search template with multiple criteria. ",
                                    "value": {
                                        "script": {
                                            "lang": "mustache",
                                            "source": {
                                                "query": {
                                                    "bool": {
                                                        "should": [{
                                                                "match": {
                                                                    "name.keyword": {
                                                                        "query": "{{name}}",
                                                                        "boost": 5
                                                                    }
                                                                }
                                                            },
                                                            {
                                                                "match_phrase": {
                                                                    "name": {
                                                                        "query": "{{name}}",
                                                                        "slop": 1,
                                                                        "boost": 3
                                                                    }
                                                                }
                                                            },
                                                            {
                                                                "match": {
                                                                    "name": {
                                                                        "query": "{{name}}",
                                                                        "boost": 3
                                                                    }
                                                                }
                                                            }
                                                        ]
                                                    }
                                                },
                                                "size": "{{size}}{{^size}}10{{/size}}"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            },
            "delete": {
                "tags": [
                    "\ud83d\udc88 Search Templates"
                ],
                "summary": "Delete Search Template",
                "description": "Delete a previously saved search template - based on the search template name.",
                "operationId": "delete_search_template__scripts__searchTemplateName__delete",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Searchtemplatename",
                        "type": "string"
                    },
                    "example": "country-search-template",
                    "name": "searchTemplateName",
                    "in": "path"
                }],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "acknowledged": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/_render/template": {
            "post": {
                "tags": [
                    "\ud83d\udc88 Search Templates"
                ],
                "summary": "Render Search Template",
                "description": "This end point can be used in two ways:\n- To render a query based on a supplied query template - render inline query with supplied parameter). \n\n- To render a query based on a previously saved search template - render saved query with supplied parameters).",
                "operationId": "render_search_template__render_template_post",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "render_supplied_template_basic": {
                                    "summary": "Render simple supplied template",
                                    "description": "A search template with two input parameters size and country name. The size parameter has a default value of 10.",
                                    "value": {
                                        "source": {
                                            "size": "{{size}}{{^size}}10{{/size}}",
                                            "query": {
                                                "match": {
                                                    "name": "{{name}}"
                                                }
                                            }
                                        },
                                        "params": {
                                            "name": "Afghanistan",
                                            "size": "4"
                                        }
                                    }
                                },
                                "render_supplied_template_multiple_search_types": {
                                    "summary": "Render supplied template into multiple search types",
                                    "description": "A search template with two input parameters size and country name. The size parameter has a default value of 10.",
                                    "value": {
                                        "source": {
                                            "query": {
                                                "bool": {
                                                    "should": [{
                                                            "match": {
                                                                "name.keyword": {
                                                                    "query": "{{name}}",
                                                                    "boost": 5
                                                                }
                                                            }
                                                        },
                                                        {
                                                            "match_phrase": {
                                                                "name": {
                                                                    "query": "{{name}}",
                                                                    "slop": 1,
                                                                    "boost": 3
                                                                }
                                                            }
                                                        },
                                                        {
                                                            "match": {
                                                                "name": {
                                                                    "query": "{{name}}",
                                                                    "boost": 3
                                                                }
                                                            }
                                                        }
                                                    ]
                                                }
                                            },
                                            "size": "{{size}}{{^size}}10{{/size}}"
                                        },
                                        "params": {
                                            "name": "Afghanistan",
                                            "size": "1"
                                        }
                                    }
                                },
                                "render_saved_template": {
                                    "summary": "Render saved template",
                                    "description": "Render a saved template.",
                                    "value": {
                                        "id": "country-search-template",
                                        "params": {
                                            "name": "Afghanistan",
                                            "size": 5
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "template_output": {
                                        "size": "10",
                                        "query": {
                                            "match": {
                                                "name": "France"
                                            }
                                        },
                                        "from": "20"
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        },
        "/{index}/_search/template": {
            "post": {
                "tags": [
                    "\ud83d\udc88 Search Templates"
                ],
                "summary": "Run Search Template",
                "description": "Similar to the ```_render/template``` endpoint this end point can be used in two ways:\n- To run a templated query with the supplied parameters where the template is provided inline. \n\n- To run a templated query with the supplied query where the template was previously saved in the cluster state.",
                "operationId": "run_search_template__index___search_template_post",
                "parameters": [{
                    "required": true,
                    "schema": {
                        "title": "Index",
                        "type": "string"
                    },
                    "example": "country",
                    "name": "index",
                    "in": "path"
                }],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "Request",
                                "type": "object"
                            },
                            "examples": {
                                "run_simple_inline_search_template": {
                                    "summary": "Run simple inline Search Template",
                                    "description": "A **simple** example of running a search template provided inline. The search template is populated and the query executed. ",
                                    "value": {
                                        "source": {
                                            "size": "{{size}}{{^size}}10{{/size}}",
                                            "query": {
                                                "match": {
                                                    "name": "{{countryName}}"
                                                }
                                            }
                                        },
                                        "params": {
                                            "countryName": "Afghanistan",
                                            "size": 4
                                        }
                                    }
                                },
                                "run_complex_inline_search_template": {
                                    "summary": "Run complex inline Search Template",
                                    "description": "A ***complex** search template with two input parameters size and country name. The search template is populated and the query executed. ",
                                    "value": {
                                        "source": {
                                            "query": {
                                                "bool": {
                                                    "should": [{
                                                            "match": {
                                                                "name.keyword": {
                                                                    "query": "{{name}}",
                                                                    "boost": 5
                                                                }
                                                            }
                                                        },
                                                        {
                                                            "match_phrase": {
                                                                "name": {
                                                                    "query": "{{name}}",
                                                                    "slop": 1,
                                                                    "boost": 3
                                                                }
                                                            }
                                                        },
                                                        {
                                                            "match": {
                                                                "name": {
                                                                    "query": "{{name}}",
                                                                    "boost": 3
                                                                }
                                                            }
                                                        }
                                                    ]
                                                }
                                            },
                                            "size": "{{size}}{{^size}}10{{/size}}"
                                        },
                                        "params": {
                                            "name": "Afghanistan",
                                            "size": "1"
                                        }
                                    }
                                },
                                "run_simple_saved_search_template": {
                                    "summary": "Run saved Search Template",
                                    "description": "A **simple** example of running a previously saved search template. The requests identifies the saved search template and the parameters that should be used to generate the query.",
                                    "value": {
                                        "id": "country-search-template",
                                        "params": {
                                            "name": "Afghanistan",
                                            "size": 5
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "examples": {
                                    "JSON Response": {
                                        "summary": "JSON Response",
                                        "value": {
                                            "took": 2,
                                            "timed_out": false,
                                            "_shards": {
                                                "total": 1,
                                                "successful": 1,
                                                "skipped": 0,
                                                "failed": 0
                                            },
                                            "hits": {
                                                "total": {
                                                    "value": 1,
                                                    "relation": "eq"
                                                },
                                                "max_score": 0.2876821,
                                                "hits": [{
                                                    "_index": "country",
                                                    "_type": "_doc",
                                                    "_id": "123456",
                                                    "_score": 0.2876821,
                                                    "_source": {
                                                        "name": "Afghanistan",
                                                        "countryCode": "AF",
                                                        "capital": "Kabul",
                                                        "region": "Asia",
                                                        "subregion": "Southern Asia",
                                                        "area": 652230
                                                    }
                                                }]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [{
                    "HTTPBasic": []
                }]
            }
        }
    },
    "components": {
        "schemas": {
            "HTTPValidationError": {
                "title": "HTTPValidationError",
                "type": "object",
                "properties": {
                    "detail": {
                        "title": "Detail",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ValidationError"
                        }
                    }
                }
            },
            "ValidationError": {
                "title": "ValidationError",
                "required": [
                    "loc",
                    "msg",
                    "type"
                ],
                "type": "object",
                "properties": {
                    "loc": {
                        "title": "Location",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "msg": {
                        "title": "Message",
                        "type": "string"
                    },
                    "type": {
                        "title": "Error Type",
                        "type": "string"
                    }
                }
            },
            "country_model": {
                "title": "country_model",
                "type": "object",
                "properties": {
                    "cioc": {
                        "title": "Cioc",
                        "type": "string"
                    },
                    "regionalBlocs": {
                        "title": "Regionalblocs",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/regionalBlocs"
                        }
                    },
                    "flag": {
                        "title": "Flag",
                        "maxLength": 65536,
                        "minLength": 1,
                        "type": "string",
                        "format": "uri"
                    },
                    "translations": {
                        "title": "Translations",
                        "type": "object"
                    },
                    "languages": {
                        "title": "Languages",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/languages"
                        }
                    },
                    "currencies": {
                        "title": "Currencies",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/currencies"
                        }
                    },
                    "numericCode": {
                        "title": "Numericcode",
                        "type": "string"
                    },
                    "nativeName": {
                        "title": "Nativename",
                        "type": "string"
                    },
                    "borders": {
                        "title": "Borders",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "timezones": {
                        "title": "Timezones",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "gini": {
                        "title": "Gini",
                        "type": "number"
                    },
                    "area": {
                        "title": "Area",
                        "type": "integer"
                    },
                    "demonym": {
                        "title": "Demonym",
                        "type": "string"
                    },
                    "latlng": {
                        "title": "Latlng",
                        "type": "array",
                        "items": {
                            "type": "number"
                        }
                    },
                    "population": {
                        "title": "Population",
                        "type": "integer"
                    },
                    "subregion": {
                        "title": "Subregion",
                        "type": "string"
                    },
                    "region": {
                        "title": "Region",
                        "type": "string"
                    },
                    "altSpellings": {
                        "title": "Altspellings",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "capital": {
                        "title": "Capital",
                        "type": "string"
                    },
                    "name": {
                        "title": "Name",
                        "type": "string"
                    },
                    "topLevelDomain": {
                        "title": "Topleveldomain",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "alpha2Code": {
                        "title": "Alpha2Code",
                        "type": "string"
                    },
                    "alpha3Code": {
                        "title": "Alpha3Code",
                        "type": "string"
                    },
                    "callingCodes": {
                        "title": "Callingcodes",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            },
            "currencies": {
                "title": "currencies",
                "type": "object",
                "properties": {
                    "code": {
                        "title": "Code",
                        "type": "string"
                    },
                    "name": {
                        "title": "Name",
                        "type": "string"
                    },
                    "symbol": {
                        "title": "Symbol",
                        "type": "string"
                    }
                }
            },
            "format_types": {
                "title": "format_types",
                "enum": [
                    "json",
                    "column"
                ],
                "type": "string",
                "description": "An enumeration."
            },
            "languages": {
                "title": "languages",
                "type": "object",
                "properties": {
                    "iso639_1": {
                        "title": "Iso639 1",
                        "type": "string"
                    },
                    "iso639_2": {
                        "title": "Iso639 2",
                        "type": "string"
                    },
                    "name": {
                        "title": "Name",
                        "type": "string"
                    },
                    "nativeName": {
                        "title": "Nativename",
                        "type": "string"
                    }
                }
            },
            "regionalBlocs": {
                "title": "regionalBlocs",
                "type": "object",
                "properties": {
                    "acronym": {
                        "title": "Acronym",
                        "type": "string"
                    },
                    "name": {
                        "title": "Name",
                        "type": "string"
                    },
                    "otherAcronyms": {
                        "title": "Otheracronyms",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "otherNames": {
                        "title": "Othernames",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "retrieve_operations__schema__search_model": {
                "title": "search_model",
                "type": "object",
                "properties": {
                    "query": {
                        "$ref": "#/components/schemas/retrieve_operations__schema__search_query"
                    },
                    "size": {
                        "title": "Size",
                        "type": "integer"
                    },
                    "track_total_hits": {
                        "title": "Track Total Hits",
                        "type": "boolean"
                    }
                }
            },
            "retrieve_operations__schema__search_query": {
                "title": "search_query",
                "type": "object",
                "properties": {
                    "match": {
                        "title": "Match",
                        "type": "object"
                    },
                    "range": {
                        "title": "Range",
                        "type": "object"
                    }
                }
            },
            "update_operations__schema__search_model": {
                "title": "search_model",
                "type": "object",
                "properties": {
                    "query": {
                        "$ref": "#/components/schemas/update_operations__schema__search_query"
                    },
                    "size": {
                        "title": "Size",
                        "type": "integer"
                    },
                    "track_total_hits": {
                        "title": "Track Total Hits",
                        "type": "boolean"
                    }
                }
            },
            "update_operations__schema__search_query": {
                "title": "search_query",
                "type": "object",
                "properties": {
                    "match": {
                        "title": "Match",
                        "type": "object"
                    },
                    "range": {
                        "title": "Range",
                        "type": "object"
                    }
                }
            }
        },
        "securitySchemes": {
            "HTTPBasic": {
                "type": "http",
                "scheme": "basic"
            }
        }
    },
    "tags": [{
            "name": "\ud83c\udf8a Cluster Basics"
        },
        {
            "name": "\u2728 Index Operations"
        },
        {
            "name": "\ud83d\ude80 Create Documents"
        },
        {
            "name": "\ud83c\udf89 Retrieve Documents"
        },
        {
            "name": "\ud83e\udd73 Update Documents"
        },
        {
            "name": "\ud83e\udd84 Delete Documents"
        },
        {
            "name": "\ud83d\udd25 Text Analysis"
        }
    ]
}