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

Range filters on scripted fields don't work when bounds aren't explicit #4862

Closed
lukasolson opened this issue Sep 4, 2015 · 2 comments
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience PR sent v4.2.0

Comments

@lukasolson
Copy link
Member

  1. Create a scripted field of type number
  2. Create a bar chart
  3. For X-axis, select range aggregation on the scripted field
  4. Add another range, but leave at least one of the From/To empty (signifying the range should have either no upper or lower bound)
  5. Run the visualization, then click on the bar generated by the above step to create a filter
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"expression_script_compilation_exception","reason":"Parameter [gte] must be a numeric type"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"apache-logs-2015.07.01","node":"5Ft1n7ZoSFO81zMCSJeiFQ","reason":{"type":"script_exception","reason":"Error during search with inline script [(ln(doc[\"bytes\"].value))>=gte && (ln(doc[\"bytes\"].value))<lt] using lang [expression]","caused_by":{"type":"expression_script_compilation_exception","reason":"Parameter [gte] must be a numeric type"}}}]}}
    at http://localhost:5601/bundles/kibana.bundle.js:94680:39
    at Function.Promise.try (http://localhost:5601/bundles/commons.bundle.js:54485:23)
    at http://localhost:5601/bundles/commons.bundle.js:54454:31
    at Array.map (native)
    at Function.Promise.map (http://localhost:5601/bundles/commons.bundle.js:54453:31)
    at callResponseHandlers (http://localhost:5601/bundles/kibana.bundle.js:94652:23)
    at http://localhost:5601/bundles/kibana.bundle.js:94166:17
    at wrappedCallback (http://localhost:5601/bundles/commons.bundle.js:33417:82)
    at wrappedCallback (http://localhost:5601/bundles/commons.bundle.js:33417:82)
    at http://localhost:5601/bundles/commons.bundle.js:33503:27

I guess it's possible that this is a bug in Elasticsearch.

@lukasolson lukasolson added bug Fixes for quality problems that affect the customer experience v4.2.0 labels Sep 4, 2015
@rashidkpc
Copy link
Contributor

Seems likely to be an elasticsearch bug?

"root_cause":[{"type":"expression_script_compilation_exception","reason":"Parameter [gte] must be a numeric type"}

Also, if this is only applies when bounds aren't explicit that error message sure doesn't convey that

@rashidkpc
Copy link
Contributor

Er, this is definitely our bug, we create the filters by concatenating a string basically. I bet we're not looking to see if the gte side of the string exists

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 PR sent v4.2.0
Projects
None yet
Development

No branches or pull requests

3 participants