From f6866828eda24358e8f0626607cfbc7c17330e4a Mon Sep 17 00:00:00 2001 From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Tue, 18 Aug 2026 13:25:45 -0700 Subject: [PATCH] refactor(search): reuse extract_cjk_text in _build_cjk_query _build_cjk_query re-derived the same CJK-run extraction extract_cjk_text already implements, despite a docstring claiming they mirror each other. Call it directly so the mirroring is structural, not a copy to keep in sync. --- src/documents/search/_query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/search/_query.py b/src/documents/search/_query.py index 521159596..63f59c2a9 100644 --- a/src/documents/search/_query.py +++ b/src/documents/search/_query.py @@ -198,7 +198,7 @@ def _build_cjk_query( matches against unrelated Latin text). Returns None when there is no CJK text or the parse fails. """ - cjk_text = " ".join(_CJK_RE.findall(raw_query)) + cjk_text = extract_cjk_text(raw_query) if not cjk_text: return None try: