refactor: remove redundant ilike filter in build_substring_filter
contains(city, ^query) already produces ILIKE '%query%' ilike(city, ^pattern) with pattern="%query%" is identical
This commit is contained in:
parent
265e976d94
commit
add855c8cb
1 changed files with 2 additions and 3 deletions
|
|
@ -515,14 +515,13 @@ defmodule Mv.Membership.Member do
|
|||
# Builds substring search filter for structured fields
|
||||
# Note: contains/2 uses ILIKE '%value%' which is not index-optimized
|
||||
# Performance: Good for small datasets, may be slow on large tables
|
||||
defp build_substring_filter(query, pattern) do
|
||||
defp build_substring_filter(query, _pattern) do
|
||||
expr(
|
||||
contains(postal_code, ^query) or
|
||||
contains(house_number, ^query) or
|
||||
contains(phone_number, ^query) or
|
||||
contains(email, ^query) or
|
||||
contains(city, ^query) or
|
||||
ilike(city, ^pattern)
|
||||
contains(city, ^query)
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue