From 8aab15894284a715818123a57e56fb66eb81b7c0 Mon Sep 17 00:00:00 2001 From: Wang Qi Date: Tue, 21 Apr 2026 10:05:47 +0800 Subject: [PATCH] OpenSource Resume is supported only with Elasticsearch. (#14233) ### What problem does this PR solve? OpenSource Resume is supported only with Elasticsearch. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/app/resume.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rag/app/resume.py b/rag/app/resume.py index 80fc322bd0..b1225e6a9e 100644 --- a/rag/app/resume.py +++ b/rag/app/resume.py @@ -39,6 +39,8 @@ from io import BytesIO from typing import Optional import numpy as np +from common import settings + # tiktoken for long random string filtering (ref: SmartResume should_remove strategy) try: import tiktoken @@ -2485,6 +2487,9 @@ def chunk(filename, binary, tenant_id, from_page=0, to_page=100000, if callback is None: def callback(prog, msg): return None + if settings.DOC_ENGINE.lower() != "elasticsearch": + raise Exception("Resume is supported only with Elasticsearch.") + try: callback(0.1, "Starting resume parsing...")