Skip to content

[Maps] Spatial filtering (Draw to filter data) doesn't work when ignoreFilterIfFieldNotInIndex is True #56651

@audeberc

Description

@audeberc

Kibana version: 7.5.1

Elasticsearch version: 7.5.1

Server OS version: ElasticCloud AWS

Browser version: Chrome Version 79.0.3945.117 (Official Build) (64-bit)

Browser OS version: Ubuntu 18.04

Original install method (e.g. download page, yum, from source, etc.): ElasticCloud

Describe the bug:
When the advanced option ignoreFilterIfFieldNotInIndex is set to True in the advanced option (in order to use multi-index dashboards), spatial filtering functions in the Maps visualization (bounding box filtering, shape filtering) are broken (indexes not filtered).

Steps to reproduce:

  1. Set ignoreFilterIfFieldNotInIndex to True in advanced option
  2. Open a map visualization with a Document layer visible
  3. Open Tools (wrench under the map zoom buttons) > Draw bounds to filter data
  4. Draw a rectangle on the map to test the spatial filtering

Expected behavior:
Data is filtered to only display points inside the bounding box.

Observed behavior:
The data is not filtered even though the filter is displayed under the research bar

Any additional context:
when looking at the request sent by the browser when filtering the data (Chrome developer tools), it seems that the Elasticsearch query is incomplete:

"query":{"bool":{"must":[ ],"filter":[{"match_all":{}}],"should":[],"must_not":[]}}}

Whereas the same action without ignoreFilterIfFieldNotInIndex sends the query:

"query":{"bool":{"must":[],"filter":[{"match_all":{}},{**"geo_bounding_box":{"geom_point":{"bottom_right":[XXX,YYY],"top_left":[XXX,YYY]}}**}],"should":[],"must_not":[]}}}

Metadata

Metadata

Assignees

Labels

Team:GeoFormer Team Label for Geo Team. Now use Team:PresentationbugFixes for quality problems that affect the customer experience

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions