October 2019
Beginner
186 pages
5h 39m
English
The multi search template allows for the execution of the search over multiple template requests in the same API. It does this by using the _msearch/template endpoint. It is similar in format to the multi search API. The structure of the multi search template is as follows:
header\nbody\nheader\nbody\n
As seen in the preceding example, each newline character ends with \n. Each line may be preceded by \r. The header indicates which indices are to be searched, that is, search_type, preference, and routing:
$ cat requests{"index": "test"}{"source": {"query": {"match": {"user" : "{{username}}" }}}, "params": {"username": "John"}}{"source": {"query": {"{{query_type}}": {"name": "{{name}}" }}}, "params": {"query_type": "match_phrase_prefix", ...Read now
Unlock full access