I am adding pg_search to a Rails application. I follow the instructions on github and railscast , but I ran into a problem.
I am creating a multi-user search and I have a basic implementation. But I want to extend pg_seach to use its English dictionary.
I already have an initializer:
PgSearch.multisearch_options = { :using => [:tsearch,:trigram], :ignoring => :accents }
So, from what I read, it seems that adding a voice recorder should be as simple as
PgSearch.multisearch_options = { :using => [:tsearch => [:dictionary => "english"],:trigram], :ignoring => :accents }
But when I start my server
...config/initializers/pg_search.rb:2: syntax error, unexpected ']', expecting tASSOC (SyntaxError) :using => [:tsearch => [:dictionary => "english"],:trigram],
I tried replacing the square with curly braces and all the other syntax permutations that I can think of, but no luck.
What is the correct syntax here? And why are my attempts invalid since I followed the syntax for searching in scope?
source share