mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-03-31 05:12:45 +00:00
Add --if-needed flag to `document_index reindex`: checks _needs_rebuild() (schema version + language sentinels) and skips if index is up to date. Safe to run on every upgrade or startup. Simplify Docker init-search-index script to unconditionally call `reindex --if-needed` — schema/language change detection is now fully delegated to Python. Removes the bash index_version and language file tracking entirely; Tantivy's own sentinels are the source of truth. Update docs: bare metal upgrade step uses --if-needed; Docker note updated to describe the new always-runs-but-skips-if-current behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>