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
36ecb8c5
Commit
36ecb8c5
authored
Dec 24, 2020
by
Dmitry Gruzd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add search by full path field
parent
298ebf6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
ee/changelogs/unreleased/292673-add-search-by-full-path.yml
ee/changelogs/unreleased/292673-add-search-by-full-path.yml
+5
-0
ee/lib/elastic/latest/git_class_proxy.rb
ee/lib/elastic/latest/git_class_proxy.rb
+1
-1
ee/spec/models/concerns/elastic/repository_spec.rb
ee/spec/models/concerns/elastic/repository_spec.rb
+1
-0
No files found.
ee/changelogs/unreleased/292673-add-search-by-full-path.yml
0 → 100644
View file @
36ecb8c5
---
title
:
Add advanced search by full path field
merge_request
:
50567
author
:
type
:
changed
ee/lib/elastic/latest/git_class_proxy.rb
View file @
36ecb8c5
...
...
@@ -161,7 +161,7 @@ module Elastic
_name:
context
.
name
(
:blob
,
:match
,
:search_terms
),
query:
query
.
term
,
default_operator: :and
,
fields:
%w[blob.content blob.file_name]
fields:
%w[blob.content blob.file_name
blob.path
]
}
}
...
...
ee/spec/models/concerns/elastic/repository_spec.rb
View file @
36ecb8c5
...
...
@@ -20,6 +20,7 @@ RSpec.describe Repository, :elastic do
index!
(
project
)
expect
(
project
.
repository
.
elastic_search
(
'def popen'
)[
:blobs
][
:total_count
]).
to
eq
(
1
)
expect
(
project
.
repository
.
elastic_search
(
'files/ruby/popen.rb'
)[
:blobs
][
:total_count
]).
to
eq
(
1
)
expect
(
project
.
repository
.
elastic_search
(
'def | popen'
)[
:blobs
][
:total_count
]
>
1
).
to
be_truthy
expect
(
project
.
repository
.
elastic_search
(
'initial'
)[
:commits
][
:total_count
]).
to
eq
(
1
)
...
...
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