I'm getting ready to build search capabilities into my app. I want the search to have the ability to span multiple models.
I'm thinking about adding a search controller which would then decide which models to search based on settings etc...
What do you think? Does a search controller sound right or is there something open-source I should be thinking about?
Thanks
You have a couple of options for search in ruby world like
Going through the documentation of heroku, heroku suggests with solr which is an awesome search engine. http://docs.heroku.com/websolr and http://docs.heroku.com/full-text-search details more information about that. We chose solr for search in one of our projects and we used sunspot_rails which nicely integrates with your models and reindexes when your content changes. We used the gem sunspot_rails from http://github.com/outoftime/sunspot which is recommended by heroku too.
Caveat though is that heroku's file system is read only and does not allow you to run arbitrary processes, so you have to choose one like websolr(starts from 20$ a month) or spawning your own amazon ec2 instance and do the indexing there. Since heroku is also running on amazon ec2, the latency is very very less.
Getting back to the alternatives, Ferret is known to crash/corrupt indexes often in production. Sphinx is not supported by heroku. Endeca is damn expensive, you gotta spend most of your budget just even to get basic results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With