Hi Xavier, I've done only Java/Lucene development before I came to Rails and discovered Sphinx.
Lucene (and even better: Compass) is indeed rock-solid and a good choice for a general-purpose search solution. I've implemented search indexes holding literally many millions of documents, and it worked seamlessly on modest hardware. That being said, Ferret (which is the Lucene port to Ruby) seems to be a totally different beast. I've heard people talking about stability issues, with indexes crashing every now and then. Sphinx seems to be a lot more stable and a good choice for the average database-bound rails application. My problem with Sphinx is exactly this database-centric approach. Lucene allows you to store in the index whatever you like, stuff from the database, from a file system, even data generated at runtime; it simply doesn't matter. Setup a document model and you're good to go. If you happen to work on a J2EE application with JavaBeans and all that jive, your beans can serve as a document model for Lucene/ Compass, which is very nice. DRY in Java, one might say. Working with Lucene from JRuby would mean to have an implementation of the Lucene document model in Ruby; I'm not sure if you could use the ActiveRecord model for that. So you'd end up maintaining two indentical object models, one for ActiveRecord and the other one for Lucene. Not DRY. Conclusion: If your data happens to be in the database only, Sphinx can be a good choice. It's stemmer support is not as good as Lucenes, but YMMV. Implementing Lucene would most probably mean extra effort. However, if your application needs to build an index that includes non- SQL data, Sphinx might not be for you. But hey, you could implement the Lucene search using a REST interface and use ActiveResource to work with it in ruby. Just my $.02 Regards, Christian On 20 Aug., 14:28, Xavier Tô <[email protected]> wrote: > Hi > > I'm working on a project which requires a search engine for the > content of the database. A Java fan is pushing for Lucene with > Compass. Since the project will be a Rails project, I'd like to use a > Ruby/Rails world approach rather than going with JRuby or Java. > > My question is : How does (Thinking) Sphinx compares to a solution > like Compass ? I know my question might not apply that much to this > group, but I'm trying anyways. > > Thanks ! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en -~----------~----~----~----~------~----~------~--~---
