title: Solr exception: docID must be >= 0 and < maxDoc=20
body: <p>I'm getting the following exception against some solr queries in a multi-gigabyte Solr index. The whole index is built on Solr 3.5.0.</p>
  
  <p>Does it means my index is corrupted? Then is there any way to recover it?</p>
  
  <p><code>HTTP Status 500 - docID must be &gt;= 0 and &lt; maxDoc=20 (got docID=2144084671) java.lang.IllegalArgumentException: docID must be &gt;= 0 and &lt; maxDoc=20 (got docID=2144084671) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:475) at org.apache.lucene.index.DirectoryReader.document(DirectoryReader.java:583) at org.apache.solr.search.SolrIndexReader.document(SolrIndexReader.java:260) at org.apache.solr.search.SolrIndexSearcher.doc(SolrIndexSearcher.java:452) at org.apache.solr.util.SolrPluginUtils.optimizePreFetchDocs(SolrPluginUtils.java:271) at org.apache.solr.handler.component.QueryComponent.doPrefetch(QueryComponent.java:478) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:385) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679)</code></p>