forked from confluentinc/demo-scene
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_es_dynamic_mapping.sh
executable file
·40 lines (38 loc) · 1.21 KB
/
create_es_dynamic_mapping.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
source .env
curl -u $ELASTIC_USERNAME:$ELASTIC_PASSWORD -XPUT "$ELASTIC_URL/_template/kafkaconnect" -H 'Content-Type: application/json' -d'
{
"template": "*",
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"dynamic_templates": [
{
"dates": {
"match": "*_TS",
"mapping": {
"type": "date"
}
}
},
{
"heights": {
"match": "HEIGHT",
"mapping": {
"type": "float"
}
}
},
{
"locations": {
"match": "LOCATION",
"mapping": {
"type": "geo_point"
}
}
}
]
}
}'