← Back to Pull requests

Add search time vs index time comparison to synonyms page #9569

Open
georgewallace opened this pull request with 8 lines diff across 1 files
View on GitHub
georgewallace georgewallace commented on Nov 23, 2026 01:43 UTC
Author

Addresses elastic/docs-content-internal#440.

Replaces the one-paragraph intro in Step 3 of the synonyms page with a short search time vs index time comparison table. Every row comes from the existing synonym and synonym_graph reference pages and the notes already on this page, so no new technical claims are introduced. The synonyms-apply-synonyms anchor is unchanged.

Questions for technical reviewers

The issue also asks about performance trade-offs and why index time still exists. The docs don't cover these, so I left them out rather than guess:

1. Does search-time synonym expansion add measurable query latency? Is it noticeable in practice?
2. What are the index size and indexing cost of index-time synonyms?
3. Does index-time expansion affect scoring (for example IDF skew)? Does it affect phrase queries?
4. Why does index time still exist? Is it for backward compatibility, or are there cases where it's the better choice?

If you can answer any of these, I'll add them as table rows and a "when to use index time" note.

🤖 Generated with Claude Code

Diff: 8 lines (+7 / -1) across 1 files Reviewer: kosabogi Review duration: 16513m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.16) × (1 − Review Confidence (0.86)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.16 · 8 lines diff across 1 files
0.16
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.88 · 5 substantive comment(s)
0.88
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
86%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.131
Real PR Conversation Timeline
8 items
github-actions[bot] github-actions[bot] commented on Nov 23, 2026 01:43 UTC
Bot

<!-- docs-pr-ai-menu:start -->

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started. <!-- docs-pr-ai-menu:docs-review -->
  • Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

    <!-- docs-pr-ai-menu:end -->

    github-actions[bot] github-actions[bot] commented on Nov 23, 2026 01:47 UTC
    Bot

    🔍 Preview links for changed docs


  • solutions/search/full-text/search-with-synonyms.md
  • github-actions[bot] github-actions[bot] commented on Nov 23, 2026 01:47 UTC
    Bot

    ✅ Elastic Docs Style Checker (Vale)

    No issues found on modified lines!

    ---

    The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

    <!-- Sticky Pull Request Commentelastic-vale-results -->

    kosabogi kosabogi commented on code on Nov 23, 2026 09:07 UTC
    Code Review
    solutions/search/full-text/search-with-synonyms.md:1
    @@ -184,7 +184,13 @@ When `lenient` is `false`, invalid synonym rules cause errors: analyzer changes
     
     ## Step 3: Create an index with your synonym analyzer [synonyms-apply-synonyms]
     
    -Synonyms can be applied at [search time or index time](../../../manage-data/data-store/text-analysis/index-search-analysis.md). Search time is recommended because you can update your synonym sets without [reindexing]({{es-apis}}operation/operation-reindex). If token filters are configured with `"updateable": true`, search analyzers can be [reloaded]({{es-apis}}operation/operation-indices-reload-search-analyzers) when you make changes.
    +Synonyms can be applied at [search time or index time](../../../manage-data/data-store/text-analysis/index-search-analysis.md). Use search time unless you have a specific reason to use index time.
    +
    +|  | Search time (recommended) | Index time |

    Suggesting to fill in all table cells to help screen readers and add a short intro to the table.

    The following table compares the two approaches:
    
    | Aspect | Search time (recommended) | Index time |
    

    kosabogi kosabogi approved these changes on Nov 23, 2026 09:07 UTC
    Approved Reviewer

    Docs LGTM, just left a small suggestion.

    eedugon eedugon requested changes on Nov 24, 2026 16:57 UTC
    Changes Requested Reviewer

    Blocking the PR for the moment. I'm going so suggest and alternative approach in a different PR, updating also the introduction to the document.

    eedugon eedugon commented on Nov 25, 2026 11:36 UTC
    Contributor

    @georgewallace : I've created https://github.com/elastic/docs-content/pull/9621 in favor of this PR. For your consideration.

    Reviewers
    Assignees
    georgewallace georgewallace
    Labels
    risk: low confidence: 86.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 16.1% (LOW) · Higher = larger blast radius
    16.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 86.4% · Lower = rushed or shallow review
    86.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2.2% · Safe to merge
    2.2%