-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[esaggs] > Cannot read property 'doc_count' of undefined #43188
Comments
Pinging @elastic/kibana-app-arch |
It also looks like, at least on master, this causes an infinite loop The dashboard search source JSON is:
I think that is the same shape that it would be in 7.2, so even though there are no filters showing in 7.2, the empty filter I suspect, is still there. |
actually something interesting is that the searchSourceJSON is the same on the dashboard |
I spent quite awhile today investigating this, and the stringified JSON in the bucket key of the response caught my attention:
This is in the response because we are sending it in the request like this:
The bucket key that we send gets stringified here in If I re-type
Identical requests -- other than the different key name. I made a hacky change to const label = filter.label
|| matchAllLabel
|| (typeof filter.input.query === 'string'
? filter.input.query
: filter.input.query.query_string
? filter.input.query.query_string.query
: angular.toJson(filter.input.query)); The result was a request that was identical to the one that "worked", and the error was gone. Next I checked out the changes introduced in #37287, I was able to confirm that the commit from that PR (c703ef1) is where the bug first appeared. So, while the hack above technically "fixes" this, I want to make sure we solve this the right way. I'll consult with @Bargs tomorrow and get a PR open with a fix. |
There are two workarounds for anyone hitting this issue and waiting on the fix to be released. The issue will affect anyone with a visualization saved in an older (pre-7.0 I think) version of kibana which utilizes a
// replace any instances of this:
query:(query_string:(query:'foo:%22bar%22'))
// with this:
query:'foo:%22bar%22'
// replace any instances of this:
"query": {
"query_string": {
"query": "foo:\"bar\""
}
}
// with this:
"query": "foo:\"bar\"" |
bubbles.json.txt
Found in 7.3
Splitting out from #41240
If I change the query from lucene to KQL, then it works;
And the response has changed to;
If I change the filter back to lucene I get this error;
So it's strange that when I open the visualization and the filter is using lucence I initially get this error;
but after changing it to KQL and back to lucene I get the different error.
The text was updated successfully, but these errors were encountered: