Commit Graph

2479 Commits

Author SHA1 Message Date
Keith Massey 0790107f9a
Re-enabling BWC tests, and updating supported versions for shard count feature after backport (#75789) 2021-07-28 09:43:49 -05:00
Przemyslaw Gomulka c96139d006
[Rest Api Compatibility] Deprecate the use of synced flush (#75372)
synced flush is going to be replaced by flush. This commit allows to synced_flush api only in v7 compatibility mode.
Worth noting - sync_id is gone and won't be available in v7 responses from indices.stats

relates removal pr #50882
relates #51816
2021-07-28 14:17:49 +02:00
Keith Massey ddc3b37580
Adding shard count to node stats api (#75433)
* Adding shard count to _nodes/stats api

Added a shards section to each node returned by the _nodes/stats api. Currently this new section only contains a total count of all shards on the node.
2021-07-27 10:39:53 -05:00
Lisa Cawley 02d851e50e
[DOCS] Drafts trained model deployment APIs (#75497) 2021-07-26 09:49:37 -07:00
Przemyslaw Gomulka 838e8d8aeb
[Rest Api Compatibility] Voting config exclusion exception message (#75406)
the exception message has changed in #55291. This is not covered by rest
api compatibility, so no need to return the old message for v7 requests.
This commit adds a transformation to allow for the 7.x test to pass with
a new exception message

relates #51816
2021-07-26 16:42:38 +02:00
Dan Hermann a882f61913
Fix failing HTTP client stats test (#75527) 2021-07-21 08:20:02 -05:00
James Rodewig ea635d67a6
[DOCS] SQL: Add formal API docs (#75506)
Adds formal API docs for the following APIs:

* Clear SQL cursor
* SQL search
* SQL translate

Other changes:

* Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
* Updates a few related xrefs.

Closes #75085
2021-07-21 08:04:21 -04:00
Mark Tozzi 7af39dbc35
Remove deprecated date histo interval (#75000)
Date histogram interval parameter was deprecated in 7.2, in favor of the more specific fixed_interval and calendar_interval parameters.  The old logic used some poorly understood guessing to decide if it should operate in fixed or calendar mode.  The new logic requires a specific choice by the user, which is more explicit.  In 7.x REST compatibility mode, we will parse the interval as calendar if possible, and otherwise interpret it as fixed.
2021-07-20 13:08:45 -04:00
Przemyslaw Gomulka 5485d3ebdd
[Rest Api Compatibility] Do not return _doc for empty mappings in template (#75448)
Previously the compatibility layer was always returning an _doc in mappings for get
template.
This commit does not return _doc in empty mappings.
Returning just {} empty object (v7 and v8 behaviour)

also moving term lookups tests which are already fixed (relates #74544)

relates #70966
relates main meta issue #51816
relates types removal meta #54160
2021-07-19 13:21:00 +02:00
Przemyslaw Gomulka 4af7150a40
[Rest Api Compatibility] Allow to use size -1 (#75342)
previously disallowed in #70209. However since now the recommendation is
to not set the field at all - and rely on a default - this would be a
shape change for users prefering to set -1 so far.
With request compatible with v7 they will still be allowed to do this
and will get a warning.

relates #69548
relates #51816
2021-07-16 12:46:05 +02:00
Steve Gordon 1e7e92dda7
Add missing X-Pack repositories REST specs (#65548)
* Add missing repositories API REST specs

A new experimental X-Pack API was added for repositories, but is missing a REST spec. The API was added in #60371

* Move this under the nodes namespace

* Rename max_version_to_clear parameter

* Update docs URL to use current
2021-07-16 10:55:13 +01:00
Lisa Cawley 345c00ceff
[DOCS] Update doc URLs for trained model deployment APIs (#75388) 2021-07-15 10:51:15 -07:00
James Rodewig b79e4a594d
[DOCS] Fix broken doc url values in JSON API spec (#75385)
Fixes a broken link in the `documentation.url` for the field usage stats API and
enroll Kibana API.

These broken links caused the build for the JS client docs to fail.
2021-07-15 13:46:00 -04:00
Steve Gordon 2083304253
Remove SET aliases from disk usage and field usage YML tests (#75381)
* Remove aliases from disk usage test

* Remove aliases from field usage test
2021-07-15 16:17:21 +01:00
Przemyslaw Gomulka 2320a38833
[Rest Api Compatibility] Allow transforming warnings per test (#75187)
Warning related transformations missed the possibility to apply per single test only.
Also a warning changed in #67158 for indices.close so this PR also applies the transformation for 7.x test

relates #51816
2021-07-15 10:50:42 +02:00
Julie Tibshirani a2b8b53014
Loosen checks in REST test for PIT slicing (#75261)
Since the index may have more than one shard, we can't always predict how many
documents will fall in each slice. This PR simply removes the checks, since we
already test the slicing logic extensively in an integration test. The REST test
is now just a sanity check for the API.

Fixes #75212.
2021-07-14 11:10:48 -07:00
Yannick Welsch 88d6079507 Adapt BWC after backport (#74227)
Adapts BWC conditions after backporting #74227 to 7.x branch (targeting 7.15).
2021-07-14 14:59:45 +02:00
Yannick Welsch db814f403b
Track Lucene field usage (#74227)
Adds a field usage API that reports shard-level statistics about which Lucene fields have been accessed, and which
parts of the Lucene data structures have been accessed.

Field usage statistics are automatically captured when queries are runnning on a cluster. A shard-level search request
that accesses a given field, even if multiple times during that request, is counted as a single use.
2021-07-14 13:21:11 +02:00
Przemyslaw Gomulka 71e05838a6
[Rest Api Compatibility] Enable tests after types and cat api fixed (#75179)
Some tests are fixed after typed api is available with compatible api.
Also cat api returning text fixed some tests
relates #51816
2021-07-14 08:37:38 +02:00
James Rodewig a9ed7dc1eb
[DOCS] Document async SQL APIs (#75078)
Adds formal API docs and JSON specs for the following APIs:

* Get async SQL search
* Get async SQL search status
* Delete async SQL search

Closes #74845
2021-07-12 10:12:02 -04:00
Przemyslaw Gomulka ff8aede63a
[Rest Api Compatibility] MoreLikeThisQuery with types (#75123)
previously removed in #42198
also adding a type for MultiTermVectorsResponse in failures

relates #54160
relates #51816
2021-07-12 12:08:45 +02:00
Dimitris Athanasiou 83395d96d3
Mute point-in-time with slicing YAML test (#75222)
Relates #75212
2021-07-12 12:47:15 +03:00
Przemyslaw Gomulka 1855782def
[Rest Api Compatibility] Allow copy_settings flag for resize operations (#75184)
previously removed in #38514, deprecated in 7.x and defaulted to true.
With rest api compatibility and when value is true it is ignored and warning is emitted
when value is false, an exception is thrown

relates #51816
2021-07-12 10:55:24 +02:00
Przemyslaw Gomulka 563e1fb8e1
[Rest Api Compatibility] Return adjust_pure_negative values (#75182)
the adjust_pure_negative value used to be always present in to_xcontent
response, but it was changed in #49543 to only serialise this field when
the value is false

relates #51816
2021-07-12 09:34:25 +02:00
Julie Tibshirani c9c5d1f84c Adjust version checks after sliced PIT backport 2021-07-09 12:24:20 -07:00
Przemyslaw Gomulka 1b0ef6a5de
[Rest Api Compatibility] Dummy REST action for indices.upgrade api (#75136)
indices upgrade api (/_upgrade or /{index}/_upgrade) was removed and _reindex is suggested to be used instead.
There is no easy way to translate _upgrade request to _reindex requests. The dummy Upgrade action will return an exception to a user with a message indicating that _reindex should be used.

upgrade api removal #64732
relates #51816
2021-07-09 10:44:45 +02:00
Julie Tibshirani cdf67e0fd5
Support search slicing with point-in-time (#74457)
This PR adds support for using the `slice` option in point-in-time searches. By
default, the slice query splits documents based on their Lucene ID. This
strategy is more efficient than the one used for scrolls, which is based on the
`_id` field and must iterate through the whole terms dictionary. When slicing a
search, the same point-in-time ID must be used across slices to guarantee the
partitions don't overlap or miss documents.

Closes #65740.
2021-07-08 15:33:41 -07:00
Przemyslaw Gomulka 1f726800a6
[Rest Api Compatibility] Clean up x-pack/plugin rest compat tests (#74701)
this PR removes tests which are not meant to be fixed (ml/, vectors/) to a separate "not to be fixed list" so that we can see which compatible changes are meant to be implemented.

relates #51816
2021-07-08 11:04:55 +02:00
Nhat Nguyen 55abeae683
Remove AwaitsFix in field collapsing yaml tests (#75087)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-07-07 16:27:22 -04:00
Steve Gordon 6bc064a0ff
Deprecate freeze and unfreeze indices endpoints in REST API specification (#75042)
* Deprecate frozen indices endpoint
* Improve description to match warning
* Deprecate unfreeze indices in REST API specs
2021-07-07 15:17:44 +01:00
James Rodewig 559e40fdb9
[DOCS] Fix stability and doc URL for rollup V2 JSON spec (#74992) 2021-07-06 12:32:21 -04:00
Przemyslaw Gomulka 72a58bc338
[Rest Api Compatibility] _time and _term sort orders (#74919)
Previously removed in #39450, deprecated in es6 but not removed in es 7.
defaults to _key behaviour

relates #51816
2021-07-06 15:06:26 +02:00
Nhat Nguyen dc60a3880c Adjust BWC test version for disk usage API
Relates #74051
2021-07-01 07:57:02 -04:00
James Rodewig 3d1cb4944d
[DOCS] Overhaul search template docs (#72583)
Changes:

* Adds a tutorial for search templates.
* Adds reference docs for the render search template API.
* Improves parameter documentation for the multi search template API.
* Removes duplicate examples from the search template API, multi search API, and create stored script API docs.
* Splits the source files for the search template API and the multi search template API docs.
2021-06-30 16:03:49 -04:00
Nhat Nguyen c23cb99b71
Add index disk usage API (#74051)
This change adds a new API that supports analyzing the disk usage of 
each field of an index.
2021-06-30 11:50:01 -04:00
Andrei Dan 5ca240eabd
Add `dry_run` support to the migrate to data tiers API (#74639)
This adds support for a `dry_run` parameter for the
`_ilm/migrate_to_data_tiers` API. This defaults to `false`, but when
configured to `true` it will simulate the migration of elasticsearch
entities to data tiers based routing, returning the entites that need to
be updated (indices, ILM policies and the legacy index template that'd
be deleted, if any was configured in the request).
2021-06-29 10:37:16 +01:00
Przemyslaw Gomulka 5ac94b5263
[Rest Api Compatibility] Enable tests that are already fixed (#74174)
With types removal changes being available under rest api compatibility I have removed the block entries for tests which are already fixed
relates #51816
2021-06-29 09:11:31 +02:00
Nik Everett d251d742aa
Lock test to single shard index (#74627)
The filter by filter terms aggregation optimization only kicks in when
its targeting a non-empty shard. An empty shard is fast to collect no
matter what so there isn't really any need to do anything complex.
Anyway, this locks the test to a single sharded index so there isn't a
chance of the debugging data coming back from an empty shard. Which
would cause the test to fail because its expecting the optimization to
run.

Closes #74612
2021-06-28 10:35:53 -04:00
Andrei Dan 636aa7c0da
Add migrate to data tiers API (#74264)
This adds the _ilm/migrate_to_data_tiers API to expose the service for
migrating the elasticsearch abstractions (indices, ILM policies and an 
optional legacy template to delete) to data tiers routing allocation 
(away from custom node attributes)
2021-06-28 12:07:39 +01:00
Przemyslaw Gomulka 90f22717b1
[Rest Api Compatibility] Typed TermLookups (#74544)
Previously removed in #46943
parsing type field in term lookup is now possible with rest
compatible api. The type field is ignored

relates main meta issue #51816
relates type removal meta issue #54160
2021-06-28 12:03:39 +02:00
Armin Braun cbf48e0633
Flatten Get Snapshots Response (#74451)
This PR returns the get snapshots API to the 7.x format (and transport client behavior) and enhances it for requests that ask for multiple repositories.
The changes for requests that target multiple repositories are:
* Add `repository` field to `SnapshotInfo` and REST response
* Add `failures` map alongside `snapshots` list instead of returning just an exception response as done for single repo requests
* Pagination now works across repositories instead of being per repository for multi-repository requests

closes #69108
closes #43462
2021-06-24 16:58:33 +02:00
Nik Everett a5af44d413
Disable optimization if we aren't sure its faster (#74260)
This disables the filter-by-filter aggregation optimization used by
`terms`, `range`, `date_histogram`, and `date_range` aggregations unless
we're *sure* that its faster than the "native" implementation. Mostly this
is when the top level query is empty or we can merge it into the filter
generated by the agg rewrite process.

Now that we have hard and fast rules we can drop the cost estimation
framework without too much fear. So we remove it in this change. It
stomps a bunch of complexity. Sadly, without the cost estimation stuff
we have to add a separate mechanism for blocking the optimization
against runtime fields for which it'd be kind of garbage. For that I
added another rule preventing the filter-by-filter aggregation from
running against the queries made by runtime fields. Its not fool-proof,
but we have control over what queries we pass as a filter so its not
wide open.

I spent a lot of time working on an alternative to this that preserved
that fancy filter-by-filter collection mechanism and was much more kind
to the query cache. It detected cases where going full filter-by-filter
was bad and grouped those filters together to collect in one pass with a
funny ORing collector. It *worked*. And, if we were super concerned with
the performance of the `filters` aggregation it'd be the way to go. But
it was very complex and it was actually slower than using the native
aggregation for things like `terms` and `date_histogram`. It was
glorious. But it was wrong for us. Too complex and optimized the wrong
things.

So here we are. Hopefully this is a fairly simple solution to a sneaky
problem.
2021-06-24 08:56:01 -04:00
Przemyslaw Gomulka dd7d37c54a
[Rest Api Compatibility] Ignore use_field_mapping option for docvalue (#74435)
previously removed in #55622 use_field_mapping option can be used on doc
value format under rest api compatibility.
The value itself is ignored (replaced with null) as it is a default
behaviour to use field mapping format.

relates https://github.com/elastic/elasticsearch/issues/51816
2021-06-24 08:56:42 +02:00
Ioannis Kakavas 6887604f17
Add REST API specification for SAML APIs (#72839)
These API specifications were originally not added as we considered 
them internal.
2021-06-24 09:29:43 +03:00
Mark Tozzi d9259ccb3f
Fix BWC version on tests after backport (#74515) 2021-06-23 17:11:45 -04:00
Ioannis Kakavas 82e7fbda53
Add the Enroll Kibana API (#72207)
This change adds the Enroll Kibana API that enables a Kibana instance to
configure itself to communicate with a secured elasticsearch cluster
2021-06-23 22:58:46 +03:00
Benjamin Trent 0303e6d733
[ML] add datafeed field to the job config (#74265)
This is a quality of life improvement for typical users. Almost all anomaly jobs will receive their data through a datafeed.

The datafeed config can now be supplied and is available in the datafeed field in the job config for creation and getting jobs.
2021-06-23 08:06:58 -04:00
Przemyslaw Gomulka 5d4dbea26a
[Rest Api Compatibility] Indicies boost in object format (#74422)
Previously removed #55078 indices_boost field is available when used
with rest api compatibility

relates #51816
2021-06-23 09:27:28 +02:00
Julie Tibshirani bcab641ed2
Adjust some skip versions after backport (#74389)
We forgot to update some skip versions in REST tests after backports. This PR
only targets search tests.
2021-06-22 15:58:02 -07:00
Mark Tozzi cd2732d40b
Fail composite aggregation if after key is unparsable (#74252)
If the after key cannot parse back to the same value we generated it from, when the client sends it back we will land on a wrong page.  If this page is earlier, it is likely we will (eventually) generate the same wrong after key, resulting in an infinite loop as the client repeatedly ask to retrieve the same page or pages of data.  This change fixes that by failing the composite aggregation (with an exception) if the after key is unparsable with the given format.  We provide as much information about what failed as possible.
2021-06-22 15:28:14 -04:00