diff --git a/backend/playlist/src/query_building.py b/backend/playlist/src/query_building.py index 03d215df..3f5593e5 100644 --- a/backend/playlist/src/query_building.py +++ b/backend/playlist/src/query_building.py @@ -45,7 +45,7 @@ class QueryBuilder: type_parsed = getattr(PlaylistTypesEnum, playlist_type.upper()).value - return {"match": {"playlist_types": type_parsed}} + return {"match": {"playlist_type": type_parsed}} def parse_sort(self) -> dict: """return sort""" diff --git a/backend/playlist/tests/test_src/test_query_building.py b/backend/playlist/tests/test_src/test_query_building.py index 66a8ec22..a3e16cd3 100644 --- a/backend/playlist/tests/test_src/test_query_building.py +++ b/backend/playlist/tests/test_src/test_query_building.py @@ -27,4 +27,4 @@ def test_parse_type(): qb.parse_type("invalid") result = qb.parse_type("custom") - assert result == {"match": {"playlist_type.keyword": "custom"}} + assert result == {"match": {"playlist_type": "custom"}}