-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Problem Summary
When using the mongodb-rag library in a Node.js environment, the application fails to detect an existing Atlas Vector Search index, even though:
- The Vector Search index (named
vector_index) is fully present and queryable, as verified via the Atlas UI. - The index is on the correct collection and database (
broenRAG-test.TIdata), with correct vector path, dimensions, and similarity method. - The database user has full
atlasAdminpermissions (confirmed in Atlas UI). - Network access is set to open (
0.0.0.0/0). - The connection string is correct and matches what is shown in the Atlas UI.
Despite all this, the library throws:
Error: Vector search index 'vector_index' does not exist. Please create it using 'npx mongodb-rag init'.
A direct test using the Node.js MongoDB driver (6.20.0) outside of mongodb-rag can see the index and execute a $vectorSearch aggregation with no problem.
Steps to Reproduce
- Create a vector search index in Atlas UI matching the config (see screenshot).
- Ensure user permissions, network access, and connection string are all correct.
- Run the application using mongodb-rag.
- Observe the error that the index does not exist.
Evidence
- Screenshots show the index exists and is queryable in Atlas UI.
- Custom test script using the same connection string and driver version can see and use the index.
Mitigation/Workaround
- As a workaround, using the Node.js MongoDB driver directly (bypassing mongodb-rag) works fine for both listing search indexes and running vector search queries.
- However, this requires reimplementing RAG features manually and defeats the purpose of using this library.
Request
Please investigate potential dependency, driver, or internal library bugs causing this issue, especially around index detection. If there are known version incompatibilities or specific cache/lock issues, please add this to the documentation or provide guidance for robust troubleshooting.
Thank you for your work on this valuable project!
Metadata
Metadata
Assignees
Labels
No labels