I have been looking at integrating a search engine into rails, and I am considering both Sphinx with the Thinkink Sphinx plugin, or possibly Solr with the acts as solr plugin.
My question is which one works best in general? As far a开发者_JAVA技巧s I can see sphinx seems to be the option most people go with to get a basic search up and running.
Sphinx is simple to deploy and really great in simple case. With Sphinx there are no really different request system. You are a little limit. But it's a great tool and works fine.
Solr is a really big application. But can be too big for small system. Solr has a great query system. So you can made more complicated query with it.
Having worked with both, my take is "sphinx if you want to get set up quickly and have less load (Java) on your server (it is a C app)", "solr if search is a critical part of your application and delivering search results quality is very important." (and you're ok with having the JRE on your server) For a website I'd probably use Google custom search engine with custom css, for a freelance project (short term) I'd probably use Sphinx, for a company as an employee on a web application where users needed to find archived information by searching, I'd use solr." Another point might be where you host the application. Engine Yard offers Sphinx I believe.
I would recommend the thinking_sphinx plugin. The acts_as_solr is very out of date and not very robust. While SOLR may give better search result matching it is also a bear to setup and maintain. I have written some very complex and quality search algorithms in thinking_sphinx. You can do quite a bit with it. It is also extremely easy to setup.
精彩评论