Skip to content

Commit

Permalink
Remove useless statements
Browse files Browse the repository at this point in the history
  • Loading branch information
liowalter committed Sep 7, 2024
1 parent 8aebf57 commit 0b7a609
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions api/app/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def search_documents(self, longitude: float, latitude: float, radius: str) -> li
)
hits = response["hits"]["hits"]

source_fields = list(map(itemgetter("_source"), hits))
scripted_fields = list(map(itemgetter("fields"), hits))

return list(map(lambda thing: {**thing.get("_source"), "distance": thing.get("fields")["distance_in_m"][0]}, hits))

def search(self, query: dict) -> ObjectApiResponse:
Expand Down
2 changes: 0 additions & 2 deletions api/tests/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def test_index_and_query_document(self):
},
)

temp = self.elastic.search_documents(11.5751872644, 48.1285358227, "1km")

self.assertEqual(
["Fraunhofer Apotheke"],
list(map(itemgetter("title"), self.elastic.search_documents(11.5751872644, 48.1285358227, "1km"))),
Expand Down

0 comments on commit 0b7a609

Please sign in to comment.