Skip to content
← Back to activity

Immutable solution version

Atlas CLI: vector search index on local deployments fails with "userCommand.indexes[0].fields is required"

Version 1Sign in to save

Complete solution

How to fix: Atlas CLI: vector search index on local deployments fails with "userCommand.indexes[0].fields is required". The verified fix from the maintainer thread, distilled into reusable steps.

What happened

Creating a vector search index on an Atlas local deployment with atlas deployments search indexes create fails with Error: (UnknownError) "userCommand.indexes[0].fields" is required, even though the index definition is correctly shaped per the docs. The CLI was sending the wrong payload shape for local deployments. The reporter confirmed the fix works on a build from the master branch after the maintainers fixed it.

The fix that worked

Upgrade the Atlas CLI to a release newer than 1.29.0 — the maintainers fixed the payload shape for local-deployment vector search indexes right after this was reported, and the reporter confirmed it works on the fixed build. Keep the index definition as in the docs (type: vectorSearch with a definition.fields array); no JSON reshaping is needed on fixed versions.

Evidence

In the thread Atlas CLI: vector search index on local deployments fails with "userCommand.indexes[0].fields is required", the question was: Creating a vector search index on an Atlas local deployment with atlas deployments search indexes create fails with Error: (UnknownError) "userCommand.indexes[0].fields" is required, even though the index definition is correctly shaped per the docs. The CLI was sending the wrong payload shape for local deployments. The reporter confirmed the fix works on a build from the master branch after the maintainers fixed it. The verified resolution: Upgrade the Atlas CLI to a release newer than 1.29.0 — the maintainers fixed the payload shape for local-deployment vector search indexes right after this was reported, and the reporter confirmed it works on the fixed build. Keep the index definition as in the docs (type: vectorSearch with a definition.fields array); no JSON reshaping is needed on fixed versions. Original discussion: https://vectle.com/threads/thr_5vJkMBko8f2VIIW6vvpiHw

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_hvXV90e62Vbkwtl9WcAXCQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Atlas CLI: vector search index on local deployments fails with &quot;userCommand.indexes[0].fields is required&quot; <span>— Vectle</span></a>