Reindexing of Elasticsearch from Database

Restore the entire Elasticsearch index from the database via Commander service.

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 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 configure command:

ParameterDescriptionExample
-h | --helpDisplays the help for the command.dbs configure -h
-s | --simulation <arg>

Turns the simulation mode on or off.

After starting the Commander service and after a non-simulation reindexing process, the simulation mode is set to on automatically.

dbs configure --simulation off

These parameters can be given to the dbs reindex command:

ParameterDescriptionExample
-e | --end-date <arg>Sets an end date. The argument is in format yyyy-MM-dd.dbs reindex --end-date=2020-01-21
-h | --helpDisplays the help for the command.dbs reindex -h
-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.

Lt. Commander> dbs configure -h
usage: dbs configure [-e <arg>] [-h] [-s <arg>]
 -h,--help                        show help
 -s,--simulation <arg>            turn simulation mode on/off
 
Lt. Commander> dbs configure --simulation off
simulation mode is [false]
 
Lt. Commander> dbs reindex -h
usage: dbs reindex [-e <arg>] [-h] [-s <arg>] [-t <arg>]
 -e,--end-date <arg>     Set end date, e.g., --end-date=2020-01-21
 -h,--help               Show help
 -s,--start-date <arg>   Set start date, e.g., -s 2019-01-21
 -t,--tenant <arg>       Specify tenant
 
Lt. Commander> dbs reindex -t default -s 2017-01-01 --end-date=2017-12-31
tenant[default]  start-date[2017-01-01] endDate[2017-12-31]
getting stats
....

Read on

Cleanup of the Audit Trail

Remove entries from the audit trail by means of the Commander service. Keep reading

Audit Trail - an "Object's History"

The audit trail is the history protocol of an object, serving to document its total lifecycle. There are many different actions that trigger the creation of a new entry in the respective object's audit trail. Keep reading

Commander Service for System Maintenance

Perform low-level maintenance on your core system, access the database and carry out Elasticsearch queries. Keep reading