Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cybertron
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
alpha
cybertron
Commits
11636385
Commit
11636385
authored
Jul 16, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
66ffbe75
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
workspace.xml
.idea/workspace.xml
+0
-0
pictorial.py
index_contrast/pictorial.py
+3
-2
tag.py
index_contrast/tag.py
+4
-2
user.py
index_contrast/user.py
+4
-3
No files found.
.idea/workspace.xml
View file @
11636385
This diff is collapsed.
Click to expand it.
index_contrast/pictorial.py
View file @
11636385
...
...
@@ -48,6 +48,7 @@ class ESPerform(object):
:return:
"""
try
:
index_flag
=
None
assert
(
index_flag
in
[
None
,
"read"
,
"write"
])
official_index_name
=
cls
.
index_prefix
+
"-"
+
sub_index_name
...
...
@@ -191,8 +192,8 @@ class ESPerform(object):
try
:
assert
(
es_cli
is
not
None
)
official_index_name
=
sub_index_name
# if sub_index_name != "mv-alpha-user-test-19071190
1":
#
official_index_name = cls.get_official_index_name(sub_index_name, "read")
if
sub_index_name
!=
"mv-alpha-toipc-test-190712901
1"
:
official_index_name
=
cls
.
get_official_index_name
(
sub_index_name
,
"read"
)
index_exists
=
es_cli
.
indices
.
exists
(
official_index_name
)
if
not
index_exists
:
...
...
index_contrast/tag.py
View file @
11636385
...
...
@@ -18,6 +18,7 @@ ES_INFO_LIST = [
]
ES_INDEX_PREFIX
=
"gm-dbmw"
class
ESPerform
(
object
):
cli_obj
=
None
cli_info_list
=
ES_INFO_LIST
...
...
@@ -46,6 +47,7 @@ class ESPerform(object):
:return:
"""
try
:
index_flag
=
None
assert
(
index_flag
in
[
None
,
"read"
,
"write"
])
official_index_name
=
cls
.
index_prefix
+
"-"
+
sub_index_name
...
...
@@ -283,6 +285,7 @@ class ESPerform(object):
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
True
# 先获取一部分数据
es_cli_obj
=
ESPerform
.
get_cli
()
...
...
@@ -362,12 +365,11 @@ for old_item in result_dict["hits"]:
is_deleted
=
values
[
"is_deleted"
]
if
is_online
!=
new_source
[
"suggest"
][
"contexts"
][
"is_online"
]:
print
(
is_online
)
print
(
"----is_online--------"
)
print
(
"----is_online--------"
)
if
is_deleted
!=
new_source
[
"suggest"
][
"contexts"
][
"is_deleted"
]:
print
(
is_deleted
)
print
(
"-------is_deleted---------"
)
if
old_source
[
"is_deleted"
]
!=
new_source
[
"is_deleted"
]:
print
(
old_source
[
"is_deleted"
])
print
(
new_source
[
"is_deleted"
])
...
...
index_contrast/user.py
View file @
11636385
...
...
@@ -48,6 +48,7 @@ class ESPerform(object):
:return:
"""
try
:
index_flag
=
None
assert
(
index_flag
in
[
None
,
"read"
,
"write"
])
official_index_name
=
cls
.
index_prefix
+
"-"
+
sub_index_name
...
...
@@ -191,8 +192,8 @@ class ESPerform(object):
try
:
assert
(
es_cli
is
not
None
)
official_index_name
=
sub_index_name
#
if sub_index_name != "mv-alpha-user-test-190711901":
#
official_index_name = cls.get_official_index_name(sub_index_name, "read")
if
sub_index_name
!=
"mv-alpha-user-test-190711901"
:
official_index_name
=
cls
.
get_official_index_name
(
sub_index_name
,
"read"
)
index_exists
=
es_cli
.
indices
.
exists
(
official_index_name
)
if
not
index_exists
:
...
...
@@ -237,7 +238,7 @@ class ESPerform(object):
try
:
assert
(
es_cli
is
not
None
)
#
official_index_name = cls.get_official_index_name(sub_index_name, "read")
official_index_name
=
cls
.
get_official_index_name
(
sub_index_name
,
"read"
)
index_exists
=
es_cli
.
indices
.
exists
(
sub_index_name
)
if
not
index_exists
:
logging
.
error
(
"index:
%
s is not existing,get_search_results error!"
%
sub_index_name
)
...
...
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