Skip to content

Commit

Permalink
api: linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
jone committed Sep 7, 2024
1 parent a73c6d9 commit 7741943
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions api/app/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,22 @@ def search_documents(self, longitude: float, latitude: float, radius: str) -> li
"size": 1000,
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": radius,
"coordinates": {
"lat": latitude,
"lon": longitude
}
}
}
"must": {"match_all": {}},
"filter": {"geo_distance": {"distance": radius, "coordinates": {"lat": latitude, "lon": longitude}}},
}
},
"sort": [
{
"_geo_distance": {
"coordinates": {
"lat": latitude,
"lon": longitude
},
"coordinates": {"lat": latitude, "lon": longitude},
"order": "asc",
"unit": "km",
"mode": "min",
"distance_type": "arc",
"ignore_unmapped": True
"ignore_unmapped": True,
}
}
]
],
}
)
hits = response["hits"]["hits"]
Expand Down

0 comments on commit 7741943

Please sign in to comment.