From 5e7ef39998c4cc6a7ca0b8bd3fd8300c12a2edee Mon Sep 17 00:00:00 2001 From: zrguo <49157727+LarFii@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:12:01 +0800 Subject: [PATCH] Update operate.py --- lightrag/operate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightrag/operate.py b/lightrag/operate.py index 7db42284..30983145 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -1242,9 +1242,11 @@ async def _find_most_related_text_unit_from_entities( all_text_units_lookup = {} tasks = [] + for index, (this_text_units, this_edges) in enumerate(zip(text_units, edges)): for c_id in this_text_units: if c_id not in all_text_units_lookup: + all_text_units_lookup[c_id] = index tasks.append((c_id, index, this_edges)) results = await asyncio.gather(