简体   繁体   中英

Rails full text search PgSql

I am working in rails 3.2 and using pgsql, Thing is I want to implement full-text search functionality and after so much googling I did not found anything relevant. Right now I am using search with wild card and its working fine, but I want to implement full text search

Event.select('event_name,id').find(:all, :conditions => ['lower(event_name) LIKE ?', "%#{params[:keyword].downcase}%"])

Any help would be really appreciate able.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM