Skip to content
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

[Fix] Show Alias Fields in Discover Tab #7930

Merged
merged 9 commits into from
Sep 5, 2024

Conversation

sejli
Copy link
Member

@sejli sejli commented Aug 30, 2024

Description

Adds a new advanced setting that updates the Discover's search request to include "fields": ["*"]. Defaults to off, open to suggestions for the title and description of the new setting.

Thanks @LDrago27 for the deep dive and fix!

Issues Resolved

#7632

Screenshot

Testing the changes

Changelog

  • fix: Show alias fields in Discover tab

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.98%. Comparing base (e5c125d) to head (dbc7a51).
Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7930      +/-   ##
==========================================
- Coverage   64.33%   60.98%   -3.36%     
==========================================
  Files        3677     3684       +7     
  Lines       81200    87040    +5840     
  Branches    12944    13377     +433     
==========================================
+ Hits        52240    53077     +837     
- Misses      25749    30750    +5001     
- Partials     3211     3213       +2     
Flag Coverage Δ
Linux_1 29.26% <0.00%> (-1.48%) ⬇️
Linux_2 56.18% <0.00%> (-0.01%) ⬇️
Linux_3 37.82% <100.00%> (-2.79%) ⬇️
Linux_4 29.57% <0.00%> (-1.84%) ⬇️
Windows_1 29.28% <0.00%> (-1.48%) ⬇️
Windows_2 56.13% <0.00%> (-0.01%) ⬇️
Windows_3 37.82% <100.00%> (-2.79%) ⬇️
Windows_4 29.57% <0.00%> (-1.84%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ashwin-pc
ashwin-pc previously approved these changes Aug 30, 2024
joshuali925
joshuali925 previously approved these changes Aug 30, 2024
src/plugins/data/server/ui_settings.ts Outdated Show resolved Hide resolved
@@ -762,5 +762,19 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
}),
schema: schema.arrayOf(schema.string()),
},
[UI_SETTINGS.SEARCH_USE_FIELDS]: {
name: i18n.translate('data.advancedSettings.searchUseFieldsTitle', {
defaultMessage: 'Include all fields in search request',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this setting is to include all fields, would search:includeAllFields be better than search:useFields?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking was that previously, we weren't using the fields field in the request body. Turning on this property "uses" fields. I think in this case, the title itself could be something different.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this suggestion

Signed-off-by: Sean Li <[email protected]>
@sejli sejli dismissed stale reviews from joshuali925 and ashwin-pc via 83d5dd9 August 30, 2024 22:57
kavilla
kavilla previously approved these changes Aug 30, 2024
Signed-off-by: Sean Li <[email protected]>
sejli added a commit to sejli/OpenSearch-Dashboards that referenced this pull request Aug 30, 2024
* Add field search option

Signed-off-by: Suchit Sahoo <[email protected]>

* initial implementation for new setting

Signed-off-by: Sean Li <[email protected]>

* Changeset file for PR opensearch-project#7930 created/updated

* update naming

Signed-off-by: Sean Li <[email protected]>

* removing page reload

Signed-off-by: Sean Li <[email protected]>

* updating names

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Suchit Sahoo <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Co-authored-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@sejli sejli merged commit 0c047dc into opensearch-project:main Sep 5, 2024
74 of 75 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 5, 2024
* Add field search option

Signed-off-by: Suchit Sahoo <[email protected]>

* initial implementation for new setting

Signed-off-by: Sean Li <[email protected]>

* Changeset file for PR #7930 created/updated

* update naming

Signed-off-by: Sean Li <[email protected]>

* removing page reload

Signed-off-by: Sean Li <[email protected]>

* updating names

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Suchit Sahoo <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Co-authored-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 0c047dc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 5, 2024
* Add field search option

Signed-off-by: Suchit Sahoo <[email protected]>

* initial implementation for new setting

Signed-off-by: Sean Li <[email protected]>

* Changeset file for PR #7930 created/updated

* update naming

Signed-off-by: Sean Li <[email protected]>

* removing page reload

Signed-off-by: Sean Li <[email protected]>

* updating names

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Suchit Sahoo <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Co-authored-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 0c047dc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
huyaboo pushed a commit that referenced this pull request Sep 5, 2024
* Add field search option



* initial implementation for new setting



* Changeset file for PR #7930 created/updated

* update naming



* removing page reload



* updating names



---------





(cherry picked from commit 0c047dc)

Signed-off-by: Suchit Sahoo <[email protected]>
Signed-off-by: Sean Li <[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>
Co-authored-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Sep 5, 2024
* Add field search option



* initial implementation for new setting



* Changeset file for PR #7930 created/updated

* update naming



* removing page reload



* updating names



---------





(cherry picked from commit 0c047dc)

Signed-off-by: Suchit Sahoo <[email protected]>
Signed-off-by: Sean Li <[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>
Co-authored-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants