diff --git a/app/save-and-restore/util/src/main/resources/save_and_restore_util_preferences.properties b/app/save-and-restore/util/src/main/resources/save_and_restore_util_preferences.properties index 6185c3776c..3c97832517 100644 --- a/app/save-and-restore/util/src/main/resources/save_and_restore_util_preferences.properties +++ b/app/save-and-restore/util/src/main/resources/save_and_restore_util_preferences.properties @@ -12,4 +12,4 @@ writeTimeout=5000 # (write one PV at a time). With channel access (ca), parallel writes # may trigger deadlocks in the JCA library. SYNCHRONOUS policy # is then the workaround to consider. -restorePolicy=SYNCHRONOUS +restorePolicy=ASYNCHRONOUS diff --git a/services/save-and-restore/src/main/resources/scripts/update-configuration-mapping.sh b/services/save-and-restore/src/main/resources/scripts/update-configuration-mapping.sh new file mode 100644 index 0000000000..c1944f06b1 --- /dev/null +++ b/services/save-and-restore/src/main/resources/scripts/update-configuration-mapping.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo "Invalid usage. Please specify path to the file configuration_mapping.json as first argument." + exit 1 +fi + +echo "Creating temporary index" +curl -XPUT "http://localhost:9200/saveandrestore_configuration_tmp" -H 'Content-Type: application/json' --data @$1 +echo + +echo "Copying data to temporary index" +curl -XPOST "http://localhost:9200/_reindex" -H 'Content-Type: application/json' -d '{"source":{"index": "saveandrestore_configuration"}, "dest":{"index":"saveandrestore_configuration_tmp"}}' +echo + +echo "Flushing data to temporary index" +curl -XPOST "http://localhost:9200/saveandrestore_configuration_tmp/_flush" +echo + +echo "Delete original index" +curl -XDELETE "http://localhost:9200/saveandrestore_configuration" +echo + +echo "Re-creating original index" +curl -XPUT "http://localhost:9200/saveandrestore_configuration" -H 'Content-Type: application/json' --data @$1 +echo + +echo "Copying data to original index" +curl -XPOST "http://localhost:9200/_reindex" -H 'Content-Type: application/json' -d '{"source":{"index": "saveandrestore_configuration_tmp"}, "dest":{"index":"saveandrestore_configuration"}}' +echo + +echo "Flushing data to original index" +curl -XPOST "http://localhost:9200/saveandrestore_configuration/_flush" +echo + +echo "Delete temporary index" +curl -XDELETE "http://localhost:9200/saveandrestore_configuration_tmp" +echo diff --git a/services/save-and-restore/src/main/resources/tree_node_mapping.json b/services/save-and-restore/src/main/resources/tree_node_mapping.json index 6bde6fccb6..48f6945548 100644 --- a/services/save-and-restore/src/main/resources/tree_node_mapping.json +++ b/services/save-and-restore/src/main/resources/tree_node_mapping.json @@ -36,7 +36,7 @@ "type" : "nested", "properties": { "name": { - "type": "text" + "type": "keyword" }, "comment": { "type": "text"