Elasticsearch-dsl-py: KeyError: 'created' return meta['created']

Created on 12 Dec 2017  路  5Comments  路  Source: elastic/elasticsearch-dsl-py

Hi I am using elasticsearch-dsl-py in my project with the version 5.4.0. I got key error in document.py line 437 for there is no key in meta. I saw it has been updated in master branch to be code return meta["result"] == "created".
So when can I got the next release version.
Thanks.

Most helpful comment

Currently I inherited the class DocType and override the methods save to and change the last line to be return meta.get('result', '') == 'created'

All 5 comments

What is the version of elasticsearch-py and elasticsearch? I had same issue, but noticed I was using es6. After installing version 5.6, error went away.

Currently I inherited the class DocType and override the methods save to and change the last line to be return meta.get('result', '') == 'created'

Thank you for the report, 6.0 support is coming, currently implemented in master, to be released soon.

I have version 6.2.1 and I'm still facing this problem!

This is problem has been solved, by checking the key {'created':True} from elasticsearch in version 6.3.1. Should give a PR? Also connects to #953

Was this page helpful?
0 / 5 - 0 ratings

Related issues

takaomag picture takaomag  路  3Comments

gabrielpjordao picture gabrielpjordao  路  3Comments

SalahAdDin picture SalahAdDin  路  4Comments

berinhard picture berinhard  路  3Comments

njoannin picture njoannin  路  3Comments