I have a simple document schema on which I am trying to run the following query :
curl -XPOST 'localhost:9200/indexName/topn/_search?pretty' -d '{ "aggregations" : { "applid" : { "terms" : { "field" : "applid", "size" : 3, "order" : { "tt>byt_sum" : "desc" } }, "aggregations" : { "tt" : { "filter" : { "and" : { "filters" : [ { "range" : { "t" : { "from" : 1403211600000, "to" : 1403216100000, "include_lower" : true, "include_upper" : true } } }, { "terms" : { "gid" : [ "abcd" ] } } ] } }, "aggregations" : { "byt_sum" : { "sum" : { "field" : "byt" } } } } } } } }' This seems to give me back an error "error" : "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[rcP5ncimTpmcUZgvn5cgSw][indexName][0]: ArrayIndexOutOfBoundsException[null]}{[vauVf2XOQvOobpqIbp0REQ][indexName][2]: RemoteTransportException[[Bloodstorm][inet[/10.0.0.91:9300]][search/phase/query]]; nested: ArrayIndexOutOfBoundsException; }{[vauVf2XOQvOobpqIbp0REQ][indexName][1]: RemoteTransportException[[Bloodstorm][inet[/10.0.0.91:9300]][search/phase/query]]; nested: ArrayIndexOutOfBoundsException; }{[vauVf2XOQvOobpqIbp0REQ][indexName][4]: RemoteTransportException[[Bloodstorm][inet[/10.0.0.91:9300]][search/phase/query]]; nested: ArrayIndexOutOfBoundsException; }{[vauVf2XOQvOobpqIbp0REQ][indexName][3]: RemoteTransportException[[Bloodstorm][inet[/10.0.0.91:9300]][search/phase/query]]; nested: ArrayIndexOutOfBoundsException; }]", "status" : 500 } When I take the "order" : { "tt>byt_sum" : "desc" } out, this seems to work fine. Also, the error only occurs for certain "gid" : [ "abcd" ] parameters. FOr example, it works for "gid" : [ "1234" ]. Could you suggest what is going wrong here? Elasticsearch version : { "status" : 200, "name" : "Kylun", "version" : { "number" : "1.1.1", "build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc", "build_timestamp" : "2014-04-16T14:27:12Z", "build_snapshot" : false, "lucene_version" : "4.7" }, "tagline" : "You Know, for Search" } -- 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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0aed2aa9-e91b-43db-b917-11612458da2a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.