Add search time vs index time comparison to synonyms page #9569
<!-- docs-pr-ai-menu:start -->
Elastic Docs AI PR menu
Check the box to run an AI review for this pull request.
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 -->
✅ 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 -->
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 |
Docs LGTM, just left a small suggestion.
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.
@georgewallace : I've created https://github.com/elastic/docs-content/pull/9621 in favor of this PR. For your consideration.
kosabogi
georgewallace
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-synonymsanchor 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