巨大结果集的分页错误

时间:2010-12-23 11:21:10

标签: solr

我在Solr上执行文本搜索,生成一个巨大的结果集,如2,277,292。

我只显示20个文件/页面。当我点击最后一页时,在后端,对solr的查询生成为

开始= 2277280
行= 20

引发异常:

  

HTTP状态500 - allocLargeObjectOrArray:[Lorg /阿帕奇/ lucene的/搜索/ ScoreDoc ;,尺寸9109184 java.lang.OutOfMemoryError:allocLargeObjectOrArray:在org.apache [Lorg /阿帕奇/ lucene的/搜索/ ScoreDoc ;,大小9109184。位于org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:996)的lucene.search.TopDocsCollector.topDocs(TopDocsCollector.java:132)org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java: 884)org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:341)atg.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:182)org.apache.solr.handler .component.SearchHandler.handleRequestBody(SearchHandler.java:195)在org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)在org.apache.solr.core.SolrCore.execute(SolrCore.java:1316 )org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrD) ispatchFilter.java:241)处org.apache.catalina在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)) .core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127 )在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)在org.apache.catalina.connector.CoyoteAdapter。服务(CoyoteAdapter.java:298)在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)在org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:588)在组织java.lang.Thread.run上的.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:489) d.java:619)

1 个答案:

答案 0 :(得分:0)

不确定这是否是Solr中的错误,但您可以尝试增加内存:

设置

JAVA_OPTS="-Xmx1024m -Xms256m"

在catalina.sh/.bat