Skip to content

Add hybrid search pre-filtering documentation - #12544

Merged
kolchfa-aws merged 4 commits into
opensearch-project:mainfrom
RexyZhang2001:doc/hybrid-search-pre-filtering
Jun 26, 2026
Merged

Add hybrid search pre-filtering documentation#12544
kolchfa-aws merged 4 commits into
opensearch-project:mainfrom
RexyZhang2001:doc/hybrid-search-pre-filtering

Conversation

@RexyZhang2001

Copy link
Copy Markdown
Contributor

Description

Document the hybrid query common filter as pre-filtering: add a new pre-filtering page, clarify the filter parameter in the hybrid query reference, and cross-link the post-filtering page. The filter must be a single query object; multiple conditions are combined in a bool query.

Issues Resolved

Closes opensearch-project/neural-search#1811

Version

3.0

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

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.

Document the hybrid query common filter as pre-filtering: add a new
pre-filtering page, clarify the filter parameter in the hybrid query
reference, and cross-link the post-filtering page. The filter must be a
single query object; multiple conditions are combined in a bool query.

Signed-off-by: Rex Zhang <yichenzg@amazon.com>
@github-actions

Copy link
Copy Markdown

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc 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).

@github-actions github-actions Bot added the Tech review PR: Tech review in progress label Jun 19, 2026

@heemin32 heemin32 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall, LGTM. One suggestion: would it make more sense to combine post-filtering.md and pre-filtering.md into a single filtering.md document that covers both pre-filtering and post-filtering? I will leave it to @kolchfa-aws to decide.

@heemin32

Copy link
Copy Markdown
Contributor

@kolchfa-aws This is for 3.0 and above.

@kolchfa-aws

Copy link
Copy Markdown
Collaborator

@RexyZhang2001 I think it makes sense to keep pre- and post-filtering pages separate. That said, could you add some information so the users can decide when to use pre-filtering and when to use post-filtering? It can go into a parent page (either create a new "Using filtering with hybrid search" parent page and make the pre- and post-filtering children of that page, or just add a section "Filtering data" in the current parent page). That way users can see the difference between the two options right away and we can help them decide which one to use. Thanks!

@kolchfa-aws kolchfa-aws added Doc review PR: Doc review in progress Awaiting response backport 3.7 and removed Tech review PR: Tech review in progress labels Jun 22, 2026
Signed-off-by: Rex Zhang <yichenzg@amazon.com>
@RexyZhang2001

Copy link
Copy Markdown
Contributor Author

Hi @kolchfa-aws
Thanks for the suggestion! I've added a new section to the current hybrid search parent page with a comparison table that summarizes the differences between pre-filtering and post-filtering. This should help users decide which approach fits their use case before reading both child pages first.

I would really appreciate it if you could take a look at this blog change as well when you get a chance, thanks: opensearch-project/project-website#4169

Signed-off-by: Rex Zhang <yichenzg@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

@kolchfa-aws kolchfa-aws left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the updates, @RexyZhang2001! Doc review complete and changes applied.

@kolchfa-aws
kolchfa-aws merged commit 1c94b93 into opensearch-project:main Jun 26, 2026
4 checks passed
kolchfa-aws added a commit that referenced this pull request Jun 26, 2026
* Add hybrid search pre-filtering documentation

Document the hybrid query common filter as pre-filtering: add a new
pre-filtering page, clarify the filter parameter in the hybrid query
reference, and cross-link the post-filtering page. The filter must be a
single query object; multiple conditions are combined in a bool query.



* Add filtering comparison table to hybrid search parent page



* Add filtering comparison table and faceted search example



* Doc review



---------




(cherry picked from commit 1c94b93)

Signed-off-by: Rex Zhang <yichenzg@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Rex Zhang <yichenzg@amazon.com>
Co-authored-by: Fanit Kolchina <kolchfa@amazon.com>
aryasoni98 pushed a commit to aryasoni98/documentation-website that referenced this pull request Jun 29, 2026
* Add hybrid search pre-filtering documentation

Document the hybrid query common filter as pre-filtering: add a new
pre-filtering page, clarify the filter parameter in the hybrid query
reference, and cross-link the post-filtering page. The filter must be a
single query object; multiple conditions are combined in a bool query.

Signed-off-by: Rex Zhang <yichenzg@amazon.com>

* Add filtering comparison table to hybrid search parent page

Signed-off-by: Rex Zhang <yichenzg@amazon.com>

* Add filtering comparison table and faceted search example

Signed-off-by: Rex Zhang <yichenzg@amazon.com>

* Doc review

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

---------

Signed-off-by: Rex Zhang <yichenzg@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Co-authored-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 3.7 Doc review PR: Doc review in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Improve the validation error info for the hybrid query filter field

3 participants