search engine

5 views
Skip to first unread message

Annapoorna R

unread,
Aug 22, 2011, 5:58:00 AM8/22/11
to rubyonra...@googlegroups.com
hello all
 I am trying to develop a search functionality that performs searchin by user id, searching by name as part of my application  in rails3 .. could anybody suggest ?

J. Pablo Fernández

unread,
Aug 22, 2011, 6:10:10 AM8/22/11
to rubyonra...@googlegroups.com
You could just use SQL if your needs are very simple. It's a straightforward solution, just do a query using LIKE and wildcards, but be careful not to open your app to SQL injection.

If that's not enough, several databases have full text search, which may or may not be good.

The next step is to use something like Sphinx to index your data, but here it becomes quite complex.

sandip ransing

unread,
Aug 22, 2011, 6:45:10 AM8/22/11
to rubyonra...@googlegroups.com
use thinking-sphinx gem

2011/8/22 J. Pablo Fernández <pup...@pupeno.com>
You could just use SQL if your needs are very simple. It's a straightforward solution, just do a query using LIKE and wildcards, but be careful not to open your app to SQL injection.

If that's not enough, several databases have full text search, which may or may not be good.

The next step is to use something like Sphinx to index your data, but here it becomes quite complex.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/pls4RWzY0AQJ.

To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



--
sαη∂ιρ Rαηѕιηg

---
www.funonrails.com

twitter, github @sandipransing
skype sandip.ransing

J. Pablo Fernández

unread,
Aug 22, 2011, 6:54:15 AM8/22/11
to rubyonra...@googlegroups.com
Yes, of course, thinking-sphinx... well there are other gems but I haven't tried them. Even then, you have to maintain Sphinx itself running, which sometimes can be a pain.
Reply all
Reply to author
Forward
0 new messages