I just switched from MySQL to Postgres 9.0.3. I have a new application with little data (game data).
In any case, I cannot find partial words to search. Here is my search method:
def self.search(query)
conditions = <<-EOS
to_tsvector('english', title) @@ plainto_tsquery('english', ?)
EOS
find(:all, :conditions => [conditions, query])
end
I'm sure I need a template, but I'm just learning Postgres.
When I search , I get the correct results: Shinobi
Alex Kidd in Shinobi World - Sega Home
Shinobi - Sega Master System
Shinobi - Nintendo Entertainment System
Cyber Shinobi: Shinobi Part 2 - Sega Master System
But when I search , I get nothing? Shin
Thanks for any tips.
source
share