Skip to content

Clarify function_score default match_all behavior - #12720

Open
MdTanwer wants to merge 1 commit into
opensearch-project:mainfrom
MdTanwer:docs/function-score-default-match-all-21172
Open

Clarify function_score default match_all behavior#12720
MdTanwer wants to merge 1 commit into
opensearch-project:mainfrom
MdTanwer:docs/function-score-default-match-all-21172

Conversation

@MdTanwer

@MdTanwer MdTanwer commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Documents that omitting the top-level query in function_score defaults to match_all with a base score of 1
  • Clarifies that function filters affect scoring, not document inclusion
  • Explains why documents matching no function filters still receive _score: 1 with default settings
  • Fixes misleading wording in the "Applying the scoring function to a subset of documents" section
  • Adds a books example and bool query workaround for filtering by function filters

Resolves documentation gap identified in opensearch-project/OpenSearch#21172.

@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 30, 2026
@MdTanwer
MdTanwer marked this pull request as draft June 30, 2026 05:39
@github-actions github-actions Bot added In progress Issue/PR: The issue or PR is in progress. and removed Tech review PR: Tech review in progress labels Jun 30, 2026
Document that omitting query defaults to match_all, that function
filters affect scoring not inclusion, and why unmatched docs score 1.

Signed-off-by: MdTanwer <tanw9004167@gmail.com>
@MdTanwer
MdTanwer force-pushed the docs/function-score-default-match-all-21172 branch from 4147879 to ec1bea1 Compare June 30, 2026 05:44
@MdTanwer
MdTanwer marked this pull request as ready for review June 30, 2026 05:44
@github-actions github-actions Bot added Tech review PR: Tech review in progress and removed In progress Issue/PR: The issue or PR is in progress. labels Jun 30, 2026
@kolchfa-aws

Copy link
Copy Markdown
Collaborator

@mgodwan Could you review this PR for technical accuracy?

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

Labels

backport 3.7 Tech review PR: Tech review in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants