lower the number of characters to trigger a fulltext search

This commit is contained in:
thomas girod 2024-09-17 17:52:39 +02:00
parent 813bbbb94a
commit ab72e01707

View File

@ -54,7 +54,7 @@ class UserFilterSchema(FilterSchema):
def filter_search(self, value: str | None) -> Q:
if not value:
return Q()
if len(value) < 4:
if len(value) < 3:
# For small queries, full text search isn't necessary
return (
Q(first_name__istartswith=value)