# Not able to query a Hive ES table

**URL:** https://discuss.elastic.co/t/not-able-to-query-a-hive-es-table/59937
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [September 7, 2016, 3:02am UTC](https://discuss.elastic.co/t/not-able-to-query-a-hive-es-table/59937 "2016-09-07T03:02:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vjk1688](https://avatars.discourse-cdn.com/v4/letter/v/b77776/32.png) [@vjk1688](https://discuss.elastic.co/u/vjk1688)
#### Post date: [September 7, 2016, 3:02am UTC](https://discuss.elastic.co/t/not-able-to-query-a-hive-es-table/59937/1 "2016-09-07T03:02:48Z")

</div>

Hi,

I am using Hadoop 2.6 , ElasticSearch 2.3.0 and Hadoop-ES 2.4.1

I have loaded data to a Hive-ES external table. The data got indexed in ElasticSearch and I am able to search.

But whenever I try to query the Hive-ES table I get the following error

Failed with exception java.io.IOException:java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Can somebody provide a pointer please ?

---

<div class="post-metadata">

### Author: ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)
#### Post date: [September 7, 2016, 10:09pm UTC](https://discuss.elastic.co/t/not-able-to-query-a-hive-es-table/59937/2 "2016-09-07T22:09:32Z")

</div>

> [@vjk1688](#):
>
> But whenever I try to query the Hive-ES table I get the following error
> 
> Failed with exception java.io.IOException:java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Could you provide a full stack trace? The IOException on it's own is not enough to help troubleshoot the problem. Thanks.

> [@vjk1688](#):
>
> Can somebody provide a pointer please ?

[0x3A28213A](https://xkcd.com/138/), Couldn't resist 😁

---

<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:23pm UTC](https://discuss.elastic.co/t/not-able-to-query-a-hive-es-table/59937/3 "2017-07-06T13:23:20Z")

</div>


