I’ve been reading this post below back in December 2005.
Is it possible to set :key to :id in cFerret like suggested below?
- 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?
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 = Index::Index.new
(:key => :id)
Alternatively you could handle the deletes yourself.
Hope this helps.