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

GeoDistance incorrectly requires the parameters for GeoBoundingBox #111

Open
chaserelock opened this issue Jul 24, 2020 · 0 comments
Open

Comments

@chaserelock
Copy link

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html
src/QueryDSL/Query/Geo/GeoDistance

Rather than just requiring a getGeoPointFC(opts) e.g. { "lat": 127, "lon": 4 }, GeoDistance instead expects top_left and bottom_right which should only be used in the GeoBoundingBox query.

 const subName = getTypeName('QueryGeoDistanceSettings', opts);
  const fields = getGeoPointAsFieldConfigMap(
    opts,
    opts.getOrCreateITC(subName, () => ({
      name: subName,
      fields: {
        top_left: getGeoPointFC(opts),
        bottom_right: getGeoPointFC(opts),
      },
    }))
  );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant