Facing issue while indexing the data

hi

any one help me how to resolve this issue, while indexing time facing this exception ?

my _id is : http:/****** like

bulkresponse json{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: id is too long, must be no longer than 512 bytes but was: 522;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: id is too long, must be no longer than 512 bytes but was: 522;"},"status":400}

Thanks in Advance
John

Your document ID seems too long and may also contain illegal characters (as it seems to be a URL). I would recommend instead creating a hash, e.g. MD5 or SHA1, of the id string and use this as an ID.

1 Like

Hi Christian,
Thank you for ur information
is any other way to increase the ids bytes in elasticsearch?

I would recommend staying away from extremely long document IDs (especially if they can contain unsafe characters) as they can take up quite a lot of disk space. Not sure if it is possible to override it.

1 Like

hi christian,
thank you let me try that one , i am having another query
i am having list of datas (like 10000 ) how to use write bulkindex api?

thanks in advance

That is a completely separate question, so please open a new thread with a proper description. Include which versions you are using as well as how you are currently indexing data, e.g. language client used.

1 Like

okay christian, i have created new thread Bulkindex in elasticsearch

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