From fc16d4c13e0464d3987563358a6e189b22db8478 Mon Sep 17 00:00:00 2001 From: kazuya-awano Date: Thu, 4 Dec 2025 14:28:25 +0900 Subject: [PATCH] docs: mention MongoDB file_id index recommendation --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d76aab84..b78ba518 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,16 @@ The `ATLAS_MONGO_DB_URI` could be the same or different from what is used by Lib Follow one of the [four documented methods](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#procedure) to create the vector index. +#### Create a `file_id` Index (recommended) + +We recommend creating a standard MongoDB index on `file_id` to keep lookups fast. After creating the collection, run the following once (via Atlas UI, Compass, or `mongosh`): + +```javascript +db.getCollection("").createIndex({ file_id: 1 }) +``` + +Replace `` with the same collection used by the RAG API. This ensures lookups remain fast even as the number of embedded documents grows. + ### Proxy Configuration