在solr中,是否有一种方法可以从查询中获取所有结果,例如start = 0& rows = *或rows = all? [英] in solr is there an way to fetch all results from a query something like start=0&rows=* or rows=all?

查看:599
本文介绍了在solr中,是否有一种方法可以从查询中获取所有结果,例如start = 0& rows = *或rows = all?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为solr Wiki是不可能的.你们有什么工作吗?

as far as I know this is not possible as the solr wiki. do you guys have any work around?

推荐答案

唯一的解决方法是将行值设置为足够大以返回所有文档.

The only workaround is to set the rows value large enough to return all documents.

但是,对于大于1000个文档的文档,我不建议这样做.如果要获取的文档数量足够大,则必须生成和解析的XML会遇到内存或超时问题.例如,如果您的索引中有2-3百万个文档,您是否真的希望在一次响应中全部这些?它的分页是有原因的.您可能应该利用它.

However, I wouldn't recommend this for anything larger than about 1000 documents. If the number of documents you are fetching is large enough, you will run into memory or timeout issues with the XML you have to generate and parse. For example, if there are 2-3 million documents in your index, do you really want all of that in a single response? It's paginated for a reason. You should probably leverage it.

次要问题...为什么要这样做呢?如果您只想将所有数据全部提取出来,那么将一堆数据放入搜索索引有什么意义呢?此时,最好使用原始数据源.

Of secondary concern... Why are you doing this to begin with? What's the point of putting a bunch of data into a search index, if you are just going to pull it ALL out? You may be better off using your original data source at that point.

这篇关于在solr中,是否有一种方法可以从查询中获取所有结果,例如start = 0& rows = *或rows = all?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆