Prompt

MongoDB Atlas Search is not giving us the relevance we need

Technology / Search & Discovery Tools1 observationLast seen Oct 12, 2026

Latest observation

Oct 12, 2026OpenAI APIWeb search: off

If Atlas Search isn’t ranking results the way you expect, the fix usually comes down to index design, query construction, and relevance tuning rather than “search is bad.” Here’s a practical way to improve it.

1) Make sure the right fields are being searched

Common issue: all text is being thrown into one analyzed field, which weakens ranking.

Better approach:

  • Search title, subtitle, tags, description separately
  • Give important fields more weight
  • Don’t rely on one giant catch-all field if relevance matters

Example with weighted fields:

{
  $search: {
    text: {
      query: "wireless headphones",
      path: [
        { value: "title", score: { boost: { value: 5 } } },
        { value: "tags", score: { boost: { value: 3 } } },
        { value: "description", score: { boost: { value: 1 } } }
      ]
    }
  }
}

2) Check your analyzer

If stemming, stop words, punctuation handling, or tokenization are off, relevance can get weird.

Questions to ask:

  • Are you using the default analyzer when you need a language-specific one?
  • Are synonyms being over-applied?
  • Are you matching partial terms too aggressively?
  • Is autocomplete being used where full-text search would be better?

For example:

  • Use autocomplete only for typeahead
  • Use text search for actual ranking
  • Use phrase searches when word order matters

3) Use compound queries instead of a single text clause

Atlas Search often works better when you combine signals:

  • Must match the main term
  • Should match popular fields
  • Filter by category, status, locale, etc.

Example:

{
  $search: {
    compound: {
      must: [
        { text: { query: "wireless headphones", path: "title" } }
      ],
      should: [
        { text: { query: "wireless headphones", path: "tags" } },
        { text: { query: "wireless headphones", path: "description" } }
      ],
      filter: [
        { equals: { path: "isActive", value: true } }
      ],
      score: {
        boost: { value: 2 }
      }
    }
  }
}

4) Tune scoring explicitly

If the default score isn’t enough:

  • Boost exact matches
  • Boost matches in titles more than body text
  • Penalize stale or low-quality documents
  • Use function scoring if you need business-specific ranking

For example:

  • Newer content ranks higher
  • Higher-rated products rank higher
  • Items with more inventory rank higher

5) Watch out for autocomplete misuse

If you’re using autocomplete everywhere, you can get noisy results. Autocomplete is great for suggestions, but not always for final ranking.

Typical pattern:

  • Typeahead: autocomplete
  • Search results page: text + compound
  • Exact title match: boosted phrase

6) Add phrase and exact-match boosts

A document containing the exact search phrase should usually outrank loose matches.

Example:

{
  $search: {
    compound: {
      should: [
        {
          phrase: {
            query: "wireless headphones",
            path: "title",
            score: { boost: { value: 10 } }
          }
        },
        {
          text: {
            query: "wireless headphones",
            path: "description"
          }
        }
      ]
    }
  }
}

7) Validate with real queries

Relevance tuning only works with real examples. Create a small test set:

  • 20–50 common queries
  • Expected top 5 results for each
  • Compare current vs improved ranking

This helps identify whether the problem is:

  • Indexing
  • Analyzer
  • Query formulation
  • Field weighting
  • Missing business signals

8) Use scoreDetails to see why results rank as they do

Atlas Search can help you inspect scoring so you can see what’s driving rank.

If you’re unsure, this is often the fastest way to debug relevance:

  • Which clause matched?
  • Which field contributed most?
  • Is a low-value field overpowering a high-value one?

A good default pattern

For many applications, this is a strong starting point:

  • Index the relevant fields separately
  • Use compound
  • Boost title > tags > body
  • Add exact phrase boosts
  • Filter out irrelevant documents
  • Tune analyzer and synonyms carefully

If you want, I can help you debug it directly

If you paste:

  1. your Atlas Search index definition, and
  2. one example query with “bad” results,

I can suggest a concrete scoring/query rewrite.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.