Skip to content

Update specs and APIs to 6.1 #3180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 5, 2018
Merged

Update specs and APIs to 6.1 #3180

merged 19 commits into from
Apr 5, 2018

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Mar 29, 2018

This PR updates the 6.x branch with new REST APIs available in 6.1:

  • Split Index API
  • Migration Assistance and Upgrade APIs
  • Trial License status and Start Trial License APIs
  • ML Forecast API
  • ML Get Overall Buckets API

A number of deprecations are fixed:

  • Indices Boost is now serialized as an array of objects
  • NestedPath and NestedFilter are deprecated in favour of Nested for nested field sorting

A number of changes are made in relation to changes in the REST API specs, in order to maintain backwards binary compatibility:

  • Include parameterless contstructors for AliasExists, GetTask and ReindexRethrottle

Fixes the following tests

  • IpRange aggregation uses a better IP address for partitioning into buckets and improving likelihood of documents in each bucket

Mpdreamz and others added 17 commits March 29, 2018 12:24
This commit updates to using the 6.1 core Rest API specification and regenerates the client with this.
Adds wait_for_active_shards to OpenIndex API
Include parameterless constructors for AliasExists, GetTask and ReindexRethrottle

Closes #3153
This commit adds the Split Index API.
number_of_routing_shards index setting added to support splitting.

Closes #3154
WIP. Fix remaining unit tests
This commit moves the DeprecationInfo API and associated tests to a Migration directory under XPack,
to align with X-Pack documentation
This commit adds Migration assistance and upgrade APIs.
Consider including a 5.6 index for integration test purposes in future.
This commit adds the Get Trial License Status and Start Trial License APIs.
Integration tests currently run against an X-Pack cluster that already has a valid
license applied, so test the unhappy path.
This commit adds the machine learning Forecast Job API
This commit adds the machine learning overall buckets API.
The integration test is similar to that performed within X-Pack integration.
This commit adds the EarliestRecordTimestamp and LatestRecordTimestamp to the PostJobDataResponse.
Use an IP address within the ranges that has better likelihood of partitioning addresses into buckets
Directive is not honoured when surrounding only some methods
This commit serializes IndicesBoost as an array of objects such that the boosts are ordered.
Deserialization supports both JSON array and object forms

Closes #3179
@russcam
Copy link
Contributor Author

russcam commented Mar 29, 2018

branch has been rebased against 6.x. I would suggest this branch is rebased and merge to allow the Migration assistance and upgrade APIs to be cherry-picked to 5.x

Copy link
Contributor

@codebrain codebrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor things, weird character introduced and an outstanding TODO.

@@ -31,7 +31,7 @@
},
"pre_filter_shard_size" : {
"type" : "number",
"description" : "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.",
"description" : "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird character: theÂ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove from downloaded spec

@@ -1921,7 +1921,7 @@ public class SearchRequestParameters : RequestParameters<SearchRequestParameters
///</summary>
public long? MaxConcurrentShardRequests { get => Q<long?>("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); }
///<summary>
/// A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search
/// A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird characters: theÂ

@@ -235,6 +235,7 @@ public IEnumerable<Constructor> DescriptorConstructors()
generated = $"public {m}({par}) : base({routing}.Required(\"type\", (Types)typeof({generic})))";
}

// TODO: Don't think this is required anymore, now that Suggest in on search endpoint.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outstanding TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, will address.

russcam added 2 commits April 5, 2018 13:02
Suggest is no under the Search endpoint, so this commit removes the special case handling for generating
SuggestDescriptor
Following PR review
@russcam russcam merged commit b00f081 into 6.x Apr 5, 2018
@russcam
Copy link
Contributor Author

russcam commented Apr 5, 2018

Will need to be forward ported to master (without the bwc fixes for parameterless ctors) and the migration APIs backported to 5.x

@russcam russcam deleted the 6.1 branch April 28, 2018 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants