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

Scripted fields prevent regular fields from appearing on Discover #7699

Closed
Bargs opened this issue Jul 9, 2016 · 1 comment · Fixed by #7751
Closed

Scripted fields prevent regular fields from appearing on Discover #7699

Bargs opened this issue Jul 9, 2016 · 1 comment · Fixed by #7751
Labels
blocker bug Fixes for quality problems that affect the customer experience v5.0.0-beta1

Comments

@Bargs
Copy link
Contributor

Bargs commented Jul 9, 2016

Kibana version: master
Server OS version: Darwin
Browser version: Chrome Canary
Browser OS version: OSX

Description of the problem including expected versus actual behavior:

The presence of a scripted field seems to be preventing other fields from returning in the master branch (haven't tried alpha4 yet). The screenshot below shows the discover page with makelogs data, and you can see that only my scripted field foo (and the fielddata_fields) are pressent. No errors in browser console, Kibana logs or ES logs. Maybe the scripted field request syntax changed in a subtle way?

Steps to reproduce:

  1. Create an index pattern
  2. Go to Discover, confirm you can see all your fields
  3. Create a scripted fields
  4. See all your normal fields perform their vanishing act

screen shot 2016-07-09 at 10 51 02 am

@Bargs Bargs added bug Fixes for quality problems that affect the customer experience P1 labels Jul 9, 2016
@Bargs
Copy link
Contributor Author

Bargs commented Jul 12, 2016

Seems to be a change in ES behavior, I filed a ticket here: elastic/elasticsearch#19403

Bargs added a commit to Bargs/kibana that referenced this issue Jul 14, 2016
Kibana used to always include a `fields` parameter on Discover search
requests which included '_source' so that ES would return the _source
field for each hit. When ES removed the `fields` param we attempted to
switch to a new request body param `_source: true` to maintain the
same behavior. However, we missed one spot in the code that needed
updating in order to pass that param along to the actual request json.

This problem wasn't immediately obvious because _source is included by
default. However, this fixes a related issue where _source fields were
missing in Discover if any scripted fields existed. The presence of the
`script_fields` param in the request would disabled the automatic return
of _source. Now that we're correctly passing `_source: true`, _source
fetching works correctly even when scripted fields are present.

Fixes elastic#7699
airow pushed a commit to airow/kibana that referenced this issue Feb 16, 2017
Kibana used to always include a `fields` parameter on Discover search
requests which included '_source' so that ES would return the _source
field for each hit. When ES removed the `fields` param we attempted to
switch to a new request body param `_source: true` to maintain the
same behavior. However, we missed one spot in the code that needed
updating in order to pass that param along to the actual request json.

This problem wasn't immediately obvious because _source is included by
default. However, this fixes a related issue where _source fields were
missing in Discover if any scripted fields existed. The presence of the
`script_fields` param in the request would disabled the automatic return
of _source. Now that we're correctly passing `_source: true`, _source
fetching works correctly even when scripted fields are present.

Fixes elastic#7699


Former-commit-id: 1cd6eec
cee-chen added a commit that referenced this issue May 3, 2024
`v94.1.0-backport.0` ⏩ `v94.2.1-backport.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

##
[`v94.2.1-backport.0`](https://github.com/elastic/eui/releases/v94.2.1-backport.0)

**This is a backport release only intended for use by Kibana.**

- Reverted the `EuiFlexGroup`/`EuiFlexItem` `component` prop feature due
to Kibana typing issues

## [`v94.2.1`](https://github.com/elastic/eui/releases/v94.2.1)

**Bug fixes**

- Fixed an `EuiTabbedContent` edge case bug that occurred when updated
with a completely different set of `tabs`
([#7713](elastic/eui#7713))
- Fixed the `@storybook/test` dependency to be listed in
`devDependencies` and not `dependencies`
([#7719](elastic/eui#7719))

## [`v94.2.0`](https://github.com/elastic/eui/releases/v94.2.0)

- Updated `getDefaultEuiMarkdownPlugins()` to allow excluding the
following plugins in addition to `tooltip`:
([#7676](elastic/eui#7676))
  - `checkbox`
  - `linkValidator`
  - `lineBreaks`
  - `emoji`
- Updated `EuiSelectable`'s `isPreFiltered` prop to allow passing a
configuration object, which allows disabling search highlighting in
addition to search filtering
([#7683](elastic/eui#7683))
- Updated `EuiFlexGroup` and `EuiFlexItem` prop types to support passing
any valid React component type to the `component` prop and ensure proper
type checking of the extra props forwarded to the `component`.
([#7688](elastic/eui#7688))
- Updated `EuiSearchBar` to allow the `@` special character in query
string searches ([#7702](elastic/eui#7702))
- Added a new, optional `optionMatcher` prop to `EuiSelectable` and
`EuiComboBox` allowing passing a custom option matcher function to these
components and controlling option filtering for given search string
([#7709](elastic/eui#7709))

**Bug fixes**

- Fixed an `EuiPageTemplate` bug where prop updates would not cascade
down to child sections
([#7648](elastic/eui#7648))
- To cascade props down to the sidebar, `EuiPageTemplate` now explicitly
requires using the `EuiPageTemplate.Sidebar` rather than
`EuiPageSidebar`
- Fixed `EuiFieldNumber`'s typing to accept an icon configuration shape
([#7666](elastic/eui#7666))
- Fixed `EuiFieldText` and `EuiFieldNumber` to render the correct
paddings for icon shapes set to `side: 'right'`
([#7666](elastic/eui#7666))
- Fixed `EuiFieldText` and `EuiFieldNumber` to fully ignore
`icon`/`prepend`/`append` when `controlOnly` is set to true
([#7666](elastic/eui#7666))
- Fixed `EuiColorPicker`'s input not setting the correct right padding
for the number of icons displayed
([#7666](elastic/eui#7666))
- Visual fixes for `EuiRange`s with `showInput`:
([#7678](elastic/eui#7678))
  - Longer `append`/`prepend` labels no longer cause a background bug
  - Inputs can no longer overwhelm the actual range in width
- Fixed a visual text alignment regression in `EuiTableRowCell`s with
the `row` header scope
([#7681](elastic/eui#7681))
- Fixed `toolTipProps` type on `EuiSuperUpdateButton` to use
`Partial<EuiToolTipProps>`
([#7692](elastic/eui#7692))
- Fixes missing prop type for `popperProps` on `EuiDatePicker`
([#7694](elastic/eui#7694))
- Fixed a focus bug with `EuiDataGrid`s with `leadingControlColumns`
when moving columns to the left/right
([#7701](elastic/eui#7701))
([#7698](elastic/eui#7698))
- Fixed `EuiSuperDatePicker` to validate date string with respect of
locale on `EuiAbsoluteTab`.
([#7705](elastic/eui#7705))
- Fixed a visual bug with `EuiSuperDatePicker`'s absolute tab on small
mobile screens ([#7708](elastic/eui#7708))
- Fixed i18n of empty and loading state messages for the
`FieldValueSelectionFilter` component
([#7718](elastic/eui#7718))

**Dependency updates**

- Updated `@hello-pangea/dnd` to v16.6.0
([#7599](elastic/eui#7599))
- Updated `remark-rehype` to v8.1.0
([#7601](elastic/eui#7601))

**Accessibility**

- Improved `EuiBasicTable` and `EuiInMemoryTable`'s selection checkboxes
to have unique aria-labels per row
([#7672](elastic/eui#7672))
- Added `aria-valuetext` attributes to `EuiRange`s with tick labels for
improved screen reader UX
([#7675](elastic/eui#7675))
- Updated `EuiAccordion` to keep focus on accordion trigger instead of
moving to content on click/keypress
([#7696](elastic/eui#7696))
- Added `aria-disabled` attribute to `EuiHorizontalSteps` when status is
"disabled" ([#7699](elastic/eui#7699))

---------

Co-authored-by: Tomasz Kajtoch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience v5.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant