...
Changes in the object structure might lead to differences between the index of Elasticsearch and the database. As of yuuvis® Momentum version 2020 Winter, it is possible to reindex Elasticsearch according to the database by means of the dbs
-reindex
command provided by the Commander COMMANDER service.
The reindexing can be limited by a start date and an end date, and by specifying a tenant. Per default, the command is executed in a simulation mode that does not manipulate any data. In order to actually apply the reindexing to the data, the simulation mode has to be turned off with the dbs-configure Command. After the non-simulation reindexing has been executed, the simulation mode is turned on again automatically.
These parameters can be given to the dbs
reindex
command:
Parameter | Description | Example |
---|---|---|
-e | --end-date <arg> | Sets an end date. The argument is in format yyyy-MM-dd . | dbs-reindex --end-date=2020-01-21 |
-s | --start-date <arg> | Sets a start date. The argument is in format yyyy-MM-dd . | dbs-reindex -s 2019-01-21 |
-t | --tenant <arg> | Specifies the target tenant. If not specified, the command is executed for all tenants. | dbs-reindex -t default (with the example tenant default ) |
The following example code shows the commands together with the corresponding command line outputs for a non-simulation reindexing. The simulation mode is turned off in line 7. In line 18, the reindexing is executed for the default
tenant starting from 2017-01-01
and ending on 2017-12-31
.
...