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
Copy file name to clipboardexpand all lines: README.adoc
+17-13
Original file line number
Diff line number
Diff line change
@@ -65,11 +65,11 @@ docker-compose ps
65
65
66
66
=== Reindex
67
67
68
-
The script `./reindex.sh` is used to reindex from an index to another index. The default will reindex from `ecommerce.products.v1` to `ecommerce.products.v2`. The only difference between `elasticsearch/mapping-v1.json` (used by `ecommerce.products.v1`) to `elasticsearch/mapping-v2.json` (used by `ecommerce.products.v2`) is the `type` of the `reference` property. In the formeris set `text` and in the latter, `keyword`.
68
+
The script `./reindex.sh` is used to reindex an index to another. The default will reindex from `ecommerce.products.v1` to `ecommerce.products.v2`. The only difference between `elasticsearch/mapping-v1.json` (used by `ecommerce.products.v1`) to `elasticsearch/mapping-v2.json` (used by `ecommerce.products.v2`) is the `type` of the `reference` property. In the former, it is set the type `text` and, in the latter, the type `keyword`.
69
69
70
-
It's interesting because the `reference` property has some special characters. An example of `reference` code is `SBES@DDR4-10000`. As it is a `text`, ES (using the `standard` analyzer) splits the content in tokens ['SBES', 'DDR4', 10000]. So, for example, if you are looking for a product with `DDR4` RAM and, for some reason, the string `DDR4` is present in the reference code of some product X, the product X will be selected, even if it doesn't have `DDR4` in its description. It is an error.
70
+
It's interesting because the `reference` property has some special characters. An example of `reference` code is `SBES@DDR4-10000`. As it has the type `text`, ES (using the `standard` analyzer) splits the content in tokens ['SBES', 'DDR4', 10000]. So, for example, if you are looking for a product with `DDR4` RAM and, for some reason, the string `DDR4` is present in the reference code of some product X, the product X will be selected, even if it doesn't have `DDR4` in its description.
71
71
72
-
So, the script `./reindex.sh` aims to fix it, setting the type `keyword` to `reference` property. The `DDR4` problem won't happen again because, from now on, ES won't tokenize the content present in the `reference` property.
72
+
So, the script `./reindex.sh` aims to fix it, setting the type `keyword` to the `reference` property. The `DDR4` search issue won't happen again because, from now on, ES won't tokenize the content present in the `reference` property.
73
73
74
74
== Running applications using Maven
75
75
@@ -219,9 +219,9 @@ It should return something like
219
219
[source]
220
220
----
221
221
{
222
-
"name" : "8cbb430221c5",
222
+
"name" : "5f932864548a",
223
223
"cluster_name" : "docker-cluster",
224
-
"cluster_uuid" : "Qf1RvbzXQKimAUR0z_erYA",
224
+
"cluster_uuid" : "J8k8aa6eSkOHlgJSZPl8kA",
225
225
"version" : {
226
226
"number" : "7.17.4",
227
227
"build_flavor" : "default",
@@ -263,8 +263,8 @@ It should return something like
263
263
[source]
264
264
----
265
265
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
266
-
green open .geoip_databases r_GGDT_iSdm6lr_j1GjfRw 1 0 24 0 25mb 25mb
267
-
yellow open ecommerce.products.v1 Z1zkiWaIRAWNaQaa1-RWDQ 1 1 0 0 226b 226b
266
+
green open .geoip_databases Ud5Jc_p1SZav1G5CPd6X6g 1 0 40 0 38.3mb 38.3mb
267
+
yellow open ecommerce.products.v1 rmL6pbPMQyKroHl9_KXTVQ 1 1 0 0 226b 226b
0 commit comments