Create mapping ahead of time and don't rely on index request in test
In case ttl has passed, then just check the delete count
ttl can be as lower than 0 (purge interval)
Use nonzero status code to signal abnormal termination

We currently return with status code 0 when an IOException occurs.
The plugin manager should in any case return a nonzero status if
the operation was not successful. Now the PluginManager uses the
following reponse codes based on 'sysexists.sh':
 * '0' on success
 * '64' command line usage error
 * '70' internal software error
 * '74' input/output

Closes #3463
Return ordinals from MultiOrdinals.MultiDocs

MultiOrdinals.MultiDocs returned 'null' ordinals which caused
a NPE if the field was single valued and would allow a significantly
smaller in memory representation than single packed int ordinals.

Closes #3470
Added random sort test for dense and sparse fields.

This test triggers a MultiDoc / MultiOrds in-memory representation
even if the field is not multivalued

Relates to #3470
termvectors: fix null pointer exception if field has no term vectors

Retrieving termvectors for a document that does not have the requested field
caused a null pointer exception. Same for documents if the field has no term vectors,
for example, because the field only contains "?".
Now, an empty response is returned.

Closes #3471
when changing the mapping of the _default_ mapping, do not apply the old _default_ mapping to the new one and also do not validate the new version with a merge but parse is as a new type.

Closes #3474, Closes #3476
Separated index creation from mapping creation pending bug fix concerning concurrent not-acked mapping requests
Disable UpdateMappingTets#updateDefaultMappingSettings

Test has been too flaky over nightly builds. Disabling it
with AwaitFix.
Failure to execute search request with empty top level filter
closes #3477
NPE for POST mode facets if facet_filter gives no document.
Closes #3479.
Test deleting the percolate type differently. Instead of checking the types exist api, register a DocumentTypeListener that notifies when percolate queries have been cleared.
Added support for `tests.failfast` and `tests.maxiters`

This commit adds support for failing fast when running a test
case with `-Dtests.iters=N` and uses some goodness from LuceneTestCase
in a new base `AbstractRandomizedTest`. This class checks among other
things if a tests doesn't call `super.setup` / `super.tearDown` when it
should do and checks if a large static resources are not cleaned up
after the tests ie. a running node.
Added IndicesAdminClient.getIndexTemplates()

In addition to creating and removing a template, one can now receive index templates as well.
Simple regexes like template* are supported.

Closes #3439
Remove accidentially committed default values

`-Dtests.maxFailures` and `-Dtests.failfast` should not be enabled
by default.
Set default `operation_threading` to `thread_per_shard` and exposed it as an option in the rest api.
Use TransportMasterNodeOperationAction in TransportGetIndexTemplatesAction

No need to use ClusterInfoRequest, as we do not need to access any indices.
Fix debian init script to not depend on new start-stop-daemon

By making use of the lsb provided functions, one does not depend on the start-stop daemon version to test if elasticsearch is running.
This ensures, that the init script works on debian wheezy, squeeze, current ubuntu and LTS versions.

Closes #3452
Support fuzzy queries in CompletionSuggest

Added the FuzzySuggester in order to support completion queries

The following options have been added for the fuxxy suggester

* edit_distance: Maximum edit distance
* transpositions: Sets if transpositions should be counted as one or two changes
* min_prefix_len: Minimum length of the input before fuzzy suggestions are returned
* non_prefix_len: Minimum length of the input, which is not checked for fuzzy alternatives

Closes #3465