Solr - 获取构面计数而不返回搜索结果

发布于 2024-07-06 16:28:07 字数 83 浏览 10 评论 0原文

我只需要从 solr 返回方面计数。 所以我基本上想搜索所有文档并返回构面计数,但我不想返回任何搜索结果。 这可能吗?

谢谢

I need to return only the facet counts from solr. So I basically want to search over all documents and return the facet counts, but I don't want to return any search results. Is this possible?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

海螺姑娘 2024-07-13 16:28:07

设置 facet=true 将启用分面,设置 rows=0 将阻止返回任何结果。 numFound 将方便地显示找到了多少个结果。

Setting facet=true will enable faceting and setting rows=0 will prevent any results being returned. Conveniently the numFound will show you how many results were found.

电影里的梦 2024-07-13 16:28:07

我想明显的解决方案是使用通配符进行搜索并指定您希望返回零结果。

到目前为止,这就是我的解决方案。

I guess the obvious solution would be to search using a wildcard and specify that you want zero results returned.

That's my solution so far.

独自←快乐 2024-07-13 16:28:07

因此,根据我的理解,如果我需要获取分页系统中所有文档的构面计数,我需要发出两个请求(选择):
- 第一个获得所有文档的构面计数。
- 第二个是从当前页面获取文档。

So, from what I have understood if I need to get facets count for all documents in a paginated system, I need to make two requests (selects):
- The first to get the facets count for all documents.
- And the second to get the documents from current page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文