I know that I am getting this exception because the priorityQueue allocate memory more than my PC can allocate from the RAM.
ERROR {org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer} - Error in index search: null java.lang.NegativeArraySizeException at org.apache.lucene.util.PriorityQueue.<init>(PriorityQueue.java:58) at org.apache.lucene.search.HitQueue.<init>(HitQueue.java:64) at org.apache.lucene.search.TopScoreDocCollector.<init>(TopScoreDocCollector.java:184) at org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector.<init>(TopScoreDocCollector.java:53) at org.apache.lucene.search.TopScoreDocCollector.create(TopScoreDocCollector.java:174) at org.apache.lucene.search.TopScoreDocCollector.create(TopScoreDocCollector.java:154) Is there a way to get the matching documents in a streaming fashion? Thanks, Gimantha