From 7c90b8771516a8f3bfc9e8b774fd6e9641aa3347 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 17 Feb 2025 12:48:56 +0800 Subject: [PATCH] Fix window size of ES issue. (#5026) ### What problem does this PR solve? #5015 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- graphrag/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphrag/utils.py b/graphrag/utils.py index 1fcf9c477..06e73bcb0 100644 --- a/graphrag/utils.py +++ b/graphrag/utils.py @@ -524,7 +524,7 @@ def rebuild_graph(tenant_id, kb_id): src_ids = [] flds = ["entity_kwd", "entity_type_kwd", "from_entity_kwd", "to_entity_kwd", "weight_int", "knowledge_graph_kwd", "source_id"] bs = 256 - for i in range(0, 10000000, bs): + for i in range(0, 10000, bs): es_res = settings.docStoreConn.search(flds, [], {"kb_id": kb_id, "knowledge_graph_kwd": ["entity", "relation"]}, [],