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

Move 'body' parameters to new typed parameters #1672

Closed
b-deam opened this issue Feb 21, 2023 · 2 comments
Closed

Move 'body' parameters to new typed parameters #1672

b-deam opened this issue Feb 21, 2023 · 2 comments
Milestone

Comments

@b-deam
Copy link
Member

b-deam commented Feb 21, 2023

As part of the ES client upgrade to 8.x, all client method's now expose the JSON
body' field as typed parameters,
, and the use of the body parameter is deprecated.

For example:

client.search(
    index="test-index",
    size=10,
    body={
        "runtime_mappings": {
            "day_of_week": {
                "type": "keyword",
                "script": "emit(doc['@timestamp'].value.dayOfWeekEnum)"
            }
        },
        "aggs": {
            "day_of_week_count": {
                "value_count": {
                    "field": "day_of_week"
                }
            }
        }
    }
)

Would become:

client.search(
    index="test-index",
    size=10,
    runtime_mappings={
        "day_of_week": {
            "type": "keyword",
            "script": "emit(doc['@timestamp'].value.dayOfWeekEnum)"
        }
    },
    aggs={
        "day_of_week_count": {
            "value_count": {
                "field": "day_of_week"
            }
        }
    }
)

We need to refactor all of our runners (and custom runners in rally-tracks) to use these new parameters.

@b-deam b-deam added this to the 2.7.1 milestone Feb 21, 2023
@b-deam b-deam mentioned this issue Feb 21, 2023
19 tasks
@pquentin
Copy link
Member

Another option here is to use **body instead of body.

@pquentin pquentin modified the milestones: 2.7.1, 2.8.0 Mar 2, 2023
@b-deam
Copy link
Member Author

b-deam commented Mar 31, 2023

Looks like a decision was made to un-deprecate the removal of the body param.

Closing this one out for now.

@b-deam b-deam closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants