LibreChat/packages/data-schemas/src
Danny Avila dc7889770a
fix: pass explicit primaryKey to Meilisearch addDocuments/updateDocuments calls
Meilisearch v1.0+ refuses to auto-infer the primary key when a document
contains multiple fields ending with 'id'. The messages index has both
conversationId and messageId, causing addDocuments to silently fail with
index_primary_key_multiple_candidates_found, leaving message search empty.

Pass { primaryKey } to addDocumentsInBatches, addDocuments, and
updateDocuments — the variable was already in scope.

Also replace raw this.collection.updateMany with Mongoose Model.updateMany
to satisfy the no-restricted-syntax ESLint rule (tenant isolation guard).

Closes #12538
2026-04-03 17:48:39 -04:00
..
admin ⛩️ feat: Admin Grants API Endpoints (#12438) 2026-03-30 16:49:23 -04:00
app 🧹 chore: Clean Up Config Fields (#12537) 2026-04-03 12:22:58 -04:00
common feat: Add cursor pagination utilities and refine user/group/role types in @librechat/data-schemas (#9218) 2025-08-23 00:18:31 -04:00
config 🏗️ feat: bulkWrite isolation, pre-auth context, strict-mode fixes (#12445) 2026-03-28 16:43:50 -04:00
crypto 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
methods 📦 chore: Bump mongodb-memory-server to v11.0.1, mermaid to v11.14.0, npm audit (#12543) 2026-04-03 17:01:11 -04:00
migrations 🔬 ci: Add TypeScript Type Checks to Backend Workflow and Fix All Type Errors (#12451) 2026-03-28 21:06:39 -04:00
models fix: pass explicit primaryKey to Meilisearch addDocuments/updateDocuments calls 2026-04-03 17:48:39 -04:00
schema ⛩️ feat: Admin Grants API Endpoints (#12438) 2026-03-30 16:49:23 -04:00
types 🧹 chore: Clean Up Config Fields (#12537) 2026-04-03 12:22:58 -04:00
utils 🛡️ refactor: Self-Healing Tenant Isolation Update Guard (#12506) 2026-04-01 19:07:52 -04:00
index.ts 🏗️ feat: bulkWrite isolation, pre-auth context, strict-mode fixes (#12445) 2026-03-28 16:43:50 -04:00