elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
68.65k stars 24.38k forks source link

Incorrect query at start makes some aggregations stop working #9816

Closed ltworf closed 8 years ago

ltworf commented 9 years ago

It took me a little while to narrow down this bug.

I have a cluster with various indexes and types, and I have a query that performs aggregations, that only works on one index/type and fails miserably if executed on anything else.

This is the query I use:

{
  "aggs": {
    "genre": {
      "scripted_metric": {
        "init_script": "_agg.genre = [:]",
        "map_script": "genres=doc['genre'][0].split('/'); for (i=0; i<genres.size(); i++) _agg.genre.put(genres[i],_agg.genre.get (genres[i],0)+1)",
        "reduce_script": "retval = [:];for (i in 0.._aggs.genre.size()) {for ( e in _aggs.genre[i] ) {retval.put(e.key,retval.get(e.key,0)+e.value)}};return retval;"
      }
    },
    "decade": {
      "scripted_metric": {
        "init_script": "_agg.decade = [:]",
        "map_script": "try {dec = ((doc['releasedYear'][0].toInteger()/10).toInteger()*10).toString();_agg.decade.put(dec,_agg.decade.get(dec,0)+1);} catch (e) {}",
        "reduce_script": "retval = [:];for (i in 0.._aggs.decade.size()) {for ( e in _aggs.decade[i] ) {retval.put(e.key,retval.get(e.key,0)+e.value)}}; retval.remove('0'); return retval;"
      }
    },
    "movieRating": {
      "terms": {
        "field": "movieRating"
      }
    },
    "releasedYear": {
      "terms": {
        "field": "releasedYear"
      }
    }
  },
  "query": {
    "filtered": {
      "filter": {},
      "query": {
        "match_all": {}
      }
    }
  }
}

And this is an example of document inside the type

{
"_index": "edge",
"_type": "AssetsDetails",
"_id": "10026",
"_score": 1,
"_source": {
"_id": 10026,
"fantasyViolence": false,
"assetType": "FTP",
"castFirstName": [
"James Buchli"
,
" Toni Myers"
],
"closedCaption": true,
"contentId": 10026,
"contentType": "ASSET",
"createDate": 1422669583,
"creditsFirstName": [ ],
"description": "From the unique vantage point of 200 miles above Earth's surface, we see how natural forces - volcanoes, earthquakes and hurricanes - affect our world, and how a powerful new force - humankind - has begun to alter the face of the planet. From Amazon rain forests to Serengeti grasslands, Blue Planet inspires a new appreciation of life on Earth, our only home.",
"distributor": "someone",
"dolbyStereo": false,
"downloadAllowed": true,
"encodingType": "MPEG-2 TS",
"encripted": false,
"endVodDate": 2019686400,
"episodeTitle": "",
"genre": "Documentary/Short",
"hd": true,
"isSubscriptionPart": true,
"language": false,
"madefortv": false,
"modifyDate": 1422669583,
"movieRating": "G",
"movieRatingId": 2,
"price": 199,
"protocol": "HLS",
"providerassetid": "ZVOD2013100819121602",
"reducedDesc": "From the unique vantage point of 200 miles above Earth's surface, we see how natural forces - volcanoes, earthquakes and hurricanes - affect our world, and how a powerful new force - humankind - has begun to alter the face of the planet. From Amazon rain forests to Serengeti grasslands, Blue Planet inspires a new appreciation of life on Earth, our only home.",
"reducedTitle": "IMAX - Blue Planet",
"releasedYear": "1990",
"rentTime": 2,
"resourceId": 144,
"rtsp": true,
"runtime": 2400,
"sexRating": false,
"spFile": "http://192.168.9.12/inside_job/inside_job_36.m3u8",
"sppath": "",
"startVodDate": 1293840000,
"startvodsetdate": 1293840000,
"startvodsetid": 2,
"status": true,
"studioroyaltyflatrate": 0,
"studioroyaltyminimum": 0,
"studioroyaltypercent": 0,
"subtitleLanguage": "",
"suggestiveDialog": false,
"supplierid": -1,
"imageId": 21,
"title": "6_IMAX Blue Planet",
"trickPlay": true,
"tvRatingId": -1,
"tvnAssetId": "6_ZVOD2013100819121601",
"tvnassetname": "IMAX_Blue_Planet_title",
"tvnbillingid": "927278",
"tvnprovider": "",
"tvnprovidercontenttier": 0,
"tvnproviderid": "",
"tvnsuggestedprice": 199,
"tvnversionmajor": 1,
"tvnversionminor": 0,
"customerassettype": "MOD",
"version": 1,
"violence": false,
"vsFile": "http://192.168.9.12/inside_job/inside_job_36.m3u8",
"uri": "",
"serverIp": "hlsurl",
"serverPort": "0",
"serverType": "HLS"
}
}

Now the problem is that if I try to run the query on /, I will get some exceptions

org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.06][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,741][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.09][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.09][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,748][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.18][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.18][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,754][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.12][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.12][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,769][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.19][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.19][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,770][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.16][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.16][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,776][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.13][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.13][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,788][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.23][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.23][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,862][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.11][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.11][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,864][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.10][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.10][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:34,869][DEBUG][action.search.type       ] [Dark Beast] [.marvel-2015.02.20][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [.marvel-2015.02.20][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: ElasticsearchIllegalArgumentException[No field found for [genre] in mapping with types []]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:35,070][DEBUG][action.search.type       ] [Dark Beast] [edge][0], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [edge][0]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: NullPointerException[Cannot invoke method split() on null object]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:35,081][DEBUG][action.search.type       ] [Dark Beast] [edge][4], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [edge][4]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: NullPointerException[Cannot invoke method split() on null object]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:35,086][DEBUG][action.search.type       ] [Dark Beast] [edge][1], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [edge][1]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: NullPointerException[Cannot invoke method split() on null object]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:35,088][DEBUG][action.search.type       ] [Dark Beast] [edge][2], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94] lastShard [true]
org.elasticsearch.search.query.QueryPhaseExecutionException: [edge][2]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: NullPointerException[Cannot invoke method split() on null object]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more
[2015-02-23 14:41:35,099][DEBUG][action.search.type       ] [Dark Beast] [edge][3], node[OXjTmwuySZSw-isia4Yxbw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3e4a3c94]
org.elasticsearch.search.query.QueryPhaseExecutionException: [edge][3]: query[ConstantScore(*:*)],from[0],size[10]: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:275)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
        at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
        at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: NullPointerException[Cannot invoke method split() on null object]
        at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:253)
        at org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregator.collect(ScriptedMetricAggregator.java:96)
        at org.elasticsearch.search.aggregations.AggregationPhase$AggregationsCollector.collect(AggregationPhase.java:161)
        at org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:60)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:193)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:491)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:448)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:157)
        ... 7 more

After the exceptions, if I run the query on the correct index/type, the aggregations on the years and decades will work fine, however if I run the query on / as first thing after starting elasticsearch, then subsequent correct queries will fail to aggregate years and decades, which will only contain empty data structures in the response.

Let me know if you need more information.

clintongormley commented 9 years ago

@colings86 it looks like the script is being cached along with the field datatype lookup? Please could you take a look.

clintongormley commented 8 years ago

@colings86 has this already been fixed?

colings86 commented 8 years ago

@clintongormley I'm not aware of any fix that has been merged for this. I have also just tried to reproduce it without success.

@ltworf are you still able to reproduce this bug on the latest version of Elasticsearch (currently 2.1)?

ltworf commented 8 years ago

I no longer work on that project. I will unsubscribe this.

clintongormley commented 8 years ago

OK - I'll close for now as presumed fixed