FULL rebuild deleted a document before re-ingesting it from its URI, and the handler around that logged and continued. A 404, a timeout or any conversion error therefore removed the document permanently. Deleting after a successful create is not an alternative: create_document_from_source resolves the same URI to the existing document and updates it in place, so a trailing delete would remove the freshly rebuilt row. Refresh in place instead. create_document_from_source takes an internal force flag that skips the revision and MD5 short-circuits, so an unchanged source is still re-converted, re-chunked and re-embedded into the existing document, and the document id survives a rebuild. A failed refresh now falls through to the stored-content path rather than skipping the document: FULL recreates the chunks table before the loop, so skipping left the document present but unsearchable until the next rebuild. The pending-batch flush moves out of the try. A failed flush is a lost write and should abort the rebuild, not be logged and skipped. |
||
|---|---|---|
| .. | ||
| test_flush_rebuild_batch_is_a_noop_without_documents.yaml | ||
| test_patch_picture_descriptions_returns_zero_for_doc_without_pictures.yaml | ||
| test_rebuild_batch_size_flush.yaml | ||
| test_rebuild_descriptions_flushes_in_batches.yaml | ||
| test_rebuild_descriptions_patches_blob_and_chunks.yaml | ||
| test_rebuild_descriptions_skips_already_described.yaml | ||
| test_rebuild_drops_leftover_staging_table.yaml | ||
| test_rebuild_embed_only.yaml | ||
| test_rebuild_embed_only_flushes_in_batches.yaml | ||
| test_rebuild_embed_only_multi_doc_streams_via_staging.yaml | ||
| test_rebuild_embed_only_recovers_picture_bytes[recoverable].yaml | ||
| test_rebuild_embed_only_recovers_picture_bytes[wiped].yaml | ||
| test_rebuild_embed_only_skips_unchanged.yaml | ||
| test_rebuild_embed_only_with_changed_vector_dim.yaml | ||
| test_rebuild_embed_only_yields_documents_without_chunks.yaml | ||
| test_rebuild_full.yaml | ||
| test_rebuild_full_flushes_in_batches.yaml | ||
| test_rebuild_full_flushes_pending_before_source_rebuild.yaml | ||
| test_rebuild_full_skips_document_deleted_mid_rebuild.yaml | ||
| test_rebuild_full_source_failure_falls_back_to_stored_content.yaml | ||
| test_rebuild_full_warns_when_source_is_missing.yaml | ||
| test_rebuild_full_with_accessible_source.yaml | ||
| test_rebuild_non_embed_mode_drops_staging_recovery_state.yaml | ||
| test_rebuild_rechunk.yaml | ||
| test_rebuild_resumes_phase2_from_staging_after_crash.yaml | ||
| test_rebuild_warns_when_post_rebuild_vacuum_fails.yaml | ||
| test_rechunk_raises_when_docling_blob_is_missing.yaml | ||