Describe the feature: I am calling es.update with index, id and body, everytime I get:
ElasticsearchDeprecationWarning: [types removal] Specifying types in document update requests is deprecated, use the endpoint /{index}/_update/{id} instead.
Elasticsearch version (bin/elasticsearch --version): 7.7.0
elasticsearch-py version (elasticsearch.__versionstr__): 7.7.0
Description of the problem including expected versus actual behavior:
The function es.update works but I get this annoying log for each request.
Steps to reproduce:
I have wrapped the call in the function:
import datetime
import os # get environment variables
import elasticsearch
URL_ELASTIC = os.environ.get("URL_ELASTIC")
INDEXNAME = "documents"
ES = elasticsearch.Elasticsearch(hosts=[URL_ELASTIC])
def doc_close_update(
es_id,
msgresponse,
):
"""Updates documents with final time and message."""
body = {
"doc": {
"msgresponse": msgresponse,
"timeresponse": datetime.datetime.utcnow(),
"error": False,
}
}
return ES.update(index=INDEXNAME, id=es_id, body=body)
I've seen this, it has been reported by another user as well and I'm working on a fix in https://github.com/elastic/elasticsearch-py/pull/1249 which will be eventually released as 7.7.1.
Closed via https://github.com/elastic/elasticsearch-py/pull/1253 will be released in 7.7.1 today.
@sethmlarson tested and worked, thanks a lot!
Most helpful comment
Closed via https://github.com/elastic/elasticsearch-py/pull/1253 will be released in 7.7.1 today.