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

Only include scripted fields if really needed in request #18564

Closed
bczifra opened this issue Apr 25, 2018 · 7 comments
Closed

Only include scripted fields if really needed in request #18564

bczifra opened this issue Apr 25, 2018 · 7 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bczifra
Copy link
Member

bczifra commented Apr 25, 2018

Kibana version: 6.2.3

Elasticsearch version: 6.2.3

Server OS version: OSX

Browser version: Chrome

Browser OS version: 65.0.3325.181 (Official Build) (64-bit)

Original install method (e.g. download page, yum, from source, etc.): tar

Description of the problem including expected versus actual behavior: If an index pattern has a scripted field associated with it, then any Kibana requests related to that index pattern (visualizations, dashboards, etc.) will include that scripted field as part of the request, even if the request does not require the scripted field.

Steps to reproduce:

  1. Create a scripted field associated with an index pattern.
  2. Create a simple visualization based on that index pattern that doesn't referenced the scripted field in any way.
  3. Render the visualization.
  4. Check the Chrome "Network" toolbar and the scripted field will show up as part of the request.
@bczifra bczifra added Feature:Search Querying infrastructure in Kibana :Discovery triage_needed enhancement New value added to drive a business result labels Apr 25, 2018
@Bargs
Copy link
Contributor

Bargs commented Apr 25, 2018

Are you seeing any issues as a result? Since the visualization request is asking for 0 hits, I would assume the script isn't actually being run at all.

@bczifra
Copy link
Member Author

bczifra commented Apr 26, 2018

No, no issues, just didn't expect it to be part of the request.

@Bargs Bargs added chore and removed enhancement New value added to drive a business result feedback_needed labels Apr 26, 2018
@Bargs
Copy link
Contributor

Bargs commented Apr 26, 2018

Gotcha. In that case I'd only really want to exclude it if it doesn't overly complicate the code. I'll leave this open as a chore task.

@timroes timroes changed the title If an index pattern has scripted fields defined, they are included as part of any request referencing that index pattern Only include scripted fields if really needed in request Jul 3, 2018
@rayafratkina rayafratkina added bug Fixes for quality problems that affect the customer experience and removed chore labels Jul 3, 2018
@rayafratkina
Copy link
Contributor

rayafratkina commented Jul 3, 2018

Per recent report, this is actually causing issues, so removing Chore label and reclassifying as bug.
Note from a user: "Many visualizations return shard fails due to amount of script that elastic has to compile which is limited (configurable). "

@alexfrancoeur
Copy link

alexfrancoeur commented Jul 9, 2018

I believe the Elasticsearch team is discussing some of this on their end as well - elastic/elasticsearch#31824

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure :Discovery labels Sep 16, 2018
@AlonaNadler
Copy link

Elasticsearch merged a fix for this elastic/elasticsearch#31824
Can we close this issue?

@elastic/kibana-app

@timroes
Copy link
Contributor

timroes commented Feb 25, 2019

Yeah since the Elasticsearch team no longer calculates scripted fields in case we send size=0 from 6.5.0 onwards there is no need for us to strip these of in the Kibana side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

6 participants