From: David Balmain Date: 2005-12-19T19:05:43+09:00 Subject: Re: Writing to ferret index from multiple processes I'm not to sure about this one. Are you by any chance explicitely deleting the lock files when your app starts up? I've seen a few people do that. The only way I can see doc numbers getting out of order is if you delete the lock files. Any chance I could look at more of your code? Is this for RForum? Perhaps I could check it out of svn. Anyway, I hope I can help you out with this. Dave PS: If you are interested you should join the Ferret mailing list. You seem to be doing some more advanced stuff judging from the bugs you're finding. ;-) On 12/19/05, Andreas S. wrote: > 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/. > >