Skip to content

Trying to create an index in db.seed running rspec fails #977

Open
@aleguro

Description

@aleguro

Under db/seeds.rb

Model.__elasticsearch__.create_index! force: true

$ bundle exec rspec --backtrace

Backtrace


backtrace

Model

class Model
  include Mongoid::Document
  include Mongoid::Attributes::Dynamic
  include Elasticsearch::Model

  def as_indexed_json(_options = {})
    as_json(only: %w[id name product_id product_variant_id])
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions