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

[Search Source] Do not request unmapped fields if source filters are provided #91921

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

majagrubic
Copy link
Contributor

@majagrubic majagrubic commented Feb 18, 2021

Summary

Fixes: #91907

This should be merged before: #91735

KibanaApp team recently made a decision to show unmapped fields in Discover by default in 7.12. with the new Fields API implementation. The problem occurs when having source filters enabled; we request a list of fields explicitly and add the include_unmapped option to each field. According to the ES team, we shouldn't be doing this, as it will break Elasticsearch for a large number of fields.

This PR removes include_unmapped from that list of fields.

How to test

  1. Open an existing saved search
  2. Verify show unmapped fields switch is in the Discover sidebar (it will be there until [Discover] Always show unmapped fields #91735 is merged)
  3. Go to Index Pattern settings
  4. Add a source filter to exclude a certain field
  5. Go back to Discover
  6. Verify the request is requesting a list of fields, without include_unmapped option

Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support

  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
    - [ ] Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
    - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
    - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
    - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
    - [ ] This was checked for cross-browser compatibility

For maintainers

@majagrubic majagrubic requested a review from a team as a code owner February 18, 2021 19:30
@majagrubic majagrubic added v7.12.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 18, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@majagrubic majagrubic added the release_note:skip Skip the PR/issue when compiling release notes label Feb 18, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 912.6KB 912.4KB -139.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

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

App Services code change LGTM.

@majagrubic majagrubic merged commit 8b909ce into elastic:master Feb 19, 2021
@majagrubic majagrubic deleted the search_source_fix branch February 19, 2021 14:05
majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Feb 19, 2021
majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Feb 19, 2021
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 19, 2021
* master: (111 commits)
  [Logs UI] Replace dependencies in the infra bundle (elastic#91503)
  [Search Source] Do not request unmapped fields if source filters are provided (elastic#91921)
  [APM] Kql Search Bar suggests values outside the selected time range (elastic#91918)
  Refactored component edit policy tests into separate folders and using client integration testing setup (elastic#91657)
  [Fleet] Don't error on missing package_assets value (elastic#91744)
  [Lens] Pass used histogram interval to chart (elastic#91370)
  [Indexpattern management] Use indexPatterns Service instead of savedObjects client (elastic#91839)
  [Security Solutions] Fixes Cypress tests for indicator match by making the selectors more specific (elastic#91947)
  [CI] backportrc can skip CI (elastic#91886)
  Revert "[SOM] fix flaky suites (elastic#91809)"
  [Fleet] Install Elastic Agent integration by default during setup (elastic#91676)
  [Fleet] Silently swallow 404 errors when deleting ingest pipelines (elastic#91778)
  [data.search] Use incrementCounter for search telemetry (elastic#91230)
  [Fleet] Bootstrap functional test suite (elastic#91898)
  [Alerts][Docs] Added API documentation for alerts plugin (elastic#91067)
  Use correct environment in anomaly detection setup link (elastic#91877)
  [FTSR] Convert to tasks and add jest/api integration suites (elastic#91770)
  [CI] Build and publish storybooks (elastic#87701)
  docs: add PHP agent info to docs (elastic#91773)
  [DOCS] Adds and updates Visualization advanced settings (elastic#91904)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Search Source] Fields API: Do not request unmapped fields if source filtering is used
5 participants