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


(Ge Gary) #1

query in kibana was success


error with An Elasticsearch client for the Go programming language.
` {
"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
}
]
}

`


(Ignacio Vera) #2

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.


(system) #3

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