# Error when using VersionType.EXTERNAL\_GTE in 1.1.0

**URL:** <https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721>\
**Category:** Elasticsearch\
**Created:** [March 31, 2014, 7:02pm UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721 "2014-03-31T19:02:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [March 31, 2014, 7:02pm UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/1 "2014-03-31T19:02:58Z")

</div>

Hello team - I just switched over to 1.1.0 and changed from  
VersionType.EXTERNAL to VersionType.EXTERNAL\_GTE. Ever since then, we are  
seeing the error below.

Any comments?

I looked at ES code and see this newly added line for EXTERNAL\_GTE. Does it  
mean we dont support zero as a valid version number? Our systems use zero  
as the start version number.

```
   @Override
    public boolean validateVersion(long version) {
        return version > 0L;
    }

```

org.elasticsearch.action.ActionRequestValidationException: Validation  
Failed: 1: illegal version value [0] for version type [EXTERNAL\_GTE];  
at  
org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)  
at  
org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:181)  
at  
org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:63)  
at  
org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:109)  
at  
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:228)  
at  
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)  
at  
org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)  
at  
org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:330)  
at  
org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)  
at  
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)  
at  
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)

-Amit.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQLCjgK02bvDvhg0U%3DO-G2u2-BFR095y4%2Bb%3DXVho48K\_DQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQLCjgK02bvDvhg0U%3DO-G2u2-BFR095y4%2Bb%3DXVho48K_DQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [March 31, 2014, 7:11pm UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/2 "2014-03-31T19:11:58Z")

</div>

Also to add: it seems that even VersionType.EXTERNAL is broken in the new  
version (1.1.0) since it now does the validation of input version number  
and it does not allow a save if the input version number is zero.

Looking for inputs from ES team on how to proceed on this.

-Amit.

On Mon, Mar 31, 2014 at 12:02 PM, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) wrote:

> Hello team - I just switched over to 1.1.0 and changed from  
> VersionType.EXTERNAL to VersionType.EXTERNAL\_GTE. Ever since then, we are  
> seeing the error below.
> 
> Any comments?
> 
> I looked at ES code and see this newly added line for EXTERNAL\_GTE. Does  
> it mean we dont support zero as a valid version number? Our systems use  
> zero as the start version number.
> 
> ```
> @Override
> public boolean validateVersion(long version) {
> return version > 0L;
> }
> 
> ```
> 
> org.elasticsearch.action.ActionRequestValidationException: Validation  
> Failed: 1: illegal version value [0] for version type [EXTERNAL\_GTE];  
> at  
> org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)  
> at  
> org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:181)  
> at  
> org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:63)  
> at  
> org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:109)  
> at  
> org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:228)  
> at  
> org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)  
> at  
> org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)  
> at  
> org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:330)  
> at  
> org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)  
> at  
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)  
> at  
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
> 
> -Amit.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQJvCiF%2BWogUpgZwmEwHNsM4kR8PYTaUHBWqn59-xCmuPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQJvCiF%2BWogUpgZwmEwHNsM4kR8PYTaUHBWqn59-xCmuPA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [April 3, 2014, 8:59pm UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/3 "2014-04-03T20:59:44Z")

</div>

Hello team - Can you pl comment on this please?

-Amit.

On Mon, Mar 31, 2014 at 12:11 PM, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) wrote:

> Also to add: it seems that even VersionType.EXTERNAL is broken in the new  
> version (1.1.0) since it now does the validation of input version number  
> and it does not allow a save if the input version number is zero.
> 
> Looking for inputs from ES team on how to proceed on this.
> 
> -Amit.
> 
> On Mon, Mar 31, 2014 at 12:02 PM, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) wrote:
> 
> > Hello team - I just switched over to 1.1.0 and changed from  
> > VersionType.EXTERNAL to VersionType.EXTERNAL\_GTE. Ever since then, we are  
> > seeing the error below.
> > 
> > Any comments?
> > 
> > I looked at ES code and see this newly added line for EXTERNAL\_GTE. Does  
> > it mean we dont support zero as a valid version number? Our systems use  
> > zero as the start version number.
> > 
> > ```
> > @Override
> > public boolean validateVersion(long version) {
> > return version > 0L;
> > }
> > 
> > ```
> > 
> > org.elasticsearch.action.ActionRequestValidationException: Validation  
> > Failed: 1: illegal version value [0] for version type [EXTERNAL\_GTE];  
> > at  
> > org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)  
> > at  
> > org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:181)  
> > at  
> > org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:63)  
> > at  
> > org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:109)  
> > at  
> > org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:228)  
> > at  
> > org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)  
> > at  
> > org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)  
> > at  
> > org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:330)  
> > at  
> > org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)  
> > at  
> > org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)  
> > at  
> > org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
> > 
> > -Amit.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQL4EsD37TPGmW89QTcM0YpvEK4zwT%2BJ9u35Fe8%2BvSwoOw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQL4EsD37TPGmW89QTcM0YpvEK4zwT%2BJ9u35Fe8%2BvSwoOw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [April 3, 2014, 9:09pm UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/4 "2014-04-03T21:09:24Z")

</div>

Thank you for reporting this, the plan is to revert back and allow 0 for  
external versioning. Not sure yet when it will be but likely in the next 1  
or 2 releases.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/27cac5e1-acec-4fa4-a937-4a16e8711533%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/27cac5e1-acec-4fa4-a937-4a16e8711533%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [April 4, 2014, 3:45am UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/5 "2014-04-04T03:45:48Z")

</div>

Thanks for confirming Binh. We look forward to the change and we can  
upgrade only after this change is done else it would break our system.

Do you want me to create a bug for this?

-Amit.

On Thu, Apr 3, 2014 at 2:09 PM, Binh Ly [binhly\_es@yahoo.com](mailto:binhly_es@yahoo.com) wrote:

> Thank you for reporting this, the plan is to revert back and allow 0 for  
> external versioning. Not sure yet when it will be but likely in the next 1  
> or 2 releases.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/27cac5e1-acec-4fa4-a937-4a16e8711533%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/27cac5e1-acec-4fa4-a937-4a16e8711533%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/27cac5e1-acec-4fa4-a937-4a16e8711533%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/27cac5e1-acec-4fa4-a937-4a16e8711533%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQLLeRuK0oPX\_f203RC2%2BcXsiv6iz8BVUR5VCG7Jzx\_omA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQLLeRuK0oPX_f203RC2%2BcXsiv6iz8BVUR5VCG7Jzx_omA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [April 4, 2014, 4:16am UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/6 "2014-04-04T04:16:49Z")

</div>

Amit,

One solid work-around is to always create the index before you bulk-load  
it. Either with explicit mappings or letting ES guess them by default  
should work fine. It should get you by until the bug is fixed in a future  
release, and should be rather easy to implement.

In my case, I lock down ES to prevent auto-index creation and auto-create  
of unmapped fields, so I must always create the index and its mappings  
before loading data into the index. This means that I haven't run into this  
bug. And it's not a bad workaround; in fact, it is a very good practice.  
Sometimes ES guesses wrong. It can't read my mind, so I don't expect it to.

Hope this helps.

Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0eba0b15-d012-4858-b6c5-3f10591c6869%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0eba0b15-d012-4858-b6c5-3f10591c6869%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [April 4, 2014, 5:07am UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/7 "2014-04-04T05:07:03Z")

</div>

Hi Brian - Thanks for the response, appreciate it. I am not sure if I  
understand this solution completely. We already create the index in advance  
(we use strict mapping and we have also disabled dynamic creation of new  
types) and then only we start indexing. We however supply the version  
number from our DB and that is where version number of zero comes in from.

Can you pl clarify!

-Amit.

On Thu, Apr 3, 2014 at 9:16 PM, InquiringMind [brian.from.fl@gmail.com](mailto:brian.from.fl@gmail.com)wrote:

> Amit,
> 
> One solid work-around is to always create the index before you bulk-load  
> it. Either with explicit mappings or letting ES guess them by default  
> should work fine. It should get you by until the bug is fixed in a future  
> release, and should be rather easy to implement.
> 
> In my case, I lock down ES to prevent auto-index creation and auto-create  
> of unmapped fields, so I must always create the index and its mappings  
> before loading data into the index. This means that I haven't run into this  
> bug. And it's not a bad workaround; in fact, it is a very good practice.  
> Sometimes ES guesses wrong. It can't read my mind, so I don't expect it to.
> 
> Hope this helps.
> 
> Brian
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/0eba0b15-d012-4858-b6c5-3f10591c6869%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0eba0b15-d012-4858-b6c5-3f10591c6869%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/0eba0b15-d012-4858-b6c5-3f10591c6869%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0eba0b15-d012-4858-b6c5-3f10591c6869%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQL5FxVPR2uKBqnyjMr0dabYgNzivP8VdhErmXOHw\_%2BUZQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQL5FxVPR2uKBqnyjMr0dabYgNzivP8VdhErmXOHw_%2BUZQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:38am UTC](https://discuss.elastic.co/t/error-when-using-versiontype-external-gte-in-1-1-0/16721/8 "2017-07-06T01:38:17Z")

</div>


