Commit Graph

21308 Commits

Author SHA1 Message Date
Clinton Gormley b5b00c5d66 Updated 5.0.0-alpha1 release notes 2016-04-05 16:08:22 +02:00
Luca Cavanna 67ccfc354e Switch to using ParseField to parse query names
* [TEST] check registered queries one by one in SearchModuleTests

* Switch to using ParseField to parse query names

If we have a deprecated query name, at the moment we don't have a way to log any deprecation warning nor fail when we are in strict mode. With this change we use ParseField, which will take care of the camel casing that we currently do manually (so that one day we can remove it more easily). This also means, that each query will have a unique preferred name, and all the other names are deprecated.

Terms query "in" synonym is now formally deprecated, as well as fuzzy_match, match_fuzzy, match_phrase and match_phrase_prefix for match query, mlt for more_like_this and geo_bbox for geo_bounding_box. All these will be removed in 6.0.

Every QueryParser holds now a ParseField constant called QUERY_NAME_FIELD that holds the name for it. The first name is the preferred one, all the others are deprecated. The first name is taken from the NAME constant already present in each query builder object, so that we somehow keep the serialization constant separated from ParseField. This change also allowed us to remove the names method from the QueryParser interface.
2016-04-05 15:38:53 +02:00
Colin Goodheart-Smithe 84eacadd51 Splits `phrase` and phrase_prefix` in match query into `MatchPhraseQueryBuilder` and `MatchPhrasePrefixQueryBuilder`
The `phrase` and `phrase_prefix` options in the `MatchQueryBuilder` have been deprecated in favour of using the new `MatchPhraseQueryBuilder` and `MatchPhrasePrefixQueryBuilder`. This is not a breaking change since `MatchQueryBuilder` still supports `phrase` and `phrase_prefix` but this option will be removed from the `MatchQueryBuilder` in the future (probably in 6.0)

Relates to https://github.com/elastic/elasticsearch/pull/17458#discussion_r58351998
2016-04-05 12:55:03 +01:00
Jim Ferenczi 6c8d9acc75 Merge pull request #17530 from jimferenczi/bwc_2.3.1
Replace problematic bwc indices for 2.3.1 with newly generated one.
2016-04-05 11:19:43 +02:00
Christoph Büscher 7254eac840 Add more fromXContent() testing with shuffled field order 2016-04-05 10:07:51 +02:00
Jim Ferenczi 0225376a49 Replace problematic bwc indices for 2.3.1 with newly generated one.
Restore the test OldIndexBackwardsCompatibilityIT.testOldIndexes which now works fine with 2.3.1 bwc indices.
2016-04-05 09:50:34 +02:00
Lee Hinman 177e3ae331 Merge remote-tracking branch 'dakrone/hot-threads-fail-better' 2016-04-04 16:41:03 -06:00
Lee Hinman 05e2358ffb Fail hot_threads in a better way if unsupported by JDK
Currently if thread cpu time is not supported (for instance, on
operating systems such as FreeBSD), an `IllegalStateException` is thrown
in `HotThreads#innerDetect()` that causes the API to return a useless
response.

This changes the check to be earlier, substituting a message for the
hot_threads output (in case some nodes *do* support it).

Additionally, if an exception is thrown during the hot_threads
generation it is now logged and the best effort output is returned.
2016-04-04 15:36:21 -06:00
Zachary Tong 0a472cb359 [TEST] Temporarily silence failing bwc test
More details at #17514
2016-04-04 16:17:24 -04:00
Lee Hinman 78e6ff6e5e Show configured and remaining delay for an unassigned shard.
When a shard is delayed, we now show output like:

```json
{
  "shard" : {
    "index" : "i",
    "index_uuid" : "QzoKda9aQCG_hCaZQ18GEg",
    "id" : 3,
    "primary" : false
  },
  "assigned" : false,
  "unassigned_info" : {
    "reason" : "NODE_LEFT",
    "at" : "2016-04-04T16:44:47.520Z",
    "details" : "node_left[HyRLmMLxR5m_f58RKURApQ]"
  },
  "allocation_delay" : "59.9s",
  "allocation_delay_ms" : 59910,
  "remaining_delay" : "38.9s",
  "remaining_delay_ms" : 38991,
  "nodes" : {
    "jKiyQcWFTkyp3htyyjxoCw" : {
      "node_name" : "Landslide",
      "node_attributes" : { },
      "final_decision" : "YES",
      "weight" : 1.0,
      "decisions" : [ ]
    },
    "9bzF0SgoQh-G0F0sRW_qew" : {
      "node_name" : "Caretaker",
      "node_attributes" : { },
      "final_decision" : "NO",
      "weight" : 2.0,
      "decisions" : [ {
        "decider" : "same_shard",
        "decision" : "NO",
        "explanation" : "the shard cannot be allocated on the same node id [9bzF0SgoQh-G0F0sRW_qew] on which it already exists"
      } ]
    }
  }
}
```

Where the new addition is this section:

```
  "allocation_delay" : "59.9s",
  "allocation_delay_ms" : 59910,
  "remaining_delay" : "38.9s",
  "remaining_delay_ms" : 38991,
```

Which shows the configured delay as well as the remaining delay until
the shard can be considered "assignable". This data is only shown if the
shard is unassigned.

Relates to #17372
2016-04-04 11:37:29 -06:00
Nik Everett 90f300bb71 Remove PROTOTYPE from some enums in query builders 2016-04-04 13:19:36 -04:00
Clinton Gormley cbbf80ca35 v2.3.0 has been released and no longer needs to be hardcoded as -SNAPSHOT 2016-04-04 19:03:43 +02:00
Tanguy Leroux dea12d200d Gradle: wraps command line arguments
So that they are resolved at execution time, not configuration time
2016-04-04 18:28:42 +02:00
Dimitrios Liappis e6d6eaa1bf Reverting 127.0.0.1 to localhost 2016-04-04 19:03:13 +03:00
Clinton Gormley b7fb34fed2 Bumped current version to 2.3.2-SNAPSHOT and added bwc indices for 2.3.1 2016-04-04 17:45:27 +02:00
Martijn Laarman 9fb38f11df Merge pull request #17503 from Mpdreamz/fix/update-by-query-required-param-rest-spec
index is a required url part for update by query
2016-04-04 16:49:01 +02:00
Lee Hinman 8e01b093d0 When considering the size of shadow replica indices, set size to 0
Otherwise, when trying to calculate the amount of disk usage *after* the
shard has been allocated, it has incorrectly subtracted the shadow
replica size.

Resolves #17460
2016-04-04 08:28:03 -06:00
Dimitrios Liappis be602ee026 clarify that dnf is mostly for Fedora >=22
RHEL7 and CentOS 7 are still on yum
2016-04-04 16:10:27 +03:00
Luca Cavanna f75086fcee ParseField#getAllNamesIncludedDeprecated to not return duplicate names 2016-04-04 15:08:43 +02:00
Dimitrios Liappis 22e6567995 Replacing typo with distro safe address
apart from locahost typo, the issue is that localhost is not 100% safe
for all distros with IPv6.

For example fedora23 defines localhost4 and localhost6 (among other
aliases) so `curl localhost:9200` doesn't work.

For this reason, I think it's safer to replace localhost with 127.0.0.1
2016-04-04 16:01:03 +03:00
Mpdreamz dd0c99bb65 index is a required url part 2016-04-04 14:14:44 +02:00
Jason Tedor cea3c3c92f Quote path to java binary
This commit quotes the variable that contains the path to the java
binary. Without these quotes, when the arguments to eval are evaluated
the existing quotes will be removed leading to unquoted use of the path
to the java binary. If this path contains spaces, evaluation will fail.
2016-04-03 23:23:25 -04:00
Clinton Gormley 7d4ed5b19e Changed JAVA_OPTS to ES_JAVA_OPTS in plugin docs 2016-04-03 16:52:37 +02:00
Clinton Gormley 6ff947427d Fixed plugin docs links to dir layouts 2016-04-03 16:50:28 +02:00
Clinton Gormley 06604708d4 Docs: Complete rewrite of setup, installation, and configuration docs 2016-04-03 16:09:48 +02:00
Jason Tedor e201f5c8b0 Fix missing parenthesis in commit timeout message 2016-04-02 14:16:32 -04:00
Jason Tedor c7c8b1d825 Merge branch 'master' into enable_acked
* master: (156 commits)
  Make JNA calls optional
  Added RPM metadata
  Remove PROTOTYPE from MLT.Item
  Remove PROTOTYPE from VersionType
  Fix mistake in TopHits change
  Remove PROTOTYPEs from highlighting
  Clean up some log messages
  Command line arguments with comma must be quoted on windows
  Cluster Health should run on applied states, even if waitFor=0 #17440
  ingest: make concrete processor impl final, like all other processor concrete impls.
  Improve some test method comments.
  Document task id's as string in the rest spec
  Replace FieldStatsProvider with a method on MappedFieldType. #17334
  cleanup test
  Remove MathUtils. #17454
  Addressing review comments
  fix javadocs
  Make TranslogConfig immutable and pass TranslogGeneration as a ctor arg to Translog
  [reindex] Don't get rejected
  Remove redundant commit - #openTranslog() already commits in that case
  ...
2016-04-02 13:56:00 -04:00
Jason Tedor 8b970d970d Clarify closing of timeout listeners 2016-04-02 13:41:23 -04:00
Jason Tedor 1f12beea9a Reword received superseded cluster state message 2016-04-02 13:32:29 -04:00
Jason Tedor e85535724e Make JNA calls optional
The introduction of max number of processes and max size virtual memory
checks inadvertently made JNA non-optional on OS X and Linux. This
commit wraps these calls in a check to see if JNA is available so that
JNA remains optional.

Closes #17492
2016-04-02 12:08:05 -04:00
Clinton Gormley 410147c754 Added RPM metadata 2016-04-02 10:38:34 +02:00
Nik Everett 0539def016 Remove PROTOTYPE from MLT.Item
Relates to #17085
2016-04-01 22:01:20 -04:00
Nik Everett ca54b408a3 Remove PROTOTYPE from VersionType 2016-04-01 21:48:51 -04:00
Nik Everett b7afd80b3f Fix mistake in TopHits change 2016-04-01 21:35:35 -04:00
Nik Everett d919031469 Remove PROTOTYPEs from highlighting 2016-04-01 21:35:34 -04:00
Christoph Büscher 9d68a515b8 Merge pull request #17453 from cbuescher/add-xcontent-randomization
Add randomization of XContentBuilder output to query tests
2016-04-01 15:02:01 +02:00
Martijn Laarman a0aebc1573 Merge pull request #17471 from Mpdreamz/fix/task-rest-spec
Document task id's as string in the rest spec
2016-04-01 14:54:30 +02:00
Tanguy Leroux 662c34b888 Clean up some log messages 2016-04-01 14:44:50 +02:00
Tanguy Leroux c739d9af2b Command line arguments with comma must be quoted on windows 2016-04-01 14:44:13 +02:00
Boaz Leskes 283eff13aa Merge pull request #17457 from s1monw/make_translog_config_immutable
Make TranslogConfig immutable and pass TranslogGeneration as a ctor arg to Translog

This mutable state is confusing and is easily missed. By default this is null and
wipes all translog. This commit makes the TranslogGeneration mandatory on the Translog
constructor and removes the mutalbe state.
2016-04-01 12:18:28 +02:00
Boaz Leskes 0b12cab07a Cluster Health should run on applied states, even if waitFor=0 #17440
We already protect against making decisions based on an inflight cluster state if someone asks for a waitFor rule (like wait for green). We should do the same for normal health checks as well (unless timeout is set to 0) as it be trappy to debug failures when health says the cluster is in a certain state, but that state wasn't applied yet.

Closes #17440
2016-04-01 11:14:17 +02:00
Martijn van Groningen 9ebc0c8f47 ingest: make concrete processor impl final, like all other processor concrete impls. 2016-04-01 11:05:16 +02:00
Christoph Büscher 7a1b06ce0b Improve some test method comments. 2016-04-01 11:04:56 +02:00
Mpdreamz 2944869ab9 Document task id's as string in the rest spec 2016-04-01 11:04:15 +02:00
Adrien Grand 4c4bbb3e45 Replace FieldStatsProvider with a method on MappedFieldType. #17334
FieldStatsProvider had to perform instanceof calls to properly handle dates or
ip addresses. By moving the logic to MappedFieldType, each field type can check
whether all values are within bounds its way.

Note that this commit only keeps rewriting support for dates, which are the only
field for which the rewriting mechanism is likely to help (because of time-based
indices).
2016-04-01 10:28:58 +02:00
Martijn van Groningen 11fdd2608f cleanup test 2016-04-01 09:45:28 +02:00
Adrien Grand 8afc0f1748 Remove MathUtils. #17454
It has a single method: mod, which can be replaced with Math.floorMod since
we always coll it with a positive divisor.
2016-04-01 08:31:31 +02:00
Christoph Büscher 1a697a1ae6 Addressing review comments 2016-03-31 21:46:17 +02:00
Simon Willnauer 7f8235b004 fix javadocs 2016-03-31 21:33:01 +02:00
Simon Willnauer 23ea59b06f Make TranslogConfig immutable and pass TranslogGeneration as a ctor arg to Translog
This mutable state is confusing and is easily missed. By default this is null and
wipes all translog. This commit makes the TranslogGeneration mandatory on the Translog
constructor and removes the mutalbe state.
2016-03-31 21:24:48 +02:00