I am relatively new to Java world and started using Solr recently. I am running Solr 5.2.1 on Amazon t2.small box which is single core and 2 gm RAM ubuntu server. I ran Solr with 1gb heap space configuration. The Solr core currently has 8M documents with 15 fields, 14 of which are String ids only. The other being a DateRange Field type.
The search queries are typically long ones typically on range of 15000-20000 characters. This is due to filter queries being used with multiple field values on the range of 100s. For example,
/select?fq=field1:("value-1"+OR+"value-2"+.......+OR+"value-n") , n ranges from 1000-2000
I modified the Jetty's MaxURLLength to 65535 which allowed me to do this.
Earlier, when the number of documents were < 2M, Solr was running smoothly. But, when the number of documents reached 8M, Solr starts crashing giving OutOfMemoryError Heap Space Error. The following is the exception
java.lang.OutOfMemoryError: Java heap space
at org.apache.lucene.util.FixedBitSet.<init>(FixedBitSet.java:115)
at org.apache.lucene.spatial.prefix.IntersectsPrefixTreeFilter$1.start(IntersectsPrefixTreeFilter.java:62)
at org.apache.lucene.spatial.prefix.AbstractVisitingPrefixTreeFilter$VisitorTemplate.getDocIdSet(AbstractVisitingPrefixTreeFilter.java:130)
at org.apache.lucene.spatial.prefix.IntersectsPrefixTreeFilter.getDocIdSet(IntersectsPrefixTreeFilter.java:57)
at org.apache.lucene.search.Filter$1.scorer(Filter.java:95)
at org.apache.lucene.search.Weight.bulkScorer(Weight.java:137)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:768)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:485)
at org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:1243)
at org.apache.solr.search.SolrIndexSearcher.getPositiveDocSet(SolrIndexSearcher.java:926)
at org.apache.solr.search.SolrIndexSearcher.getProcessedFilter(SolrIndexSearcher.java:1088)
at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1609)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1485)
at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:561)
at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:518)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:255)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:654)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:450)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
- Is the above exception due to lack of memory?
- Is it due to query being too long which inturn is affecting the search?