diff --git a/elasticsearch-persistence/examples/notes/Gemfile b/elasticsearch-persistence/examples/notes/Gemfile index ef2c098c..f1bc6d11 100644 --- a/elasticsearch-persistence/examples/notes/Gemfile +++ b/elasticsearch-persistence/examples/notes/Gemfile @@ -26,8 +26,8 @@ gem 'hashie' gem 'patron' gem 'elasticsearch' -gem 'elasticsearch-model', git: 'https://github.com/elastic/elasticsearch-rails.git' -gem 'elasticsearch-persistence', git: 'https://github.com/elastic/elasticsearch-rails.git' +gem 'elasticsearch-model', git: 'https://github.com/elastic/elasticsearch-rails.git', branch: 'main' +gem 'elasticsearch-persistence', git: 'https://github.com/elastic/elasticsearch-rails.git', branch: 'main' gem 'sinatra', require: false gem 'thin' diff --git a/elasticsearch-persistence/examples/notes/application.rb b/elasticsearch-persistence/examples/notes/application.rb index 0f172447..cfb19aea 100644 --- a/elasticsearch-persistence/examples/notes/application.rb +++ b/elasticsearch-persistence/examples/notes/application.rb @@ -237,7 +237,7 @@ class Application < Sinatra::Base <% @notes.each_with_hit do |note, hit| %>
- <%= hit.highlight && hit.highlight.size > 0 ? hit.highlight.text.first : note.text %> + <%= hit[:highlight] && hit[:highlight].size > 0 ? hit[:highlight].text.first : note.text %> <% note.tags.each do |tag| %> <%= tag %><% end %> <%= Time.parse(note.created_at).strftime('%d/%m/%Y %H:%M') %>