开发者

Solr Vs. Sphinx in a Ruby project

I have a project that is being written on top of the Grape API framework in ruby. (https://github.com/intridea/grape)

The problem I'm having is that Thinking-Sphinx vs. Sunspot (Gems used to interface with each search index) have worlds different benchmarks. View the Benchmark Here

We're trying to develop something that is quick and easy to deploy (Solr needs Java).

The issues we see right now is mainly that Solr is slower through Sunspo开发者_C百科t gem and Sphinx is faster through Thinking-Sphinx because Solr is HTTP REST calls where Sphinx is sockets.

Anyone have any experience in either and can explain pitfalls / bonuses?

Note: Needs to be deployable to Rails AND non-rails apps (Hence Sunspot).

Thanks!


Sphinx is easier to setup and get working and provides most of the flexibility you may want.

Solr is more fully featured and scales up to larger data better, but may be harder to configure and get working the way you'd like.

We've been using Sphinx for years at PatientsLikeMe and I wish we had originally selected Solr. I regret not having more complex weighting and sorting options. On the other hand, Sphinx was a lot easier to get setup initially.

EDIT: I've had even better luck with ElasticSearch, which is both easy to setup, scales well, and has all of the features of Solr. I would strongly recommend ElasticSearch over either Sphinx or Solr for anyone.


As noted in the comments of that post, that benchmark is next to useless. Not only does it not mention the parameters of the index and the queries used in the benchmark, but it only seems to benchmark transfer speed, not actual searching speed.

Please note that I'm not saying that Solr is faster / better than Sphinx, I'm just saying that I'd never use that post and that benchmark to make a decision about a search engine for my applications.

By the way, it doesn't really matter much, but Solr's HTTP interface is not REST at all.

Also, if you really make your benchmarks correctly and determine that you absolutely need top performance and the bottleneck is XML serialization (in the real world, this almost never happens), you can take a look at this javabin implementation in Ruby.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜