私はElasticSearchのバージョン5.4.1を使用しています。弾性サーチアグリゲーションで空のバケット配列を取得する
groupBy集約/集約集合を実行しようとすると、私はバケット配列に値を取得できません。
これが私のインデックスです:
curl -X PUT localhost:9200/urldata -d '{
"mappings" : {
"components" : {
"properties" : {
"name" : {
"type" : "keyword",
"index" : "not_analyzed"
},
"status" : {
"type" : "keyword",
"index" : "not_analyzed"
},
"timestamp":{
"type":"date",
"index":"not_analyzed"
}
}
}
}
}'
そして、この集計クエリ:
curl -XGET 'localhost:9200/urldata/_search?pretty' -H 'Content-Type: application/json' -d'
{
"size": 0,
"aggs": {
"components": {
"terms": {
"field": "name.keyword"
}
}
}
}
'
出力:私は間違っているつもりです
{
"took":2,
"timed_out":false,
"_shards":{
"total":5,
"successful":5,
"failed":0
},
"hits":{
"total":3,
"max_score":0.0,
"hits":[
]
},
"aggregations":{
"components":{
"doc_count_error_upper_bound":0,
"sum_other_doc_count":0,
"buckets":[
]
}
}
}
?
いくつかの文書の例を提供できますか? – mel
{name: "A"、ステータス: "success"、created_at: "2017-08-17"} {name: "A"、ステータス: "failure"、created_at: "2017-08-18"} –