Skip to content

Commit

Permalink
Use the keyword creator field
Browse files Browse the repository at this point in the history
Signed-off-by: Olga Bulat <obulat@gmail.com>
  • Loading branch information
obulat committed Nov 14, 2023
1 parent de73677 commit b48b865
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/api/controllers/search_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def build_collection_query(
# Collection filters allow a single value.
("tag", "tags.name.keyword"),
("source", None),
("creator", None),
("creator", "creator.keyword"),
]
for serializer_field, es_field in filters:
if serializer_field in collection_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_create_search_query_empty_with_dynamically_excluded_providers(
{"source": "flickr", "creator": "nasa"},
[
{"term": {"source": "flickr"}},
{"term": {"creator": "nasa"}},
{"term": {"creator.keyword": "nasa"}},
],
id="filter_by_creator",
),
Expand Down

0 comments on commit b48b865

Please sign in to comment.