How to update a document using elasticsearch-py?

You’re almost there, you just need to enclose your body inside a “doc” field. The correct way of doing a partial update with elasticsearch-py goes like this:

coll = Elasticsearch()
coll.update(index='stories-test',doc_type="news",id=hit.meta.id,
                body={"doc": {"stanford": 1, "parsed_sents": parsed }})

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)