Commit Graph

53981 Commits

Author SHA1 Message Date
Ignacio Vera ba5574935e
Remove dependency of Geometry queries with mapped type names (#63077) (#63110)
It extracts the query capabilities from AbstractGeometryFieldType into two new interfaces, GeoshapeQueryable and ShapeQueryable. Those interfaces are implemented by the final mappers.
2020-10-01 10:49:12 +02:00
James Rodewig 700bfb156d
[DOCS] EQL: date_nanos timestamp is not supported (#63101) (#63103) 2020-09-30 17:45:00 -04:00
Howard 8c6e197f51 Remove allocation id from engine (#62680)
We no longer need the allocation id in Engine.
2020-09-30 15:28:27 -04:00
Marios Trivyzas f69d268500
SQL: Allow skip of bwc tests on `check` task (#62936) (#63089)
Bwc tests can consume much time to build and to run so it's nice to be
able to skip them when running the `check` task on the SQL module.

Introduce a new task `checkNoBwc` so one can use:
```
./gradlew -p x-pack/plugin/sql checkNoBwc
```
to skip them.

(cherry picked from commit a52e1846f338f6869273181c6f248579581fa68c)
2020-09-30 20:03:19 +02:00
Marios Trivyzas 0ebaf8a3ec
EQL: Allow escaped backquote in identifiers (#62932) (#63082)
Previously, backquote couldn't not be used inside an escaped identifier,
e.g.:
```
`my`identifier` = "some_value"
```
was not allowed. Introduce escaping of the backquote by using a
double backquote:
```
`my``identifier` = "some_value"
```

(cherry picked from commit 49514121486f42a58674b3e5901de4021fda5c15)
2020-09-30 19:10:09 +02:00
James Rodewig e91e5ff6d7
[DOCS] Document escaped backticks for identifiers (#63079) (#63084) 2020-09-30 12:26:20 -04:00
Alan Woodward 4fe09b4bf0 Convert test field mappers to parametrized forms (#63018)
Relates to #62988
2020-09-30 16:59:35 +01:00
Alan Woodward 675d18f6ea Convert dense/sparse vector field mappers to Parametrized form (#62992)
Also adds a proper MapperTestCase test for dense vectors.

Relates to #62988
2020-09-30 16:55:28 +01:00
Lisa Cawley 3838fe1fd4 [DOCS] Add experimental tag to inference processor and bucket aggregation (#63023) 2020-09-30 08:51:26 -07:00
István Zoltán Szabó 0655d9e8ac
[DOCS] Adds limitation item about using scripts in transforms (#63021) (#63075) 2020-09-30 16:25:48 +02:00
James Rodewig e179b89085
[DOCS] Clarify that v2.0+ hyphenation files aren't supported (#60579) (#63073)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: jgkirschbaum <juergen.kirschbaum@gmail.com>
2020-09-30 09:28:44 -04:00
Mayya Sharipova abfae16517 Unmute test DeleteByQueryConcurrentTests
Unmute DeleteByQueryConcurrentTests
testConcurrentDeleteByQueriesOnDifferentDocs test.

LUCENE-9449 introduced a bug in sorting on _doc,
which resulted in failure of this test. As Lucene bug
has been fixed, this reenables the test.

Closes #62609
2020-09-30 09:06:42 -04:00
James Rodewig 803f1ec897
[DOCS] Updated target_field description of the json ingest processor (#61968) (#63068)
Co-authored-by: Dan Hermann <danhermann@users.noreply.github.com>
Co-authored-by: Jakob Reiter <jakommo@users.noreply.github.com>
2020-09-30 09:04:59 -04:00
Dimitris Athanasiou e09074d382
[7.x][ML] Fix online updates with custom rules referencing filters (#63057) (#63064)
When an opened anomaly detection job is updated with a detection
rule that references a filter, apart from updating the c++ process
with the rule, we also need to update it with the referenced filter.

This commit fixes a bug which led to the job not applying such updates
on-the-fly.

Fixes #62948

Backport of #63057
2020-09-30 16:01:06 +03:00
Costin Leau a6b903b783 EQL: Remove unused classes from reponse API (#62134)
Remove Count class and related artifacts since that functionality is not
(yet) available.
Update parser name for better error reporting.

Fix #62131

(cherry picked from commit 060f500346788c4c5d0b3b9c045facec5d677d3d)
2020-09-30 15:45:30 +03:00
Mayya Sharipova f221349593 Fix UnsignedLongTests test failure (#63056)
Test testSortDifferentFormatsShouldFail was occasionally failing for
2 reasons:
1) Documents on "idx2" were not available for search before a
search request started
2) Running a test multiple times was causing
occasional ResourceAlreadyExistsException for idx2,
as idx2 was not deleted for a test.

This patch makes the following fixes:
1) Sets up immediate refresh policy for docs in the index"idx2"
2) Creates an index idx2 only once per cluster

Closes: #62997
2020-09-30 08:41:31 -04:00
Yang Wang e31bef4032
Fix API key role descriptors rewrite bug for upgraded clusters (#62917) (#63042)
This PR ensures that API key role descriptors are always rewritten to a target node
compatible format before a request is sent.
2020-09-30 22:16:39 +10:00
Przemysław Witek d677a2b8ee
[7.x] [ML] Implement AucRoc metric for classification - HLRC (#62304) (#63058) 2020-09-30 14:04:10 +02:00
Benjamin Trent 0860746bf2
[ML] changing ngram loop order for minor performance improvement (#63033) (#63059)
This is a very minor optimization but trivial to implement, so might as well. 

```
Benchmark                               (nGramStrs)  Mode  Cnt        Score        Error  Units
NGramProcessorBenchmark.ngramInnerLoop        1,2,3  avgt   20  4415092.443 ±  31302.115  ns/op
NGramProcessorBenchmark.ngramOuterLoop        1,2,3  avgt   20  4235550.340 ± 103393.465  ns/op
```

This measurement is in nanoseconds, consequently, the overall performance of inference is dominated by other factors (i.e. map#put). But, this optimization adds up overtime and is simple.
2020-09-30 07:51:31 -04:00
Benjamin Trent b7c47b1717
[ML] Add data frame analytics bwc testing (#63012)
This commit adds bwc testing for data frame analytics.

The bwc tests only go back to the 7.9.0.
Meaning, initially only rolling upgrades from 7.9.x -> 7.10.0 are tested.

Since the feature was experimental in < 7.9.0, this is acceptable.
2020-09-30 07:13:40 -04:00
Przemysław Witek 4366d58564
[7.x] [ML] Implement AucRoc metric for classification (#60502) (#63051) 2020-09-30 12:55:52 +02:00
Dimitris Athanasiou 179fe9cc0e
[7.x][ML] Delete dest index and reindex if incompatible (#62960) (#63050)
Data frame analytics results format changed in version `7.10.0`.
If existing jobs that were not completed are restarted, it is
possible the destination index had already been created. That index's
mappings are not suitable for the new results format.

This commit checks the version of the destination index and deletes
it when the version is outdated. The job will then continue by
recreating the destination index and reindexing.

Backport of #62960
2020-09-30 12:57:48 +03:00
Tanguy Leroux b099bfb789
InternalClusterInfoService should not ignore hidden indices (#62995) (#63048)
Today InternalClusterInfoService ignores hidden indices when
retrieving shard stats of the cluster. This can lead to suboptimal
shard allocation decisions as the size of shards are taken into
account when allocating new shards or rebalancing existing shards.
2020-09-30 11:02:57 +02:00
István Zoltán Szabó ee985ea716
[DOCS] Adds data stream and ILM related limitation items to transforms (#63016) (#63046) 2020-09-30 10:37:28 +02:00
Ignacio Vera 8e67ec8647
Add equals and hashcode implementation to KnownCardinalityUpperBound (#62930) (#63045) 2020-09-30 09:14:56 +02:00
Hendrik Muhs df93f46888 [Transform] fix issue in TransformIndexerStateTests.testStopAtCheckpoint (#63006)
fix a test issue by improving counting the number of times the deferred listener is called

fixes #62996
2020-09-30 08:54:45 +02:00
Alan Woodward 2f5a813589
Convert all FieldMappers in mapper-extras to parametrized form (#62938) (#63034)
This converts RankFeatureFieldMapper, RankFeaturesFieldMapper,
SearchAsYouTypeFieldMapper and TokenCountFieldMapper to
parametrized forms. It also adds a TextParams utility class to core
containing functions that help declare text parameters - mainly shared
between SearchAsYouTypeFieldMapper and KeywordFieldMapper at
the moment, but it will come in handy when we convert TextFieldMapper
and friends.

Relates to #62988
2020-09-29 20:50:34 +01:00
James Rodewig 454aafde1f
[DOCS] Fix painless-datetime example script error (#62811) (#63027)
Co-authored-by: mushao999 <mushaoqiong@126.com>
2020-09-29 13:47:51 -04:00
David Roberts 05427c2bb2
[ML] Add timeouts to named pipe connections (#63022)
This PR adds timeouts to the named pipe connections of the
autodetect, normalize and data_frame_analyzer processes.
This argument requires the changes of elastic/ml-cpp#1514 in
order to work, so that PR will be merged before this one.
(The controller process already had a different mechanism,
tied to the ES JVM lifetime.)

Backport of #62993
2020-09-29 18:04:02 +01:00
Costin Leau 3bee28056f EQL: Fix bug in sequences with any pattern (#63007)
Fix query creation inside sequences with any queries due to lacking a
clause to combine, which lead to an invalid request being created.

Fix #62967

(cherry picked from commit ff59d8823919a6e70928816e5c3687308ebde33f)
2020-09-29 18:19:25 +03:00
Alexander Reelsen a6548117d0
[DOCS] Backport normalize aggregation fix (#63017)
This is a backport of 8534bd5ce79103bf2d5d41c2ebb278ac53583631 which was only applied to the master branch, but not to 7.x or 7.$current
2020-09-29 11:17:40 -04:00
Benjamin Trent 0b3af242d4
[ML] fixing classification feature importance parsing (#63003) (#63015)
Classification feature importance supports various types in the class name:
- string
- boolean
- numerical

The xcontent parsing on the server side and the HLRC side should support and test these types.
2020-09-29 10:54:35 -04:00
Dan Hermann c9be9963a8
[DOCS] Sort option for the grok patterns endpoint (#62092) (#62982) 2020-09-29 09:40:54 -05:00
Yang Wang 068f605040
Use compilation as validation for painless role template (#62845) (#63010)
* Use compilation as validation for painless role template (#62845)

Role template validation now performs only compilation if the script is painless.
It no longer attempts to execute the script with empty input which is problematic.
The compliation process will catch things like invalid syntax, undefined variables,
which still provide certain level of protection against ill-defined role templates.
Behaviour for Mustache script is unchanged.

* Checkstyle
2020-09-30 00:37:41 +10:00
James Rodewig 26f98f3a74
[DOCS] Fix 404s (#62918) (#63013)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Guido Lena Cota <guido.lenacota@kreuzwerker.de>
2020-09-29 10:37:26 -04:00
James Rodewig 42437e4b29
[DOCS] Fix elasticsearch-croneval chunking (#63008) (#63009) 2020-09-29 10:35:23 -04:00
Alan Woodward de08ba58bf Convert percolator, murmur3 and histogram mappers to parametrized form (#63004)
Relates to #62988
2020-09-29 14:42:26 +01:00
Howard a914d8bc90
[DOCS] Remove duplicate disk.threshold_enabled setting (#62925) 2020-09-29 09:13:21 -04:00
Dimitris Athanasiou facf9ede0a
[ML] Fix binary classification importance in LegacyFeatureImportanceTests (#63000)
Fixes #62991
2020-09-29 15:53:34 +03:00
Benjamin Trent 2b9032a07d
[7.x] [ML] fixing testTwoJobsWithSameRandomizeSeedUseSameTrainingSet tests (#62976) (#62999)
* [ML] fixing testTwoJobsWithSameRandomizeSeedUseSameTrainingSet tests (#62976)

This fixes the two test failures.

The shard failure seems to be due to the .ml-stats index being in the middle of being created.
2020-09-29 08:12:20 -04:00
Hendrik Muhs 154a0c00b7 [Transform] add debug logging to investigate #62951 (#62990) 2020-09-29 12:06:35 +02:00
Mayya Sharipova ca42726a99 Ensure consistent ordering of hits in test (#62977)
50_script_values/Script query fails sometimes
as resulting hits will be ordered differently from expected.
This patch ensures consisten ordering of hits.

Closes #62975
2020-09-29 06:00:34 -04:00
Armin Braun 678688dc84
Avoid Redundantly Loading Monitoring Templates on CS Applier Thread (#62913) (#62979)
This refactors the loading of monitoring templates slightly so that they aren't loaded over and
over again (from disk) on CS updates. This isn't an important optimization in production for obvious
reasons since it only affects the install stage, but this turned out to cause some slow CS applies
in tests.

Relates #62853
2020-09-29 11:45:22 +02:00
Francisco Fernández Castaño e0f6b296ff
Drain all disruption events until all nodes are healthy on AbstractCoordinatorTestCase (#62987)
Backport of #62954
Closes #61711
2020-09-29 10:38:10 +02:00
David Kyle f23603dafd
[ML][Transform] Filter null objects from field caps request (#62945) (#62971)
If the transform grouping is a script then exclude the field from the source index
mappings fields caps request. A null object caused an NPE in the serialisation of 
FieldCapabilitiesIndexRequest.
2020-09-29 09:07:01 +01:00
Dimitris Athanasiou 7f6c1ff5b4
[7.x][ML] Remove top level importance from classification inference results (#62486) (#62964)
As we have decided top level importance for classification is not useful,
it has been removed from the results from the training job. This commit
also removes them from inference.

Backport of #62486
2020-09-29 10:58:48 +03:00
Rory Hunter cc33df87d3 Add RHEL UBI to dependency report (#62888)
Add information about RHEL UBI to the dependency report task.
2020-09-29 08:17:22 +01:00
Mayya Sharipova 4c8c3c8df6
Upgrade lucene to lucene-8.7.0-snapshot-3b59906 (#62978)
Backport for #62970
2020-09-28 16:52:31 -04:00
James Rodewig fa98e30c81
[DOCS] EQL: Clarify EQL docs (#62961) (#62980) 2020-09-28 15:46:30 -04:00
Benjamin Trent a054e62bc4
[ML] allow datafeeds to run if there are any concrete indices (#62827) (#62965)
This commit allows a datafeed to be assigned to a node if only one index pattern has concrete indices.
2020-09-28 12:58:07 -04:00