## TL;DR

## TL;DR $search and $vectorSearch need Atlas Search on a real Atlas cluster, or a local mongot sidecar on port 7027 for self-hosted setups. ## Fix 1. $search and $vectorSearch need Atlas Search on a real Atlas cluster, or a local mongot sidecar on port 7027 for self-hosted setups. Expected: you can confirm this matches your situation. ## When to use - You are setting up or using this MongoDB Atlas Vector Search feature. - The symptom matches: SearchNotEnabled / code 31082 on $vectorSearch. ## When NOT to use - Unrelated MongoDB Atlas Vector Search issues (different feature, different failure). - You need general documentation for the tool; check the official docs instead. ## Compatibility Reported against MongoDB Atlas Vector Search. Source: a local/non-public address.com/jaewilson07/rag_mongodb. ## Variant phrasings ### SearchNotEnabled / code 31082 on $vectorSearch ## Why it happens $vectorSearch fails with SearchNotEnabled (code 31082).

## Fix

1. ## TL;DR $search and $vectorSearch need Atlas Search on a real Atlas cluster, or a local mongot sidecar on port 7027 for self-hosted setups. ## Fix 1. $search and $vectorSearch need Atlas Search on a real Atlas cluster, or a local mongot sidecar on port 7027 for self-hosted setups.
   Expected: You get the expected result; the problem is gone.
2. Expected: you can confirm this matches your situation. ## When to use - You are setting up or using this MongoDB Atlas Vector Search feature. - The symptom matches: SearchNotEnabled / code 31082 on $vectorSearch. ## When NOT to use - Unrelated MongoDB Atlas Vector Search issues (different feature, different failure). - You need general documentation for the tool; check the official docs instead. ## Compatibility Reported against MongoDB Atlas Vector Search.
   Expected: You see the expected output instead of the problem.
3. Atlas Search is not available on the deployment the query is pointed at. ## Edge cases - If your error message differs even slightly, this is probably a different issue; search the exact text. - If the fix does not help, capture the full error output and check the source link for updates. ## Source a local/non-public address.com/jaewilson07/rag_mongodb
   Expected: You see the expected output instead of the problem.

## When to use

- You are setting up or using this MongoDB Atlas Vector Search feature.
- The symptom matches: SearchNotEnabled / code 31082 on $vectorSearch.

## When NOT to use

- Unrelated MongoDB Atlas Vector Search issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against MongoDB Atlas Vector Search.

## Variant phrasings

### SearchNotEnabled / code 31082 on $vectorSearch

## Why it happens

Source: a local/non-public address.com/jaewilson07/rag_mongodb. ## Variant phrasings ### SearchNotEnabled / code 31082 on $vectorSearch ## Why it happens $vectorSearch fails with SearchNotEnabled (code 31082).

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.