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
78898a43
Commit
78898a43
authored
Nov 03, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新es的配置
parent
f512050d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
type_info.py
trans2es/type_info.py
+6
-6
No files found.
trans2es/type_info.py
View file @
78898a43
...
@@ -184,10 +184,10 @@ class TypeInfo(object):
...
@@ -184,10 +184,10 @@ class TypeInfo(object):
if
not
isinstance
(
es
,
(
list
,
tuple
,)):
if
not
isinstance
(
es
,
(
list
,
tuple
,)):
es
=
[
es
]
es
=
[
es
]
#
index_type = self.type
index_type
=
self
.
type
index_type
=
"_doc"
if
self
.
type
==
'newitemwiki'
or
self
.
type
==
'collectwiki'
or
self
.
type
==
'brandwiki'
or
self
.
type
==
'productwiki'
:
if
self
.
type
==
'newitemwiki'
or
self
.
type
==
'collectwiki'
or
self
.
type
==
'brandwiki'
or
self
.
type
==
'productwiki'
:
index_type
=
'
_doc
'
index_type
=
'
newwiki
'
index
=
es_index_adapt
(
index
=
es_index_adapt
(
index_prefix
=
index_prefix
,
index_prefix
=
index_prefix
,
...
@@ -201,7 +201,7 @@ class TypeInfo(object):
...
@@ -201,7 +201,7 @@ class TypeInfo(object):
bulk_actions
.
append
({
bulk_actions
.
append
({
'_op_type'
:
'index'
,
'_op_type'
:
'index'
,
'_index'
:
index
,
'_index'
:
index
,
'_type'
:
index_type
,
'_type'
:
"_doc"
,
'_id'
:
data
[
'id'
]
+
data
[
"wikitype"
]
*
10000
,
'_id'
:
data
[
'id'
]
+
data
[
"wikitype"
]
*
10000
,
'_source'
:
data
,
'_source'
:
data
,
})
})
...
@@ -210,7 +210,7 @@ class TypeInfo(object):
...
@@ -210,7 +210,7 @@ class TypeInfo(object):
bulk_actions
.
append
({
bulk_actions
.
append
({
'_op_type'
:
'index'
,
'_op_type'
:
'index'
,
'_index'
:
index
,
'_index'
:
index
,
'_type'
:
index_type
,
'_type'
:
"_doc"
,
'_id'
:
self
.
name
+
"_"
+
str
(
data
[
"id"
]),
'_id'
:
self
.
name
+
"_"
+
str
(
data
[
"id"
]),
'_source'
:
data
,
'_source'
:
data
,
})
})
...
@@ -229,7 +229,7 @@ class TypeInfo(object):
...
@@ -229,7 +229,7 @@ class TypeInfo(object):
bulk_actions
.
append
({
bulk_actions
.
append
({
'_op_type'
:
'index'
,
'_op_type'
:
'index'
,
'_index'
:
index
,
'_index'
:
index
,
'_type'
:
index_type
,
'_type'
:
"_doc"
,
'_id'
:
data
[
'id'
],
'_id'
:
data
[
'id'
],
'_source'
:
data
,
'_source'
:
data
,
})
})
...
...
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