Hi Dave,

when rebuilding my unkeyed index and running a search on that index in
parallel, the rebuilding script is bombing out with a File Not Found
exception:

/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/runner.rb:27: 
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.0/lib/ferret/index.rb:286:in 
`add_document': File Not Found Error occured at <except.c>:93 in xraise 
(FileNotFoundError)
Error occured in fs_store.c:329 - fs_open_input
        tried to open 
"script/../config/../ferret_index/development/news_article_versions/_1.fdx" but 
it doesn't exist: <No such file or directory>

        from 
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.0/lib/ferret/index.rb:286:in `<<'
        from /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from 
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.0/lib/ferret/index.rb:256:in `<<'
        from script/../config/../app/models/news_article_version.rb:119:in 
`ferret_update'
        from script/../config/../app/models/news_article_version.rb:90:in 
`ferret_rebuild'
        from script/../config/../app/models/news_article_version.rb:90:in 
`ferret_rebuild'
        from 
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:783:in
 `benchmark'
        from 
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:794:in
 `silence'
         ... 7 levels...
        from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/runner.rb:27
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in 
`require'
        from 
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
 `require'
        from script/runner:3

I'm starting the rebuilding process first, then running the search
process.  When starting the search process, I often get a Lock Error.
It I start it a couple of times, it gets going.

/usr/lib/ruby/gems/1.8/gems/ferret-0.11.0/lib/ferret/index.rb:125:in 
`initialize': Lock Error occured at <except.c>:117 in xpop_context 
(Ferret::Store::Lock::LockError)
Error occured in index.c:6044 - iw_open
        Couldn't obtain write lock when opening IndexWriter

        from 
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.0/lib/ferret/index.rb:125:in 
`initialize'
        from /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from 
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.0/lib/ferret/index.rb:122:in 
`initialize'
        from config/../app/models/news_article_version.rb:72:in 
`ferret_init_index'
        from config/../app/models/news_article_version.rb:57:in `ferret_index'
        from config/../app/models/news_article_version.rb:36:in `ferret_search'
        from /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
        from config/../app/models/news_article_version.rb:35:in `ferret_search'
        from search_tester.rb:6
        from search_tester.rb:5

I rebuild in a loop in batches of 1000, with no explicit flushes or
commits.  If I add a commit after each batch, the File Not Found doesn't
crop up, but a segfault in the searcher process does (see previous
e-mail I guess :)

btw, I'm deleting the index directory before rebuilding.

John.
--
http://johnleach.co.uk

On Sun, 2007-02-25 at 22:46 +1100, David Balmain wrote:
> Hey folks,
> 
> Sorry for cross posting like this but this is an important
> announcement for all Ferret users.
> 
> ** Description **
> 
> Firstly for those who don't know, Ferret is a full-text search library
> which makes adding search to your application a breeze. It's much
> faster than MySQL full-text search as well most other search libraries
> out there. It allows you to do Boolean (+ruby + rails -jewelry) and
> phrase queries ("the quick brown fox") as well as some more unusual
> queries like fuzzy queries (misspelling~ matches mispeling or
> misspellng), wildcard queries (Aus?ral*), range queries
> (date:<=20050601) and a lot more. Ferret also now offers query result
> highlighting and excerpting.
> 
> ** Announcement **
> 
> I've just released Ferret 0.11.0 which is the first release candidate
> for Ferret 1.0. This release has no new features to the API but it
> does fix some very major bugs. Ferret now uses lock-less commits which
> fixes a problem a lot of people where having with file not found
> exceptions. I've also fixed a number of bugs which were causing
> segfaults (hopefully all of them) so Ferret is now a lot more stable.
> 
> ==========
> !! IMPORTANT !!
> ==========
> 
> Some of these fixes mean that the current version of Ferret is not
> backwards compatible. If you install the latest version you will need
> to rebuild your index from scratch. Having said that, I do recommend
> that everyone upgrade. The new version should be *MUCH* more stable.
> 
> ** Try It **
> 
> $ sudo gem install ferret
> 

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to