# Searching with synonyms

**URL:** <https://www.ruby-forum.com/t/searching-with-synonyms/205532>\
**Category:** Ferret\
**Created:** [April 8, 2011, 8:41am UTC](https://www.ruby-forum.com/t/searching-with-synonyms/205532 "2011-04-08T08:41:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 8, 2011, 8:41am UTC](https://www.ruby-forum.com/t/searching-with-synonyms/205532/1 "2011-04-08T08:41:59Z")

</div>

Hello,

I’m currently working on a project, which is a search engine, and I need  
the ability to search the index, created with Ferret, using synonyms.  
I have based my current code on following articles:

[http://www.ruby-forum.com/topic/114402](http://www.ruby-forum.com/topic/114402)  
[http://www.davebalmain.com/trac/wiki/HowTos](http://www.davebalmain.com/trac/wiki/HowTos)

The code seems to be working, in that I don’t receive any errors and  
that I can search for words actually existing inside the documents that  
have been indexed, but when I try to use a synonyms, defined in my YAML  
file, i don’t receive any matches.

I’ve taken over the exact classes from the examples and read through the  
Ferret pages to see if I was missing something, but it seems the  
synonyms are not beeing loaded by the SynonymEngine class.  
I can probably go around this by retrieving them manually before the  
search and do an OR search on the array of words, but is there something  
extra that needs to be done?
