Commit Graph

54365 Commits

Author SHA1 Message Date
Mark Vieira f8f5d27f6b Add option to preserve data in test clusters (#65400)
(cherry picked from commit 1ce323e1368cf5231181f1efaba1c4e425066e37)
2020-11-24 11:56:56 -08:00
Andras Palinkas 7f7e938a25
{S,E}QL: Fix optimization of `NotEquals` in conjunctions (#65331) (#65449)
* Fix the `CombineBinaryComparisons` optimizer rule, so that semantic
equality taken into account during the optimization of `NotEquals`

Examples that previously removed the `NotEquals` expressions (leading
to incorrect results):

```
double >= 10 AND integer != 9
-->  double >= 10

keyword != '2021' AND datetime >= '2020-01-01T00:00:00'
--> datetime >= '2020-01-01T00:00:00'
```

With the fix, expressions like the above will not be touched.
`NotEquals` will only be eliminated from the `AND` expression if the
left side of the `NotEquals` `semanticEquals()` to the left side
of the other expressions within the conjunction (comparisons against
the same field/expression).

* Unit tests and integration tests

Close #65322
(cherry-picked from 8b2b7fa)
2020-11-24 13:20:32 -05:00
James Rodewig be2ed11931
[DOCS] Fix obsolete Slack setup info (#57834) (#65447)
Slack no longer recommends the legacy "integrations" setup (https://api.slack.com/legacy/custom-integrations/incoming-webhooks).  Updated documentation to reference https://api.slack.com/messaging/webhooks instead.  

Removed screenshots from our documentation related to Slack setup.  We should avoid these screenshots (and simply point to Slack documentation) for Slack may change the instructions/their UI in the future.

Also added a short note on the use case of notifying multiple Slack channels.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-11-24 12:44:46 -05:00
James Rodewig 0c7ee1ff19
[DOCS] Remove 7.10 coming tag (#65440) 2020-11-24 11:40:07 -05:00
Jay Modi 419bda5c15
Fix watcher search template test after #65332 (#65382)
In #65332, the serialization of the WatcherSearchTemplateRequest class
changed to use IndicesOptions built in XContent facilities. This had
the side effect of fixing the handling of `all` for `expand_wildcards`
to include hidden indices. However, the tests in WatcherUtilsTests were
missed. This change updates those tests.

Backport of #65379
2020-11-24 09:04:42 -07:00
James Rodewig 87d74b27af
[DOCS] Correct the url in delete-component-template doc (#65349) (#65427)
Co-authored-by: bellengao <gbl_long@163.com>
2020-11-24 10:07:25 -05:00
Jim Ferenczi 88993e763f Fix handling of null values in geo_point (#65307)
A bug was introduced in 7.10 that causes explicit `null` values to be indexed in the _field_names
field. This change fixes this bug for newly ingested data but `null` values ingested with 7.10 will
continue to match `exists` query so a reindex is required.

Fixes #65306
2020-11-24 11:00:37 +01:00
David Roberts 59ceba8d04 [ML] Adjusting soft_limit description (#65383)
This PR adds detail to the explanation of the soft_limit
memory_status in ML job stats. A consequence that was not
mentioned before is that examples are not added to category
definitions.

Relates elastic/ml-cpp#1590
2020-11-24 09:38:37 +00:00
Mark Vieira cda1f884ee Mute WatcherUtilsTests.testDeserializeSearchRequest 2020-11-23 16:02:08 -08:00
Jim Ferenczi 359b89a19b
Fix cacheability of custom LongValuesSource in TermsSetQueryBuilder (#65367) (#65389)
This change fixes the equals and hashCode methods of the custom FieldValuesSource
that is used internally to extract the value from a doc value field.
Using the field data instance to check equality prevented the query to be cached in
previous versions. Switching to the field name should make the query eligible for
caching again.
2020-11-23 22:21:01 +01:00
Jay Modi 1a13a0b10f
Watcher understands hidden expand wildcard value (#65372)
Watcher has a search template that stores indices options to be used as
part of a search during watch execution, but this was not updated to be
aware of hidden indices and the `hidden` expand_wildcards option. This
change makes use of the `IndicesOptions#toXContent` method in Watcher,
which already handles the new value. Additionally, the XContent parsing
is moved to the IndicesOptions class so that we will be less likely to
miss updating this in the future.

Closes #65148
Backport of #65332
2020-11-23 09:17:49 -07:00
Hendrik Muhs 1828a8b6cc mute WatcherRestartIT 2020-11-23 15:44:55 +01:00
David Turner c558ef6505 Add snapshots to important config list (#65338)
The _Important Elasticsearch configuration_ docs lists a number of items
that you should consider before moving to production. Today this list
does not include configuring snapshots, even though they're very
important to have in production. This commit addresses that omission,
removes some repetition from the introductory paragraphs, and notes that
this config is handled for you on Cloud.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-11-23 14:35:46 +00:00
Alan Woodward dc6b05934f
Correctly serialize search-as-you-type analyzer (#65359)
The search-as-you-type mapper was using an incorrect default analyzer when
creating its merge builder, which meant that a configured analyzer would not
be included in serialization.  This in turn resulted in the master node
getting an incorrect configuration, and search-as-you-type fields always
using a standard analyzer.

This has already been fixed via subsequent refactorings in 7.11 and master,
so this fix is for 7.10 only.

Resolves #65319
2020-11-23 14:02:05 +00:00
Andrei Stefan 866a6afcdf
Extend the interval date comparison (#65348) (#65358)
(cherry picked from commit acfb463892fdaf3f0deb679122b5e402c7b56418)
2020-11-23 15:24:36 +02:00
Armin Braun 7fbdcb5e00
Fix SearchableSnapshotsIntegTests.testCreateAndRestoreSearchableSnapshot (#65343) (#65351)
The recovery stats assertions in this test ran without any waiting for
the recoveries to actually finish. The fact that they ran after the concurrent
searches checks generally meant that they would pass (because of searches warming caches
+ general relative slowness of searches) but there is no hard guarantees this will work
reliably as the pre-fetch threads which will update the recovery state might still be slow
to do so randomly, causing the assertions to trip.

closes #65302
2020-11-23 12:30:18 +01:00
Armin Braun b0cea04f95
Fix Broken Error Handling in CacheFile#acquire (#65342) (#65347)
If we fail to create the `FileChannelReference` (e.g. because the directory it should be created in
was deleted in a test) we have to remove the listener from the `listeners` set to not trip internal
consistency assertions.

Relates #65302 (does not fix it though, but reduces noise from failures by removing secondary
tripped assertions after the test fails)
2020-11-23 08:57:24 +01:00
Armin Braun 67b6317488
Mute JdbcCsvSpecIT#testCurrentDateFilter (#65341)
Muting for https://github.com/elastic/elasticsearch/issues/65336
2020-11-22 22:37:21 +01:00
Wylie Conlon a86c8dce70 Clarify field data cache behavior in docs (#64375)
* Clarify that field data cache includes global ordinals
* Describe that the cache should be cleared once the limit is reached
* Clarify that the `_id` field does not supported aggregations anymore
* Fold the `fielddata` mapping parameter page into the `text field docs
* Improve cross-linking
2020-11-20 13:59:52 -08:00
Jack Conradson 89ec7db26b Fix casting bug in compound assignment for String (#65329)
This change fixes a bug where when doing compound assignment involving String concatenation, the 
right-hand side will fail to cast to String appropriately and throw a ClassCastException.
2020-11-20 12:09:27 -08:00
Nik Everett 56605e4d9a Fixup reduceRandom tests (#65263)
In aa1ea96b8698aa12bed1c4e8d704882a2a639791 I made all
`testReduceRandom` tests for aggs mimick production more precisely.
More precisely, they pick the correct "lead" result when performing
partial reduction. This is great, but, sadly, some tests assumed that we
always reduced against the "first" aggregator. This fixes those tests.

Closes #65163
2020-11-20 13:10:34 -05:00
Nik Everett 956ae93fdb Better mimick real reduction in test
This changes has `InternalAggregationTestCase` performs partial
reductions to better mimick `InternalAggregations#reduce`. In
particular, this fixes a bug when we'd attempt a partial reduction of
aggregations that were entirely unmapped but use a mapped aggregation as
the "lead" of the reduction. This was possible in the test but isn't
possible in production. The reduction "lead" is unmapped if all agg
results being reduced are unmapped.

Closes #65118
2020-11-20 13:10:34 -05:00
James Rodewig feca22729c
[DOCS] Remove duplicated word in replica shard allocator comment (#65295) (#65317)
Co-authored-by: Howard <danielhuang@tencent.com>
2020-11-20 12:25:52 -05:00
István Zoltán Szabó e5629f5580
[DOCS] Makes the screenshot larger on the custom URLs page. (#65269) (#65298) 2020-11-20 15:24:32 +01:00
James Rodewig 99f3156646
[DOCS] Fix formatting issue in search explain docs (#65303) (#65313)
Co-authored-by: bellengao <gbl_long@163.com>
2020-11-20 09:21:29 -05:00
Sylvain Wallez f7e840b012
[client] Add simple support for gzip compression
Adds a `RestClient.setCompressionEnabled()` setting that will gzip-
compress request bodies and add a `Accept-Encoding: gzip` header so
that the ES server can send compressed responses.
2020-11-20 07:38:21 +01:00
James Rodewig d4e308a135
[DOCS] Document `xpack.http.proxy.scheme` setting (#65264) (#65287) 2020-11-19 15:44:12 -05:00
Jay Modi 893e1a5282
Fix date math hidden index resolution (#65278)
This commit updates the IndexAbstractionResolver so that hidden indices
are properly resolved when date math is in use and when we are checking
if the index is visible.

Closes #65157
Backport of #65236
2020-11-19 12:40:14 -07:00
James Rodewig b60d0711b7
[DOCS] ILM: Add alloc ex with multiple node attributes (#65266) (#65271) 2020-11-19 12:38:24 -05:00
István Zoltán Szabó a6a9950868
[7.10][DOCS] Adds UI related limitation to configuring aggs docs (#65190) 2020-11-19 14:57:33 +01:00
Nhat Nguyen 3989243a52 Stop renew retention leases when follow task fails (#65168)
If a shard follow-task hits a non-retryable error and stops, then we 
should also stop the retention-leases renewal process associated with
that follow-task.
2020-11-18 15:53:55 -05:00
DeDe Morton 2e079b1b9b
Fix links to Fleet overview (#65174) (#65233) 2020-11-18 11:04:07 -08:00
James Rodewig 46c55c562a
[DOCS] Remote reindex is not fwd compatible (#65207) (#65226) 2020-11-18 13:03:12 -05:00
Armin Braun 6953726a2b
Fix Allocation `include` Filter Docs (#65202) (#65223)
Fix documentation to match actual behavior of `include` type filters.

Closes #65113
2020-11-18 18:25:09 +01:00
James Rodewig b1dc869b0f
[DOCS] Clarify logger-package relationship (#65169) (#65212)
Updates the logging level docs to better clarify the relationship
between loggers and their Java packages.
2020-11-18 10:45:00 -05:00
James Rodewig c8dac8cff8
[DOCS] Format the ilm-migrate doc (#65182) (#65204)
Co-authored-by: bellengao <gbl_long@163.com>
2020-11-18 09:14:00 -05:00
Jim Ferenczi 9f3e3e2162 Fix "resource not found" exception on existing EQL async search (#65167)
This change fixes the initialization of the async results service
for the EQL get async action. The boolean that differentiates EQL
from normal _async_search request is set incorrectly, which results
in errors (404) when extending the keep alive of a running EQL search.

Fixes #65108
2020-11-18 09:10:31 +01:00
Costin Leau f089547b20 EQL: Fix aggressive/incorrect until policy in sequences (#65156)
The current until implementation in sequences is too optimistic, leading
to an aggressive match that discards correct data leading to invalid
results.
This commit addresses this issue and also unifies the until usage inside
TumblingWindow.
Further more it packs together the UntilGroup with SequenceGroup to
minimize memory usage and improve clean-up.

(cherry picked from commit de2724e92c732c66436939dbbedef93c9981b435)
(cherry picked from commit a60757756aae5f5abb31176fee972a7cdeac3649)
2020-11-18 09:34:33 +02:00
Julie Tibshirani 5495032b00 Remove unused method Analysis#isNoStopwords. 2020-11-17 16:34:33 -08:00
James Rodewig a8d3053128
[DOCS] Clarify ingest attachment example (#65143) (#65160) 2020-11-17 15:15:25 -05:00
James Rodewig 9471b6345e
[DOCS] Add note about NFS repositories (#65149) (#65162)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Rafi Estrada <62263912+TheRiffRafi@users.noreply.github.com>
2020-11-17 14:48:47 -05:00
Johnny Lim d67907d244
[DOCS] Fix typos (#65124)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-11-17 12:35:41 -05:00
Sylvain Wallez b2475f9ccf
Fix parsing RareTerms aggregation response in RestHighLevelClient (#65144)
Backport of #64454

- Add LongRareTerms and StringRareTerms to the DefaultNamedXContents,
  ensure that the response of RareTerms aggregation can be parsed
  correctly.
- Add testSearchWithRareTermsAgg method to test the response of
  RareTerms aggregation can be parsed correctly.
- Add some test code to ensure the AggregationsTests can execute
  successfully.

Co-authored-by: bellengao <gbl_long@163.com>
2020-11-17 17:43:51 +01:00
James Rodewig 196c2a52c1
[DOCS] EQL: Update docs for null tiebreakers (#65078) (#65138) 2020-11-17 10:42:10 -05:00
James Rodewig b54133399e
[DOCS] EQL: Document result_position param (#65075) (#65135) 2020-11-17 10:41:06 -05:00
Dimitris Athanasiou 197de8fe66
[7.10][ML] Increase timeout waiting for DFA jobs to finish in integ tests (#65126) (#65131)
It appears that occasionally 30 seconds are not enough for CI workers
to complete DFA jobs. In order to eliminate such failures we increase
the time we wait for DFA jobs to complete in integration tests to
60 seconds.

Fixes #64926

Backport of #65126
2020-11-17 16:46:17 +02:00
István Zoltán Szabó 93505cc05f
[DOCS] Adds recommendation about when to use chunking_config in manual mode. (#65060) (#65083) 2020-11-17 10:45:28 +01:00
Julie Tibshirani 3974c3b066 Move the shared fetch cache to highlighting. (#65105)
The cache is only used by highlighters, so it can be scoped to only the
highlighting context.
2020-11-16 18:54:32 -08:00
James Rodewig 23a1c64347 [DOCS] Fix typo 2020-11-16 21:35:15 -05:00
Jack Conradson 0beffcd405 Revert null-safe behavior to error at runtime instead of compiletime (#65099)
This reverts a change where null-safe was enhanced to cause a compile-time error instead of a run-
time error when the target value was a primitive type. The reason for the reversion is consistency 
across def/non-def types and versions. I've added a follow up issue to fix this behavior in general 
(#65098).
2020-11-16 10:45:38 -08:00