-
Notifications
You must be signed in to change notification settings - Fork 578
adding rewrite parameter docs #9954
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
base: main
Are you sure you want to change the base?
adding rewrite parameter docs #9954
Conversation
Signed-off-by: Anton Rubin <anton.rubin@eliatra.com>
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. |
@kaushalmahi12 Could you please review this PR? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets expand the examples with some data to explain the rewrite functions better
## Available rewrite methods | ||
|
||
| Rewrite method | Description | | ||
| [`constant_score`](#constant_score-default) | (Default) All expanded terms are evaluated together as a single unit, assigning the same score to every match. Efficient for filtering use cases. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it help with filtering use case, scoring happens on filtered documents right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we meant that it will save the scoring cost by passing the scoring phase for all docs then it makes sense
* Expands the wildcard into individual `term` queries inside a Boolean `should` clause. | ||
* Each document’s score reflects how many terms it matches and their term frequency. | ||
* Can trigger `too_many_clauses` if many terms match. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we explain with some example documents how will this expand the query ?
* Similar structure to `scoring_boolean`, but documents are not ranked. | ||
* All matching docs receive the same score. | ||
* This retains Boolean clause flexibility (e.g., use with `must_not`) without ranking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, We can keep the example index documents same
Description
adding rewrite parameter docs
Version
all
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.