搭建集群后,查询时出现index_out_of_bounds_exception错误?(有很神奇的事情,具体情况内详)
Elasticsearch | 作者 mulianghai | 发布于2016年09月20日 | 阅读数:9240
查询失败的具体提示如下:"reason": {
"type": "index_out_of_bounds_exception",
"reason": "index_out_of_bounds_exception: docID must be >= 0 and < maxDoc=2 (got docID=2147188464)"
}
"hits": {"total": 73,
"max_score": 58.560722,
"hits": [ ] (问题在这里,反悔结果为空,明明有73个被hit的项目,结果一个都不给我返回……,之前单机上的时候好像没出现过这个问题呀……)
神奇的事情是这样的,在query中,可以设置两个参数:
"from": 0,
"size": 1000,
当size设置比较小,比如1的时候,同一个搜索关键词,就能够命中,且在hits中显示出来,
{"took": 6,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 73,
"max_score": 58.560722,
"hits": [
{
"_index": "booksearch",
"_type": "books",
"_id": "5235b24c9625b8f94b002cf0",
"_score": 58.560722,
"_source": {
"title": "无限美女帝国",
"author": "无限流系统",
"searchfield": [
"无限美女帝国"
,
"无限流系统"
],
"banned": 0,
"reviewCount": 1,
"latelyFollower": 405,
"gender": 1,
"weight": 10
}
}
]
}}
……
当size比较大的时候,就会出现前面的问题,结果在hits中为空,明明hits统计显示有73个结果,且最高打分是58.81188,但不能返回具体的结果……请问这种情况怎么解决呀?
"type": "index_out_of_bounds_exception",
"reason": "index_out_of_bounds_exception: docID must be >= 0 and < maxDoc=2 (got docID=2147188464)"
}
"hits": {"total": 73,
"max_score": 58.560722,
"hits": [ ] (问题在这里,反悔结果为空,明明有73个被hit的项目,结果一个都不给我返回……,之前单机上的时候好像没出现过这个问题呀……)
神奇的事情是这样的,在query中,可以设置两个参数:
"from": 0,
"size": 1000,
当size设置比较小,比如1的时候,同一个搜索关键词,就能够命中,且在hits中显示出来,
{"took": 6,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 73,
"max_score": 58.560722,
"hits": [
{
"_index": "booksearch",
"_type": "books",
"_id": "5235b24c9625b8f94b002cf0",
"_score": 58.560722,
"_source": {
"title": "无限美女帝国",
"author": "无限流系统",
"searchfield": [
"无限美女帝国"
,
"无限流系统"
],
"banned": 0,
"reviewCount": 1,
"latelyFollower": 405,
"gender": 1,
"weight": 10
}
}
]
}}
……
当size比较大的时候,就会出现前面的问题,结果在hits中为空,明明hits统计显示有73个结果,且最高打分是58.81188,但不能返回具体的结果……请问这种情况怎么解决呀?
1 个回复
weizijun - elasticsearch fan
赞同来自: mulianghai