dnet-applications/apps/dhp-broker-application/src/main/resources/config/mapping_es7.sh

57 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
INDEXBASEURL=http://localhost:9200
EVENTINDEXNAME=events_beta_michele
NOTIFICATIONINDEXNAME=notifications_beta_michele
echo
echo "Fixing events index..."
curl -XPUT -H 'Content-Type: application/json' "$INDEXBASEURL/$EVENTINDEXNAME/_mapping" -d '
{
"properties" : {
"map": {
"type": "nested",
"properties": {
"targetDatasourceId": {
"type": "keyword",
"index": true
},
"targetDatasourceName": {
"type": "keyword",
"index": true
},
"targetDatasourceType": {
"type": "keyword",
"index": true
}
}
}
}
}'
echo
echo
echo "Fixing notifications index..."
curl -XPUT -H 'Content-Type: application/json' "$INDEXBASEURL/$NOTIFICATIONINDEXNAME/_mapping" -d '
{
"properties" : {
"map": {
"type": "nested",
"properties": {
"targetDatasourceId": {
"type": "keyword",
"index": true
},
"targetDatasourceName": {
"type": "keyword",
"index": true
},
"targetDatasourceType": {
"type": "keyword",
"index": true
}
}
}
}
}'