Skip to content

Improve search/query interface guidance and update for ES|QL reranking#6447

Draft
leemthompo wants to merge 9 commits into
mainfrom
search-query-story-improvements
Draft

Improve search/query interface guidance and update for ES|QL reranking#6447
leemthompo wants to merge 9 commits into
mainfrom
search-query-story-improvements

Conversation

@leemthompo
Copy link
Copy Markdown
Member

@leemthompo leemthompo commented May 12, 2026

Contributes to https://github.com/elastic/docs-content-internal/issues/1190

Summary

The search query docs needed updates and didn't help readers choose between Query DSL, Retrievers, and ES|QL. The semantic reranking page only documented the retriever path, missing ES|QL RERANK entirely. Several newer capabilities (diversify retriever, MMR command, EMBEDDING function, vector similarity functions) were absent.

  • querying-for-search: Add "choosing the right interface" section with decision criteria and feature comparison table; fix ES|QL being undersold and retrievers claiming exclusivity on reranking
  • semantic-reranking: Restructure to present retriever and ES|QL RERANK as equal implementation paths with comparison table
  • ranking: Surface both reranking interfaces in the overview
  • retrievers-overview: Add missing diversify retriever, organize list into first-stage vs compound, add multi-field query format references
  • esql-for-search: Add MMR command, EMBEDDING function, vector similarity functions, update FUSE to mention RRF/LINEAR methods

Test plan

  • Verify all cross-links resolve correctly in doc preview
  • Confirm no broken anchors from removed custom anchor IDs
  • Review rendering of new tables in querying-for-search and semantic-reranking

@leemthompo leemthompo requested a review from a team as a code owner May 12, 2026 15:05
@github-actions
Copy link
Copy Markdown
Contributor

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.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@leemthompo leemthompo self-assigned this May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Vale Linting Results

Summary: 1 suggestion found

💡 Suggestions (1)
File Line Rule Message
solutions/search/esql-for-search.md 176 Elastic.WordChoice Consider using 'run, start' instead of 'execute', unless the term is in the UI.

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.

Copy link
Copy Markdown
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, added a few comments, will defer to the Search Relevance team for approval :)

Both approaches require an inference endpoint configured for the `rerank` task. You have the following options:

To use semantic re-ranking in {{es}}, you need to:
1. Use the Elastic Rerank cross-encoder model through a preconfigured `.rerank-v1-elasticsearch` endpoint or create a custom one using the [{{infer}} API’s {{es}} service]({{es-apis}}operation/operation-inference-put-elasticsearch).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be inclined to add an option for EIS as the first listed option, and recommend jina v3 reranker.

We might also consider whether using the preconfigured endpoint should be as high on the list of options, considering that jina v2 and v3 are both significantly better than the preconfigured endpoint.

### Step 2: Choose an implementation approach

Refer to [the Elastic NLP model reference](../../../explore-analyze/machine-learning/nlp/ml-nlp-model-ref.md#ml-nlp-model-ref-text-similarity) for a list of third party text similarity models supported by {{es}} for semantic re-ranking.
You can use either retrievers or {{esql}} to implement semantic re-ranking in your search pipelines.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wording feels a little awkward, as "implement" and "pipeline" imply the need for more than simply sending a search request in the appropriate manner. Maybe something like "you can perform semantic reranking using either retrievers or {{esql}}"?


#### Use the {{esql}} `RERANK` command

Use the {{esql}} [`RERANK` command](elasticsearch://reference/query-languages/esql/commands/rerank.md) to add re-ranking as a step in a piped query. This is a good fit when you want to combine re-ranking with other [{{esql}}](elasticsearch://reference/query-languages/esql.md) capabilities like transformations, aggregations, or text generation with `COMPLETION`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another reason to use ES|QL RERANK would be for multi field support, which is a technical limitation of the retriever reranker.

{{es}} supports semantic re-ranking through two interfaces:

* The [`text_similarity_reranker` retriever](ranking/semantic-reranking.md) for composable retrieval pipelines via the `_search` API
* The [ES|QL `RERANK` command](ranking/semantic-reranking.md) for piped search workflows via the `_query` API
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is workflows an overloaded term here, considering Workflows is a product offered in Kibana?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants