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

Loading docvalue_fields for geopoints can give incorrect result #55993

Open
jtibshirani opened this issue Apr 30, 2020 · 2 comments
Open

Loading docvalue_fields for geopoints can give incorrect result #55993

jtibshirani opened this issue Apr 30, 2020 · 2 comments
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@jtibshirani
Copy link
Contributor

If a document has a multi-valued geopoint field, the result of docvalue_fields will append all the lat and lon values into a single array. The following example reproduces on version 7.6.

PUT index
{
  "mappings": {
    "properties": {
      "locations": {
        "type": "geo_point"
      }
    }
  }
}

PUT index/_doc/1
{
  "locations": [[ -71.34, 41.12 ], [ -71.34, 42.89 ]]
}

POST index/_search
{
  "docvalue_fields": ["locations"]
}

Response:

{
  "_index" : "index",
  ...
  "fields" : {
    "locations" : [
      -71.33999633789062,
      -71.33999633789062,
      41.119998931884766,
      42.88999938964844
    ]
  }
}
@jtibshirani jtibshirani added >bug :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Apr 30, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Geo)

@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 30, 2020
@wchaparro
Copy link
Member

wchaparro commented Dec 15, 2021

We agree this is a bug and should address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

4 participants