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
When you configure a cluster-based connection, and the cluster consists of many nodes, you can choose strategies that govern how the cluster reacts to changing operating conditions, or how workload is distributed among the nodes.
111
111
112
-
#### Connection pool
112
+
#### Connection pool and Node pool settings
113
113
114
-
With this setting you decide how a list of hosts that form a cluster is managed.
115
-
The list of active hosts tends to change in time, due to different reasons, such as connectivity issues, host malfunction, or the fact that you add new hosts to the cluster to increase its performance.
116
-
By default, the `StaticNoPingConnectionPool` setting is used.
114
+
The way you configure cluster node management depends on which Elasticsearch version you're using.
117
115
118
-
You can change the default setting with the following key:
With this setting you decide how a list of hosts that form a cluster is managed.
119
+
The list of active hosts tends to change in time, due to different reasons, such as connectivity issues, host malfunction, or the fact that you add new hosts to the cluster to increase its performance.
120
+
By default, the `StaticNoPingConnectionPool` setting is used.
121
+
122
+
You can change the default setting with the following key:
When the cluster consists of many hosts, the `connection_selector` setting decides what strategy is used to pick a node to send query requests to.
131
+
By default, the `RoundRobinSelector` setting is used.
125
132
126
-
For more information and a list of available choices, see [Connection pool](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/connection_pool.html).
133
+
If you prefer a different strategy, or have created your own, custom strategy, you can change the default setting with the following key:
If you change the connection pool setting, it's recommended that you to perform load tests to check whether the change doesn't negatively impact the performance of your environment.
141
+
For more information and a list of available choices, see [Connection pool](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/connection_pool.html) and [Selectors](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/selectors.html).
131
142
132
-
#### Connection selector
143
+
!!! tip "Load tests recommendation"
133
144
134
-
When the cluster consists of many hosts, the `connection_selector` setting decides what strategy is used to pick a node to send query requests to.
135
-
By default, the `RoundRobinSelector` setting is used.
145
+
If you change the connection pool setting, it's recommended that you perform load tests to check whether the change doesn't negatively impact the performance of your environment.
136
146
137
-
If you prefer a different strategy, or have created your own, custom strategy, you can change the default setting with the following key:
With these settings you decide how nodes in the cluster are selected and how failed nodes are resurrected.
150
+
The node pool manages the list of active nodes, which can change over time due to connectivity issues, host malfunction, or when you add new nodes to the cluster to increase performance.
151
+
152
+
By default, Elasticsearch uses the `SimpleNodePool` algorithm with `RoundRobin` selector and `NoResurrect` strategy.
153
+
154
+
You can customize the node pool behavior with the following settings:
For more information and a list of available choices, see [Node pool](https://www.elastic.co/guide/en/elasticsearch/client/php-api/8.19/node_pool.html).
164
+
165
+
!!! tip "Load tests recommendation"
144
166
145
-
For more information and a list of available choices, see [Selectors](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/selectors.html).
167
+
If you change the node pool settings, it's recommended that you perform load tests to check whether the change doesn't negatively impact the performance of your environment.
146
168
147
169
##### Number of retries
148
170
@@ -155,9 +177,12 @@ By default, `null` is used, which means that the number of retries equals to the
155
177
retries: null
156
178
```
157
179
158
-
Depending on the connection pool that you select, [[= product_name =]]'s reaction to reaching the maximum number of retries might differ.
180
+
Depending on the connection pool/node pool that you select, [[= product_name =]]'s reaction to reaching the maximum number of retries might differ.
159
181
160
-
For more information, see [Set retries](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/set-retries.html).
If your Elasticsearch cluster is protected by API keys, you must provide the key and secret in authentication configuration to connect [[= product_name =]] with the cluster.
220
-
With API key authentication you can define different authorization levels, such as [`create_index` or `index`](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-privileges.html#privileges-list-indices).
245
+
With API key authentication you can define different authorization levels, such as `create_index` or `index`.
221
246
Such approach proves useful if the cluster is available to the public.
222
247
223
-
For more information, see [Create API key](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html).
248
+
For more information, see:
224
249
225
-
When using API key authentication, you must pass the following parameters to authenticate access to the cluster:
250
+
- Elasticsearch 7: [Create API key](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html) and [Security privileges](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-privileges.html#privileges-list-indices)
251
+
- Elasticsearch 8: [Create API key](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-api-key.html) and [Security privileges](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-privileges.html#privileges-list-indices)
226
252
227
-
``` yaml
228
-
<connection_name>:
229
-
# ...
230
-
authentication:
231
-
type: api_key
232
-
credentials: ['<api_key>', '<api_secret>']
233
-
```
253
+
=== "Elasticsearch 7"
234
254
235
-
For example:
255
+
When using API key authentication with Elasticsearch 7, you must pass the following parameters to authenticate access to the cluster:
When using API key authentication with Elasticsearch 8, you can pass either the API key and key ID pair, or the encoded API key value, which Elasticsearch also calls "API key credentials".
To see the difference between API key, API key id, and encoded API key, refer to the [examples in Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-api-key.html#security-api-create-api-key-example).
247
329
248
330
### SSL
249
331
@@ -293,24 +375,28 @@ To do this, pass the following setting under the `ssl` key:
293
375
verification: false
294
376
```
295
377
296
-
For more information, see [Elasticsearch: SSL Encryption](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/connceting.html#ssl-encryption).
- Elasticsearch 8: [Security by default (HTTPS)](https://www.elastic.co/guide/en/elasticsearch/client/php-api/8.19/connecting.html#auth-http)
297
382
298
383
### Enable debugging
299
384
300
385
In a staging environment, you can log messages about the status of communication with Elasticsearch.
301
386
You can then use Symfony Profiler to review the logs.
302
387
303
-
By default, debugging is disabled. To enable debugging, you can toggle either of the following two settings:
388
+
By default, debugging is disabled.
389
+
To enable debugging, you can use the following settings:
304
390
305
391
``` yaml
306
392
<connection_name>:
307
393
# ...
308
394
debug: <true/false>
309
-
trace: <true/false>
395
+
trace: <true/false> # Elasticsearch 7 only
310
396
```
311
397
312
398
- `debug`logs basic information about a request, such as request status and time.
313
-
- `trace`logs additional information, such as steps to reproduce an exact copy of a query.
399
+
- `trace`logs additional information, such as steps to reproduce an exact copy of a query. Available only for Elasticsearch 7.
314
400
315
401
!!! tip
316
402
@@ -371,7 +457,10 @@ Index names use the following pattern:
371
457
372
458
- `settings`- Settings under this key control all aspects related to an index.
373
459
374
-
For more information and a list of available settings, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index-modules.html#index-modules-settings).
460
+
For more information and a list of available settings, see:
For example, you can define settings that convert text into a format that is optimized for search, like a normalizer that changes a case of all phrases in the index:
377
466
@@ -393,16 +482,22 @@ For more information and a list of available settings, see [Elasticsearch docume
393
482
394
483
- `mappings`- Settings under this key define mapping for fields in the index.
395
484
396
-
For more information about mappings, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/mapping.html).
When you create a custom index template, with settings for your own field and document types, make sure that it contains mappings for all searchable fields that are available in [[= product_name =]].
399
-
For an example of default configuration with a list of searchable fields.
400
-
To see the default configuration, go to `vendor/ibexa/elasticsearch/src/bundle/Resources/config/` and open the `default-config.yaml` file.
491
+
492
+
To see the default configuration, go to `vendor/ibexa/elasticsearch/src/bundle/Resources/config/` and open the `default-config.yaml` file.
401
493
402
494
### Fine-tune the search results
403
495
404
496
Your search results can be adjusted by configuring additional parameters.
405
-
For a list of available mapping parameters and their usage, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/mapping-params.html).
497
+
For a list of available mapping parameters and their usage, see:
For example, you can apply a mapping parameter, in this case, a normalizer, to a specific mapping under the `dynamic_templates` key:
408
503
@@ -488,9 +583,12 @@ For more information about specifying the pattern for your language, see [Define
488
583
489
584
#### Create config for language specific analyzer
490
585
491
-
For information about configuring an analyzer for each specific language, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/analysis-lang-analyzer.html).
586
+
For information about configuring an analyzer for each specific language, see:
492
587
493
-
An adoption of the [English analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/analysis-lang-analyzer.html#english-analyzer) in [[= product_name =]] configuration looks like this:
For more information about how Elasticsearch handles settings and mappings from multiple templates that match the same index, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates-v1.html#multiple-templates-v1).
621
+
For more information about how Elasticsearch handles settings and mappings from multiple templates that match the same index, see:
Copy file name to clipboardExpand all lines: docs/search/search_engines/elasticsearch/elasticsearch_overview.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,10 @@ As a result of having distributed architecture, Elasticsearch can analyze massiv
14
14
Instead of searching text directly, it searches and index.
15
15
Thanks to this mechanism, it's able to achieve fast response.
16
16
17
-
For a detailed description of advanced settings that you might require in a specific production environment, see the documentation provided by Elastic.
18
-
Start with the [Set up Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/setup.html) section.
17
+
For a detailed description of advanced settings that you might require in a specific production environment, see the documentation provided by Elastic:
18
+
19
+
- Elasticsearch 7: [Set up Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/setup.html)
20
+
- Elasticsearch 8: [Set up Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/setup.html)
0 commit comments