# co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.\_types.mapping.VersionProperty: Unknown field 'index'

**URL:** <https://discuss.elastic.co/t/co-elastic-clients-json-jsonpmappingexception-error-deserializing-co-elastic-clients-elasticsearch-types-mapping-versionproperty-unknown-field-index/323316>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [January 17, 2023, 10:57am UTC](https://discuss.elastic.co/t/co-elastic-clients-json-jsonpmappingexception-error-deserializing-co-elastic-clients-elasticsearch-types-mapping-versionproperty-unknown-field-index/323316 "2023-01-17T10:57:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sundar.s](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@sundar.s](https://discuss.elastic.co/u/sundar.s)\
**Post date:** [January 17, 2023, 10:57am UTC](https://discuss.elastic.co/t/co-elastic-clients-json-jsonpmappingexception-error-deserializing-co-elastic-clients-elasticsearch-types-mapping-versionproperty-unknown-field-index/323316/1 "2023-01-17T10:57:37Z")

</div>

Hi,

When I tried to create an index containing a field of type: "version" or "geo\_point" with 'index' : true/false (sample input below) through the Java API client (7.17.7), I am getting the following exception. Could some on help on this.

Input 1 :

```auto
"my_version": {
        "type": "version",
        "store": true,
       "index": false
      }

```

Exception :

_co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.\_types.mapping.VersionProperty: Unknown field 'index' (JSON path: mappings.properties.my\_version.index) (in object at line no=1, column no=792, offset=791)_

Input 2 :

```auto
"location": {
        "type": "geo_point",
        "index": false,
        "store": true,
        "doc_values": false
     }

```

Exception :

_co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.\_types.mapping.GeoPointProperty: Unknown field 'index' (JSON path: mappings.properties.location.index) (in object at line no=1, column no=790, offset=789)_

I am using _PutTemplateRequestBuilder::withJson(Reader input)_ method to parse the mappings. Any help on this would be greatly appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [January 17, 2023, 11:29am UTC](https://discuss.elastic.co/t/co-elastic-clients-json-jsonpmappingexception-error-deserializing-co-elastic-clients-elasticsearch-types-mapping-versionproperty-unknown-field-index/323316/2 "2023-01-17T11:29:02Z")

</div>

Hi Sundar,

Thanks for raising this error. There is currently an open GitHub issue out for this issue. check out the below issue and discuss thread for details:

1. [GitHub Issue](https://github.com/elastic/elasticsearch-java/issues/394)
2. [Discuss thread](https://discuss.elastic.co/t/elastic-java-client-problem-with-geopointproperty-unknown-field-index/313799)

---

<div class="post-metadata">

**Author:** ![sundar.s](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@sundar.s](https://discuss.elastic.co/u/sundar.s)\
**Post date:** [January 18, 2023, 12:17pm UTC](https://discuss.elastic.co/t/co-elastic-clients-json-jsonpmappingexception-error-deserializing-co-elastic-clients-elasticsearch-types-mapping-versionproperty-unknown-field-index/323316/3 "2023-01-18T12:17:04Z")

</div>

Thanks for the reply @carly.richmond.  
Do we have some workaround up until the original issue is fixed?

---

<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 15, 2023, 12:17pm UTC](https://discuss.elastic.co/t/co-elastic-clients-json-jsonpmappingexception-error-deserializing-co-elastic-clients-elasticsearch-types-mapping-versionproperty-unknown-field-index/323316/4 "2023-02-15T12:17:09Z")

</div>

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