by using Ferret 0.9.3 on windows you are using the 'pure pure' ruby version. As I've read some time ago someone - i think it was jens kraemer - suggested that on windows downgrading to 0.3.2 might be a good idea, because this version comes with a native extension (not as feature rich as cFerret of course but a predecessor) even on windows. Pure ruby - as clean and wonderful the language is - is slow comparing it to java or C and therefore pure ruby ferret isn't really the first choice for building up an index of a large document set.
Another possibility you might want to think about while waiting for cFerret on Windows could be to do the initial huge indexing batch on a linux or osx/freebsd machine, transfer the index and perform only ongoing updates on windows.
Regardless what I've said before: What performance are you experiencing with your pure ruby installation? How much datasets do you need to index initially? When (after how much datasets) are you experiencing the bottleneck?
Regards
Jan
On 5/24/06, Marcus Andersson <[EMAIL PROTECTED]> wrote:
I'm building a new index from scratch based on a number of documents
stored in a database loaded using my Rails env (using Ruby Ferret 0.9x
(installed today with Gem) on Windows). At first everything goes nice
but after a number of documents it starts to go slower and slower until
it grinds to a halt (at least feels like it).
Am I doing something wrong? Is there some way to work around this?
/Marcus
Code in question:
ENV['RAILS_ENV'] ||= 'development'
puts "Environment : #{ENV['RAILS_ENV']}"
require 'config/environment.rb'
require 'ferret'
index = Ferret::Index::Index.new( :path => Node.class_index_dir, :create
=> true)
Node.find_all_by_type("PageNode").each { |content|
puts "ID: #{content.id} => name: #{content.title}"
index << content.to_doc if content.respond_to?("to_doc")
}
index.flush
index.optimize
index.close
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk
_______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

