Displaying 3 results from an estimated 3 matches for "temp_index".
2006 Nov 22
2
crash while retrieving term vectors
This program reliably crashes for me (usually a segfault):
require ''rubygems''
require ''ferret''
reader=Ferret::Index::IndexReader.new ARGV
fields=reader.field_infos.fields
reader.max_doc.times{|n|
fields.each{|field|
reader.term_vector(n,field)
} unless reader.deleted?(n)
print "."; STDOUT.flush
}
As you can see, it just goes through
2007 Feb 16
8
term vector blues
...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), ple...
2007 Mar 09
5
memory leak in index build?
...ndex process every so often to recover
its memory. I''m about to try that, because I''m really hunting a
different bug... however, the memory problem concerns me.
require ''rubygems''
require ''ferret''
require ''set''
dir = "temp_index"
if ARGV.first=="-p"
ARGV.shift
prefix=ARGV.shift
end
fi= Ferret::Index::FieldInfos.new
fi.add_field :name,
:index => :yes, :store => :yes, :term_vector => :with_positions
%w[data field1 field2 field3].each{|fieldname|
fi.add_field fieldname.to_sym,...