graphql-compose / graphql-compose/graphql-compose-elasticsearch

GeoDistance incorrectly requires the parameters for GeoBoundingBox

Open
#111 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
584
Forks
76
PR merge metrics
No merged PRs in 30d

Description

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.

```js
const subName = getTypeName('QueryGeoDistanceSettings', opts);
const fields = getGeoPointAsFieldConfigMap(
opts,
opts.getOrCreateITC(subName, () => ({
name: subName,
fields: {
top_left: getGeoPointFC(opts),
bottom_right: getGeoPointFC(opts),
},
}))
);
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.