Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
acc333bf
Commit
acc333bf
authored
Feb 22, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'es_filter_scope_for_iid_search' into 'master'
[Elasticsearch] More efficient search See merge request !1282
parents
b705d410
2e83524d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
app/models/concerns/elastic/application_search.rb
app/models/concerns/elastic/application_search.rb
+3
-2
app/models/concerns/elastic/issues_search.rb
app/models/concerns/elastic/issues_search.rb
+1
-1
changelogs/unreleased-ee/es_filter_scope_for_iid_search.yml
changelogs/unreleased-ee/es_filter_scope_for_iid_search.yml
+4
-0
No files found.
app/models/concerns/elastic/application_search.rb
View file @
acc333bf
...
@@ -141,7 +141,7 @@ module Elastic
...
@@ -141,7 +141,7 @@ module Elastic
{
{
query:
{
query:
{
bool:
{
bool:
{
must
:
[{
term:
{
iid:
iid
}
}]
filter
:
[{
term:
{
iid:
iid
}
}]
}
}
}
}
}
}
...
@@ -155,7 +155,8 @@ module Elastic
...
@@ -155,7 +155,8 @@ module Elastic
options
[
:public_and_internal_projects
]
options
[
:public_and_internal_projects
]
)
)
query_hash
[
:query
][
:bool
][
:filter
]
=
{
query_hash
[
:query
][
:bool
][
:filter
]
||=
[]
query_hash
[
:query
][
:bool
][
:filter
]
<<
{
has_parent:
{
has_parent:
{
parent_type:
"project"
,
parent_type:
"project"
,
query:
{
query:
{
...
...
app/models/concerns/elastic/issues_search.rb
View file @
acc333bf
...
@@ -79,7 +79,7 @@ module Elastic
...
@@ -79,7 +79,7 @@ module Elastic
{
term:
{
confidential:
false
}
}
{
term:
{
confidential:
false
}
}
end
end
query_hash
[
:query
][
:bool
][
:
must
]
<<
filter
query_hash
[
:query
][
:bool
][
:
filter
]
<<
filter
query_hash
query_hash
end
end
end
end
...
...
changelogs/unreleased-ee/es_filter_scope_for_iid_search.yml
0 → 100644
View file @
acc333bf
---
title
:
"
[Elasticsearch]
More
efficient
search"
merge_request
:
author
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment