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

Filters agg combined with query string or filters errors if no results #2428

Closed
jimmyjones2 opened this issue Dec 19, 2014 · 5 comments · Fixed by #2300 or #2810
Closed

Filters agg combined with query string or filters errors if no results #2428

jimmyjones2 opened this issue Dec 19, 2014 · 5 comments · Fixed by #2300 or #2810
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Vislib Vislib chart implementation PR sent
Milestone

Comments

@jimmyjones2
Copy link
Contributor

Using some syslog data.

Create new bar chart visualisation, add split chart agg, filters agg, query 1: syslog_program:dbus. Apply, see a bar. Now enter syslog_message:bound into query box, see zero bar, as expected, no messages match both.

Now add a sub aggregation, X-Axis, date histogram, and get an error in the javascript console:

TypeError: Cannot read property 'values' of undefined
    at http://localhost:5601/index.js?_b=4673:37266:22
    at Function.map (http://localhost:5601/index.js?_b=4673:34736:27)
    at lodash.ctor.(anonymous function) [as pluck] (http://localhost:5601/index.js?_b=4673:37152:31)
    at http://localhost:5601/index.js?_b=4673:105582:8
    at http://localhost:5601/index.js?_b=4673:105607:27
    at http://localhost:5601/index.js?_b=4673:105663:21
    at http://localhost:5601/index.js?_b=4673:105776:18
    at Object.<anonymous> (http://localhost:5601/index.js?_b=4673:108615:27)
    at Events.VisFactory.Vis.render (http://localhost:5601/index.js?_b=4673:110763:45)
    at Renderbot.VislibRenderbotFactory.VislibRenderbot.render (http://localhost:5601/index.js?_b=4673:140898:22)

Okay this is a bit of a weird example, but if I have a visualisation with a filters agg in a dashboard, and change the query string or do filtering that would cause there to be no results, it breaks in the same way.

@rashidkpc rashidkpc added bug Fixes for quality problems that affect the customer experience Feature:Vislib Vislib chart implementation labels Dec 19, 2014
@rashidkpc rashidkpc added this to the 4.0.0-RC1 milestone Dec 19, 2014
@stormpython
Copy link
Contributor

Just a note to myself as I am getting back into the swing of things.

This is caused because of a no data error. The issue is that a data object is being returned with an empty row, column, or series value.

Pull request #2300 should fix this issue.

@jimmyjones2
Copy link
Contributor Author

@stormpython just tried on master, and still doesn't work, but get a different error this time:

"Error: object is undefined
property/<@http://localhost:5601/index.js?_b=5028:37405:9
map@http://localhost:5601/index.js?_b=5028:34875:1
mixin/</ctor.prototype[methodName]@http://localhost:5601/index.js?_b=5028:37291:26
FlattenDataObjectUtilService/<@http://localhost:5601/index.js?_b=5028:105971:14
UniqueXValuesUtilService/<@http://localhost:5601/index.js?_b=5028:105999:27
OrderedXKeysUtilService/<@http://localhost:5601/index.js?_b=5028:106062:21
ZeroInjectionUtilService/<@http://localhost:5601/index.js?_b=5028:106175:18
ColumnHandler/<@http://localhost:5601/index.js?_b=5028:109050:27
VisFactory/Vis.prototype.render@http://localhost:5601/index.js?_b=5028:111234:22
VislibRenderbotFactory/VislibRenderbot.prototype.render@http://localhost:5601/index.js?_b=5028:144211:7
.link/<@http://localhost:5601/index.js?_b=5028:94853:11
register/<@http://localhost:5601/index.js?_b=5028:94802:15
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:5601/index.js?_b=5028:21856:23
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:5601/index.js?_b=5028:22121:13
done@http://localhost:5601/index.js?_b=5028:17656:34
completeRequest@http://localhost:5601/index.js?_b=5028:17870:7
createHttpBackend/</xhr.onreadystatechange@http://localhost:5601/index.js?_b=5028:17809:1
"

@w33ble
Copy link
Contributor

w33ble commented Jan 29, 2015

As mentioned in #2572, I'm still getting the same error as when the origin issue was filed.

  • Create an aggregation with a filter agg
  • In the query bar, enter a query that causes the filter agg to match nothing

screenshot 2015-01-29 14 33 47

  • Now, add X-Axis with date histogram and apply

screenshot 2015-01-29 14 33 52

@w33ble w33ble reopened this Jan 29, 2015
@w33ble w33ble removed the PR sent label Jan 29, 2015
@w33ble w33ble assigned w33ble and unassigned stormpython Jan 29, 2015
@stormpython
Copy link
Contributor

@w33ble digging into this issue, I get a strange result when I look at the data.

There is a data object that consists of data.rows, which is fine. data.rows is an Array that instead of containing a object with a series array, contains another rows array.

Is this expected for filter aggs?

@w33ble
Copy link
Contributor

w33ble commented Jan 30, 2015

Yes. The problem is the response from ES - the bucket is always defined, since we've told it what the bucket is (the filter agg). So, that bucket comes back, but since the bucket has no data, the next bucket has nothing in it.

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:Vislib Vislib chart implementation PR sent
Projects
None yet
4 participants