Skip to content
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

[REST Compatible API] Reindex size field #69037

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

pgomulka
Copy link
Contributor

@pgomulka pgomulka commented Feb 16, 2021

The commit #43373 has removed outer level size field in version 7.
This commit allows for the use of the size field in server ES8 using
compatible REST API.

relates #51816

This is a surgical approach with just adding a new field declaration to existing parser. A different - copying - approach is presented here #68355

The commit elastic#43373 has removed outer level size field in version 7.
This commit allows for the use of the size field in server ES8 using
compatible REST API.

relates elastic#51816
@pgomulka pgomulka self-assigned this Feb 16, 2021
@@ -158,3 +159,19 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
}
}
}

tasks.named("yamlRestCompatTest").configure {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

a test to validate the change

./gradlew ':modules:reindex:yamlRestCompatTest' --tests "org.elasticsearch.index.reindex.ReindexClientYamlTestSuiteIT.test {yaml=reindex/30_search/Sorting and size combined}"  -Dtests.security.manager=true -Dtests.locale=fi -Dtests.timezone=Navajo -Druntime.java=15                 

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

LGTM, I like the surgical approach.

Suggested commit log:

For re-index requests, the outer most "size" field was deprecated and
renamed to "max_docs" in 7.x. With this commit, the "size" field will
remain available (but still deprecated) through out 8.x when REST API
compatibility is requested.

relates #51816

@pgomulka pgomulka merged commit 587e5b4 into elastic:master Feb 17, 2021
pgomulka added a commit that referenced this pull request Mar 15, 2021
…9606)

A follow up after #69037 which added back size field for reindex api.
The original PR #43373 also removed the size field from update by query and delete by query APIs.
This commits allow to use size field with Compatible API for update_by_query and delete_by_query apis
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.

2 participants