From 0918dada6f0f6973255c5c68857ce5a0799f4bbc Mon Sep 17 00:00:00 2001
From: Marcela Ribeiro de Oliveira <mro15@inf.ufpr.br>
Date: Wed, 9 Aug 2017 11:31:47 -0300
Subject: [PATCH] files changed in  production

---
 app/services/search_service/model.rb   | 4 ++--
 app/workers/attachment_cache_worker.rb | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/services/search_service/model.rb b/app/services/search_service/model.rb
index cd2babad..6c134c09 100644
--- a/app/services/search_service/model.rb
+++ b/app/services/search_service/model.rb
@@ -71,14 +71,14 @@ module SearchService
       }
       return match_all_query if @search.query == '*'
 
-      {   
+      {
         query:{
           function_score: {
             query: { bool: {
               must: { dis_max: { queries: mount_queries } },
               filter: mount_filter
             } },
-            functions: [{ script_score: { script: { lang: 'groovy', file: 'calculate_score' } } }]
+            functions: [{ script_score: { script: { lang: 'painless', file: 'calculate_score' } } }]
           }
         },
         # https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html
diff --git a/app/workers/attachment_cache_worker.rb b/app/workers/attachment_cache_worker.rb
index 5333d5ac..b5ac3c5b 100644
--- a/app/workers/attachment_cache_worker.rb
+++ b/app/workers/attachment_cache_worker.rb
@@ -37,7 +37,7 @@ class AttachmentCacheWorker
       FileUtils.mkdir_p(directory_root)
       FileUtils.mv(file.path, file_root)
       FileUtils.chmod 0644, file_root.to_s, verbose: true
-      FileUtils.chown_R 'portalmec', 'www-data', directory_root.to_s, verbose: true
+      FileUtils.chown_R 'portalmec', 'portalmec', directory_root.to_s, verbose: true
       @attachment.update(cache_link: cache_link)
     ensure
       file.close if !file.nil? && File.exist?(file.path)
-- 
GitLab