Skip to content

Commit 8aab158

Browse files
authored
OpenSource Resume is supported only with Elasticsearch. (infiniflow#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)
1 parent f269ee9 commit 8aab158

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

rag/app/resume.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
from typing import Optional
4040
import numpy as np
4141

42+
from common import settings
43+
4244
# tiktoken for long random string filtering (ref: SmartResume should_remove strategy)
4345
try:
4446
import tiktoken
@@ -2485,6 +2487,9 @@ def chunk(filename, binary, tenant_id, from_page=0, to_page=100000,
24852487
if callback is None:
24862488
def callback(prog, msg): return None
24872489

2490+
if settings.DOC_ENGINE.lower() != "elasticsearch":
2491+
raise Exception("Resume is supported only with Elasticsearch.")
2492+
24882493
try:
24892494
callback(0.1, "Starting resume parsing...")
24902495

0 commit comments

Comments
 (0)