Hi folks,
I've working and playing with acts_as_ferret and follow this fantastic
tutorial:
http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial

When I try to implement the field storage tip, it crash. So, I try to
make it via script/console:

1. I have a simple model called Articles:
class Article < ActiveRecord::Base
        acts_as_ferret :fields => ['title']
end

2. In the console, I try this:

>> index = Article.ferret_index
=> #<Ferret::Index::Index:0x2b686dc76860 @writer=nil,
@default_input_field=:id, @qp=nil,
@dir=#<Ferret::Store::FSDirectory:0x2b686dc76748>,
@mon_entering_queue=[], @default_field=["title"], @key=:id,
@mon_count=0, @auto_flush=true, @open=true, @close_dir=true,
@id_field=:id, @mon_owner=nil, @reader=nil, @searcher=nil,
@options={:lock_retry_time=>2,
:path=>"script/../config/../config/../index/development/article",
:create_if_missing=>true, :default_field=>["title"],
:analyzer=>#<Ferret::Analysis::StandardAnalyzer:0x2b686dc75f78>,
:auto_flush=>true, :or_default=>false,
:dir=>#<Ferret::Store::FSDirectory:0x2b686dc76748>, :key=>:id,
:handle_parse_errors=>true}, @mon_waiting_queue=[]>

(it's ok, seems to run ok! :)

>> query = "ruby"
=> "ruby"
>> options =""

(mmmh, just enough! Now.... )
>> index.search_each(query, options) do |doc, score| 
?> puts index[doc][:title]
>> end

And the next and horrible message!

/usr/local/lib/site_ruby/1.8/ferret/index.rb:384: [BUG] Segmentation
fault
ruby 1.8.4 (2005-12-24) [x86_64-linux]

Woops!
Someone has the same bug!????

For more tech information:

Rails 1.2.2
Gem 0.9.2
acts_as_ferret (0.3.1)
ferret (0.11.3)

Thanks everyone!

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to