我正在尝试获取已编入索引的某些事件的直方图,但我只希望响应中的“方面结果”而不是搜索+方面结果。
这是我正在运行的查询的示例:
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
  } ]
}
部分,没有与查询匹配的所有文档。
这可能吗?
非常感谢。