Skip to content

Commit 13642ba

Browse files
UN-2175 Avoid extracting when doc is already extracted during indexing (#1605)
Co-authored-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com>
1 parent 7d1a01b commit 13642ba

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ def index_document(
427427
run_id=run_id,
428428
enable_highlight=tool.enable_highlight,
429429
doc_id=doc_id,
430-
reindex=True,
431430
)
432431
if tool.summarize_context:
433432
summarize_file_path = PromptStudioHelper.summarize(
@@ -1332,7 +1331,6 @@ def dynamic_extractor(
13321331
profile_manager: ProfileManager,
13331332
document_id: str,
13341333
doc_id: str,
1335-
reindex: bool | None = False,
13361334
) -> str:
13371335
x2text = str(profile_manager.x2text.id)
13381336
is_extracted: bool = False
@@ -1350,7 +1348,7 @@ def dynamic_extractor(
13501348
profile_manager=profile_manager,
13511349
doc_id=doc_id,
13521350
)
1353-
if is_extracted and not reindex:
1351+
if is_extracted:
13541352
fs_instance = EnvHelper.get_storage(
13551353
storage_type=StorageType.PERMANENT,
13561354
env_name=FileStorageKeys.PERMANENT_REMOTE_STORAGE,

0 commit comments

Comments
 (0)