【发布时间】:2021-01-14 15:06:48
【问题描述】:
所以,要获取文档的内部 id,我这样做:
var hits = response
.Hits
.Select(h =>
{
h.Source.id = h.Id;
return h.Source;
})
.ToList();
但是当我进行聚合时,如何返回与上面相同的 id?
var agg = response.Aggregations.Terms("inactive_pages");
var hits = agg.Buckets.Select(x => x.TopHits("top_versions").Documents<WebPage>());
【问题讨论】:
标签: elasticsearch nest