Skip to content

Simplified Linear and RRF Retrievers Docs #130559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Jul 3, 2025

Adds documentation for the simplified linear and rrf retriever query syntax. Sibling PR to elastic/docs-content#2026.

Will spin up a separate pr for 8.19 once these changes are approved.

@Mikep86 Mikep86 requested review from leemthompo and kderusso July 3, 2025 14:48
@Mikep86 Mikep86 added >docs General docs changes auto-backport Automatically create backport pull requests when merged :SearchOrg/Relevance Label for the Search (solution/org) Relevance team v9.2.0 v9.1.1 labels Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 2025

🔍 Preview links for changed docs:

🔔 The preview site may take up to 3 minutes to finish building. These links will become live once it completes.

@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team Team:SearchOrg Meta label for the Search Org (Enterprise Search) Team:Search - Relevance The Search organization Search Relevance team labels Jul 3, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-eng (Team:SearchOrg)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)

@Mikep86
Copy link
Contributor Author

Mikep86 commented Jul 3, 2025

@leemthompo Do we have to use any special tags to indicate that this functionality is only in 9.1+?

@leemthompo
Copy link
Contributor

leemthompo commented Jul 3, 2025

@Mikep86 we certainly do: the applies_to tags

You'll probably need the section and inline level ones specifically :)

Copy link
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.

Nice start!

@Mikep86 Mikep86 requested a review from kderusso July 3, 2025 20:13
Copy link
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.

LGTM, thanks for iterating. A couple non blocking suggestions, but I think it's good to go!

Required when `query` is specified.

::::{warning}
Avoid using `none` as that will disable normalization and may bias the result set towards lexical matches.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Avoid using `none` as that will disable normalization and may bias the result set towards lexical matches.
Avoid using `none` when performing hybrid search as that will disable normalization and may bias the result set towards lexical matches.

Copy link
Member

Choose a reason for hiding this comment

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

Should this warning go under the Normalizers section instead of params? Or be duplicated?

Copy link
Member

Choose a reason for hiding this comment

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

Ah nevermind, I see you have it down under the field boosting section, I think 3x might be overkill 😉 But we could consider moving it. I'll leave that up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's good where it is. Also, I'm reticent to include the qualifier of "when performing hybrid search" because:

  • We haven't introduced the concept of hybrid search here, so mentioning it out of nowhere could be confusing.
  • This feature is primarily targeted at users who want an easy button, and adding the cognitive load of figuring out if they are performing a hybrid search goes against that.

We could add general advice about when normalization is required (outside of the multi-field query format), but this linear retriever example already does that (and we link to it on this page), so it seems repetitive.


The score breakdown would be:

* Lexical fields (50% of score):
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

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

@Mikep86 it looks like you've got some chicken-and-egg build failures because you have two open PRs that depend on each other for newly created anchor sections. The solution here is to comment out X-links that aren't live yet, and then open follow up PRs to uncomment. This will be another pain point fixed by moving the examples page into Elasticsearch repo.

Copy link
Contributor

github-actions bot commented Jul 8, 2025

🔍 Preview links for changed docs

Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

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

Thanks @Mikep86!

@Mikep86 Mikep86 merged commit 5e2f154 into elastic:main Jul 8, 2025
10 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.1

Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Jul 8, 2025
leemthompo added a commit to elastic/docs-content that referenced this pull request Jul 9, 2025
Adds simplified `linear` and `rrf` retriever examples. Sibling PR to
elastic/elasticsearch#130559.

---------

Co-authored-by: Liam Thompson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >docs General docs changes :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Docs Meta label for docs team Team:Search - Relevance The Search organization Search Relevance team Team:SearchOrg Meta label for the Search Org (Enterprise Search) v9.1.1 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants