elasticsearch.exceptions.RequestError: TransportError(400, 'illegal_argument_exception', 'Rejecting mapping update to [sg_index_checker_progress] as the final mapping would have more than 1 type: [_doc, sg_index_checker_progress]')

Hi All,
I am getting this error on elastic search. Could you please help me here.!
Thanks in advance

Loading articles from Springer API(Eddie) into sg_index_checker
Processing dates 2020-01-01 00:00:00 - 2020-08-11 00:00:00(not included)
PUT http://localhost:9200/sg_index_checker_progress/sg_index_checker_progress/article-2020-01-01 [status:400 request:0.052s]
Traceback (most recent call last):
File "/Users/sam1546/Documents/Indexing-check/knowledge-graph/scigraph-new-indexing-checks/venv/lib/python3.7/site-packages/elasticsearch/transport.py", line 312, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/Users/sam1546/Documents/Indexing-check/knowledge-graph/scigraph-new-indexing-checks/venv/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py", line 129, in perform_request
self._raise_error(response.status, raw_data)
File "/Users/sam1546/Documents/Indexing-check/knowledge-graph/scigraph-new-indexing-checks/venv/lib/python3.7/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'illegal_argument_exception', 'Rejecting mapping update to [sg_index_checker_progress] as the final mapping would have more than 1 type: [_doc, sg_index_checker_progress]')

Hi Sam,

Il looks like your are trying to use mapping types in a recent ES version (7.0+ ?). As per documentation

Indices created in Elasticsearch 6.0.0 or later may only contain a single mapping type. Indices created in 5.x with multiple mapping types will continue to function as before in Elasticsearch 6.x. Types will be deprecated in APIs in Elasticsearch 7.0.0, and completely removed in 8.0.0

Your URL should be http://localhost:9200/sg_index_checker_progress/_doc/article-2020-01-01

Dominique

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.