Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Elastic Search 中根据 Name 和 Lat、Lang 对文档进行分组。我探索了聚合 API,但它只给出了特定标准的计数,而不是实际文档。有没有一种方法可以在 Elastic Search 中做到这一点
你可以使用嵌套聚合——比如按名称聚合,_id。并使用第二个查询按 id 获取文档。