制图:
"mappings": {
"test-engine": {
"properties": {
"@timestamp": {
"type": "date"
} ....
},
样本记录:
{
"_index": "application-log",
"_type": "test-engine",
"_id": "AV9pKiMHlm36MlYWarx3",
"_score": 1,
"_source": {
"@timestamp": "2017-10-29T17:24:50.026+0000",
"message": "Initialize connection to node -1 for sending metadata request",
"host": "54.205.134.57",
"severity": "DEBUG",
"thread": "Thread-4",
"logger": "org.apache.kafka.clients.NetworkClient"
}
我曾尝试查询:
GET application-log/_mapping
{
"range": {
"@timestamp": {
"gte": "2017-10-26T17:24:50.026+0000",
"lte": "2017-10-28T17:24:50.026+0000"
}
}
}
我试着用上面的映射和记录仍然日期范围不kibana工作查询
您需要使用_search
端点没有_mapping
一个和包装一个range
部分内query
查询
GET application-log/_search
{
"query": {
"range": {
"@timestamp": {
"gte": "2017-10-26T17:24:50.026+0000",
"lte": "2017-10-28T17:24:50.026+0000"
}
}
}
}