Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Indexing failing with Xapian InvalidArgumentError: Empty termnames aren't allowed. #52

Open
paulspringett opened this issue Aug 25, 2011 · 1 comment

Comments

@paulspringett
Copy link

After upgrading to Xapit 0.3.0 (from 0.2.7) I get an InvalidArgumentError (from xapian) when running rake xapit:index

I have run

$ rails g xapit:install

My model xapit method looks like this:

xapit do
  text :name
end

(where name is an active record column)

Stacktrace:

$ bundle exec rake xapit:index --trace
** Invoke xapit:index (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute xapit:index
rake aborted!
InvalidArgumentError: Empty termnames aren't allowed.
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/server/indexer.rb:15:in `add_term'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/server/indexer.rb:15:in `block in document'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/server/indexer.rb:15:in `each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/server/indexer.rb:15:in `document'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/server/database.rb:15:in `add_document'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/client/index_builder.rb:28:in `add_document'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/client/model_adapters/active_record_adapter.rb:22:in `block in index_all'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/relation/batches.rb:21:in `each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/relation/batches.rb:21:in `block in find_each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/relation/batches.rb:71:in `find_in_batches'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/relation/batches.rb:20:in `find_each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/base.rb:440:in `find_each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/client/model_adapters/active_record_adapter.rb:21:in `index_all'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit.rb:74:in `block in index'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit.rb:73:in `each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit.rb:73:in `index'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/xapit-0.3.0/lib/xapit/client/tasks.rb:16:in `block (2 levels) in <top (required)>'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/paul/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
/Users/paul/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
Tasks: TOP => xapit:index
@egze
Copy link

egze commented Dec 6, 2011

I get the same error. Will try to investigate

Edit: Works fine in master

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants