David Balmain wrote:
> Hi Andreas,
> 
> Can you show me some more code? How are you creating the index?
> Perhaps you are setting :create => true in which case it will
> overwrite the old index.
> 
> Dave

Oops. I am indeed using :create => true. I forgot that I set it because 
create_if_missing did not work.

I removed it, but now there is a different problem. When I change the 
index while the indexing script is running, it quits, but with another 
error message:

316
317
318
RuntimeError: docs out of order curent doc = 9 and previous doc = 17
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/segment_merger.rb:276:in 
`append_postings'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/segment_merger.rb:262:in 
`append_postings'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/segment_merger.rb:240:in 
`merge_term_info'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/segment_merger.rb:215:in 
`merge_term_infos'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/segment_merger.rb:176:in 
`merge_terms'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/segment_merger.rb:48:in 
`merge'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/index_writer.rb:403:in 
`merge_segments'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/index_writer.rb:371:in 
`maybe_merge_segments'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/index_writer.rb:161:in 
`add_document'
        from /usr/local/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/index_writer.rb:159:in 
`add_document'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/index.rb:270:in 
`<<'
        from /usr/local/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from 
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.3.2/lib/ferret/index/index.rb:238:in 
`<<'
        from ./app/models/search_ferret.rb:38:in `update'
        from (irb):1

-- 
Posted via http://www.ruby-forum.com/.