Commit Graph

24777 Commits

Author SHA1 Message Date
Lee Hinman f825988589 Merge remote-tracking branch 'dakrone/readd-force-versioning' 2016-10-19 11:42:08 -06:00
Lee Hinman f4f62ab91c Disallow VersionType.FORCE for 6.0+ indices
This was an error-prone version type that allowed overriding previous
version semantics. It could cause primaries and replicas to be out of
sync however, so it has been removed.

This is related to #20377, which removed the feature entirely. This
allows operations to continue to use the `force` version type if the
index was created before 6.0, in the event a document using it exists in
a translog being replayed.
2016-10-19 11:41:52 -06:00
Colin Goodheart-Smithe 74d8c75d3a Fixes bug preventing script sort working on top_hits aggregation (#21023)
Previous to this change any request using a script sort in a top_hits
aggregation would fail because the compilation of the script happened
after the QueryShardContext was frozen (after we had worked out if the
request is cachable).

This change moves the calling of build() on the SortBuilder to the
TopHitsAggregationBuilder which means that the script in the script_sort
will be compiled before we decide whether to cache the request and freeze
the context.

Closes #21022
2016-10-19 17:51:10 +01:00
Fanfan 043a45746c some misspelled words in code (#21012)
as the title mentioned, misspelling as follows, "construct" to "constrcut", "cumulation" to "cumalation", "initialize" to "intialize".
2016-10-19 11:42:38 -04:00
Jason Tedor 9adc50a6b9 Remove output_uuid parameter from cluster stats
This commit removes an undocumented output parameter output_uuid from
the cluster stats API. Currently the parameter does not even work as it
is not whitelisted as an output parameter. Since the cluster UUID is
available from the main action, and this parameter is not documented, we
opt to just remove it.

Relates #21020
2016-10-19 10:25:13 -04:00
Honza Král 4bfd21b3dd [test] Required parameters are checked client-side 2016-10-19 15:43:52 +02:00
Alexander Reelsen ba49c07740 Testing: Fix smoke tester (#21018)
Fixes two minor issues

* An import from an already removed file was used.
* The strict URL & parameter parsing hit one of the API calls
2016-10-19 15:27:42 +02:00
Boaz Leskes 0048ac4536 remove `getMockPlugins` override from IngestProcessorNotInstalledOnAllNodesIT & IngestClientIT
they didn't call the base class and it doesn't seem like they add something/the wrong way to solve a problem.
2016-10-19 11:59:23 +02:00
Nik Everett acf7c7430b Add "simple match" support for reindex-from-remote whitelist
This allows you to whitelist `localhost:*` or `127.0.10.*:9200`.
It explicitly checks for patterns like `*` in the whitelist and
refuses to start if the whitelist would match everything. Beyond
that the user is on their own designing a secure whitelist.
2016-10-18 21:47:21 -04:00
Ryan Ernst 293a24e8e8 Plugins: Add back user agent when downloading plugins (#20872)
This adds back a User-Agent header, which we had before large plugin
script refactorings for 5.0. The value is now
`elasticsearch-plugin-installer`.
2016-10-18 18:36:16 -07:00
Tal Levy 38c650f376 make painless the default scripting language for ScriptProcessor (#20981)
- fixes a bug in the docs that mentions `lang` as optional
- now `lang` defaults to "painless"
2016-10-18 16:22:01 -07:00
Ryan Ernst 31de1fa914 Remove old release scripts (#21005)
These scripts are no longer used now that we have the unified release
process.
2016-10-18 14:57:02 -07:00
Boaz Leskes c3987156ab Remove local discovery in favor of a simpler `MockZenPings` (#20960)
`LocalDiscovery` is a discovery implementation that uses static in memory maps to keep track of current live nodes. This is used extensively in our tests in order to speed up cluster formation (i.e., shortcut the 3 second ping period used by `ZenDiscovery` by default). This is sad as that mean that most of the test run using a different discovery semantics than what is used in production. Instead of replacing the entire discovery logic, we can use a similar approach to only shortcut the pinging components.
2016-10-18 21:12:15 +02:00
Ryan Ernst dca614aa3b Build: Change `gradle run` to use zip distribution (#21001)
When running `gradle run`, a developer usually intends to get a running
instance as if they had run elasticsearch from the command line. This is
different than the isolated environment we use for integration testing
plugins. This change switches the run task to use the zip distribution,
so that all modules included in the normal distribution are included.
2016-10-18 11:48:58 -07:00
Chris Earle c2894d2362 Add missing '// CONSOLE' to code snippet 2016-10-18 12:57:03 -04:00
Chris Earle 9cf7214380 [DOCS] Add "version" to template and pipeline docs (#20407)
* [DOCS] Add "version" to template and pipeline docs

This adds details about the "version" to both the template and pipeline pages.
2016-10-18 11:56:18 -04:00
Lee Hinman 2f01f65e1a Add rudimentary logstash and beats template BWC tests (#20588)
This tests that the templates shipped with 5.0 versions of Logstash and
Beats still work on an Elasticsearch 6.0+ node, so that we ensure that
ES can be upgraded prior to upgrading tools dependent on it.

Related to #20491
Resolves #17275
2016-10-18 09:49:09 -06:00
Lee Hinman c1721c6d79 Only negate index expression on all indices with preceding wildcard (#20898)
* Only negate index expression on all indices with preceding wildcard

There is currently a very confusing behavior in Elasticsearch for the
following:

Given the indices: `[test1, test2, -foo1, -foo2]`

```
DELETE /-foo*
```

Will cause the `test1` and `test2` indices to be deleted, when what is
usually intended is to delete the `-foo1` and `-foo2` indices.

Previously we added a change in #20033 to disallow creating indices
starting with `-` or `+`, which will help with this situation. However,
users may have existing indices starting with these characters.

This changes the negation to only take effect in a wildcard (`*`) has
been seen somewhere in the expression, so in order to delete `-foo1` and
`-foo2` the following now works:

```
DELETE /-foo*
```

As well as:

```
DELETE /-foo1,-foo2
```

so in order to actually delete everything except for the "foo" indices
(ie, `test1` and `test2`) a user would now issue:

```
DELETE /*,--foo*
```

Relates to #19800
2016-10-18 17:24:22 +02:00
Jason Tedor 9bb8bd0578 Fix typo in param. name in TransportService method
This commit fixes a typo in a parameter name for the
TransportService#setTracerLogExclude method.

Relates #20970
2016-10-18 10:07:57 -04:00
Fanfan d30de66949 tracelLogExclude to tracerLogExclude (#20970)
fix a variable name for misspelling "tracerLogExclude" to "tracelLogExclude"
2016-10-18 14:22:41 +02:00
Boaz Leskes ba6f759f58 ClusterState publishing shouldn't trigger circuit breakers (#20986)
Updating the circuit breaker settings (and other settings) should always be possible, even if the cluster is under stress. With #20827 we updated the cluster settings request to not trigger circuit breakers. However that change is not complete since the resulting cluster state can potentially not be published. This change makes sure cluster state publishing to not trigger circuit breakers as well.

Relates to #20960 where this was discovered.
2016-10-18 12:57:07 +02:00
Christoph Büscher 274d5d1fdb Remove org.junit.rules.ExpectedException from forbidden-apis again 2016-10-18 11:13:09 +02:00
Christoph Büscher abff485d68 Use Lucenes expectThrows() when testing exceptions
Cleaning up a few remaining occurences of using junits ExpectedException rule in
favor of using LuceneTestCase#expectThrows() which is more concise and versatile.
2016-10-18 10:34:48 +02:00
Joshua Rich 8133c5e85d Merge pull request #20958 from joshuar/joshuar-docs/clearer-shard-allocation-filtering
Docs: Cluster Allocation Filtering
2016-10-18 14:24:41 +11:00
Joshua Rich cdb156e691 Merge pull request #20794 from joshuar/doc/fix_highlighter_ambiguities
[DOCS] Use a better name for fields in examples to avoid ambiguity
2016-10-18 14:23:27 +11:00
Lee Hinman a7827b8ccd Revert "Remove FORCE version_type"
This reverts commit b4cc3cd35d.
2016-10-17 14:42:11 -06:00
Ryan Ernst e57720e091 Fix test to check for boolean instead of integer for boolean field 2016-10-17 12:31:54 -07:00
Christoph Büscher c63c5fa3f2 Use expectThrows() instead of try-catch blocks for testing expected exceptions 2016-10-17 21:06:29 +02:00
Ryan Ernst 3d3dd7185d Add support for booleans in scripts (#20950)
* Scripting: Add support for booleans in scripts

Since 2.0, booleans have been represented as numeric fields (longs).
However, in scripts, this is odd, since you expect doing a comparison
against a boolean to work. While languages like groovy will auto convert
between booleans and longs, painless does not.

This changes the doc values accessor for boolean fields in scripts to
return Boolean objects instead of Long objects.

closes #20949

* Make Booleans final and remove wrapping of `this` for getValues()
2016-10-17 11:11:42 -07:00
Clinton Gormley 5ec2ba3166 Update scripted-metric-aggregation.asciidoc
Removed docs for `reduce_params`

Closes #20917
2016-10-17 19:31:30 +02:00
David Pilato 1be7bdf721 Merge pull request #20975 from zhenxing914/2.3
node.client() should not be used in the documentation
2016-10-17 18:28:57 +02:00
Clinton Gormley 718a86e256 Added missing POST method to create.json REST spec
Relates to #20924
2016-10-17 17:58:31 +02:00
Clinton Gormley 42458e836a Add a REST spec for the create API (#20924)
The create request now requires that an ID be present.
Currently the clients hard code a create method, but
we should just add a create REST spec so this method
can be autogenerated.
2016-10-17 17:57:25 +02:00
Clinton Gormley 43ad8de75b Fixed typo in index rollover docs
Closes #20935
2016-10-17 17:56:54 +02:00
Jason Tedor 96aa5e33ce Fix slowlog docs
This commit fixes two issues with the slow log docs:
 - clarifies that these settings are per index
 - updates index slow log configuration for Log4j 2

Relates #20976
2016-10-17 10:50:32 -04:00
Quinn Shanahan 1bef6c7fee Update regexp-syntax.asciidoc (#20973) 2016-10-17 16:32:17 +02:00
Dimitrios Liappis b0bb72ccd7 Deprecate EOL'ed Ubuntu 15.04 from Vagrantfile
* Deprecate EOL'ed Ubuntu 15.04 from Vagrantfile

Relates pr #20921
2016-10-17 17:27:01 +03:00
Tanguy Leroux 1755cc08f3 REST API parser should fail on duplicate params/paths/methods/parts (#20940)
This commit changes the current REST API parser to make it fail and throw an exception when a REST specification file contains a duplicated parameters, or path, or method, or path part.
2016-10-17 09:19:07 +02:00
Joshua Rich 63f484ffa3 Docs: Cluster Allocation Filtering
Put more emphasis on the fact that multiple values can be specified
and move examples after explanation of settings.
2016-10-17 11:02:33 +11:00
Jason Tedor c1bdaaf80f Fix connection keep-alive header handling
This commit fixes an issue with the handling of the value "keep-alive"
on the Connection header in the Netty 4 HTTP implementation while
handling an HTTP 1.0 request. The issue was using the wrong equals
method to compare an AsciiString instance and a String instance (they
could never be equal). This commit fixes this to use the correct equals
method to compare for content equality.
2016-10-16 19:51:00 -04:00
Jason Tedor cd5777593a Fix connection close header handling
This commit fixes an issue with the handling of the value "close" on the
Connection header in the Netty 4 HTTP implementation. The issue was
using the wrong equals method to compare an AsciiString instance and a
String instance (they could never be equal). This commit fixes this to
use the correct equals method to compare for content equality.

Relates #20956
2016-10-16 13:18:09 -04:00
Clinton Gormley 8d602c6692 Updated REST test README to include required params when running tests 2016-10-16 13:25:25 +02:00
Simon Willnauer 5137f44bd6 [TEST] return empty array if AbstractQueryTestCase#currentTypes is null
This is important to allow any test to use RandomQueryBuilder#createQuery()
since some of the query builders that are used in this test test the length
of the types array and otherwise will thow NPE if the test is not a subclass
of AbstractQueryTestCase.
2016-10-15 14:46:54 +02:00
Jason Tedor 5a03eb91e6 Add precise logging on unknown or invalid settings
Today when logging an unknown or invalid setting, the log message does
not contain the source. This means that if we are archiving such a
setting, we do not specify where the setting is from (an index, and
which index, or a persistent or transient cluster setting). This commit
provides such logging for the end user can better understand the
consequences of the unknown or invalid setting.

Relates #20951
2016-10-14 23:55:15 -04:00
Jason Tedor f23ae90d92 Fix logging configuration for AwsSdkMetrics logger
This commit fixes an issue with the configuration for the AwsSdkMetrics
logger; the issue is that the logging configuration had used underscores
instead of periods for the settings key (the perils of lenient settings
parsing).

Relates #20313
2016-10-14 23:44:39 -04:00
Christoph Büscher 289a69bf68 Use ObjectParser in ScriptSortBuilder 2016-10-14 20:19:21 +02:00
Christoph Büscher 1b78618106 Use ObjectParser in ScoreSortBuilder and FieldSortBuilder 2016-10-14 20:19:21 +02:00
Nik Everett 4fbe1a8819 CONSOLEify _cat/pending_tasks docs
Relates to #18160
2016-10-14 14:12:35 -04:00
Jun Ohtani dd4ff9b0a7 Merge pull request #20904 from johtani/remove_nullable_in_mapper_builder_context
IndexSettings should not be Null in Mapper.BuildContext
2016-10-14 23:51:20 +09:00
Jason Tedor 370253f95a Add doc note regarding processors bound
This commit expands the thread pool docs regarding the processor
setting.

Relates #20895
2016-10-14 10:32:31 -04:00