I have a lot of crashes when I try to use term vectors. Here's an
example, which crashes pretty consistently. This problem seems to be
somewhat sensitive to platform... people on other OS's and ruby versions
have reported no error. I have seen this with ferret 0.10.13 and 0.10.14
on debian stable using ruby 1.8.2, but I have observed the same problem
on various other systems as well. I've reported this issue here before,
but it was when David was gone.

program:

require 'rubygems'
require 'ferret'
#require 'zlib'


fields=Ferret::Index::FieldInfos.new
fields.add_field :text, :store=>:no#, :index=>:omit_norms
i = Ferret::I.new :field_infos=>fields #:path=>'temp_index'

20.times{
   i << {:text=>`man gcc`[0..135000]}
}
#i.close_writer
r=i.reader
#r.term_docs_for(:text, "example")

r.term_vector(0,:text)



example output:

$ ruby tvtest.rb
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
tvtest.rb:16: [BUG] Segmentation fault
ruby 1.8.2 (2005-04-11) [i386-linux]

Aborted

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to