From bb3be5a816f7e4eb85b69ec558572bed9c3b6b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jovan=20Kruni=C4=87?= Date: Mon, 16 May 2022 11:51:10 +0000 Subject: [PATCH] fix: take coordinates in right order Closes #116 --- src/storage/elasticsearch/query.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/elasticsearch/query.ts b/src/storage/elasticsearch/query.ts index cbed5ae4..64927aed 100644 --- a/src/storage/elasticsearch/query.ts +++ b/src/storage/elasticsearch/query.ts @@ -212,8 +212,8 @@ export function buildFilter(filter: SCSearchFilter): // @ts-ignore unfortunately, typescript is stupid and won't allow me to map this to an actual type. ignore_unmapped: true, [`${filter.arguments.field}.point.coordinates`]: { - bottom_right: filter.arguments.shape.coordinates[0], - top_left: filter.arguments.shape.coordinates[1], + top_left: filter.arguments.shape.coordinates[0], + bottom_right: filter.arguments.shape.coordinates[1], }, }, },