Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions backend/onyx/seeding/load_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from onyx.db.connector_credential_pair import add_credential_to_connector
from onyx.db.credentials import PUBLIC_CREDENTIAL_ID
from onyx.db.document import check_docs_exist
from onyx.db.document import mark_document_as_indexed_for_cc_pair__no_commit
from onyx.db.enums import AccessType
from onyx.db.enums import ConnectorCredentialPairStatus
from onyx.db.index_attempt import mock_successful_index_attempt
Expand Down Expand Up @@ -264,5 +265,13 @@ def seed_initial_documents(
.values(chunk_count=doc.chunk_count)
)

# Since we bypass the indexing flow, we need to manually mark the document as indexed
mark_document_as_indexed_for_cc_pair__no_commit(
connector_id=connector_id,
credential_id=PUBLIC_CREDENTIAL_ID,
document_ids=[doc.id for doc in docs],
db_session=db_session,
)

db_session.commit()
kv_store.store(KV_DOCUMENTS_SEEDED_KEY, True)
Loading