Skip to content
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

Documentation of inner hits with hybrid query #9548

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

vibrantvarun
Copy link
Member

@vibrantvarun vibrantvarun commented Apr 2, 2025

Description

This PR contain documentation of inner hits with hybrid query.

Issues Resolved

Closes #9542

Version

3.0-beta

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

github-actions bot commented Apr 2, 2025

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@vibrantvarun
Copy link
Member Author

@martin-gaievski Can you review technical content of the PR.

}
```

## Sorting and Pagination with inner hits
Copy link
Member

Choose a reason for hiding this comment

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

Do we also want to add one example for parent-join?

Copy link
Member Author

@vibrantvarun vibrantvarun Apr 7, 2025

Choose a reason for hiding this comment

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

Since as you mentioned earlier ingestion is not a focus here. The response format of nested query and parent-child will be same and therefore we can avoid it.

1. The parent documents order in the final search response of traditional query will be determined by the inner_hits score.
2. The parent documents order in the final search response of hybrid query will be determined by the hybrid score (i.e. normalized score). However, the parent documents are fetched from the shard based on the inner hits relevancy.

The inner hits will reflect the raw scores (i.e. scores prior to normalization) information and parent documents will reflect the hybrid score in the final search response.
Copy link
Member

Choose a reason for hiding this comment

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

We should also bold this statement

Copy link
Member Author

Choose a reason for hiding this comment

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

We have {: .note} added below this statement. It will pop out this statement in a highlighted way.
for example see below screenshot how line regarding pagination is highlighted.
Screenshot 2025-04-07 at 3 27 25 PM

Copy link
Member

Choose a reason for hiding this comment

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

yeah looks like we can't bold in the note

Signed-off-by: Varun Jain <[email protected]>
Signed-off-by: Varun Jain <[email protected]>
@vibrantvarun vibrantvarun requested a review from owaiskazi19 April 7, 2025 22:30
Copy link
Member

@martin-gaievski martin-gaievski left a comment

Choose a reason for hiding this comment

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

Looks good except for one minor comment

Signed-off-by: Varun Jain <[email protected]>
@vibrantvarun
Copy link
Member Author

vibrantvarun commented Apr 7, 2025

Technical review completed. @kolchfa-aws Can you once review this PR?

Copy link
Member

@martin-gaievski martin-gaievski left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws added the 5 - Editorial review PR: Editorial review in progress label Apr 8, 2025
@kolchfa-aws
Copy link
Collaborator

@vibrantvarun Doc review complete. The responses are extremely long for these examples, so I trimmed them to show only relevant content. Please take a look. Moving the PR to editorial review.

@vibrantvarun
Copy link
Member Author

@vibrantvarun Doc review complete. The responses are extremely long for these examples, so I trimmed them to show only relevant content. Please take a look. Moving the PR to editorial review.

@kolchfa-aws looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Editorial review PR: Editorial review in progress v3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Inner hits in hybrid query
4 participants