# Searching for Comparison Search

**URL:** <https://www.ruby-forum.com/t/searching-for-comparison-search/180252>\
**Category:** Ruby\
**Created:** [December 15, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/searching-for-comparison-search/180252 "2009-12-15T21:45:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [December 15, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/searching-for-comparison-search/180252/1 "2009-12-15T21:45:05Z")

</div>

Hello all,  
Please bear with me. I’m work on my third month with Ruby on Rails.

I’m looking to find or create a comparison search. It must take a small  
paragraph and search another model column of the same name and return  
only if the match is near 50% matching.

Any ideas?

I have found a matching gem called “amatch”. This has several methods  
that I believe will help. They’ll return a percentage of the match.

I’m posting this to the Ruby discussion in hope someone may have worked  
with this topic before.

Thank you for any help.

JohnM

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [December 15, 2009, 9:48pm UTC](https://www.ruby-forum.com/t/searching-for-comparison-search/180252/2 "2009-12-15T21:48:17Z")

</div>

John M. wrote:

> Hello all,  
> Please bear with me. I’m work on my third month with Ruby on Rails.
> 
> I’m looking to find or create a comparison search. It must take a small  
> paragraph and search another model column of the same name and return  
> only if the match is near 50% matching.
> 
> Any ideas?
> 
> I have found a matching gem called “amatch”. This has several methods  
> that I believe will help. They’ll return a percentage of the match.
> 
> I’m posting this to the Ruby discussion in hope someone may have worked  
> with this topic before.
> 
> Thank you for any help.
> 
> JohnM

Text searches in databases usually get married with indexes, because  
they spend so much time together. As far as Rails solutions go, you can  
try ferret or sphinx, for instance… I think this should get you started  
😉

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [December 15, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/searching-for-comparison-search/180252/3 "2009-12-15T21:50:26Z")

</div>

Aldric,  
Thanks for the reply.  
I think you’re right.

John

> Text searches in databases usually get married with indexes, because  
> they spend so much time together. As far as Rails solutions go, you can  
> try ferret or sphinx, for instance… I think this should get you started  
> 😉

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [December 16, 2009, 7:07pm UTC](https://www.ruby-forum.com/t/searching-for-comparison-search/180252/4 "2009-12-16T19:07:22Z")

</div>

On Wed, Dec 16, 2009 at 8:38 AM, John M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I have been informed that the production database will be Oracle.

You have my sympathies. 🙂

Meanwhile, you might want to look into acts\_as\_solr.

FWIW,

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [December 16, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/searching-for-comparison-search/180252/5 "2009-12-16T17:38:05Z")

</div>

I have been informed that the production database will be Oracle. That  
eliminates Spinx.  
I’ve heard and read that ferret is hard to work with.  
Currently, I’ve been playing with Searchlogic but since I’m still new at  
this, I’m look for experienced advice.

J
