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

How to migrate to chewy 7.2 #929

Open
lyb124553153 opened this issue Feb 26, 2024 · 1 comment
Open

How to migrate to chewy 7.2 #929

lyb124553153 opened this issue Feb 26, 2024 · 1 comment

Comments

@lyb124553153
Copy link

befor chewy 7.2, I have some code like this

class MessagesIndex < Chewy::Index
   [Post, Form, TemplatePost].each do |klass|
   define_type klass do
      field :id, type: 'integer'
      field :title, type: 'string', analyzer: 'ik_max_word'
   end
end

I can define mulityplie type in a single class, But After '7.2', 'define_type' was removed, How could I add multyply index for messages class
I keep getting this error Chewy::UndefinedIndex: Can not find index named `Messages#formIndex

@lyb124553153 lyb124553153 changed the title How wo upgrade to chewy 7.5 How to migrate to chewy 7.2 Feb 26, 2024
@lyb124553153
Copy link
Author

Is there a way to create Index name likse Messages#formIndex ?

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