1
我应该保存下列数据Elasticsearch:如何在Elasticsearch中有效地存储我的表格数据?
mytypes = {
'type1': (
date(2015, 3, 12),
date(2015, 5, 6)
),
'type2': (
date(2015, 4, 11),
date(2015, 4, 14),
date(2015, 4, 20)
)
}
我不知道什么是在Elasticsearch一个高效的数据结构。例如,我为type1
创建了以下示例数据结构,但它看起来太硬编码给我。有没有更灵活的方式在Elasticsearch中存储这种数据?
PUT myconstants
{
"mappings": {
"type1": {
"_all": {
"enabled": true
},
"properties": {
"date1": {
"type":"date"
},
"date2": {
"type":"date"
}
}
}
}
}