# I can query in kibana, but got error query with an elasticsearch client

**URL:** <https://discuss.elastic.co/t/i-can-query-in-kibana-but-got-error-query-with-an-elasticsearch-client/154119>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 7:09am UTC](https://discuss.elastic.co/t/i-can-query-in-kibana-but-got-error-query-with-an-elasticsearch-client/154119 "2018-10-26T07:09:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ge\_gary](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@ge\_gary](https://discuss.elastic.co/u/ge_gary)\
**Post date:** [October 26, 2018, 7:09am UTC](https://discuss.elastic.co/t/i-can-query-in-kibana-but-got-error-query-with-an-elasticsearch-client/154119/1 "2018-10-26T07:09:35Z")

</div>

query in kibana was success

 ![Jietu20181026-150557](https://us1.discourse-cdn.com/elastic/original/3X/e/9/e9dc7129e8d3ae6df63729bc949ac18d6a933adb.jpeg)  
error with [An Elasticsearch client for the Go programming language.](https://olivere.github.io/elastic/)  
` {  
"type":"search\_phase\_execution\_exception",  
"reason":"",  
"phase":"fetch",  
"grouped":true,  
"caused\_by":{  
"reason":"java.lang.Long cannot be cast to org.apache.lucene.util.BytesRef",  
"type":"class\_cast\_exception"  
},  
"root\_cause":[  
{  
"type":"query\_shard\_exception",  
"reason":"No mapping found for [offset] in order to sort on",  
"index":"log\_ad\_metrics.2018-10-26"  
},  
{  
"type":"query\_shard\_exception",  
"reason":"No mapping found for [offset] in order to sort on",  
"index":"log\_dida\_sms\_realtime.2018-10-26"  
},  
{  
"type":"query\_shard\_exception",  
"reason":"No mapping found for [offset] in order to sort on",  
"index":"log\_official\_bandwidth\_metrics.2018-10-26"  
},  
{  
"type":"illegal\_argument\_exception",  
"reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [@timestamp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."  
},  
{  
"type":"query\_shard\_exception",  
"reason":"No mapping found for [offset] in order to sort on",  
"index":"log\_sms\_metrics.2018-10-26"  
},  
{  
"type":"query\_shard\_exception",  
"reason":"No mapping found for [offset] in order to sort on",  
"index":"log\_web\_driver\_active\_metrics.2018-10-26"  
}  
],  
"failed\_shards":[  
{  
"index":"log\_ad\_metrics.2018-10-26",  
"node":"JhHWI4GiRr-cc\_Ju16wM5g",  
"reason":{  
"index":"log\_ad\_metrics.2018-10-26",  
"index\_uuid":"cJvmcr4sSpCEN9cHJrPBmQ",  
"reason":"No mapping found for [offset] in order to sort on",  
"type":"query\_shard\_exception"  
},  
"shard":0  
},  
{  
"index":"log\_dida\_sms\_realtime.2018-10-26",  
"node":"tc9eIKbwSFyzIvHZk-oyXQ",  
"reason":{  
"index":"log\_dida\_sms\_realtime.2018-10-26",  
"index\_uuid":"jg0aV6LoQuWPt7yK5MTNjg",  
"reason":"No mapping found for [offset] in order to sort on",  
"type":"query\_shard\_exception"  
},  
"shard":0  
},  
{  
"index":"log\_official\_bandwidth\_metrics.2018-10-26",  
"node":"Wde5Dvk0TKm2uZ-zZvHt3A",  
"reason":{  
"index":"log\_official\_bandwidth\_metrics.2018-10-26",  
"index\_uuid":"J\_j3t05\_Rl-d34GIl3vw1w",  
"reason":"No mapping found for [offset] in order to sort on",  
"type":"query\_shard\_exception"  
},  
"shard":0  
},  
{  
"index":"log\_official\_bandwidth\_metrics.null",  
"node":"tc9eIKbwSFyzIvHZk-oyXQ",  
"reason":{  
"reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [@timestamp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.",  
"type":"illegal\_argument\_exception"  
},  
"shard":0  
},  
{  
"index":"log\_sms\_metrics.2018-10-26",  
"node":"tc9eIKbwSFyzIvHZk-oyXQ",  
"reason":{  
"index":"log\_sms\_metrics.2018-10-26",  
"index\_uuid":"WfIfESFfTfyI1mFU24uEyw",  
"reason":"No mapping found for [offset] in order to sort on",  
"type":"query\_shard\_exception"  
},  
"shard":0  
},  
{  
"index":"log\_web\_driver\_active\_metrics.2018-10-26",  
"node":"okx\_sKc7Sv2W5fsH84Eajw",  
"reason":{  
"index":"log\_web\_driver\_active\_metrics.2018-10-26",  
"index\_uuid":"oPiDDlSpTySiIW2zFMsh\_A",  
"reason":"No mapping found for [offset] in order to sort on",  
"type":"query\_shard\_exception"  
},  
"shard":0  
}  
]  
}

`

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [October 26, 2018, 1:14pm UTC](https://discuss.elastic.co/t/i-can-query-in-kibana-but-got-error-query-with-an-elasticsearch-client/154119/2 "2018-10-26T13:14:37Z")

</div>

Just after a quick look I see that in Kibana you are querying the following indexes: `filebeat.2018-*`

The errors from Go client refer to indexes starting by 'log' for example: `log_ad_metrics.2018-10-26`.

I would presume that you are not hitting the same indexes.

---

<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:** [November 23, 2018, 1:14pm UTC](https://discuss.elastic.co/t/i-can-query-in-kibana-but-got-error-query-with-an-elasticsearch-client/154119/3 "2018-11-23T13:14:37Z")

</div>

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