Hi!
On Sun, Feb 25, 2007 at 06:20:55AM +0100, Jen wrote:
> Hello I have a couple of questions, Hope someone here can help answer
> them.
>
> I am using acts_as_ferret on a model Item with around 10 million rows.
> I use Item.rebuild_index at the ruby console to build the index. It
> seems to run for at least 48 hours when building.
>
> My questions are:
> 1) How do you know when the indexing is over and complete?
indexing is done when rebuild_index returns. atm there is no logging of
the progress rebuild_index already has made with a running rebuild.
However I'm thinking about adding some kind of logging now.
> 2) How can you confirm that ALL records in the table were indexed?
> (especially since the table runs into millions of records)
if rebuild_index returns normally and no error is thrown, I'd say it was
successful and indexed all your records. To make sure you have all 10
million documents in the index, you can inspect the index with a small
script like that:
require 'rubygems'
require 'ferret'
reader = Ferret::Index::IndexReader.new('path/to/index')
puts "#{reader.num_docs} documents in index"
cheers,
Jens
--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk