Core: Fields defined in the `_default_` mapping of an index template should be picked up when an index alias filter is parsed if a new index is introduced when a document is indexed into an index that doesn't exist yet.

Closes #8473
Fielddata: Fix iterator over global ordinals.

Our iterator over global ordinals is currently incorrect since it does NOT
return -1 (NO_MORE_ORDS) when all ordinals have been consumed. This bug does
not strike immediately with elasticsearch since we always consume ordinals in
a random-access fashion. However it strikes when consuming ordinals through
Lucene helpers such as DocValues#docsWithField.

Close #8580
Spec: Fixes a few locations of the params array in JSON specification

A few locations of the `params` object in the JSON specification were not located in the `url` block.

Closes #8607
Snapshot/Restore: restore with wait_for_completion=true should wait for succesfully restored shards to get started

This commit ensures that restore operation with wait_for_completion=true doesn't return until all successfully restored shards are started. Before it was returning as soon as restore operation was over, which cause some shards to be unavailable immediately after restore completion.

Fixes #8340
Snapshot/Restore: fix compilation issue for JDK 1.7
Aggregations: Make size parsing consistent for strings.

Close #6061
Core: let Lucene kick off merges

Today, Elasticsearch has a separate merge thread pool checking once
per second (by default) if any merges are necessary, but this is no
longer necessary since we can and do now tell Lucene's
ConcurrentMergeScheduler never to "hard pause" threads when merges
fall behind, since we do our own index throttling.

This change goes back to letting Lucene launch merges as needed, and
removes these two expert settings:

  index.merge.force_async_merge
  index.merge.async_interval

Now merges kick off immediately instead of waiting up to 1 second
before running.

Closes #8643
Aggregations: Added getProperty method to Aggregations

This allows arbitrary properties to be retrieved from an aggregation tree. The property is specified using the same syntax as the
order parameter in the terms aggregation. If a property path contians a multi-bucket aggregation the property values from each bucket will be returned in an array.
[TEST] Reduce stringency of breaker assertions

While in a perfect world we should only ever have 2 circuit breaker
trips, it's possible to get a race condition between the child and the
parent breaker with many threads. Since multiple breaking exceptions are
not actually a bad thing, it's okay to relax the constraints in the
test.

The race conditions are due to no locking inside the breaker logic, to
ensure that it is as low overhead as possible. Even though no locking is
used, we use atomic counters internally to ensure that the "estimated"
numbers for the breakers are never out of sync (which this test still
checks with no leeway).
[TRANSLOG] Cut over to Path API

This commit moves all the Translog related code over to the
NIO2 Path API. It also make transaction logs write once since it
never reuses a translog file.

Closes #8611
Typo: changed "5% or the real words" to "5% of the real words"

Closes #8582
Docs: Added swift openstack repository

Closes #8583
[RECOVERY] Throw IndexShardClosedException if shard is closed

Today we throw a generic ElasticsearchException when a recovery is cancled. This
causes verbose logging and send shard failures and additional unnecessary cluster state
events. We can just throw IndexShardClosedException which prevents the send shard failures
Parent/child: Fixed parent/child not being able to be used in alias filters.

Closes #8628
remove unnecessary clearScroll call - these contexts are released by delete index now
[GATEWAY] Cut over MetaDataStateFormat to Path API

Closes #8609
[SPEC] Removed the utilities for generating REST specs/code

The utilities have been migrated to the elasticsearch/elasticsearch-ruby repository.

See: https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-api/utils

Related: elasticsearch/elasticsearch-ruby@dfac51d

Closes #8606
Aggregations: fix rounding issues on DST switch.

Closes #8339.
Scripts: Return new lists on calls to getValues.

Scripts currently share the same list across invocations to getValues. This
caused a bug in script fields where all documents coming from the same segment
would get the same values (basically, for the next document for which script
values have been requested). Scripts now return a fresh new list on every
invocation to `getValues`.

Close #8576
Added note that ES packages automatically change vm.max_map_count

Closes #8601