diff --git a/api/app/elastic.py b/api/app/elastic.py index 567aa83..34c9593 100644 --- a/api/app/elastic.py +++ b/api/app/elastic.py @@ -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: diff --git a/api/tests/test_elastic.py b/api/tests/test_elastic.py index 907b002..b5946aa 100644 --- a/api/tests/test_elastic.py +++ b/api/tests/test_elastic.py @@ -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"))),