Indexing error after elasticsearch upgrade

Hi,

I recently upgraded elasticsearch cluster from 5.x to 7.x.

Post this upgrade, I'm seeing below error while indexing data:

**00:42:53** File "/usr/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped **00:42:53** return func(*args, params=params, **kwargs) **00:42:53** File "/usr/local/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 362, in index **00:42:53** body=body, **00:42:53** File "/usr/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 280, in perform_request **00:42:53** body = self.serializer.dumps(body) **00:42:53** File "/usr/local/lib/python2.7/site-packages/elasticsearch/serializer.py", line 55, in dumps **00:42:53** raise SerializationError(data, e) **00:42:53** elasticsearch.exceptions.SerializationError:

same data indexing into older cluster still works.

Thanks.

What version of the python client are you using?

@warkolm I'm using elasticsearch-py 7.0.0

I'm using es.index to create/update index.

Usage:

es.index(index=index, body=body, id=record_id)

I tried using bulk() but still i hit serialisation issue.

        jsonobject = {
            '_index': index,
            '_source': body,
            '_id': record_id
        }
        actions = [jsonobject]
        helpers.bulk(es, actions)

**02:31:57** helpers.bulk(es, actions, chunk_size=1000) **02:31:57** File "/usr/local/lib/python2.7/site-packages/elasticsearch/helpers/actions.py", line 300, in bulk **02:31:57** for ok, item in streaming_bulk(client, actions, *args, **kwargs): **02:31:57** File "/usr/local/lib/python2.7/site-packages/elasticsearch/helpers/actions.py", line 212, in streaming_bulk **02:31:57** actions, chunk_size, max_chunk_bytes, client.transport.serializer **02:31:57** File "/usr/local/lib/python2.7/site-packages/elasticsearch/helpers/actions.py", line 70, in _chunk_actions **02:31:57** data = serializer.dumps(data) **02:31:57** File "/usr/local/lib/python2.7/site-packages/elasticsearch/serializer.py", line 55, in dumps **02:31:57** raise SerializationError(data, e)

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