Solr:所有类别中的每一个
我在 solr 有产品索引,产品有类别字段,我需要从每个类别中选择一个产品(最好是随机的),查询会是什么样子?
I have product index at solr, product has category field and I need to select one product (better would be random) from each category, how query would look like?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在寻找 sql group by 功能,
从 solr 3.3 开始,
它具有类似的功能,称为 FieldCollapsing
if you are looking for sql group by feature,
with solr 3.3 on-wards,
it has the similar feature called FieldCollapsing