Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
graces_es6
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
graces_es6
Commits
01435404
Commit
01435404
authored
Nov 05, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改mapping
parent
153f4c3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
trans2es_mapping2es.py
trans2es/management/commands/trans2es_mapping2es.py
+0
-2
es.py
trans2es/utils/es.py
+2
-4
No files found.
trans2es/management/commands/trans2es_mapping2es.py
View file @
01435404
...
...
@@ -114,9 +114,7 @@ class Command(BaseCommand):
def
work
(
self
,
es
,
index_prefix
,
doc_type
,
delete
=
False
):
# create index if not exits
create_index
(
es
=
es
,
index_prefix
=
index_prefix
,
doc_type
=
doc_type
)
m
=
load_mapping
(
doc_type
=
doc_type
)
# reset doc_type for experiment index
if
doc_type
==
"diary_norms_disable"
:
doc_type
=
"diary"
...
...
trans2es/utils/es.py
View file @
01435404
...
...
@@ -112,10 +112,8 @@ def put_mapping(es, index_prefix, doc_type, mapping, delete=False):
import
copy
mapping_copy
=
copy
.
deepcopy
(
mapping
)
mapping_copy
=
_mapping_modify
(
es
,
doc_type
,
mapping_copy
)
print
(
index
)
print
(
doc_type
)
print
(
mapping_copy
)
return
cl
.
put_mapping
(
index
=
index
,
body
=
mapping_copy
)
return
cl
.
put_mapping
(
index
=
index
,
doc_type
=
doc_type
,
body
=
mapping_copy
,
include_type_name
=
False
)
def
alias_shift
(
es
,
alias
,
old_index
,
new_index
):
...
...
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