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
23d9889d
Commit
23d9889d
authored
Feb 19, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't index unnecessary data into elastic
parent
b8342d20
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
CHANGELOG-EE
CHANGELOG-EE
+1
-0
lib/elastic/projects_search.rb
lib/elastic/projects_search.rb
+14
-1
lib/elastic/snippets_search.rb
lib/elastic/snippets_search.rb
+13
-2
No files found.
CHANGELOG-EE
View file @
23d9889d
...
@@ -6,6 +6,7 @@ v 8.5.0 (unreleased)
...
@@ -6,6 +6,7 @@ v 8.5.0 (unreleased)
- GitLab Pages gets support for custom domain and custom certificate
- GitLab Pages gets support for custom domain and custom certificate
- Fix of Elastic indexer. It should not trigger record validation for projects
- Fix of Elastic indexer. It should not trigger record validation for projects
- Fix of Elastic indexer. Stabilze indexer when serialized data is corrupted
- Fix of Elastic indexer. Stabilze indexer when serialized data is corrupted
- [Elastic] Don't index unnecessary data into elastic
v 8.4.4
v 8.4.4
- Re-introduce "Send email to users" link in Admin area
- Re-introduce "Send email to users" link in Admin area
...
...
lib/elastic/projects_search.rb
View file @
23d9889d
...
@@ -29,7 +29,20 @@ module Elastic
...
@@ -29,7 +29,20 @@ module Elastic
end
end
def
as_indexed_json
(
options
=
{})
def
as_indexed_json
(
options
=
{})
as_json
(
except: :runners_token
).
merge
({
as_json
({
only:
[
:id
,
:name
,
:path
,
:description
,
:namespace_id
,
:created_at
,
:archived
,
:visibility_level
,
:last_activity_at
,
:last_pushed_at
]
}).
merge
({
name_with_namespace:
name_with_namespace
,
name_with_namespace:
name_with_namespace
,
path_with_namespace:
path_with_namespace
path_with_namespace:
path_with_namespace
})
})
...
...
lib/elastic/snippets_search.rb
View file @
23d9889d
...
@@ -28,12 +28,23 @@ module Elastic
...
@@ -28,12 +28,23 @@ module Elastic
end
end
def
as_indexed_json
(
options
=
{})
def
as_indexed_json
(
options
=
{})
as_json
(
as_json
({
only:
[
:id
,
:title
,
:file_name
,
:content
,
:created_at
,
:updated_at
,
:state
,
:project_id
,
:author_id
,
],
include:
{
include:
{
project:
{
only: :id
},
project:
{
only: :id
},
author:
{
only: :id
}
author:
{
only: :id
}
}
}
)
}
)
end
end
def
self
.
elastic_search
(
query
,
options:
{})
def
self
.
elastic_search
(
query
,
options:
{})
...
...
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