Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunspot:solr:reindex not work after updating rails 6 #1008

Open
mmchavda opened this issue Oct 13, 2021 · 1 comment
Open

sunspot:solr:reindex not work after updating rails 6 #1008

mmchavda opened this issue Oct 13, 2021 · 1 comment

Comments

@mmchavda
Copy link

mmchavda commented Oct 13, 2021

After upgrade to rails 6, sunspot solr rake command is not working as expected?

Used gem and version:

gem "rake", "~> 13.0.4"
gem "sunspot_rails", "~> 2.5.0"
gem "sunspot_solr", "~> 2.5.0"

Previously i used version 2.2.7
#gem "sunspot_solr", "~> 2.2.7"

console log:

test@test-VirtualBox:/media/test/DATA/folder/appproject$ bundle exec rake sunspot:solr:reindex[,User]
rake aborted!
ArgumentError: wrong number of arguments (given 1, expected 0)
/media/test/DATA/userlogin/approject/config/initializers/rake_task.rb:6:in `execute'
/home/test/.rbenv/versions/3.0.2/bin/bundle:23:in `load'

In rails model. when update single entry for re-indexing, it's working
e.g. self.index

As doing some more analysis:
it's break when execute in searchable.rb in "def solr_index"
on line: self.includes(options[:include]).find_in_batches(options.slice(:batch_size, :start)) do |records|

don't know why reindex command is not working.

Any help ?

@mmchavda
Copy link
Author

mmchavda commented Oct 13, 2021

if i update
self.includes(options[:include]).find_in_batches(options.slice(:batch_size, :start)) do |records|
to
self.includes(options[:include]).find_in_batches(batch_size: options[:batch_size], start: options[:start]) do |records|

then it's not generate any error and reindex works fine.
Does any changes required in def solr_index function for find_in_batches attributes?

03c added a commit to ElixirTeSS/TeSS that referenced this issue Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant