ppadovani / KibanaNestedSupportPlugin

A plugin for Kibana 5.5 and beyond that adds support for nested field search and aggregation.
https://ppadovani.github.io/knql_plugin/overview/
Apache License 2.0
79 stars 7 forks source link

Filter visualize: Visualize: _parse_query.formatQuery is not a function #80

Closed Hubbitus closed 6 years ago

Hubbitus commented 6 years ago

Plugin version

1.0.7

Kibana version

6.1.2

Plugins installed

For kibana only KibanaNestedSupportPlugin

Description of the problem including expected versus actual behavior

I try use filter aggregation in metric visualisation. When I provide filter in any form (KNQL or elasticsearch form) I got error.

What interesting, I got different errors dependent on entered filter style.

Elasticsearch style filter

If I try enter filter like {"errors.hasErrors":true} I got:

Error: _parse_query.formatQuery is not a function
write/outFilters<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:24416
transform/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:231575
arrayEach@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:173252
transform@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:231504
write@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:23910
AggTypesAggParamsProvider/AggParams.prototype.write/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:14:12227
AggTypesAggParamsProvider/AggParams.prototype.write@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:14:12186
VisAggConfigProvider/AggConfig.prototype.write@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:7:28648
aggConfig.prototype.toDsl@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:44625
aggConfig.prototype.toDslNested@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:45583
AggConfigs.prototype.toDsl/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:47998
AggConfigs.prototype.toDsl@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:47412
SavedVis.prototype._afterEsResp/</<@http://pokd.rosreestr.work/bundles/kibana.bundle.js?v=16363:30:758058
shouldQuery@http://pokd.rosreestr.work/bundles/kibana.bundle.js?v=16363:87:61507
handler/<@http://pokd.rosreestr.work/bundles/kibana.bundle.js?v=16363:87:61712
$Promise@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:60:68381
handler@http://pokd.rosreestr.work/bundles/kibana.bundle.js?v=16363:87:61675
_callee/</$scope.fetch<@http://pokd.rosreestr.work/bundles/kibana.bundle.js?v=16363:77:369914
complete@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:221700
delayed@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:221857

image

KNQL syntax

If I try enter filter like "errors.hasErrors" = true I got:

Error: _parse_query.formatQuery is not a function
write/outFilters<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:24416
transform/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:231575
arrayEach@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:173252
transform@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:231504
write@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:23910
AggTypesAggParamsProvider/AggParams.prototype.write/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:14:12227
AggTypesAggParamsProvider/AggParams.prototype.write@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:14:12186
VisAggConfigProvider/AggConfig.prototype.write@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:7:28648
aggConfig.prototype.toDsl@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:44625
aggConfig.prototype.toDslNested@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:45583
AggConfigs.prototype.toDsl/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:47998
AggConfigs.prototype.toDsl@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:215:47412
SavedVis.prototype._afterEsResp/</<@http://pokd.rosreestr.work/bundles/kibana.bundle.js?v=16363:30:758058
SearchSourceProvider/SearchSource.prototype._mergeProp@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:7:69688
ittr@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:82:622546
baseMap/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:182793
createBaseFor/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:192973
baseForOwn@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:179934
createBaseEach/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:192533
baseMap@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:182726
map@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:218631
ittr@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:82:622396
AbstractDataSourceProvider/SourceAbstract.prototype._flatten@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:82:622370
value@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:27:116888
Promise.try@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:76:19141
callClient/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:82:629127
Promise.try@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:76:19073
Promise.map/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:76:18453
Promise.map@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:76:18418
callClient@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:82:629074
fetchSearchResults/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:82:626526
processQueue@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:55:132456
scheduleProcessQueue/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:55:133349
$digest@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:55:144239
$evalAsync/<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:55:146732
completeOutstandingRequest@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:55:36782
Browser/self.defer/timeoutId<@http://pokd.rosreestr.work/bundles/commons.bundle.js?v=16363:55:39923

image

Steps to reproduce

  1. Create metric visualisation
  2. In Split group select aggregation Filters
  3. Enter Filter 1 value
  4. Try run visualisation
  5. Got error

Errors in browser console (if relevant)

I think no

If using docker, include your docker file

Official oss kibana images

ppadovani commented 6 years ago

I'll be focusing time on a new release and issues this weekend, so I should be able to take a look at this then.

ppadovani commented 6 years ago

Quick test on the new port for 6.3, shows this is broken. Not sure if the same issue, but I'll address it in the 6.3 first, then look at back releases.

ppadovani commented 6 years ago

Ok.. got your exact error on 6.0.1 as I was forward porting #80 and #81 ... I did not see this in the previous versions. So I'll fix it in 6.0.1 as part of the stream of forward ports, and it should get done today/tomorrow.

ppadovani commented 6 years ago

fixed