From 99320a37bf3a8ade04f7c9d17fa62b5e2d244d6a Mon Sep 17 00:00:00 2001 From: cir9no <44470218+cir9no@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:49:04 +0800 Subject: [PATCH] chore: modify wiki index size limit --- seasearch/index_store/wiki_index.py | 2 +- seasearch/index_task/index_task_manager.py | 2 +- seasearch/script/wiki_index_local.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/seasearch/index_store/wiki_index.py b/seasearch/index_store/wiki_index.py index ead221e5..7e75efa2 100644 --- a/seasearch/index_store/wiki_index.py +++ b/seasearch/index_store/wiki_index.py @@ -175,7 +175,7 @@ def process_file(doc_uuid, content): if not is_in_wiki_dirs(path): continue - if self.size_cap is not None and int(size) <= int(self.size_cap): + if self.size_cap is not None and int(size) >= int(self.size_cap): continue doc_uuid = path.split('/')[2] if content := self.get_wiki_content(wiki_id, obj_id): diff --git a/seasearch/index_task/index_task_manager.py b/seasearch/index_task/index_task_manager.py index 2340d2f9..f96f5676 100644 --- a/seasearch/index_task/index_task_manager.py +++ b/seasearch/index_task/index_task_manager.py @@ -47,7 +47,7 @@ def _parse_config(self, config): config, section_name, 'seasearch_token' ) wiki_size_limit = get_opt_from_conf_or_env( - config, section_name, 'wiki_file_size_limit', default=int(10) + config, section_name, 'wiki_file_size_limit', default=int(5) ) self.seasearch_api = SeaSearchAPI( seasearch_url, diff --git a/seasearch/script/wiki_index_local.py b/seasearch/script/wiki_index_local.py index d7c50e20..3b3ea708 100755 --- a/seasearch/script/wiki_index_local.py +++ b/seasearch/script/wiki_index_local.py @@ -147,7 +147,7 @@ def start_index_local(): config, section_name, 'seasearch_token' ) wiki_size_limit = get_opt_from_conf_or_env( - config, section_name, 'wiki_file_size_limit', default=int(10) + config, section_name, 'wiki_file_size_limit', default=int(5) ) index_manager = IndexManager(config) seasearch_api = SeaSearchAPI(seasearch_url, seasearch_token)