More docs changes

This commit is contained in:
Josh Mock
2024-12-04 13:59:24 -06:00
parent 1fde515fcf
commit eef143073c
601 changed files with 21926 additions and 34500 deletions

View File

@ -1,4 +1,5 @@
[[reference-msearch]]
== client.msearch
////////
===========================================================================================================================
@ -32,18 +33,20 @@
</style>
++++
[discrete]
[[client.msearch]]
== client.msearch
== `client.msearch()`
Run multiple searches. The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. The structure is as follows: ``` header\n body\n header\n body\n ``` This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. IMPORTANT: The final line of data must end with a newline character `\n`. Each newline character may be preceded by a carriage return `\r`. When sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.
{ref}/search-multi-search.html[{es} documentation]
[discrete]
== Function signature
=== Function signature
[source,ts]
----
(MsearchRequest, options?): Promise<MsearchResponse>
(request: MsearchRequest, options?: TransportRequestOptions) => Promise<MsearchResponse>
----
[discrete]
@ -71,6 +74,7 @@ interface MsearchRequest extends <<RequestBase>> {
----
[discrete]
=== Response
@ -80,3 +84,4 @@ type MsearchResponse<TDocument = unknown, TAggregations = Record<<<AggregateName
----