Issue 1:
The range aggregation is awesome, but it currently limits you to defining buckets based on non-obvious inclusive/exclusive terms:

{
"to" : "2015-01-01"
},
{
"from" : "2015-01-01",
"to" : "2016-01-01"
},
{
"from" : "2016-01-01"
}

It would be great if we changed this to be more along the lines of what we do with the range query:

{
"lt" : "2015-01-01"
},
{
"gte" : "2015-01-01",
"lt" : "2016-01-01"
},
{
"gte" : "2016-01-01"
}

At the very least, it's more explicit about what's happening, but it also has the added benefit of matching the behavior of the query and it gives a smidgen more flexibility.

Issue 2:
Elasticsearch version:

2.2.0

JVM version:

java version "1.7.0_65"

OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)

OS version:

Ubuntu 14.04.1 LTS

Description of the problem including expected versus actual behavior:

Making a call to analyze API turns into a timeout when the analyzer doesn't exist and no index is provided in the url, if the index is included, the expected error is returned. Tried it in an old 1.3.4 ES server and it returns the expected error quickly.

Steps to reproduce:

Note i'm using 'standard_s_' analyzer

curl -XGET 'http://localhost:9200/_analyze?pretty&analyzer=standards&text=this-is-a-test'

But this works ok (returns an error): curl -XGET 'http://localhost:9200/my_index/_analyze?pretty&analyzer=standards&text=this-is-a-test'

3.

Provide logs (if relevant):

This shows in elasticsearch logs everytime i make a request (with no index):

[2016-03-08 15:37:31,027][ERROR][transport ] [mynode] failed to handle exception for action [indices:admin/analyze[s]], handler [org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1@227981db]
java.lang.NullPointerException
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:195)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$700(TransportSingleShardAction.java:115)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1.handleException(TransportSingleShardAction.java:174)
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:821)
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:799)
at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:361)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
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)

When making the request to the index the stacktrace is the following:

[2016-03-08 16:07:32,495][DEBUG][action.admin.indices.analyze] [mynode] null: failed to execute [org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest@1c344de9]
RemoteTransportException[[mynode][my_ip:9300][indices:admin/analyze[s]]]; nested: IllegalArgumentException[failed to find analyzer [standards]];
Caused by: java.lang.IllegalArgumentException: failed to find analyzer [standards]
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:143)
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:63)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:282)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:275)
at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.doRun(MessageChannelHandler.java:299)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
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)
[2016-03-08 16:07:32,496][INFO ][rest.suppressed ] /my_index/_analyze Params: {index=my_index, text=this-is-a-test, analyzer=standards, pretty=}
RemoteTransportException[[mynode][my_ip:9300][indices:admin/analyze[s]]]; nested: IllegalArgumentException[failed to find analyzer [standards]];
Caused by: java.lang.IllegalArgumentException: failed to find analyzer [standards]
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:143)
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:63)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:282)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:275)
at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.doRun(MessageChannelHandler.java:299)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
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)