Skip to content

Commit 5bc6dcc

Browse files
committed
[STORE] Updated the failing integration tests for Elasticsearch 5.x
1 parent ffda22d commit 5bc6dcc

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Diff for: elasticsearch-persistence/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ class Article
491491
# Define an `author` attribute, with multiple analyzers for this field
492492
#
493493
attribute :author, String, mapping: { fields: {
494-
author: { type: 'string'},
495-
raw: { type: 'string', analyzer: 'keyword' }
494+
author: { type: 'text'},
495+
raw: { type: 'keyword' }
496496
} }
497497

498498

Diff for: elasticsearch-persistence/lib/elasticsearch/persistence/model/find.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def find_in_batches(options={}, &block)
119119

120120
# Get the initial batch of documents and the scroll_id
121121
#
122-
response = gateway.client.search( { index: gateway.index_name,
122+
response = gateway.client.search( {
123+
index: gateway.index_name,
123124
type: gateway.document_type,
124125
scroll: scroll,
125126
sort: ['_doc'],

Diff for: elasticsearch-persistence/test/integration/model/model_basic_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class ::Person
1616

1717
attribute :name, String,
1818
mapping: { fields: {
19-
name: { type: 'string', analyzer: 'snowball' },
20-
raw: { type: 'string', analyzer: 'keyword' }
19+
name: { type: 'text', analyzer: 'snowball' },
20+
raw: { type: 'keyword' }
2121
} }
2222

2323
attribute :birthday, Date

Diff for: elasticsearch-persistence/test/unit/model_rails_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ::MyRailsModel
1111
include Elasticsearch::Persistence::Model
1212
include Elasticsearch::Persistence::Model::Rails
1313

14-
attribute :name, String, mapping: { analyzer: 'string' }
14+
attribute :name, String, mapping: { analyzer: 'english' }
1515
attribute :published_at, DateTime
1616
attribute :published_on, Date
1717
end

0 commit comments

Comments
 (0)