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
028b12a1
Commit
028b12a1
authored
Mar 10, 2020
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: cover snippet description in title search
Reindexing required
parent
415e0840
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
2 deletions
+10
-2
changelogs/unreleased/199220-snippet-search.yml
changelogs/unreleased/199220-snippet-search.yml
+1
-1
ee/changelogs/unreleased/207355-es-add-snippet-desc.yml
ee/changelogs/unreleased/207355-es-add-snippet-desc.yml
+5
-0
ee/lib/elastic/latest/snippet_class_proxy.rb
ee/lib/elastic/latest/snippet_class_proxy.rb
+1
-1
ee/lib/elastic/latest/snippet_instance_proxy.rb
ee/lib/elastic/latest/snippet_instance_proxy.rb
+1
-0
ee/spec/lib/elastic/latest/snippet_instance_proxy_spec.rb
ee/spec/lib/elastic/latest/snippet_instance_proxy_spec.rb
+1
-0
ee/spec/models/concerns/elastic/snippet_spec.rb
ee/spec/models/concerns/elastic/snippet_spec.rb
+1
-0
No files found.
changelogs/unreleased/199220-snippet-search.yml
View file @
028b12a1
---
title
:
Include snippet description as part of snippet title search (
when Elasticsearch is not enabled)
title
:
Include snippet description as part of snippet title search (
basic search).
merge_request
:
25961
author
:
type
:
added
ee/changelogs/unreleased/207355-es-add-snippet-desc.yml
0 → 100644
View file @
028b12a1
---
title
:
Include snippet description as part of snippet title search (advanced search, Elasticsearch reindexing required).
merge_request
:
26870
author
:
type
:
added
ee/lib/elastic/latest/snippet_class_proxy.rb
View file @
028b12a1
...
...
@@ -4,7 +4,7 @@ module Elastic
module
Latest
class
SnippetClassProxy
<
ApplicationClassProxy
def
elastic_search
(
query
,
options:
{})
query_hash
=
basic_query_hash
(
%w(title file_name)
,
query
)
query_hash
=
basic_query_hash
(
%w(title
description
file_name)
,
query
)
query_hash
=
filter
(
query_hash
,
options
)
search
(
query_hash
,
options
)
...
...
ee/lib/elastic/latest/snippet_instance_proxy.rb
View file @
028b12a1
...
...
@@ -15,6 +15,7 @@ module Elastic
:title
,
:file_name
,
:content
,
:description
,
:created_at
,
:updated_at
,
:project_id
,
...
...
ee/spec/lib/elastic/latest/snippet_instance_proxy_spec.rb
View file @
028b12a1
...
...
@@ -13,6 +13,7 @@ describe Elastic::Latest::SnippetInstanceProxy do
id:
snippet
.
id
,
title:
snippet
.
title
,
file_name:
snippet
.
file_name
,
description:
snippet
.
description
,
content:
snippet
.
content
,
created_at:
snippet
.
created_at
,
updated_at:
snippet
.
updated_at
,
...
...
ee/spec/models/concerns/elastic/snippet_spec.rb
View file @
028b12a1
...
...
@@ -131,6 +131,7 @@ describe Snippet, :elastic do
'file_name'
,
'content'
,
'created_at'
,
'description'
,
'updated_at'
,
'state'
,
'project_id'
,
...
...
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