Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
0918dada
Commit
0918dada
authored
7 years ago
by
Marcela Ribeiro de Oliveira
Browse files
Options
Downloads
Patches
Plain Diff
files changed in production
parent
54f13347
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/services/search_service/model.rb
+2
-2
2 additions, 2 deletions
app/services/search_service/model.rb
app/workers/attachment_cache_worker.rb
+1
-1
1 addition, 1 deletion
app/workers/attachment_cache_worker.rb
with
3 additions
and
3 deletions
app/services/search_service/model.rb
+
2
−
2
View file @
0918dada
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
app/workers/attachment_cache_worker.rb
+
1
−
1
View file @
0918dada
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment