Mapper parsing exception?


(AJ) #1

Hi,
I wonder if anyone could help on the below error? I am trying to import some spatial data into elastic search, using ogr2ogr, but I am getting the below error:

error":{"type":"mapper_parsing_exception","reason":"failed to parse [geometry]","caused_by":{"type":"array_index_out_of_bounds_exception","reason":"-1"}}

On the server side, the error is:
failed to execute bulk item (index) BulkShardRequest [[index][0]] containing [index {[index][FeatureCollection][AV15m2nWhhQ-IblS1nLK], source[n/a, actual length: [4.2mb], max length: 2kb]}]

The geometry is a very big one, is there any way that i can increase the max length, and if yes, would this be a good thing to do?


#2

Hi, I had a similar problem today and searched in the code for the error message. It looks like the size is hard coded to 2kb:

$ grep -Rn "max length:" *
core/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java:206:                "], max length: " + new ByteSizeValue(IndexRequest.MAX_SOURCE_LENGTH_IN_TOSTRING).toString() + "]}", request.toString());
core/src/main/java/org/elasticsearch/action/index/IndexRequest.java:577:                sSource = "n/a, actual length: [" + new ByteSizeValue(source.length()).toString() + "], max length: " +
$ grep -Rn "MAX_SOURCE_LENGTH_IN_TOSTRING =" *
core/src/main/java/org/elasticsearch/action/index/IndexRequest.java:82:    static final int MAX_SOURCE_LENGTH_IN_TOSTRING = 2048;

So I think we have to keep the source as small as posible.


(system) #3

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