# Retrieving indexed words from Ferret

**URL:** <https://www.ruby-forum.com/t/retrieving-indexed-words-from-ferret/139513>\
**Category:** Rails\
**Created:** [June 4, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/retrieving-indexed-words-from-ferret/139513 "2008-06-04T17:11:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rey9999](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@Rey9999](https://www.ruby-forum.com/u/Rey9999)\
**Post date:** [June 4, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/retrieving-indexed-words-from-ferret/139513/1 "2008-06-04T17:11:43Z")

</div>

Hello everyone.

Let us say I have a simple blog application, with ferret set up and  
running, performing searches on posts and comments (which are using  
acts\_as\_ferret).

My question is:  
is it possible, for each object which acts\_as\_ferret (let us take, for  
example, a post), to retrieve the list of words indexed by ferret in  
that very object?

Thanks in advance.

Regards,

Rey9999

---

<div class="post-metadata">

**Author:** ![Rey9999](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@Rey9999](https://www.ruby-forum.com/u/Rey9999)\
**Post date:** [June 4, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/retrieving-indexed-words-from-ferret/139513/2 "2008-06-04T17:23:33Z")

</div>

say we have a product with a ferret index on description, then

@product = Product.find(11665955)  
logger.info “FOO: #{@product.content\_for\_field\_name(:description)}”

would give you something on that line

---

<div class="post-metadata">

**Author:** ![Rey9999](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@Rey9999](https://www.ruby-forum.com/u/Rey9999)\
**Post date:** [June 5, 2008, 10:00am UTC](https://www.ruby-forum.com/t/retrieving-indexed-words-from-ferret/139513/3 "2008-06-05T10:00:50Z")

</div>

Well, I tried this, but it returns me the whole content of the indexed  
field. Isn’t Ferret supposed not to index stopwords? I know it does  
because if i try to perform a ferret search using, for example, the  
keyword “The”, I get no results (even if this keyword is contained in  
some of my records).

Alternatively, is there a way to clean up a string from the stopwords  
used by ferret?

Thanks in advance  
Rey9999

On 4 Giu, 17:23, Thorsten M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
