I’m running:
ferret (0.10.9)
ruby 1.8.5 (2006-08-25) [i386-mswin32]
on Windows XP(SP2)
When I create an index as follows:
field_infos = FieldInfos.new(:store => :yes, :term_vector => :no, :index
=> :yes)
field_infos.add_field(:id, :index => :untokenized)
field_infos.add_field(:subject)
field_infos.add_field(:author)
field_infos.add_field(:tags, :store => :no)
index = field_infos.create_index(THREAD_INDEX_DIR)
then try to add to the index as follows:
index << {:id => 1, :subject => “test subject”, :author => “test
author”, :tags => “tags, like, this”}
I get the following error:
build_ferret_index.rb:39:in `<<’: wrong argument type Hash (expected
Data) (TypeError)
When I create the index as follows:
field_infos = FieldInfos.new(:store => :yes, :term_vector => :no, :index
=> :yes)
field_infos.add_field(:id, :index => :untokenized)
field_infos.add_field(:subject)
field_infos.add_field(:author)
field_infos.add_field(:tags, :store => :no)
index = Index::Index.new(:path => THREAD_INDEX_DIR, :field_infos =>
field_infos, :analyzer => Analyzer::WhiteSpaceAnalyzer.new)
and run:
index << {:id => 1, :subject => “test subject”, :author => “test
author”, :tags => “tags, like, this”}
Everything seems to work fine…
Thoughts?