Commit Graph

24719 Commits

Author SHA1 Message Date
Nik Everett 68ed183381 CONSOLEify a few more _cat docs
`_cat/master`, `_cat/nodeattrs`, `_cat/nodes`.
2016-10-13 16:43:06 -04:00
Simon Willnauer b2c8da25fd Remove unreleased version constant
Some people apparently never run tests when they change this file.
Neither do they read comments right below the line they change that
they should do the change after all.
2016-10-13 22:13:18 +02:00
Clinton Gormley e739ecf67c Fix version constant for 5.0.0 2016-10-13 20:42:43 +02:00
Clinton Gormley feefb71007 Renamed v5.0.0-rc2 to 5.0.0 2016-10-13 20:21:49 +02:00
Nik Everett 279baa0284 Add a flush to test in _cat/indices.asciidoc
We test that sorting by `store.size` works but sometimes the
sizes aren't what we expect. At least in CI:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=opensuse/101/console
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-unix-compatibility/os=centos/100/console

I haven't been able to reproduce it locally but adding a `_flush`
won't hurt and might make the inconsistency vanish.
2016-10-13 13:21:57 -04:00
kunal642 e20d9d6478 Removed unnecessary assertion on boolean values (#20910)
* Removed unnecessary assertion on boolean values

* Reversed changes for false assertion

* corrected formatting

* reverted changes for SettingsUpdater
2016-10-13 12:12:57 -04:00
Simon Willnauer 7e5d8a6e5a [TEST] use a different node ID for the test nodes 2016-10-13 17:39:19 +02:00
Nik Everett 3bba7dbe07 Docs: note about snapshot version compatibility (#20896)
It is important that folks understand that snapshot/restore isn't
for archiving. It is appropriate for backup and disaster recovery
but not for archival over long periods of time because of version
incompatibility.

Closes #20866
2016-10-13 10:49:32 -04:00
Tanguy Leroux e71c30c71d Mustache: Add {{#url}}{{/url}} function to URL encode strings (#20838)
This commit adds a new Mustache function (codename: url) and a new URLEncoder that can be used to URL encode strings in mustache templates.
2016-10-13 16:17:28 +02:00
Simon Willnauer 61fd1cd582 Make AbstractSearchAsyncAction more testable and add a basic test case (#20890)
`AbstractSearchAsyncAction` has only been tested in integration tests.
The infrastructure is rather critical and should be tested on a unit-test
level. This change takes the first step.
2016-10-13 16:07:31 +02:00
Jay Modi fdceb64072 Use TimveValue instead of long for CacheBuilder methods
This changes the CacheBuilder methods that are used to set expiration times to accept a
TimeValue instead of long. Accepting a long can lead to issues where the incorrect value is
passed in as the time unit is not clearly identified. By using TimeValue the caller no longer
needs to worry about the time unit used by the cache or builder.
2016-10-13 09:27:31 -04:00
Uli Fahrer 85094d9190 Fix wrong heading
Relates #20906
2016-10-13 07:06:53 -04:00
Clinton Gormley 101ea0549a Add note about retention periods to reindex-upgrade docs 2016-10-13 12:13:55 +02:00
Simon Willnauer 43d11600ab [TEST] Add test that shows how to use a classic pull-parser with the object parser 2016-10-13 11:47:17 +02:00
Simon Willnauer ce1a9a2b06 [TEST] Add test that filtered alias with date math isn't cached by the request cache 2016-10-13 10:18:40 +02:00
Clinton Gormley 389d365697 Fix YAML formatting in several REST tests 2016-10-13 09:58:25 +02:00
Colin Goodheart-Smithe 71aa807acd Fixes MultiMatchQuery so that it doesn't provide a null context (#20882)
Before this change the `MultiMatchQuery` called the field types
`termQuery()` with a null context. This is not correct so this change
fixes this so the `MultiMatchQuery` now uses the `ShardQueryContext` it
stores as a field.

Relates to https://github.com/elastic/elasticsearch/pull/20796#pullrequestreview-3606305
2016-10-13 08:44:41 +01:00
Thibaud BARDIN 1bcd26627c [DOCS] Fix typo in "Wait For Active Shards" part (#20900)
Add missing closing backtick
2016-10-13 08:53:30 +02:00
Simon Willnauer 12392b5425 Ensure port range is readable in the exception message (#20893)
Both netty3 and netty4 http implementation printed the default
toString representation of PortRange if ports couldn't be bound.
This commit adds a better default toString method to PortRange and
uses the string representation for the error message in the http
implementations.
2016-10-12 22:33:47 +02:00
Simon Willnauer 968fbaceef Never use ThreadPool#estimatedTimeInMillis as wall-clock time replacement 2016-10-12 22:13:13 +02:00
Areek Zillur 133be6631d Merge branch 'master' into cleanup/transport_bulk 2016-10-12 13:09:29 -04:00
Yannick Welsch 3d3ed7a83a Increase number of allowed failures in MockRepository for snapshot restore test
The test testDataFileCorruptionDuringRestore expects failures to happen when accessing snapshot data. It would sometimes
fail however as MockRepository (by default) only simulates 100 failures.
2016-10-12 19:03:49 +02:00
Simon Willnauer 06cfffa0a9 Explain how unreleased versions should be added to the codebase without adding it to Version.java (#20892)
Sometimes it's useful / needed to use unreleased Version constants but we should not add those to the Version.java class for several reasons ie. BWC tests and assertions along those lines. Yet, it's not really obvious how to do that so I added some comments and a simple test for this.
2016-10-12 17:49:24 +02:00
Robin Clarke bbe6555b7a Docs: your -> you're (#20883) 2016-10-12 11:09:34 -04:00
Christoph Büscher c3e564a9cd Merge pull request #20673
Add test for using fuzziness parameter in multi_match query
2016-10-12 16:57:11 +02:00
Christoph Büscher 6c0e4fc13d Add test for using fuzziness parameter in multi_match query
There was an issue with using fuzziness parameter in multi_match query that has
been reported in #18710 and was fixed in Lucene 6.2 that is now used on master.
In order to verify that fix and close the original issue this PR adds the test
from that issue as an integration test.
2016-10-12 15:55:30 +02:00
Boaz Leskes 27c87ab961 improve testAutoGenerateIdNoDuplicates logging on failure
Add unique doc content and log the results of the search results on failure, so we can better see what went wrong
2016-10-12 15:31:00 +02:00
Clinton Gormley 4c62e14c50 Made REST query param types consistent
text -> string
2016-10-12 14:49:01 +02:00
Clinton Gormley e1ad00f07a Made REST query param types consistent
duration -> time
integer,float -> number
2016-10-12 14:42:19 +02:00
Simon Willnauer 7b65c97483 Use Arrays.toString to stringify a String[] 2016-10-12 14:20:41 +02:00
Boaz Leskes bc8ad8de5a MockBigArrays should tell you who originally released them 2016-10-12 13:03:40 +02:00
Simon Willnauer f96ea58db8 Prevent double release in TcpTransport if send listener throws an exception (#20880)
today we might release a bytes array more than once if the send listener
throws an exception but already has released the array. Yet, this is already fixed
in the BytesArray class we use in production to ensure 3rd party users don't release
twice but our mocks still enforce it.
2016-10-12 12:53:15 +02:00
Christoph Büscher 608c7eb9fa Merge pull request #20873: Use ConstructingObjectParser with DirectCandidateGeneratorBuilder
Use ConstructingObjectParser for parsing DirectCandidateGenerator
2016-10-12 10:28:33 +02:00
Tanguy Leroux 44ac5d057a Remove empty javadoc (#20871)
This commit removes as many as empty javadocs comments my regexp has found
2016-10-12 10:27:09 +02:00
Yannick Welsch 075047065d Keep snapshot restore state and routing table in sync (#20836)
The snapshot restore state tracks information about shards being restored from a snapshot in the cluster state. For example it records if a shard has been successfully restored or if restoring it was not possible due to a corruption of the snapshot. Recording these events is usually based on changes to the shard routing table, i.e., when a shard is started after a successful restore or failed after an unsuccessful one. As of now, there were two communication channels to transmit recovery failure / success to update the routing table and the restore state. This lead to issues where a shard was failed but the restore state was not updated due to connection issues between data and master node. In some rare situations, this lead to an issue where the restore state could not be properly cleaned up anymore by the master, making it impossible to start new restore operations. The following change updates routing table and restore state in the same cluster state update so that both always stay in sync. It also eliminates the extra communication channel for restore operations and uses standard cluster state listener mechanism to update restore listener upon successful
completion of a snapshot.
2016-10-12 09:06:37 +02:00
Nik Everett 42a7a554b1 Don't mind pending cluster tasks in docs build
This removes an assertion that the cluster doesn't have any
pending cluster state tasks from the `_cat/health` docs.

Relates to #18160
2016-10-11 17:44:50 -04:00
Nik Everett cb8fe00b0e Fix imports in GeoDistanceIT
Wildcard imports are not allowed.

Relates to #20860
2016-10-11 16:59:04 -04:00
brandonkearby a3908c4c40 Fixed writeable name from range to geo_distance (#20860)
* Fixed writeable name from range to geo_distance

* Added testGeoDistanceAggregation

* Added asserts for correct result in testGeoDistanceAggregation

* Setup mapping on test index.
2016-10-11 16:56:56 -04:00
Areek Zillur 481f7909ae Merge branch 'master' into cleanup/transport_bulk 2016-10-11 16:04:47 -04:00
Areek Zillur 0e8b6532ec rename DocumentRequest to DocWriteRequest 2016-10-11 16:00:10 -04:00
Areek Zillur 661067d160 change DocumentRequest<?> to DocumentRequest for readibility 2016-10-11 15:58:36 -04:00
Christoph Büscher ba4a3db03b Use ConstructingObjectParser for parsing DirectCandidateGenerator
When refactoring DirectCandidateGeneratorBuilder recently, the
ConstructingObjectParser that we have today was not available. Instead we used
some workaround, but it is better to remove this now and use
ConstructingObjectParser instead.
2016-10-11 21:17:47 +02:00
Nik Everett 298cf1cf21 CONSOLEify _cat/indices docs
Relates to #18160
Uses the new sorting (#20658) in the `_cat` API to support all use
cases natively. We can still resort to piping things through `sort`
if we need to, but we don't have to for basic stuff like sorting!
2016-10-11 14:55:37 -04:00
Areek Zillur 225a04b2cc fix update operation in bulk execution 2016-10-11 14:21:09 -04:00
Thibaud BARDIN 82881ef99a [DOCS] Fix typo in "Cluster Health" part (#20864)
Replace "we can see and total of ..." by "we can see a total of ..."
2016-10-11 13:53:11 -04:00
Lee Hinman f0a2726dcd [DOCS] Remove documentation for `force` version-type
This option should not be recommended to anyone, and should never be
used, upon chance of primary/replica divergence.

Relates to #19769
2016-10-11 11:21:32 -06:00
Nik Everett f3b8e7c238 Add `s` to _cat response parameters
`s` is used for sorting!

Relates to #20658
2016-10-11 12:29:55 -04:00
Alexander Lin 10ddcc4616 Adding built-in sorting capability to _cat apis. (#20658)
* Adding built-in sorting capability to _cat apis.

Closes #16975

* addressing pr comments

* changing value types back to original implementation and fixing cosmetic issues

* Changing compareTo, hashCode of value types to a better implementation

* Changed value compareTos to use Double.compare instead of if statements + fixed some failed unit tests
2016-10-11 12:29:22 -04:00
Tanguy Leroux 3b578db365 MultiGet should not fail entirely if alias resolves to many indices (#20858)
MultiGet should not fail entirely when one of the items of a multi get request refers to an alias that points to multiple indices.

closes #20845
2016-10-11 18:07:39 +02:00
Jason Tedor 05adc14231 Revert "Display plugins versions"
This reverts commit 9411f18f27.

Relates #20807
2016-10-11 11:59:06 -04:00