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.
What is the bug?
Get a
TypeError
error when using a.filter("terms", ...)
on aSearch
object.How can one reproduce the bug?
Having a str instead of an int for
Bool.filter
orBool.must
attributes when reach theBool.__and__
method. This case can happen when using string based percent (eg:"50%"
) instead of pure integer (eg:50
) forminimum_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.