Skip to content

Commit

Permalink
Fix query to be compliant with schema
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Jun 6, 2024
1 parent 75b330a commit f4c4b07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/adapters/search/ElasticsearchSearchAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class ElasticsearchSearchAdapter extends BaseSearchAdapter {
.sort(coords != null, [
{
_geo_distance: {
location: {
location_coordinates: {
lon: parseFloat(coords?.[0]),
lat: parseFloat(coords?.[1]),
},
Expand All @@ -187,7 +187,7 @@ export class ElasticsearchSearchAdapter extends BaseSearchAdapter {
{
geo_distance: {
distance: `${q.distance}miles`,
location: {
location_coordinates: {
lon: parseFloat(coords?.[0]),
lat: parseFloat(coords?.[1]),
},
Expand Down

0 comments on commit f4c4b07

Please sign in to comment.