有没有办法在单个solr请求中执行多个查询,并将结果的联合作为响应
我的简化模式看起来像一个名称字段和一个类型字段(4-5种不同的类型),我希望每个类型值有10个结果。这可以在solr中完成吗?
发布于 2011-09-24 05:37:13
当前不可能,请查看此请求,可能是在此修复到位时
发布于 2013-11-12 03:56:11
我认为这可以通过字段折叠来实现
http://wiki.apache.org/solr/FieldCollapsing#Quick_Start
他们的例子是相似的,除了他们将价格分成范围而不是类型:
我们可以使用group.query命令(很像facet.query)找到与任意查询匹配的顶级文档。例如,我们可以使用它来查找不同价格范围内的前3个文档:
http://localhost:8983/solr/select?wt=json&indent=true&fl=name,price&q=memory&group=true&group.query=price:[0+TO+99.99]&group.query=price:[100+TO+*]&group.limit=3在您的例子中是group.limit=10。
发布于 2010-12-08 23:57:14
Federated Search
Distributed Search - needs all the definition schemas to look the same
https://stackoverflow.com/questions/4388005
复制相似问题