-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Enterprise Search] Do not include precision in the search request when precision tuning is not enabled for an Engine #136670
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
[Enterprise Search] Do not include precision in the search request when precision tuning is not enabled for an Engine #136670
Conversation
…en precision tuning is not enabled for an Engine
| }; | ||
|
|
||
| const searchSettingsWithoutNewBoostProp = { | ||
| const { ['precision_enabled']: precisionEnabled, ...searchSettingsWithoutNewBoostProp } = { |
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.
Check precision is being sent, but precision_enabled is not
| searchSettings: { | ||
| searchField: {}, | ||
| boosts: {}, | ||
| precision: 7, |
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.
Check precision being sent to search
| }); | ||
| }); | ||
|
|
||
| it("won't send precision on the API call if it is not enabled", async () => { |
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.
Add test for precision not being sent
| actions.setResultsLoading(true); | ||
|
|
||
| const filteredBoosts = removeEmptyValueBoosts(boosts); | ||
| const precisionSettings = values.isPrecisionTuningEnabled ? { precision } : {}; |
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.
Actual fix (thanks @afoucret !): Do not send precision when precision tuning is not enabled
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
sphilipse
left a comment
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!
Summary
As described in https://github.com/elastic/enterprise-search-team/issues/2292, precision parameter was being sent in precision tuning search preview when precision tuning was disabled:
Solution is to avoid sending precision parameter to Search API when precision tuning is not enabled.
Checklist