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

Sidekiq indexing strategy fails with NoMethodError #974

Open
fabiendv opened this issue Dec 4, 2024 · 0 comments
Open

Sidekiq indexing strategy fails with NoMethodError #974

fabiendv opened this issue Dec 4, 2024 · 0 comments

Comments

@fabiendv
Copy link

fabiendv commented Dec 4, 2024

I have a basic implementation of a user model with indexing, following the documentation precisely. However, the index is not processed because the associated job does not execute successfully.

For instance:

  • When I create a user, it is not indexed.
  • Similarly, deletions are not reflected in the index.

Expected behavior

The job should execute without errors.

Actual behavior

The job fails with the following error:

 NoMethodError: undefined method `dig' for "UsersIndex":String

Steps to reproduce the problem

user.rb

update_index('users') { self }

users_index.rb

class UsersIndex < Chewy::Index

  index_scope User

  field :id, type: 'integer'
  ...

end

chewy.rb

Chewy.root_strategy = :sidekiq
Chewy.request_strategy = :sidekiq

Version Information

  • Chewy version 7.6.0
  • Elasticsearch version 8.16.0
  • Ruby version 3.2.2
  • Rails version 7.1.4.1
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