开发者

How to implement search layer for Ruby on Rails site?

We are implementing a product review site using Ruby on R开发者_如何学Pythonails.

Search is a core component of the user experience. We need to make searches fast and relevant.

Should we use Lucene or another open source search layer? Should we use Google's search API and index against only our site? Or should we develop proprietary search functionality?

Thanks!


I personally like Sphinx + UltraSphinx, but I'm sure there are an equal number of people who'd like Lucene or XXX. I'm afraid it depends on information not contained in your question. What are you searching? Does it have any form of taxonomy? What terms are users going to be searching for?

Ultrasphinx + Sphinx takes about 10 minutes to get running so I'd suggest you give it a crack and see how you get on.


Take a look at Solr. It's the fastest way to get up and running with a Lucene-powered search server. It'll provide additional features like faceting and plumbing for document pre-processing when indexing.

Solr also provides a lot of room for scaling as your site grows via both sharding & replication.

There seems to be plenty of bindings for Ruby (I'm more of a PHP guy so I can comment on their usefulness). Solr exposes a rich REST API you could leverage easily too.

One thing to consider carefully with Solr is how to deal with search index updates. Batch vs near real-time index updates may affect your strategy. You'll want to define your app's requirements in this regard ahead of time.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜