mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
fix metadata keys casing and set content_needs_reindexing in adapter
This commit is contained in:
parent
0de74f4bf7
commit
d0fdd3224a
1 changed files with 5 additions and 3 deletions
|
|
@ -26,9 +26,8 @@ async def index_uploaded_file(
|
||||||
should_use_code_chunker=False,
|
should_use_code_chunker=False,
|
||||||
fallback_summary=markdown_content[:4000],
|
fallback_summary=markdown_content[:4000],
|
||||||
metadata={
|
metadata={
|
||||||
"file_name": filename,
|
"FILE_NAME": filename,
|
||||||
"etl_service": etl_service,
|
"ETL_SERVICE": etl_service,
|
||||||
"document_type": "File Document",
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -42,3 +41,6 @@ async def index_uploaded_file(
|
||||||
|
|
||||||
if not DocumentStatus.is_state(indexed.status, DocumentStatus.READY):
|
if not DocumentStatus.is_state(indexed.status, DocumentStatus.READY):
|
||||||
raise RuntimeError(indexed.status.get("message", "Indexing failed"))
|
raise RuntimeError(indexed.status.get("message", "Indexing failed"))
|
||||||
|
|
||||||
|
indexed.content_needs_reindexing = False
|
||||||
|
await session.commit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue