Hi Koen, It turns out this is two bugs, one of which I fixed a couple of days ago: https://github.com/pat/thinking-sphinx/commit/60df63108b6a67b9740f8b277886526d8aa79738 <https://github.com/pat/thinking-sphinx/commit/60df63108b6a67b9740f8b277886526d8aa79738> And the other just now, due to your email: https://github.com/pat/thinking-sphinx/commit/f12073f7f8a5f41ec6de536361c5ee2f2297b987 <https://github.com/pat/thinking-sphinx/commit/f12073f7f8a5f41ec6de536361c5ee2f2297b987>
If you want, you can use the latest from the develop branch to get these fixes into place, but otherwise I should have 3.4.2 released in the next few days if all goes to plan. Thanks for the help! — Pat > On 27 Sep 2017, at 12:00 am, Koen Eijsvogels <k...@eijsvogels.nl > <mailto:k...@eijsvogels.nl>> wrote: > > Hi, > > In one of my projects, I suddenly got a strange error when trying to search > with a different ranker. > > To reproduce the problem, I created an empty Rails (5.1.4) project with only > one model (city): > > class CreateCities < ActiveRecord::Migration[5.1] > def change > create_table :cities do |t| > t.string :names > t.timestamps > end > end > end > > and an index: > > ThinkingSphinx::Index.define :city, :with => :active_record do > # fields > indexes names > end > > > After I have generated the Sphinx config file and I indexed the records I am > able to search e.g. City.searc('amsterdam') > > But as soon as I add a ranking mode like: City.search('amsterdam', ranker: > :bm25) I get the warning below: > > Could not log "warn.thinking_sphinx" event. NoMethodError: undefined method > `payload' for " \e[1m\e[32mSphinx\e[0m ":String > ["/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/active_record/log_subscriber.rb:19:in > `warn'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/active_record/log_subscriber.rb:19:in > `warn'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/subscriber.rb:99:in > `finish'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/log_subscriber.rb:83:in > `finish'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications/fanout.rb:102:in > `finish'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications/fanout.rb:46:in > `block in finish'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications/fanout.rb:46:in > `each'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications/fanout.rb:46:in > `finish'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:42:in > `finish_with_state'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:27:in > `instrument'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in > `instrument'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/logger.rb:3:in > `log'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/middlewares/valid_options.rb:16:in > `check_options'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/middlewares/valid_options.rb:5:in > `block in call'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/middlewares/valid_options.rb:5:in > `each'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/middlewares/valid_options.rb:5:in > `call'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/middlewares/stale_id_filter.rb:10:in > `call'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in > `call'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in > `call'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/search.rb:88:in > `populate'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thinking-sphinx-3.4.1/lib/thinking_sphinx/search.rb:138:in > `method_missing'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:109:in > `block in <module:IRB>'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/inspector.rb:102:in > `inspect_value'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/context.rb:385:in > `inspect_last_value'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:665:in > `output_value'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:494:in `block (2 > levels) in eval_input'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:627:in > `signal_status'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:490:in `block in > eval_input'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:246:in > `block (2 levels) in each_top_level_statement'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:232:in > `loop'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:232:in > `block in each_top_level_statement'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:231:in > `catch'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb/ruby-lex.rb:231:in > `each_top_level_statement'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:489:in > `eval_input'", > "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:430:in `block in > run'", "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:429:in > `catch'", "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:429:in > `run'", "/Users/koen/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/irb.rb:385:in > `start'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:62:in > `start'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:17:in > `start'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:97:in > `perform'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thor-0.20.0/lib/thor/command.rb:27:in > `run'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thor-0.20.0/lib/thor/invocation.rb:126:in > `invoke_command'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/thor-0.20.0/lib/thor.rb:387:in > `dispatch'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/railties-5.1.4/lib/rails/command/base.rb:63:in > `perform'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/railties-5.1.4/lib/rails/command.rb:44:in > `invoke'", > "/Users/koen/.rvm/gems/ruby-2.4.1@myproject/gems/railties-5.1.4/lib/rails/commands.rb:16:in > `<top (required)>'", > "/Users/koen/Documents/projects/kitchensink/bin/rails:9:in `require'", > "/Users/koen/Documents/projects/kitchensink/bin/rails:9:in `<top > (required)>'", "-e:1:in `load'", "-e:1:in `<main>'"] > > > I have used rankers before without any issues. I cannot find which change has > triggered this strange warning. Does anyone have the same issue and maybe a > hint how to solve it? > > Best regards, > > Koen > > > > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to thinking-sphinx+unsubscr...@googlegroups.com > <mailto:thinking-sphinx+unsubscr...@googlegroups.com>. > To post to this group, send email to thinking-sphinx@googlegroups.com > <mailto:thinking-sphinx@googlegroups.com>. > Visit this group at https://groups.google.com/group/thinking-sphinx > <https://groups.google.com/group/thinking-sphinx>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphinx+unsubscr...@googlegroups.com. To post to this group, send email to thinking-sphinx@googlegroups.com. Visit this group at https://groups.google.com/group/thinking-sphinx. For more options, visit https://groups.google.com/d/optout.