mongodb-developer / mongodb-developer/GenAI-Showcase
Error using nodejs to create vector search index on mongodb 7
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.3k
- Forks
- 746
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 2
Description
I'm porting a RAG pipeline from GenAI-Showcase that was using Atlas to a mongdb local instance to the LLM.
Following https://www.mongodb.com/docs/compass/current/indexes/create-vector-search-index/, I installed node >16.4 and npm mongodb module but it appears that the installed mongodb module is missing a createSearchIndexes context.
root@ad93b157e668:/GenAI-Showcase/mongodb-vector-search# node atlas-vector-search-quick-start.js
MongoServerError: no such command: 'createSearchIndexes'
at Connection.sendCommand (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/cmap/connection.js:297:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Connection.command (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/cmap/connection.js:325:26)
at async Server.command (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/sdam/server.js:166:24)
at async CreateSearchIndexesOperation.execute (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/operations/search_indexes/create.js:21:21)
at async executeOperation (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/operations/execute_operation.js:112:20)
at async Collection.createSearchIndexes (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/collection.js:609:16)
at async Collection.createSearchIndex (/GenAI-Showcase/mongodb-vector-search/node_modules/mongodb/lib/collection.js:596:25)
at async run (/GenAI-Showcase/mongodb-vector-search/atlas-vector-search-quick-start.js:30:21) {
errorResponse: {
ok: 0,
errmsg: "no such command: 'createSearchIndexes'",
code: 59,
codeName: 'CommandNotFound'
},
ok: 0,
code: 59,
codeName: 'CommandNotFound',
[Symbol(errorLabels)]: Set(0) {}
}
Does mongodb 7.0 support vector search index definition ? Is Atlas your only offering that supports vector search ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with atlas-vector-search-quick-start.js at line 30 and inspect the Node.js driver's createSearchIndex call that produces the createSearchIndexes error. Compare the example's assumptions with the reported MongoDB 7.0 local instance and determine whether the command is supported; document the confirmed compatibility or required project changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, node.js
- Domain
- ai, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100