AtomicArray.toArray will now throw an exception if target array if of the wrong size.
Added statistical facet to term facet in SimpleNestedTests

The test now uses a statistical facet plus a filter facet on nested documents.
rename variable and add comment about TopDocs#merge
Removed useless TODO
Added the "pattern_capture" token filter from Lucene 4.4

The XPatternCaptureGroupTokenFilter.java file can be removed once we
upgrade to Lucene 4.4.

This change required the addition of the commaDelimited flag to getAsArray()
to disable parsing strings as comma-delimited values.

Closes #3340
Add the ability to ignore or fail on numeric fields when executing more-like-this or fuzzy-like-this queries.

More-like-this and fuzzy-like-this queries expect analyzers which are able to
generate character terms (CharTermAttribute), so unfortunately this doesn't
work with analyzers which generate binary-only terms (BinaryTermAttribute,
the default CharTermAttribute impl being a special BinaryTermAttribute) such as
our analyzers for numeric fields (byte, short, integer, long, float, double but
also date and ip).

To work around this issue, this commits adds a fail_on_unsupported_field
parameter to the more-like-this and fuzzy-like-this parsers. When this parameter
is false, numeric fields will just be ignored and when it is true, an error will
be returned, saying that these queries don't support numeric fields. By default,
this setting is true but the mlt API sets it to true in order not to fail on
documents which contain numeric fields.

Close #3252
Analysis: update ThaiAnalyzerProvider to use custom stopwords setting
Eclipse: organize imports on save.

It can happen that Eclipse fails at correctly adding a new import entry to an
existing list of imports since we don't use its default rules. This commit
forces Eclipse to organize imports on save.
Optimize `has_child` query & filter execution with two short circuit mechanisms:
* If all parent ids have been emitted as hit, abort the query / filter execution.
* If the a relative small number of parent ids have been collected in the first phase then limit the number of second phase parent id lookups by putting a short circuit filter before parent document evaluation or omit the it in the case of the filter. This is contrable via the `short_circuit_cutoff` option which is exposed in the `has_child` query & filter.

All parent / child queries and filters (expect `top_children` query) abort execution if no parent ids have been collected in the first phase.

Closes #3190
Make field data able to support more than 2B ordinals per segment.

Although segments are limited to 2B documents, there is not limit on the number
of unique values that a segment may store. This commit replaces 'int' with
'long' every time a number is used to represent an ordinal and modifies the
data-structures used to store ordinals so that they can actually support more
than 2B ordinals per segment.

This commit also improves memory usage of the multi-ordinals data-structures
and the transient memory usage which is required to build them (OrdinalsBuilder)
by using Lucene's PackedInts data-structures. In the end, loading the ordinals
mapping from disk may be a little slower, field-data-based features such as
faceting may be slightly slower or faster depending on whether being nicer to
the CPU caches balances the overhead of the additional abstraction or not, and
memory usage should be better in all cases, especially when the size of the
ordinals mapping is not negligible compared to the size of the values (numeric
data for example).

Close #3189
Work around the fact that AssertionError(String message, Throwable cause) is a Java 1.7-only API.
top level filter not resulting in an actual filter is ignored
when parsing a filter, we use null to indicate that this filter should not match anything, the top level filter doesn't take it into account
fixes #3356
bound the capacity of stream handles
if the capacity of stream handles increase beyond a reasonable size, reset it, so other requests won't incur the cost of clearing it
this is a patch in 0.90, in master we can fix it in a better way (introduce a shared string concept and use it only where it makes sense)
relates to #3322
Limits are not consumed using Systemd (ulimit -n / ulimit -l)

See http://www.freedesktop.org/software/systemd/man/systemd.exec.html
* LimitNOFILE
* LimitMEMLOCK
pattern replace with empty "" setting fails
we should default the replacement to "", since in the settings, if its set to "", we remove the setting
Be consistent with the default value of `acceptable_overhead_ratio`.
Zen Discovery Cluster Events to have Priority.URGENT
Master node cluster state events resulting in zen discovery (node gets added, removed, for example) should be processed with priority URGENT as its always better to process them as fast as possible, and not let other events get in the way.
closes #3361
reroute post shard started should have HIGH prio as well
add ability to associate a timeout with a priority executor
enhancement that can be used later to timeout tasks that are pending, also added the ability to get the pending task list from the executor
Transport: Add a dedicated ping channel
Today, we have a low/med/high channel groups in our transport layer. High is used to publish cluster state and send ping requests. Sometimes, the overhead of publishing large cluster states can interfere with ping requests.

Introduce a new, dedicated ping channel (with size 1) to have a channel that only handles ping requests.
closes #3362