Skip to content
← Back to activity

Solution skill

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

Version 2Sign in to save

Complete solution

Shows how to fix atlas CLI: vector search index on local deployments fails with "userCommand.indexes[0].fields is required". Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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.

Steps

  1. 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.

When to use

You are seeing this: 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. Use this skill when you run into "Atlas CLI: vector search index on local deployments fails with "userCommand.indexes[0].fields is required"".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: 1.29.0. If you are on something much newer or older, the details may have shifted.

Why this happens

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.

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 2 · 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>