> How are you coming on this? I just built an index that tops out at
> just above 2GBs and I installed Ferret with the standard gem install
> ferret routine.
perhaps your index is just a few bytes under the max... my usage is at
3.5G. i haven't done anything special, just using ferret and AAF gems:
--- MODEL CODE
class MyModel < ActiveRecord::Base
# think of body/title in terms of an average blog
acts_as_ferret :fields => { 'body' => {}, 'title' => { :boost => 2 } }
end
--- INDEX CODE
# new index from scratch
index =
Ferret::Index::Index.new(MyModel.aaf_configuration[:ferret].dup.update(:auto_flush
=> false, :field_infos => MyModel.aaf_index.field_infos, :create =>
true))
n = 0
BATCH_SIZE = 1000
while true
records = MyModel.find(:all, :limit => BATCH_SIZE, :offset => n,
:select =>
"id,#{MyModel.aaf_configuration[:ferret_fields].keys.join(',')}")
break if (!records || records.length == 0)
records.each do |record|
index << record.to_doc # aaf method
end
n += BATCH_SIZE
end
index.flush
index.optimize # 30+ minutes =(
index.close
--- CONFIG
> gem list | grep ferret
acts_as_ferret (0.4.0)
ferret (0.11.4)
> uname -a
Linux gentoo 2.6.20-hardened #3 SMP Fri Mar 30 19:27:10 UTC 2007 x86_64
Intel(R) Pentium(R) D CPU 3.00GHz GenuineIntel GNU/Linux
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk