PG full text search on rails using pg_search gem for substring
问题 I am using Pg full text search for my search . As i am using Ruby on rails, I am using pg_search gem. How do i configure it to give a hit for substring as well. pg_search_scope :search_by_detail, :against => [ [:first_name,'A'], [:last_name,'B'], [:email,'C'] ], :using => { :tsearch => {:prefix => true} } Right now it gives a hit if the substring is in the start but it wont give a hit if the substring in the middle example It gives a hit for sdate@example.com but not for example.com 回答1: I'm