我正在运行以下查询:
POST myindex/_search
{
"aggs": {
"minSamp": {
"min": {
"field": "sample"
}
}
}
}
部分:
{
"took": 15,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 91,
"max_score": 1,
"hits": [
{
"_index": "myindex",
"_type": "myindex",
"_id": "HyYmY2oB06bGDsjT4C7Z",
"_score": 1,
"_source": {
"sample": 119267,
"age": 6,
"comp": 11
}
},
{
"_index": "myindex",
"_type": "myindex",
"_id": "HyYmY2oB06bGDsjT4C79",
"_score": 1,
"_source": {
"sample": 117100,
"age": 9,
"comp": 7
}
}
]
}
}
....
,我只想得到一个响应(最小的“样本”值是什么)
但是我得到很多文件作为回应,完整的文件,
1.怎么了?
2.我可以针对多个索引得到一个答复吗?例如:如果我的查询是针对所有以“ my”开头的索引:
谢谢
POST my*/_search