Skip to content

Commit 2db5634

Browse files
committedFeb 14, 2017
[STORE] Updated the "Notes" example application for Elasticsearch 5.x
1 parent 49e93a3 commit 2db5634

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎elasticsearch-persistence/examples/notes/application.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class NoteRepository
6262

6363
mapping do
6464
indexes :text, analyzer: 'snowball'
65-
indexes :tags, analyzer: 'keyword'
66-
indexes :created_at, type: 'date'
65+
indexes :tags, type: 'keyword'
66+
indexes :created_at, type: 'date'
6767
end
6868

6969
create_index!
@@ -105,7 +105,7 @@ class Application < Sinatra::Base
105105
end
106106

107107
if filter
108-
{ filtered: { query: query, filter: filter } }
108+
{ bool: { must: [ query ], filter: filter } }
109109
else
110110
query
111111
end

0 commit comments

Comments
 (0)
Please sign in to comment.