Hi, Multi-level term aggregations do not indeed perform very efficiently right now which is something that will be significantly improved in Elasticsearch 1.2.
On Tue, May 6, 2014 at 3:05 PM, Rahul Bahirat <[email protected]>wrote: > Hi > On elasticsearch(1.1.1) we did the aggregation queries. We notice that if > index is empty then ES node go out of memory > > > { > "aggregations" : { > "dataFilter" : { > "filter" : { > "and" : { > "filters" : [ { > "range" : { > "startTime" : { > "from" : "now-1d", > "to" : "now", > "include_lower" : true, > "include_upper" : true > } > } > }, { > "not" : { > "filter" : { > "term" : { > "type" : "xyz" > } > } > } > } ] > } > }, > "aggregations" : { > "startTimeMinOfDayTerm" : { > "terms" : { > "field" : "startTimeMinOfDay", > "size" : 0 > }, > "aggregations" : { > "nameTerm" : { > "terms" : { > "field" : "name", > "size" : 0 > }, > "aggregations" : { > "sessionTypeTerm" : { > "terms" : { > "field" : "sessionType", > "size" : 0 > }, > "aggregations" : { > "typeTerm" : { > "terms" : { > "field" : "type", > "size" : 0 > }, > "aggregations" : { > "sizeStats" : { > "stats" : { > "field" : "size" > } > }, > "totalTimeStats" : { > "stats" : { > "field" : "totalTimeTaken" > } > }, > "Stats" : { > "stats" : { > "field" : "hits" > } > } > } > } > } > } > } > } > } > } > } > } > } > } > > > stack trace of Elastic-search > > [2014-05-06 12:10:00,947][DEBUG][action.search.type ] [Silver Sable] > [oss_3][1], node[2j3OSX1gQSCudUYq8_uTOw], [P], s[STARTED]: Failed to > execute [org.elasticsearch.action.search.SearchRequest@1ab39e8] lastShard > [true] > org.elasticsearch.ElasticsearchException: Java heap space > at > org.elasticsearch.ExceptionsHelper.convertToRuntime(ExceptionsHelper.java:37) > at > org.elasticsearch.search.SearchService.createContext(SearchService.java:531) > at > org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:480) > at > org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252) > at > org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202) > at > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80) > at > org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216) > at > org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:203) > at > org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) > at java.lang.Thread.run(Thread.java:662) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.elasticsearch.common.util.BigArrays.newLongArray(BigArrays.java:446) > at > org.elasticsearch.search.aggregations.bucket.BucketsAggregator.<init>(BucketsAggregator.java:46) > at > org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.<init>(StringTermsAggregator.java:65) > at > org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.create(TermsAggregatorFactory.java:139) > at > org.elasticsearch.search.aggregations.support.ValueSourceAggregatorFactory.create(ValueSourceAggregatorFactory.java:58) > at > org.elasticsearch.search.aggregations.AggregatorFactories.createAndRegisterContextAware(AggregatorFactories.java:53) > at > org.elasticsearch.search.aggregations.AggregatorFactories.access$100(AggregatorFactories.java:38) > at > org.elasticsearch.search.aggregations.AggregatorFactories$1.<init>(AggregatorFactories.java:86) > at > org.elasticsearch.search.aggregations.AggregatorFactories.createSubAggregators(AggregatorFactories.java:74) > at > org.elasticsearch.search.aggregations.Aggregator.<init>(Aggregator.java:86) > at > org.elasticsearch.search.aggregations.bucket.BucketsAggregator.<init>(BucketsAggregator.java:45) > at > org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.<init>(StringTermsAggregator.java:65) > at > org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.create(TermsAggregatorFactory.java:139) > at > org.elasticsearch.search.aggregations.support.ValueSourceAggregatorFactory.create(ValueSourceAggregatorFactory.java:58) > at > org.elasticsearch.search.aggregations.AggregatorFactories.createAndRegisterContextAware(AggregatorFactories.java:53) > at > org.elasticsearch.search.aggregations.AggregatorFactories.access$100(AggregatorFactories.java:38) > at > org.elasticsearch.search.aggregations.AggregatorFactories$1.<init>(AggregatorFactories.java:86) > at > org.elasticsearch.search.aggregations.AggregatorFactories.createSubAggregators(AggregatorFactories.java:74) > at > org.elasticsearch.search.aggregations.Aggregator.<init>(Aggregator.java:86) > at > org.elasticsearch.search.aggregations.bucket.BucketsAggregator.<init>(BucketsAggregator.java:45) > at > org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.<init>(StringTermsAggregator.java:65) > at > org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.create(TermsAggregatorFactory.java:139) > at > org.elasticsearch.search.aggregations.support.ValueSourceAggregatorFactory.create(ValueSourceAggregatorFactory.java:58) > at > org.elasticsearch.search.aggregations.AggregatorFactories.createAndRegisterContextAware(AggregatorFactories.java:53) > at > org.elasticsearch.search.aggregations.AggregatorFactories.access$100(AggregatorFactories.java:38) > at > org.elasticsearch.search.aggregations.AggregatorFactories$1.<init>(AggregatorFactories.java:86) > at > org.elasticsearch.search.aggregations.AggregatorFactories.createSubAggregators(AggregatorFactories.java:74) > at > org.elasticsearch.search.aggregations.Aggregator.<init>(Aggregator.java:86) > at > org.elasticsearch.search.aggregations.bucket.BucketsAggregator.<init>(BucketsAggregator.java:45) > at > org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.<init>(StringTermsAggregator.java:65) > at > org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.create(TermsAggregatorFactory.java:139) > at > org.elasticsearch.search.aggregations.support.ValueSourceAggregatorFactory.create(ValueSourceAggregatorFactory.java:58) > > > > > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/66c61611-a303-433e-afe1-b69a4e3d0739%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/66c61611-a303-433e-afe1-b69a4e3d0739%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Adrien Grand -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5tF3_EsV945P1mw8g%3DSH_qWvg46Uzjtwsrckn3PAtLgA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
