16
我試圖得到我已經索引的一些事件的直方圖,但我只希望在響應'facet results'而不是搜索+ facet結果。ElasticSearch方面的結果沒有文檔
這是我運行查詢的示例:
curl -XGET 'http://localhost:9200/main/events/_search?pretty=true' -d '
{
"facets" : {
"histo1" : {
"query" : {
"query_string" : {"query":"*:*"}
},
"date_histogram" : {
"field" : "time",
"interval" : "minute"
}
}
}
}
'
所以結果我想剛纔的
"facets" : {
"histo1" : {
"_type" : "date_histogram",
"entries" : [ {
"time" : 1337700000,
"count" : 76
} ]
}
一部分,沒有所有與查詢匹配的文件。
這可能嗎?
非常感謝。
SEARCH_TYPE =計數現在已經過時https://開頭www.elastic.co/guide/en/elasticsearch/reference/current/breaking_21_search_changes.html – ymonad