Strange behaviour with filters not working

Hi,
I'm experiencing strange behaviour and hoping someone could help me out.

We've recently migrated to es 6.1.2 and imported all of our dashboards and visualisations from kibana 5.

We've got some very strange behaviour however where visualisations aren't working unless we change the filter type to something else, then back to what it was?!

For example, clicking search on the visualistion shows this in console:

You can see the search/json seemed to return ok:

If I toggle the filter from "Term" to something else, then back to "Term", it's fine:
33

Can't really see any difference in the response!:

So I started to look at the differences in the stored JSON between an "unfixed" and "fixed" visualisation.
Problem state:

{ title: 'retail-check.vehicles added to stock',
  type: 'histogram',
  params:
   { shareYAxis: true,
     addTooltip: true,
     addLegend: true,
     scale: 'linear',
     mode: 'stacked',
     times: [],
     addTimeMarker: false,
     defaultYExtents: false,
     setYExtents: false,
     yAxis: {} },
  aggs:
   [ { id: '1', type: 'count', schema: 'metric', params: [Object] },
     { id: '2',
       type: 'date_histogram',
       schema: 'segment',
       params: [Object] },
     { id: '3', type: 'filters', schema: 'group', params: [Object] } ],
  listeners: {} }

After a save (working state):

{ title: 'retail-check.vehicles added to stock',
  type: 'histogram',
  params:
   { shareYAxis: true,
     addTooltip: true,
     addLegend: true,
     scale: 'linear',
     mode: 'stacked',
     times: [],
     addTimeMarker: false,
     defaultYExtents: false,
     setYExtents: false,
     yAxis: {},
     type: 'histogram',
     grid: { categoryLines: false, style: [Object] },
     categoryAxes: [ [Object] ],
     valueAxes: [ [Object] ],
     seriesParams: [ [Object] ],
     legendPosition: 'right' },
  aggs:
   [ { id: '1',
       enabled: true,
       type: 'count',
       schema: 'metric',
       params: [Object] },
     { id: '2',
       enabled: true,
       type: 'date_histogram',
       schema: 'segment',
       params: [Object] },
     { id: '3',
       enabled: true,
       type: 'filters',
       schema: 'group',
       params: [Object] } ] }

So there are some differences... We've got 1000's of visualisations so would rather not have to manually toggle the filters on them all!

Anyone got any ideas how to ease this pain?

Digging into this a little more I see a difference in the way the filters are being stored:

broken:

> a.aggs[2].params.filters[0]
{ input: { query: { query_string: [Object] } }, label: '' }

working:

> a.aggs[2].params.filters[0]
{ input:
   { query: 'dotted-name-by-all:at-portal.live.by-all.counter.status.2??.api.appraisal-vehicle.add-to-stock' },
  label: '' }

I moved this over to the Kibana forum, as that question seems to be more appropriate over here.

Hi Karl,

just to confirm I get you correctly: This only effects visualizations, that uses the Filter Bucket aggregation? Not filters attached to any visualization?

Cheers,
Tim

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.