Skip to content

Commit 85b1aa6

Browse files
committed
Create new index and update alias in RPPD script (RPB-109)
1 parent cfafbe8 commit 85b1aa6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

transformAndIndexRppd.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
#!/bin/bash
22
set -uo pipefail # See http://redsymbol.net/articles/unofficial-bash-strict-mode/
33

4+
TIME=$(date "+%Y%m%d-%H%M")
5+
INDEX="gnd-rppd-$TIME"
6+
ALIAS="gnd-rppd-test"
7+
48
cd ../rpb
59
bash transformRppd.sh
610
cd -
7-
sbt "runMain apps.Index baseline"
11+
sbt -Dindex.prod.name=$INDEX "runMain apps.Index baseline"
12+
curl -X POST "weywot3:9200/_aliases?pretty" -H 'Content-Type: application/json' -d'
13+
{
14+
"actions" : [
15+
{ "remove" : { "index" : "*", "alias" : "'"$ALIAS"'" } },
16+
{ "add" : { "index" : "'"$INDEX"'", "alias" : "'"$ALIAS"'" } }
17+
]
18+
}
19+
'
820
curl -S -s -o /dev/null https://rppd.lobid.org

0 commit comments

Comments
 (0)