Skip to content

Commit

Permalink
Update search options
Browse files Browse the repository at this point in the history
  • Loading branch information
aliciapaz committed Mar 11, 2024
1 parent 5017603 commit b6f918b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/autocomplete_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AutocompleteController < ApplicationController
def index
@suggestions = PgSearch.multisearch(params[:q]).map do |record|
record.searchable.name
end.uniq.sort
end.uniq

render layout: false
end
Expand Down
6 changes: 3 additions & 3 deletions config/initializers/pg_search.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PgSearch.multisearch_options = { using: { tsearch: { prefix: true },
trigram: { threshold: 0.1 },
dmetaphone: {} } }
PgSearch.multisearch_options = { using: {
trigram: { threshold: 0.1 }
} }

0 comments on commit b6f918b

Please sign in to comment.