Closed
Description
"Terms" query currently only support list parameters : using Terms(field1=(1, 2, 3), field2={"foo", "bar"})
would result in a SerializationError
.
Is there a reason not to support any iterable ? It would be more pythonic and also ease integration with other framwework (thinking of Django's QuerySet)
An easy way to implement this is redefining Terms._setattr
:
class Terms():
...
def _setattr(self, name, value):
super()._setattr(name, list(value))