Facing issue while indexing the data


(john rabindranath) #1

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


(Christian Dahlqvist) #2

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.


(john rabindranath) #3

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


(Christian Dahlqvist) #4

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.


(john rabindranath) #5

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


(Christian Dahlqvist) #6

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.


(john rabindranath) #7

okay christian, i have created new thread Bulkindex in elasticsearch


(system) #8

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