Commit Graph

21328 Commits

Author SHA1 Message Date
Christoph Büscher bdc70df319 Merge pull request #17547: Add shuffling xContent to aggregation tests
This adds shuffling of xContent similar to #17521 to the aggregation and pipeline aggregation base test.
The additional shuffling uncovered that some aggregation builders internally store some properties in a 
way that made the equals() testing fail when the xContent is shuffled.
For TopHitsAggregatorBuilder, the internal scriptFields parameter was changed to a set because the order 
they appear in the xContent should not matter. For FiltersAggregatorBuilder, the internal list of KeyedFilters 
is sorted by key now. As a side effect, the keys in the aggregation response are now not always in the same 
order as the filters in the query, but sorted by key as well (unless they are anonymous).
2016-04-06 14:09:36 +02:00
Clinton Gormley fbf5976663 Make es_release_notes choose the same :Label every time when multiple specified 2016-04-06 13:52:45 +02:00
James Bertouch 3651854bf6 Enhanced lat/long error handling
NumberFormatExceptions caused by non-double lat/long values are now
handled when the ignore_malformed flag is set to true.

Closes #16833
2016-04-06 07:14:01 -04:00
Mahmoud Lababidi 20b398daea Add a more descriptive example to Index Template
Closes #17513
The current example in the documentation for Index Templates lacks any properties values. This is helpful to many devs that aren't sure how to take a regular Index Mapping and convert it to a template.
2016-04-06 12:18:10 +02:00
Christoph Büscher f409d0b763 Make defensive copies of filters list internally 2016-04-06 11:40:08 +02:00
Alexander Reelsen c5bbb023fa Smoke tester: Use portsfile to find out host/port
Instead of hardcoding localhost:9200, the smoke tester
now uses the portsfile's first entry to find out, which
host/port combination to test HTTP against.

Closes #17409
2016-04-06 09:16:19 +02:00
Igor Motov f599ac5d5a Expose whether a task is cancellable in the _tasks list API
Closes #17369
2016-04-05 19:16:08 -06:00
Jason Tedor e76038e076 Exploit DiscoveryNode immutability in toString
DiscoveryNode is immutable yet we rebuild DiscoveryNode#toString on
every invocation. Most importantly, this just leads to unnecessary
allocations. This is most germane to ZenDiscovery and the processing of
cluster states where DiscoveryNode#toString is invoked when submitting
update tasks and processing cluster state updates.

Closes #17543
2016-04-05 19:17:04 -04:00
Christoph Büscher cbcbe75cf0 Adressing comments 2016-04-06 00:05:26 +02:00
Jason Tedor 66cc2029cd Refactor old state version check to ZenDiscovery 2016-04-05 17:31:36 -04:00
Sergii Golubev 8430b379d8 string.asciidoc: fix for `position_increment_gap`
Remove  outdated and duplicate description for the `position_increment_gap` parameter.
2016-04-05 16:23:42 -04:00
Jason Tedor c2ed5a1c9e Reorder pending queue clean checks 2016-04-05 15:59:54 -04:00
Jason Tedor 3abf8177e8 Add comment about older cluster states 2016-04-05 15:56:16 -04:00
Jeff ba34faa1ef Call out where we are making a setting change.
IMHO the original text here was incomplete. Adding the simple words 'in the index mapping' makes this sentence more clear. Perhaps a be more clear to make this a link.
2016-04-05 13:51:31 -06:00
Christoph Büscher b01e3f0d3b Add shuffling xContent to aggregation tests 2016-04-05 19:33:52 +02:00
Jason Tedor 7cdd647d7b Clarify cluster state local node validation 2016-04-05 13:04:34 -04:00
Dimitrios Liappis b86d0983bb Merge pull request #17505 from dliappis/docs_fixes
Fix locahost typo and distro clarifications
2016-04-05 19:24:33 +03:00
Colin Goodheart-Smithe 65a5366cba Aggregations: Fixes Filter and FiltersAggregation to work with empty query
This fix ensures the filter and filters aggregation will not throw a NPE when `{}` is passed in as a filter. Instead `{}` is interpreted as a MatchAllDocsQuery.

Closes #17518
2016-04-05 17:20:29 +01:00
Spencer 7037670aeb [REST API] set correct default value
The correct default value for the `expand_wildcards` parameter to `indices.get_alias` is `all` as of all
f4d75f0212
2016-04-05 09:19:21 -07:00
Jason Tedor cffc315dca Reject old cluster states and keep the queue clean
This commit adds a guard preventing old cluster states from entering
into the pending queue when we are following a master, and cleans old
cluster states from the pending queue when processing a commit.
2016-04-05 11:03:29 -04:00
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