Forum: Ferret setting of :key to :id in cFerret

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1d623696d26ebebafecb8a2a2bc0f32e?d=identicon&s=25 big mac (Guest)
on 2006-02-07 19:25
(Received via mailing list)
Hi Dave,
I've been reading this post below back in December 2005.
Is it possible to set :key to :id in cFerret like suggested below?

On 12/3/05, Carl Youngblood <carl at
 <>> wrote:
>* I seem to be getting the same document multiple times in my search
*>* results.  I'm wondering if this is because by default a document is
*>* placed in the search results every time the word you're looking for

*>* shows up.  Is that the way it works?
Hi Carl,

This means the document has been placed in the index more than once.
Sounds to me like you are adding the an object to the index every time

it is updated. You could try setting :key to :id. This will make sure
that :id is unique in the index. That is, every time you add an
existing document, the document is replaced.

  index =
(:key => :id)

Alternatively you could handle the deletes yourself.

Hope this helps.

>* Thanks,
*>* Carl
*>* _______________________________________________

*>* Ferret-talk mailing list
*>* Ferret-talk at
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2006-02-08 03:45
(Received via mailing list)
Hi Mac,

I was planning on handling this in the Ruby bindings rather than in
the C code. If you don't mind me asking, what are you using cFerret

This topic is locked and can not be replied to.