From 88a45523e26f799e9e51d149301d7923f14350a5 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 21 Oct 2025 17:33:00 +0800 Subject: [PATCH] Increase default max file paths from 30 to 100 and improve documentation - Bump DEFAULT_MAX_FILE_PATHS to 100 - Add clarifying comment about display --- env.example | 5 +++-- lightrag/constants.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/env.example b/env.example index 4b86d79f..3fd824ba 100644 --- a/env.example +++ b/env.example @@ -142,8 +142,9 @@ SUMMARY_LANGUAGE=English ### FIFO: First in first out ### KEEP: Keep oldest (less merge action and faster) # SOURCE_IDS_LIMIT_METHOD=FIFO -### Maximum number of file paths stored in entity/relation file_path field -# MAX_FILE_PATHS=30 + +# Maximum number of file paths stored in entity/relation file_path field (For displayed only, does not affect query performance) +# MAX_FILE_PATHS=100 ### maximum number of related chunks per source entity or relation ### The chunk picker uses this value to determine the total number of chunks selected from KG(knowledge graph) diff --git a/lightrag/constants.py b/lightrag/constants.py index f4e06e11..0d02edbf 100644 --- a/lightrag/constants.py +++ b/lightrag/constants.py @@ -70,8 +70,8 @@ VALID_SOURCE_IDS_LIMIT_METHODS = { SOURCE_IDS_LIMIT_METHOD_KEEP, SOURCE_IDS_LIMIT_METHOD_FIFO, } -# Default file_path limit in meta data for entity and relation (Use same limit method as source_ids) -DEFAULT_MAX_FILE_PATHS = 30 +# Maximum number of file paths stored in entity/relation file_path field (For displayed only, does not affect query performance) +DEFAULT_MAX_FILE_PATHS = 100 # Field length of file_path in Milvus Schema for entity and relation (Should not be changed) # file_path must store all file paths up to the DEFAULT_MAX_FILE_PATHS limit within the metadata.