spec/spec_helper.rb in search_flip-4.0.0.beta13 vs spec/spec_helper.rb in search_flip-4.0.0.beta14

- old
+ new

@@ -84,11 +84,11 @@ class CommentIndex include SearchFlip::Index def self.type_name - connection.version.to_i < 8 ? "comments" : "_doc" + connection.distribution.nil? && connection.version.to_i < 8 ? "comments" : "_doc" end def self.index_name "comments" end @@ -111,11 +111,11 @@ class ProductIndex include SearchFlip::Index def self.mapping - if ProductIndex.connection.version.to_i >= 5 + if ProductIndex.connection.distribution || ProductIndex.connection.version.to_i >= 5 { properties: { category: { type: "text", fielddata: true @@ -134,11 +134,11 @@ {} end end def self.type_name - connection.version.to_i < 8 ? "products" : "_doc" + connection.distribution.nil? && connection.version.to_i < 8 ? "products" : "_doc" end def self.index_name "products" end @@ -175,10 +175,10 @@ } } end def self.type_name - connection.version.to_i < 8 ? "test" : "_doc" + connection.distribution.nil? && connection.version.to_i < 8 ? "test" : "_doc" end def self.index_name "test" end