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
4767ac69
Commit
4767ac69
authored
Jan 09, 2020
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: Keep monkey-patch up-to-date with 6.1
https://github.com/elastic/elasticsearch-rails/pull/862
parent
a917f8ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
ee/lib/gem_extensions/elasticsearch/model/indexing/instance_methods.rb
...tensions/elasticsearch/model/indexing/instance_methods.rb
+5
-2
No files found.
ee/lib/gem_extensions/elasticsearch/model/indexing/instance_methods.rb
View file @
4767ac69
...
...
@@ -24,6 +24,8 @@ module GemExtensions
)
end
# Code copied from gem, to disable checks
# rubocop:disable Style/MultilineIfModifier
def
update_document
(
options
=
{})
if
attributes_in_database
=
self
.
instance_variable_get
(
:@__changed_model_attributes
).
presence
attributes
=
if
respond_to?
(
:as_indexed_json
)
...
...
@@ -35,13 +37,14 @@ module GemExtensions
client
.
update
(
{
index:
index_name
,
type:
document_type
,
id:
self
.
es_id
,
id:
self
.
es_id
,
# Changed
body:
{
doc:
attributes
}
}.
merge
(
options
)
)
)
unless
attributes
.
empty?
else
index_document
(
options
)
end
end
# rubocop:enable Style/MultilineIfModifier
def
update_document_attributes
(
attributes
,
options
=
{})
client
.
update
(
...
...
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