We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, consider the following document indexed on ES:
{'_id': 'id123', '_index': 'index123', '_source': { 'one_field': {'entries': []}, } }
Calling to_dict(skip_empty=False) on the corresponding DSL Document created out of it will return:
to_dict(skip_empty=False)
{"one_field": {}}
instead of
{"one_field": {"entries": []}}
After few tests, I believe the issue comes from the fact the serialize() can sometimes call to_dict(), without passing skip_empty, ex: https://github.com/elastic/elasticsearch-dsl-py/blob/master/elasticsearch_dsl/field.py#L226
serialize()
to_dict()
skip_empty
HTH. Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, consider the following document indexed on ES:
Calling
to_dict(skip_empty=False)
on the corresponding DSL Document created out of it will return:instead of
After few tests, I believe the issue comes from the fact the
serialize()
can sometimes callto_dict()
, without passingskip_empty
, ex: https://github.com/elastic/elasticsearch-dsl-py/blob/master/elasticsearch_dsl/field.py#L226HTH. Thanks!
The text was updated successfully, but these errors were encountered: