Rails 3. Live searching
I am developing a "live search" in Rails 3 using the below guide. I am just a bit afraid that this "query by type" will be very heavy o开发者_JAVA技巧n the database server (I am using Heroku). Is searching like this a big no-no or do you guys think it will be ok, even if I got 500 users? Any input is good! Thanks!
You may want to use a full-text search engine like Sphinx. Look at this Railscast episode to learn more.
I think in the same tutorial @Aymeric has commented after your query (http://aymeric.gaurat.net/index.php/2010/how-to-develop-live-search-textbox-in-ruby-on-rails/)
and one more thing you can do is to set a limit to the query so that you wont get the whole list
cheers
sameera
精彩评论