-
Notifications
You must be signed in to change notification settings - Fork 508
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
Add or update boost prameter for term-level queries #6700
Add or update boost prameter for term-level queries #6700
Conversation
Signed-off-by: Yuki Imamura <[email protected]>
@owaiskazi19 - Can you please review this contribution from a technical standpoint? Thanks! |
I investigated the situation regarding the
Should I also add the |
_query-dsl/term/prefix.md
Outdated
@@ -63,8 +63,9 @@ The `<field>` accepts the following parameters. All parameters except `value` ar | |||
Parameter | Data type | Description | |||
:--- | :--- | :--- | |||
`value` | String | The term to search for in the field specified in `<field>`. | |||
`boost` | Floating-point | Boosts the query by the given multiplier. Useful for searches that contain more than one query. Values in the [0, 1) range decrease relevance, and values greater than 1 increase relevance. Default is `1`. |
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.
@imamuray all PrefixQueryBuilder supports are value
, rewrite
and caseInsensitive
. Any reason for this change?
Are you trying to mention the boost
keyword of the index mappings here?
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.
I missed the comment here. Ignore my previous comment. The boost
here is keyword field type defined here. To make it synchronize across all the term queries we should either add boost
in all of them or remove from few of them.
If we want to add it in all of them, we can use the same description
A floating-point value that specifies the weight of this field toward the relevance score. Values above 1.0 increase the field’s relevance. Values between 0.0 and 1.0 decrease the field’s relevance. Default is 1.0.
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.
@owaiskazi19 Thank you for the review.
I have added boost
to all term-level queries. 080f57c
Signed-off-by: Yuki Imamura <[email protected]>
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.
LGTM. Thank you, @imamuray!
* Add to boost parameter to the prefix query Signed-off-by: Yuki Imamura <[email protected]> * Add or update boost prameter for term-level queries Signed-off-by: Yuki Imamura <[email protected]> --------- Signed-off-by: Yuki Imamura <[email protected]> (cherry picked from commit 9ff5db3) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add to boost parameter to the prefix query * Add or update boost prameter for term-level queries --------- (cherry picked from commit 9ff5db3) Signed-off-by: Yuki Imamura <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Term-level queries can set
boost
parameter, but some of them are not mentioned in the documentation.boost
exists
fuzzy
ids
prefix
range
regexp
term
terms
term_set
wildcard
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.