Skip to content
Snippets Groups Projects
Commit 0918dada authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

files changed in production

parent 54f13347
No related branches found
No related tags found
No related merge requests found
...@@ -71,14 +71,14 @@ module SearchService ...@@ -71,14 +71,14 @@ module SearchService
} }
return match_all_query if @search.query == '*' return match_all_query if @search.query == '*'
{ {
query:{ query:{
function_score: { function_score: {
query: { bool: { query: { bool: {
must: { dis_max: { queries: mount_queries } }, must: { dis_max: { queries: mount_queries } },
filter: mount_filter 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 # https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html
......
...@@ -37,7 +37,7 @@ class AttachmentCacheWorker ...@@ -37,7 +37,7 @@ class AttachmentCacheWorker
FileUtils.mkdir_p(directory_root) FileUtils.mkdir_p(directory_root)
FileUtils.mv(file.path, file_root) FileUtils.mv(file.path, file_root)
FileUtils.chmod 0644, file_root.to_s, verbose: true 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) @attachment.update(cache_link: cache_link)
ensure ensure
file.close if !file.nil? && File.exist?(file.path) file.close if !file.nil? && File.exist?(file.path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment