Skip to content

Commit 844e1fe

Browse files
committed
[MODEL] Fixed incorrect mapping configuration in the integration tests
1 parent 70b8ca8 commit 844e1fe

5 files changed

+7
-7
lines changed

elasticsearch-model/test/integration/active_record_basic_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class ::Article < ActiveRecord::Base
1818

1919
settings index: { number_of_shards: 1, number_of_replicas: 0 } do
2020
mapping do
21-
indexes :title, type: 'string', analyzer: 'snowball'
22-
indexes :body, type: 'string'
21+
indexes :title, type: 'text', analyzer: 'snowball'
22+
indexes :body, type: 'text'
2323
indexes :clicks, type: 'integer'
2424
indexes :created_at, type: 'date'
2525
end

elasticsearch-model/test/integration/active_record_import_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ::ImportArticle < ActiveRecord::Base
1616
scope :popular, -> { where('views >= 50') }
1717

1818
mapping do
19-
indexes :title, type: 'string'
19+
indexes :title, type: 'text'
2020
indexes :views, type: 'integer'
2121
indexes :numeric, type: 'integer'
2222
indexes :created_at, type: 'date'

elasticsearch-model/test/integration/active_record_pagination_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ::ArticleForPagination < ActiveRecord::Base
1616

1717
settings index: { number_of_shards: 1, number_of_replicas: 0 } do
1818
mapping do
19-
indexes :title, type: 'string', analyzer: 'snowball'
19+
indexes :title, type: 'text', analyzer: 'snowball'
2020
indexes :created_at, type: 'date'
2121
end
2222
end

elasticsearch-model/test/integration/mongoid_basic_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ::MongoidArticle
2020

2121
settings index: { number_of_shards: 1, number_of_replicas: 0 } do
2222
mapping do
23-
indexes :title, type: 'string', analyzer: 'snowball'
23+
indexes :title, type: 'text', analyzer: 'snowball'
2424
indexes :created_at, type: 'date'
2525
end
2626
end

elasticsearch-model/test/integration/multiple_models_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module ::NameSearch
2020

2121
settings index: {number_of_shards: 1, number_of_replicas: 0} do
2222
mapping do
23-
indexes :name, type: 'string', analyzer: 'snowball'
23+
indexes :name, type: 'text', analyzer: 'snowball'
2424
indexes :created_at, type: 'date'
2525
end
2626
end
@@ -130,7 +130,7 @@ class ::Image
130130

131131
settings index: {number_of_shards: 1, number_of_replicas: 0} do
132132
mapping do
133-
indexes :name, type: 'string', analyzer: 'snowball'
133+
indexes :name, type: 'text', analyzer: 'snowball'
134134
indexes :created_at, type: 'date'
135135
end
136136
end

0 commit comments

Comments
 (0)