mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-02 17:12:18 +00:00
build_llm_index_text queried Note and CustomFieldInstance (plus its field FK) per document, uncovered by the earlier correspondent/type/ storage_path/tags prefetch fix. Add notes and custom_fields__field to the rebuild and scoped document querysets, and read from doc.notes.all() instead of a fresh Note.objects.filter() so the prefetch is actually used. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>