From 2db5634d1fb782ea19b0343b5a285449c313f475 Mon Sep 17 00:00:00 2001 From: Karel Minarik Date: Tue, 14 Feb 2017 11:01:00 +0100 Subject: [PATCH] [STORE] Updated the "Notes" example application for Elasticsearch 5.x --- elasticsearch-persistence/examples/notes/application.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-persistence/examples/notes/application.rb b/elasticsearch-persistence/examples/notes/application.rb index 50f56dece..03ffa5d10 100644 --- a/elasticsearch-persistence/examples/notes/application.rb +++ b/elasticsearch-persistence/examples/notes/application.rb @@ -62,8 +62,8 @@ class NoteRepository mapping do indexes :text, analyzer: 'snowball' - indexes :tags, analyzer: 'keyword' - indexes :created_at, type: 'date' + indexes :tags, type: 'keyword' + indexes :created_at, type: 'date' end create_index! @@ -105,7 +105,7 @@ class Application < Sinatra::Base end if filter - { filtered: { query: query, filter: filter } } + { bool: { must: [ query ], filter: filter } } else query end