-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[App Search] Relevance Tuning logic - actions and selectors only, no listeners #89313
Conversation
17da8e0
to
936083d
Compare
import { RelevanceTuningLogic } from './relevance_tuning_logic'; | ||
|
||
describe('RelevanceTuningLogic', () => { | ||
const searchSettings = { |
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.
Generally speaking, I changed the name and overall theme of this file to match its place it the web application, which is "Relevance Tuning", not "Search Settings".
The underlying model that gets updated and persisted is still named SearchSettings
to match what we call it on the server. So you will still see the "Search Settings" name used in this file.
97e3877
to
e966ec9
Compare
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.
Generally looks good, will hold off on final approval until the parent PR is merged
// I believe this is because schemas *always* have an ID, and we don't consider that | ||
// a tunable field |
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.
We should validate this with another team member and remove the ambiguity from this 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.
True. I updated the comment: 62e9598
Looking forward to approving this after #89461 is merged |
d4e3cb3
to
2ff1eef
Compare
@byronhulcher Merged #89461, this is all set |
...lugins/enterprise_search/public/applications/app_search/components/relevance_tuning/types.ts
Outdated
Show resolved
Hide resolved
..._search/public/applications/app_search/components/relevance_tuning/relevance_tuning_logic.ts
Outdated
Show resolved
Hide resolved
...ch/public/applications/app_search/components/relevance_tuning/relevance_tuning_logic.test.ts
Outdated
Show resolved
Hide resolved
...ch/public/applications/app_search/components/relevance_tuning/relevance_tuning_logic.test.ts
Outdated
Show resolved
Hide resolved
// This is because if a schema only has a single field, it is "id", which we do not | ||
// consider a tunable field. |
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.
💯 thanks for the explanation!
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.
Mostly optional comments & some discussion, awesome work on this. Also I had to go back to the UI to remember when on earth we filter schema fields haha 🤦♀️ Would definitely super appreciate FIELD_FILTER_CUTOFF
being in a constants file if/when we port that over
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.
Changes look great! Thanks Jason!
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* master: (244 commits) [maps] Top hits per entity--change to title to use recent, minor edits (elastic#89254) [DOCS] Update installation details (elastic#90354) RFC for automatically generated typescript API documentation for every plugins public services, types, and functionality (elastic#86704) Elastic Maps Server config is `host` not `hostname` (elastic#90234) Use doc link services in index pattern management (elastic#89937) [Fleet] Managed Agent Policy (elastic#88688) [Workplace Search] Fix Source Settings bug (elastic#90242) [Enterprise Search] Refactor MockRouter test helper to not store payload (elastic#90206) Use doc link service in more Stack Monitoring pages (elastic#89050) [App Search] Relevance Tuning logic - actions and selectors only, no listeners (elastic#89313) Remove UI filters from UI (elastic#89793) Use newfeed.service config for all newsfeeds (elastic#90252) skip flaky suite (elastic#85086) Add readme to geo containment alert covering test alert setup (elastic#89625) [APM] Enabling yesterday option when 24 hours is selected (elastic#90017) Test user for maps tests under import geoJSON tests (elastic#86015) [Lens] Hide column in table (elastic#88680) [Security Solution][Detections] Reduce detection engine reliance on _source (elastic#89371) [Discover] Minor cleanup (elastic#90260) [Search Session][Management] Rename "cancel" button and delete "Reload" button (elastic#90015) ...
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
This is Part 2 of Relevance Tuning.
This is the actions and selectors of the Logic file from ent-search, no listeners have been implemented yet. That will be Part 3.
To move fast and reduce friction in the migration, this code is almost an exact replica of what was in ent-search. I have not changed the logic in any significant way other than to match the current patterns of our code. Please consider reviewing this as just that, a migration. There is much opportunity for refactor, but I don't think we need to take that on right now.
For maintainers