Skip to content

Commit 23e049b

Browse files
committed
Fix FacetSearchResults when passing an empty facet_query string.
When we pass an empty "facetQuery" param to Meilisearch, the response turns the empty string into a null value. This causes "Input should be a valid string" errors, making it impossible to run this query (which is quite a useful one, since it returns all the distinct values for an index.)
1 parent bfe252a commit 23e049b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

meilisearch_python_sdk/models/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FacetHits(CamelBase):
1818

1919
class FacetSearchResults(CamelBase):
2020
facet_hits: list[FacetHits]
21-
facet_query: str
21+
facet_query: str | None
2222
processing_time_ms: int
2323

2424

0 commit comments

Comments
 (0)