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

[maps] ignore indices without geometry field in vector tile requests #170656

Closed
nreese opened this issue Nov 6, 2023 · 1 comment · Fixed by #171472
Closed

[maps] ignore indices without geometry field in vector tile requests #170656

nreese opened this issue Nov 6, 2023 · 1 comment · Fixed by #171472
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Maps Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@nreese
Copy link
Contributor

nreese commented Nov 6, 2023

Solutions use wide data views that access many elasticsearch indices, for example metrics*. This can cause shard failures for indices that do not contain geospatial field. These shard failures are a nuisance to users and can be removed by adding an exists filter to the query. This is similar to #73304. #73304 has been resolved for search source data requests. The issue is not resolved for vector tile data requests.

Steps to view problem

  1. In console, run:
    PUT geo1
    {}
    
    PUT geo1/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
    
    PUT geo1/_doc/1
    {
      "location": "25,25"
    }
    
    PUT geo2
    {}
    
    PUT geo2/_doc/1
    {}
    
  2. Create geo* data view
  3. create new map
  4. add documents layer from geo* data view.
  5. Add heatmap layer from geo* data view.
  6. notice how layer indicates warning because geo2 index could not return results.
    Screenshot 2023-11-17 at 8 27 36 AM
  7. Switch scaling to limit to 10000. Notice how warning no longer exists. This is because bounds filter for geojson request includes clause to ensure geometry field exists. Vector tile requests should do the same thing.
@nreese nreese added bug Fixes for quality problems that affect the customer experience Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Maps labels Nov 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@nreese nreese changed the title [maps] ensure geometry field exists for vector tile layers [maps] handle indices without geometry field in vector tile requests Nov 6, 2023
@nreese nreese changed the title [maps] handle indices without geometry field in vector tile requests [maps] ignore indices without geometry field in vector tile requests Nov 6, 2023
@nreese nreese self-assigned this Nov 17, 2023
lcawl pushed a commit to lcawl/kibana that referenced this issue Nov 22, 2023
…lastic#171472)

Closes elastic#170656

PR adds exists filter to ensure geo field exists 

### Test instructions
1. In console, run:
    ```
    PUT geo1
    {}

    PUT geo1/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }

    PUT geo1/_doc/1
    {
      "location": "25,25"
    }

    PUT geo2
    {}

    PUT geo2/_doc/1
    {}
    ```
2. Create `geo*` data view
3. create new map
4. add documents layer from `geo*` data view.
5. Add heatmap layer from `geo*` data view.
6. Verify geo1 data is displayed and warning is not displayed fro geo2
shard failures

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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:Maps Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants