Skip to content

Instantly share code, notes, and snippets.

@chaudum
Created December 5, 2016 15:41
Show Gist options
  • Save chaudum/0c3b552cb2b689f79f8a190199ba9798 to your computer and use it in GitHub Desktop.
Save chaudum/0c3b552cb2b689f79f8a190199ba9798 to your computer and use it in GitHub Desktop.
curl -sXPUT "http://localhost:4200/_template/.partitioned.tto_device_data_points." -d@- <<- EOF
{
"order": 0,
"template": ".partitioned.tto_device_data_points.*",
"settings": {
"index": {
"number_of_shards": "2",
"auto_expand_replicas": "false",
"number_of_replicas": "1"
}
},
"mappings": {
"default": {
"_meta": {
"routing": "did",
"partitioned_by": [
[
"m",
"string"
]
],
"primary_keys": [
"m",
"did",
"ts",
"rid",
"gid",
"fid"
]
},
"dynamic": "true",
"_all": {
"enabled": false
},
"properties": {
"fid": {
"type": "integer",
"doc_values": true
},
"gid": {
"type": "integer",
"doc_values": true
},
"dps": {
"dynamic": "true",
"properties": {
"performance": {
"type": "double",
"doc_values": true
},
"modulation": {
"type": "float",
"doc_values": true
},
"cur_temp": {
"type": "float",
"doc_values": true
},
"energy_usage": {
"type": "float",
"doc_values": true
},
"temporary_mmi_room_tmp": {
"type": "long"
},
"operating_hours": {
"type": "float",
"doc_values": true
},
"energy_revenue": {
"type": "float",
"doc_values": true
},
"out_temp": {
"type": "float",
"doc_values": true
},
"out_temp_group": {
"type": "float",
"doc_values": true
},
"set_temp": {
"type": "float",
"doc_values": true
},
"status": {
"type": "integer",
"doc_values": true
}
}
},
"gwid": {
"type": "long",
"doc_values": true
},
"rid": {
"type": "integer",
"doc_values": true
},
"m": {
"index": "no",
"type": "string"
},
"did": {
"type": "integer",
"doc_values": true
},
"ts": {
"format": "epoch_millis||dateOptionalTime",
"type": "date",
"doc_values": true
}
}
}
},
"aliases": {
"tto_device_data_points": {}
}
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment