On Sat, Dec 16, 2006 at 12:37:24AM +0100, sk wrote:> Hi,
>
> Recently, I was trying to play around with AAF and found that reindexing
> table is very slow. Then I started looking into Ferret performance and
> tried myself and found that it''s very fast. Then, I just used
Ferret to
> index my table and it was also very fast. All good.
>
> Then why reindexing using AAF is slow. After sometime I found that in
> the AAF, it uses (:key => :id) in acts_as_ferret method of
> class_methods.rb. When I removed this condition, everything works fine.
>
> ==========================> Without the above changes: It took me 8
hours to index 1 million records
> With changes I guess around 20 minutes. Big difference :-)
> ==========================>
> I wonder, is their any side effect of this changes.
for rebuilding, no. But once you modify a record, without the :key
option the old ferret document won''t get removed when the record is
re-indexed, so you''ll end up with documents belonging to different
versions of your record in your index. that''s because ferret does not
support updates of existing documents in the index, so updates are done
by ''add new doc, remove old doc''. the :key option tells ferret
how to
find the old doc.
However, I could have look into disabling the :key option for index
rebuilds. A patch would be very welcome, too :-)
cheers,
Jens
--
webit! Gesellschaft f?r neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de
Schnorrstra?e 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66