Elasticsearchランタイムフィールド
ElasticのSchema on readの実装であるランタイムフィールドを使用して、高速かつ柔軟な方法でデータをElasticsearchに取り込み、変更に容易に対応できます。高速なSchema on writeと利便性に優れたSchema on readの両方を提供しているのは、Elasticだけです。
#In this index template, we've defined two fields,
#timestamp and response_code, which will be created
#when we ingest the data. We've also defined a
#dynamic runtime field mapping. Any other fields
#will be runtime fields.
PUT _index_template/my_dynamic_index
{
"index_patterns": [
"my_dynamic_index-*"
],
"template": {
"mappings":{
"dynamic": "runtime",
"properties": {
"timestamp": {
"type": "date",
"format": "yyyy-MM-dd"
},
"response_code": {
"type": "integer"
}
}
}
}
}