# Search technique

**URL:** <https://discuss.rubyonrails.org/t/search-technique/14754>\
**Category:** rubyonrails-talk\
**Created:** [June 22, 2007, 11:14am UTC](https://discuss.rubyonrails.org/t/search-technique/14754 "2007-06-22T11:14:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@Arun\_Agrawal](https://discuss.rubyonrails.org/u/Arun_Agrawal)\
**Post date:** [June 22, 2007, 11:14am UTC](https://discuss.rubyonrails.org/t/search-technique/14754/1 "2007-06-22T11:14:24Z")

</div>

hello all,

I need to implement search in my app. any one guide me which search technique or plugin or gem is good for it. the search must be too fast. i used ferret before. but if there is any good other than this then please reply me.

Thanks

---

<div class="post-metadata">

**Author:** ![Arun\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@Arun\_Agrawal](https://discuss.rubyonrails.org/u/Arun_Agrawal)\
**Post date:** [June 25, 2007, 10:57am UTC](https://discuss.rubyonrails.org/t/search-technique/14754/2 "2007-06-25T10:57:36Z")

</div>

any idea about ferret…?

---

<div class="post-metadata">

**Author:** ![Jens\_Kraemer](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@Jens\_Kraemer](https://discuss.rubyonrails.org/u/Jens_Kraemer)\
**Post date:** [June 25, 2007, 1:43pm UTC](https://discuss.rubyonrails.org/t/search-technique/14754/3 "2007-06-25T13:43:39Z")

</div>

> any idea about ferret..?

with acts\_as\_ferret ([http://projects.jkraemer.net/acts\_as\_ferret](http://projects.jkraemer.net/acts_as_ferret)) Ferret can do all the things stated below, minus the need for a Java server 🙂

And you don't need a search server running at all when doing local development and testing - the server component is only needed for production usage.

Btw, what exactly does 'Optimized for Low to High Volume Web Traffic' mean?

Cheers, Jens

> \>

[..]

---

<div class="post-metadata">

**Author:** ![Peter\_De\_Berdt](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@Peter\_De\_Berdt](https://discuss.rubyonrails.org/u/Peter_De_Berdt)\
**Post date:** [June 26, 2007, 7:29am UTC](https://discuss.rubyonrails.org/t/search-technique/14754/4 "2007-06-26T07:29:40Z")

</div>

Ferret is fine for low traffic sites, but once traffic goes up, things start to happen. I’m sure people on this list will know the disastrous “segmentation fault” errors ferret is well known for. The latest version of ferret has dealt with a lot of these bugs, so things should be better. Also, ferret has no way of splitting up your indexing to balance it over another server. All in all, I’ve switched from ferret to solr and although I’m not a big java fan because of its memory consumption, solr and the real lucene behind it blow away ferret both in terms of speed and reliability.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![Jens\_Kraemer](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@Jens\_Kraemer](https://discuss.rubyonrails.org/u/Jens_Kraemer)\
**Post date:** [June 26, 2007, 9:17am UTC](https://discuss.rubyonrails.org/t/search-technique/14754/5 "2007-06-26T09:17:03Z")

</div>

> \> with acts\_as\_ferret ([http://projects.jkraemer.net/acts\_as\_ferret](http://projects.jkraemer.net/acts_as_ferret))  
> \> Ferret \> can do all the things stated below, minus the need for a Java  
> \> server 🙂\> \> And you don't need a search server running at all when doing local \> development and testing - the server component is only needed for \> production usage. \> \> Btw, what exactly does 'Optimized for Low to High Volume Web Traffic' \> mean?
> 
> Ferret is fine for low traffic sites, but once traffic goes up,  
> things start to happen. I'm sure people on this list will know the  
> disastrous "segmentation fault" errors ferret is well known for. The  
> latest version of ferret has dealt with a lot of these bugs, so  
> things should be better.

Recent Ferret only segfaults or corrupts the index when multiple processes write-access the index at the same time. This is a well-known and discussed issue and one that can easily be solved by doing the indexing with a single process, i.e. some backend server solution just as solr is one, too.

> Also, ferret has no way of splitting up your indexing to balance it over another server.

Right, Ferret doesn't have that feature. I didn't miss it, yet.

> All in all, I've switched from ferret to solr and although I'm not a big java fan because of its memory consumption, solr and the real lucene behind it blow away ferret both in terms of speed and reliability.

Acts\_as\_ferret brings an indexing server that will handle all indexing in production environments, so you'll see no segfaults or other problems at all. Plus you get features like index versioning and background rebuilds.

For the speed, Solr and acts\_as\_ferret/DRb seem to be pretty up to par, with a slight advantage for Ferret according to this benchmark (not done by me, but by a user of aaf):

> **[Benchmarking acts\_as\_ferret and acts\_as\_solr](http://calebjones.blogspot.com/2007/03/benchmarking-actsasferret-and.html)**
>
> The Problem I've been a fan of the acts\_as\_ferret plugin for a while and have had great success in using it while developing Rails applicat...

I'm not at all into search engine flamewars, but please hold to the facts and don't post any unproven generalized speed estimates. Thank you 🙂

Regarding the stability you might like to have a look at projects like omdb.org which runs Ferret for lots of live searches and the main site search. it has a background indexer that is busy reindexing stuff as soon as something on the page is changed - it runs without a single hickup for months now. The project's code is MIT licensed, so you can even have a look at how it's done under the hood.

cheers, Jens

---

<div class="post-metadata">

**Author:** ![Peter\_De\_Berdt](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@Peter\_De\_Berdt](https://discuss.rubyonrails.org/u/Peter_De_Berdt)\
**Post date:** [June 26, 2007, 10:31am UTC](https://discuss.rubyonrails.org/t/search-technique/14754/6 "2007-06-26T10:31:11Z")

</div>

Point taken 🙂

My experiences date back some time and my company has been the victim of corrupted indexes, but having read the entry in your wiki ([http://projects.jkraemer.net/acts\_as\_ferret/wiki/DrbServer](http://projects.jkraemer.net/acts_as_ferret/wiki/DrbServer)) makes me consider ferret again to be honest. As I said, I’m not a big fan of java because of its memory consumption and ease of use, but when our app went haywire all the time, I went for solr running as a Tomcat servlet and am still very happy with its performance.

On the other hand, acts\_as\_solr seems to have some new features that are not in acts\_as\_ferret (and can come in handy).

Dilemmas, I really hate em 🙂 Anyway, thx for your input, good food for thought 😉

Best regards

Peter De Berdt
