Skip to content

Commit e2f5d33

Browse files
Auto-generated API code
1 parent b66ad43 commit e2f5d33

3 files changed

Lines changed: 3 additions & 45 deletions

File tree

src/Endpoints/AsyncSearch.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function status(?array $params = null)
170170
* explain?: bool, // Specify whether to return detailed information about score computation as part of a hit
171171
* stored_fields?: string|array<string>, // A comma-separated list of stored fields to return as part of a hit
172172
* docvalue_fields?: string|array<string>, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
173-
* from?: int, // Starting offset (default: 0)
173+
* from?: int, // Starting offset
174174
* ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
175175
* ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
176176
* allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
@@ -181,7 +181,7 @@ public function status(?array $params = null)
181181
* q?: string, // Query in the Lucene query string syntax
182182
* routing?: string|array<string>, // A comma-separated list of specific routing values
183183
* search_type?: string, // Search operation type
184-
* size?: int, // Number of hits to return (default: 10)
184+
* size?: int, // Number of hits to return
185185
* sort?: string|array<string>, // A comma-separated list of <field>:<direction> pairs
186186
* _source?: string|array<string>, // True or false to return the _source field or not, or a list of fields to return
187187
* _source_excludes?: string|array<string>, // A list of fields to exclude from the returned _source field

src/Endpoints/Cluster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public function putComponentTemplate(?array $params = null)
488488
* @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-update-settings.html
489489
*
490490
* @param array{
491-
* flat_settings?: bool, // Return settings in flat format (default: false)
491+
* flat_settings?: bool, // Return settings in flat format
492492
* master_timeout?: int|string, // Explicit operation timeout for connection to master node
493493
* timeout?: int|string, // Explicit operation timeout
494494
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)

src/Traits/ClientEndpointsTrait.php

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,48 +1025,6 @@ public function info(?array $params = null)
10251025
}
10261026

10271027

1028-
/**
1029-
* Run a knn search
1030-
*
1031-
* @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/knn-search-api.html
1032-
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1033-
*
1034-
* @param array{
1035-
* index: string|array<string>, // (REQUIRED) A comma-separated list of index names to search; use `_all` to perform the operation on all indices
1036-
* routing?: string|array<string>, // A comma-separated list of specific routing values
1037-
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
1038-
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
1039-
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
1040-
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1041-
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
1042-
* body: string|array<mixed>, // (REQUIRED) The search definition. If body is a string must be a valid JSON.
1043-
* } $params
1044-
*
1045-
* @throws MissingParameterException if a required parameter is missing
1046-
* @throws NoNodeAvailableException if all the hosts are offline
1047-
* @throws ClientResponseException if the status code of response is 4xx
1048-
* @throws ServerResponseException if the status code of response is 5xx
1049-
*
1050-
* @return Elasticsearch|Promise
1051-
*/
1052-
public function knnSearch(?array $params = null)
1053-
{
1054-
$params = $params ?? [];
1055-
$this->checkRequiredParameters(['index','body'], $params);
1056-
$url = '/' . $this->encode($this->convertValue($params['index'])) . '/_knn_search';
1057-
$method = empty($params['body']) ? 'GET' : 'POST';
1058-
1059-
$url = $this->addQueryString($url, $params, ['routing','pretty','human','error_trace','source','filter_path']);
1060-
$headers = [
1061-
'Accept' => 'application/json',
1062-
'Content-Type' => 'application/json',
1063-
];
1064-
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1065-
$request = $this->addOtelAttributes($params, ['index'], $request, 'knn_search');
1066-
return $this->sendRequest($request);
1067-
}
1068-
1069-
10701028
/**
10711029
* Get multiple documents
10721030
*

0 commit comments

Comments
 (0)