Correctly lookup docs for the orb dataset

This commit is contained in:
Yiorgis Gozadinos 2026-01-20 09:50:40 +02:00
parent e6b239bd6c
commit de022639b6
No known key found for this signature in database

View file

@ -92,7 +92,13 @@ async def populate_db(
progress.advance(task)
continue
existing = await rag.get_document_by_uri(payload.uri)
# Use the actual URI that will be stored in the database
if payload.source_path is not None:
lookup_uri = payload.source_path.absolute().as_uri()
else:
lookup_uri = payload.uri
existing = await rag.get_document_by_uri(lookup_uri)
if existing is not None:
assert existing.id
chunks = await rag.chunk_repository.get_by_document_id(existing.id)