You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This is the official Elastic client for the **Elasticsearch Serverless** service, still in private preview.
6
-
If you're looking to develop your PHP application with the Elasticsearch Stack, you should look at the [Elasticsearch Client](https://github.com/elastic/elasticsearch-php) instead. If you're looking to develop your PHP application with Elastic Enterprise Search, you should look at the [Enterprise Search Client](https://github.com/elastic/enterprise-search-php/).
5
+
This is the official Elastic client for the **Elasticsearch Serverless** service.
6
+
7
+
If you're looking to develop your PHP application with the Elasticsearch Stack,
8
+
you should look at the [Elasticsearch Client](https://github.com/elastic/elasticsearch-php) instead.
7
9
8
10
## Installation
9
11
@@ -24,10 +26,10 @@ Please remember that `alpha` releases are quite unstable, the code can change be
24
26
Instead, a release candidate `rc` will not break the backward compatibility. Typically an `rc`
25
27
version includes only bug fixes.
26
28
27
-
### Instantiate a Client
29
+
### Instantiate the client
28
30
29
-
When you have installed elasticsearch-php you can start using it with the `Client`` class.
30
-
You can use the ClientBuilder class to create this object:
31
+
When you have installed elasticsearch-php you can start using it with the `Client` class.
32
+
You can use the `ClientBuilder` to create this object:
31
33
32
34
```php
33
35
require 'vendor/autoload.php';
@@ -52,10 +54,6 @@ page for a getting started guide.
52
54
53
55
See [CONTRIBUTING](./CONTRIBUTING.md).
54
56
55
-
### Docs
56
-
57
-
Some questions, assumptions and general notes about this project can be found in [the docs directory](./docs/questions-and-assumptions.md).
@@ -148,7 +148,7 @@ public function status(string $id, array $params = []): Elasticsearch|Promise
148
148
* allow_partial_search_results: bool, // Indicate if an error should be returned if there is a partial search failure or timeout
149
149
* analyzer: string, // The analyzer to use for the query string
150
150
* analyze_wildcard: bool, // Specify whether wildcard and prefix queries should be analyzed (default: false)
151
-
* batched_reduce_size: integer, // Affects how often partial results become available, which happens whenever shard results are reduced.A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).
151
+
* batched_reduce_size: int, // Affects how often partial results become available, which happens whenever shard results are reduced.A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).
152
152
* ccs_minimize_roundtrips: bool, // The default value is the only supported value.
153
153
* default_operator: string, // The default operator for query string query (AND or OR)
154
154
* df: string, // The field to use as default where no field prefix is given in the query string
@@ -158,10 +158,10 @@ public function status(string $id, array $params = []): Elasticsearch|Promise
158
158
* ignore_throttled: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
159
159
* ignore_unavailable: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
160
160
* lenient: bool, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
161
-
* max_concurrent_shard_requests: integer, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
161
+
* max_concurrent_shard_requests: int, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
162
162
* min_compatible_shard_node: string, //
163
163
* preference: string, // Specify the node or shard the operation should be performed on (default: random)
164
-
* pre_filter_shard_size: integer, // The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped.
164
+
* pre_filter_shard_size: int, // The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped.
165
165
* request_cache: bool, // Specify if request cache should be used for this request or not, defaults to true
166
166
* routing: string, // A comma-separated list of specific routing values
167
167
* scroll: string|integer, //
@@ -170,11 +170,11 @@ public function status(string $id, array $params = []): Elasticsearch|Promise
170
170
* stored_fields: string|array, // A comma-separated list of stored fields to return as part of a hit
171
171
* suggest_field: string, // Specifies which field to use for suggestions.
172
172
* suggest_mode: string, // Specify suggest mode
173
-
* suggest_size: integer, // How many suggestions to return in response
173
+
* suggest_size: int, // How many suggestions to return in response
174
174
* suggest_text: string, // The source text for which the suggestions should be returned.
175
-
* terminate_after: integer, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
175
+
* terminate_after: int, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* track_total_hits: bool|integer, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
177
+
* track_total_hits: bool|int, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
178
178
* track_scores: bool, // Whether to calculate and return scores even if they are not used for sorting
179
179
* typed_keys: bool, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
180
180
* rest_total_hits_as_int: bool, //
@@ -184,8 +184,8 @@ public function status(string $id, array $params = []): Elasticsearch|Promise
184
184
* _source_includes: string|array, // A list of fields to extract and return from the _source field
185
185
* seq_no_primary_term: bool, // Specify whether to return sequence number and primary term of the last modification of each hit
186
186
* q: string, // Query in the Lucene query string syntax
187
-
* size: integer, // Number of hits to return (default: 10)
188
-
* from: integer, // Starting offset (default: 0)
187
+
* size: int, // Number of hits to return (default: 10)
188
+
* from: int, // Starting offset (default: 0)
189
189
* sort: string|array, // A comma-separated list of <field>:<direction> pairs
190
190
* pretty: bool, // Pretty format the returned JSON response. (DEFAULT: false)
191
191
* human: bool, // Return human readable values for statistics. (DEFAULT: true)
@@ -450,11 +450,11 @@ public function mlTrainedModels(string $model_id = null, array $params = []): El
450
450
* If you do not specify one of these options, the API returns information for all transforms.
451
451
* @param array{
452
452
* allow_no_match: bool, // Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; contains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches.If `true`, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches.If `false`, the request returns a 404 status code when there are no matches or only partial matches.
453
-
* from: integer, // Skips the specified number of transforms.
453
+
* from: int, // Skips the specified number of transforms.
454
454
* h: string|array, // Comma-separated list of column names to display.
455
455
* s: string|array, // Comma-separated list of column names or column aliases used to sort the response.
456
456
* time: string, // The unit used to display time values.
457
-
* size: integer, // The maximum number of transforms to obtain.
457
+
* size: int, // The maximum number of transforms to obtain.
458
458
* pretty: bool, // Pretty format the returned JSON response. (DEFAULT: false)
459
459
* human: bool, // Return human readable values for statistics. (DEFAULT: true)
460
460
* error_trace: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -470,7 +470,7 @@ public function mlTrainedModels(string $model_id = null, array $params = []): El
0 commit comments