Skip to content

GeoDistance incorrectly requires the parameters for GeoBoundingBox #111

Description

@chaserelock

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),
      },
    }))
  );

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions