提问人:Jeff VanHorn 提问时间:11/10/2023 更新时间:11/10/2023 访问量:15
在 mongodb c# 中,如何将分面搜索限制为一组特定的 id?
In mongodb c# how can I limit a facet search to a specific set of ids?
问:
这是我想完成的:
var idFilter = Builders<TProduct>.Filter.In(x => x.Id, aListOfStringIds);
var aggResultArray = await Repository.Aggregate()
.SearchMeta(Builders<TProduct>.Search
.Facet(Builders<TProduct>.Search
.Compound()
.Filter(idFilter)
.Must(must)
.Should(should), facets), indexName: SearchIndex)
.ToListAsync(cancellationToken);
我的问题是分面搜索不支持.在
有没有办法做到这一点?
尝试了查询字符串,但无法将其与 ObjectIds 一起使用,因此没有匹配。
答: 暂无答案
评论