Files
paperless-ngx/src/documents
Trenton Handshamoon 351892bbab Fix: skip vector store document id filter for unrestricted chat users (#13937)
* Fix: skip vector store document id filter for unrestricted chat users

ChatStreamingView built an IN filter from every permitted document id
for the "chat over all documents" case, which exceeds the vector
store's SQLite bound-parameter safety limit on installs with more
than ~32700 documents, silently returning no context. For a user who
can see every document (an active superuser), that filter never
narrows anything, so skip it and let the retriever search the whole
index instead.

* Minor improvements from a Claude review

* When a user is unrestricted chatting, still exclude trashed documents using a 'NOT IN' SQL statement.  Wire that up where we need it

* Update src/paperless_ai/chat.py

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-09-02 18:08:54 +00:00
..
2026-09-01 07:56:38 -07:00
2026-05-26 16:46:23 +00:00
2026-08-24 14:43:05 -07:00
2026-09-01 07:56:38 -07:00
2026-09-01 07:56:38 -07:00
2026-05-20 08:54:00 -07:00