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

[BUG] TypeError error when using a .filter(...) on a Search object. #779

Closed
Godefroy-Amaury opened this issue Jul 18, 2024 · 0 comments · Fixed by #780
Closed

[BUG] TypeError error when using a .filter(...) on a Search object. #779

Godefroy-Amaury opened this issue Jul 18, 2024 · 0 comments · Fixed by #780
Labels
bug Something isn't working

Comments

@Godefroy-Amaury
Copy link
Contributor

Godefroy-Amaury commented Jul 18, 2024

What is the bug?

Get a TypeError error when using a .filter("terms", ...) on a Search object.

How can one reproduce the bug?

Having a str instead of an int for Bool.filter or Bool.must attributes when reach the Bool.__and__ method.
This case can happen when using string based percent (eg: "50%") instead of pure integer (eg: 50) for minimum_should_match.

What is the expected behavior?

Accept 50, "50" or "50%" as valid values.

Do you have any additional context?

A TODO statement is present in the code for this specific case.
This TODO statement date back at least from the opensearch-dsl 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants