Repository navigation
Fix: add soft limit for graph rag size - #13252
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13252 +/- ##
==========================================
- Coverage 49.89% 47.18% -2.72%
==========================================
Files 44 44
Lines 9738 9740 +2
Branches 110 110
==========================================
- Hits 4859 4596 -263
- Misses 4871 5131 +260
- Partials 8 13 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
LGTM. Please fix CI errors. |
|
If you need to read in English, please use Google Translate in the top right corner 有一点点相关问题: 但search 引发的其中一个问题是 offset+limit 超过ES 10000的限制(这个限制和max_count互斥了),在search中单次查询的page和size是分页数,offset = (page - 1)* size 没有做上限检查,如果 page=138, size=100,则 offset=13700, limit=100,总计 13800 超限 引发的报错是: """BadRequestError('search_phase_execution_exception', meta=ApiResponseMeta(status=400, http_version='1.1', headers={'X-elastic-product': 'Elasticsearch', 'content-type': 'application/vnd.elasticsearch+json;compatible-with=8', 'content-length': '1495'}, duration=0.006059885025024414, node=NodeConfig(scheme='http', host='localhost', port=9200, path_prefix='', headers={'user-agent': 'elasticsearch-py/8.19.3 (Python/3.12.12; elastic-transport/8.17.1)'}, connections_per_node=10, request_timeout=10.0, http_compress=False, verify_certs=False, ca_certs=None, client_cert=None, client_key=None, ssl_assert_hostname=None, ssl_assert_fingerprint=None, ssl_version=None, ssl_context=None, ssl_show_warn=True, _extras={})), body={'error': {'root_cause': [{'type': 'illegal_argument_exception', 'reason': 'Result window is too large, from + size must be less than or equal to: [10000] but was [13800]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'ragflow_c603c33a072a11f1af5651d505616f77', 'node': '2yezF4UYTfyVEF3qQ3OaCA', 'reason': {'type': 'illegal_argument_exception', 'reason': 'Result window is too large, from + size must be less than or equal to: [10000] but was [13800]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.'}}], 'caused_by': {'type': 'illegal_argument_exception', 'reason': 'Result window is too large, from + size must be less than or equal to: [10000] but was [13800]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.', 'caused_by': {'type': 'illegal_argument_exception', 'reason': 'Result window is too large, from + size must be less than or equal to: [10000] but was [13800]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.'}}}, 'status': 400}) 完整的解决方案请考虑: |
### What problem does this PR solve? Fix: add soft limit for graph rag size infiniflow#13258 Q2 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Yingfeng <[email protected]>
### What problem does this PR solve? Fix: add soft limit for graph rag size infiniflow#13258 Q2 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Yingfeng <[email protected]>
### What problem does this PR solve? Fix: add soft limit for graph rag size infiniflow#13258 Q2 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Yingfeng <[email protected]>
### What problem does this PR solve? Fix: add soft limit for graph rag size infiniflow#13258 Q2 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Yingfeng <[email protected]>
What problem does this PR solve?
Fix: add soft limit for graph rag size #13258 Q2
Type of change