You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Andrii32 From a quick look at elasticsearch_dsl/search.py, the following .extra() did not perform any kind of serialization (a.k.a to_dict() of this issue title), and that explains why it remains object.
def extra(self, **kwargs):
"""
Add extra keys to the request body. Mostly here for backwards
compatibility.
"""
s = self._clone()
if 'from_' in kwargs:
kwargs['from'] = kwargs.pop('from_')
s._extra.update(kwargs)
return s
A question, may I know what is possible to be put inside .extra(), so that I can see how we can handle the serialization. Alternatively, we can recurse dictionary sent into .extra() to identify Q object and serialize them.
Hi. It seems like
to_dict()
method ofSearch
class does not serializerescore_query
content.Example code:
Result:
Expected result:
Despite that, search executes properly.
The text was updated successfully, but these errors were encountered: