Skip to content

Commit

Permalink
Remove unneeded spaces surrounding tsquery term
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Jan 10, 2022
1 parent 70c790c commit 86f16c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,7 @@ def generate_query_for_search(unsanitized_terms)
terms = unsanitized_terms.gsub(DISALLOWED_TSQUERY_CHARACTERS, ' ')

# The final ":*" is for prefix search.
# Not sure what surrounding spaces are for, but they were there in the
# original code.
"' #{terms} ':*"
"'#{terms}':*"
end
end

Expand Down

0 comments on commit 86f16c5

Please sign in to comment.