# Geo data : MapperParser Exception

**URL:** <https://discuss.elastic.co/t/geo-data-mapperparser-exception/115506>\
**Category:** Elasticsearch\
**Created:** [January 15, 2018, 9:24am UTC](https://discuss.elastic.co/t/geo-data-mapperparser-exception/115506 "2018-01-15T09:24:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurab\_Dahal](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Saurab\_Dahal](https://discuss.elastic.co/u/Saurab_Dahal)\
**Post date:** [January 15, 2018, 9:24am UTC](https://discuss.elastic.co/t/geo-data-mapperparser-exception/115506/1 "2018-01-15T09:24:52Z")

</div>

I've been trying to index geo data but even after following the

my data looks like

> {"coordinates":[[[87.2779545572,26.4571324637],[87.2781064548,26.4579406195],[87.2782446134,26.4587874038],[87.2783030644,26.4591965219],[87.27830437,26.4592438567],[87.2783349474,26.4594676809],[87.2783562029,26.4597388392],[87.2783615164,26.4601146542],[87.2783682274,26.4603249248],[87.2783130862,26.4608071736],[87.2783030643,26.4608948231],[87.2781595918,26.4617939128],[87.2779842368,26.4628547356],[87.2779782454,26.4628535209],[87.2778832752,26.4633970355],[87.2776016445,26.4651380861],[87.2773784652,26.4664605071],[87.277181855,26.4676972891],[87.2771801092,26.4676966194],[87.2771393443,26.468020753],[87.2767833204,26.470051895],[87.2767807758,26.4700510941],[87.2765648448,26.4715927325],[87.2764969453,26.4725242677],[87.2764332357,26.4732918757],[87.2763334711,26.4751307915],[87.2763891119,26.4759481186]]],"type":"MultiLineString"}

and my code looks like

```
bulkRequest.add(client.prepareIndex("geo_data_line", "data_line")
                        .setSource(jsonBuilder()
                                .startObject()
                                .field("geometry",new JSONObject(new JSONObject(s.toString()).get("geometry").toString()))
.endObject()
)

```

);  
}

bulkRequest.get();

and I get following error  
`MapperParsingException[failed to parse [geometry]]; nested: ElasticsearchParseException[shape must be an object consisting of type and coordinates];`

I have specified `coordinates` and `type` and geometry is an `Object` (JSONObject is also an Object, right ?)  
and my mapping is

```
"data_line": {
      "properties": {
        "geometry": {
          "type": "geo_shape"
        }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 12, 2018, 9:25am UTC](https://discuss.elastic.co/t/geo-data-mapperparser-exception/115506/2 "2018-02-12T09:25:11Z")

</div>

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