在ES里执行如下Query的时候报错:
错误如下:
查了一圈也没有看出来为什么这里会有问题,请问哪位知道这个怎么破
{
"query": {
"bool": {
"filter": [
{
"term": {
"orderSubType": {
"value": [
0,
1,
2
],
"boost": 1
}
}
}
]
}
}
}
错误如下:
{"error": {
"root_cause": [
{
"type": "query_shard_exception",
"reason": "failed to create query: { "bool" : { "filter" : [ { "term" : { "orderSubType" : { "value" : "]", "boost" : 1.0 } } } ], "disable_coord" : false, "adjust_pure_negative" : true, "boost" : 1.0 } }",
"index_uuid": "yU0cvLLuRlOeQK6YwaFB8Q",
"index": "bill-201710"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "bill-201710",
"node": "CoiI4HDiSX2UzwodVW5vyA",
"reason": {
"type": "query_shard_exception",
"reason": "failed to create query: { "bool" : { "filter" : [ { "term" : { "orderSubType" : { "value" : "]", "boost" : 1.0 } } } ], "disable_coord" : false, "adjust_pure_negative" : true, "boost" : 1.0 } }",
"index_uuid": "yU0cvLLuRlOeQK6YwaFB8Q",
"index": "bill-201710",
"caused_by": {
"type": "number_format_exception",
"reason": "For input string: "]""
}
}
}
],
"caused_by": {
"type": "query_shard_exception",
"reason": "failed to create query: { "bool" : { "filter" : [ { "term" : { "orderSubType" : { "value" : "]", "boost" : 1.0 } } } ], "disable_coord" : false, "adjust_pure_negative" : true, "boost" : 1.0 } }",
"index_uuid": "yU0cvLLuRlOeQK6YwaFB8Q",
"index": "bill-201710",
"caused_by": {
"type": "number_format_exception",
"reason": "For input string: "]""
}
}
},
"status": 400}
从Java里的报错来看,reason字段是“For input string: "[0, 1, 2]"];”查了一圈也没有看出来为什么这里会有问题,请问哪位知道这个怎么破
1 个回复
Judge
赞同来自: rojay