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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
34 deletions
+84
-34
workspace.xml
.idea/workspace.xml
+73
-27
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
...
...
@@ -28,13 +28,13 @@
<usages-collector
id=
"statistics.file.extensions.edit"
>
<counts>
<entry
key=
"dummy"
value=
"1"
/>
<entry
key=
"py"
value=
"15
04
"
/>
<entry
key=
"py"
value=
"15
18
"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.types.edit"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"1"
/>
<entry
key=
"Python"
value=
"15
04
"
/>
<entry
key=
"Python"
value=
"15
18
"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.lifecycle.project"
>
...
...
@@ -68,25 +68,38 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/pictorial.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
45
"
>
<caret
line=
"1
3"
selection-start-line=
"13"
selection-end-line=
"19"
selection-end-column=
"27
"
/>
<state
relative-caret-position=
"
282
"
>
<caret
line=
"1
94"
column=
"52"
selection-start-line=
"194"
selection-start-column=
"52"
selection-end-line=
"194"
selection-end-column=
"52
"
/>
<folding>
<element
signature=
"e#382#16835#0"
/>
<element
signature=
"e#530#960#0"
/>
<element
signature=
"e#1648#2194#0"
/>
<element
signature=
"e#2272#3153#0"
/>
<element
signature=
"e#3275#4024#0"
/>
<element
signature=
"e#4129#4630#0"
/>
<element
signature=
"e#4762#6096#0"
/>
<element
signature=
"e#8486#9071#0"
/>
<element
signature=
"e#9141#10450#0"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/user.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
413
"
>
<caret
line=
"
479"
column=
"93"
selection-start-line=
"479"
selection-start-column=
"93"
selection-end-line=
"479"
selection-end-column=
"93
"
/>
<state
relative-caret-position=
"
-1015
"
>
<caret
line=
"
188"
column=
"8"
selection-start-line=
"188"
selection-start-column=
"8"
selection-end-line=
"188"
selection-end-column=
"8
"
/>
<folding>
<element
signature=
"e#384#17208#0"
/>
<element
signature=
"e#530#960#0"
/>
<element
signature=
"e#1676#2222#0"
/>
<element
signature=
"e#2300#3181#0"
/>
<element
signature=
"e#3303#4052#0"
/>
<element
signature=
"e#4157#4658#0"
/>
<element
signature=
"e#4792#6126#0"
/>
<element
signature=
"e#9522#10831#0"
/>
</folding>
</state>
</provider>
...
...
@@ -95,11 +108,21 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/tag.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
315
"
>
<caret
line=
"
21"
selection-start-line=
"21"
selection-end-line=
"448
"
/>
<state
relative-caret-position=
"
-7
"
>
<caret
line=
"
300"
column=
"36"
lean-forward=
"true"
selection-start-line=
"300"
selection-start-column=
"36"
selection-end-line=
"300"
selection-end-column=
"36
"
/>
<folding>
<element
signature=
"e#46#55#0"
expanded=
"true"
/>
<element
signature=
"e#349#16802#0"
/>
<element
signature=
"e#495#925#0"
/>
<element
signature=
"e#1023#1547#0"
/>
<element
signature=
"e#1613#2159#0"
/>
<element
signature=
"e#2237#3118#0"
/>
<element
signature=
"e#3240#3989#0"
/>
<element
signature=
"e#4094#4595#0"
/>
<element
signature=
"e#4729#6063#0"
/>
<element
signature=
"e#6360#8356#0"
/>
<element
signature=
"e#8453#9038#0"
/>
<element
signature=
"e#9108#10417#0"
/>
</folding>
</state>
</provider>
...
...
@@ -137,8 +160,8 @@
<option
value=
"$PROJECT_DIR$/reply_comment1.py"
/>
<option
value=
"$PROJECT_DIR$/answer_reply1.py"
/>
<option
value=
"$PROJECT_DIR$/index_contrast/tag.py"
/>
<option
value=
"$PROJECT_DIR$/index_contrast/pictorial.py"
/>
<option
value=
"$PROJECT_DIR$/index_contrast/user.py"
/>
<option
value=
"$PROJECT_DIR$/index_contrast/pictorial.py"
/>
</list>
</option>
</component>
...
...
@@ -231,7 +254,7 @@
<layout>
<window_info
id=
"Structure"
order=
"0"
sideWeight=
"0.21188119"
side_tool=
"true"
weight=
"0.19112115"
/>
<window_info
id=
"Favorites"
order=
"1"
side_tool=
"true"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"2"
sideWeight=
"0.7872763"
visible=
"true"
weight=
"0.23272438
"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"2"
sideWeight=
"0.7872763"
visible=
"true"
weight=
"0.14932486
"
/>
<window_info
id=
"DB Browser"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
weight=
"0.3284974"
/>
...
...
@@ -241,7 +264,7 @@
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"6"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"8"
sideWeight=
"0.49960285"
visible=
"true"
weight=
"0.0"
/>
<window_info
a
ctive=
"true"
a
nchor=
"bottom"
id=
"Terminal"
order=
"8"
sideWeight=
"0.49960285"
visible=
"true"
weight=
"0.0"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"9"
sideWeight=
"0.50039715"
side_tool=
"true"
weight=
"0.32890365"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"10"
/>
<window_info
anchor=
"bottom"
id=
"DB Execution Console"
order=
"11"
/>
...
...
@@ -298,12 +321,12 @@
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/index_contrast/tag.py
</url>
<line>
16
9
</line>
<line>
16
8
</line>
<option
name=
"timeStamp"
value=
"10"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/index_contrast/tag.py
</url>
<line>
2
1
</line>
<line>
2
0
</line>
<option
name=
"timeStamp"
value=
"12"
/>
</line-breakpoint>
</breakpoints>
...
...
@@ -537,31 +560,54 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/tag.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
315
"
>
<caret
line=
"
21"
selection-start-line=
"21"
selection-end-line=
"448
"
/>
<state
relative-caret-position=
"
-7
"
>
<caret
line=
"
300"
column=
"36"
lean-forward=
"true"
selection-start-line=
"300"
selection-start-column=
"36"
selection-end-line=
"300"
selection-end-column=
"36
"
/>
<folding>
<element
signature=
"e#46#55#0"
expanded=
"true"
/>
<element
signature=
"e#349#16802#0"
/>
<element
signature=
"e#495#925#0"
/>
<element
signature=
"e#1023#1547#0"
/>
<element
signature=
"e#1613#2159#0"
/>
<element
signature=
"e#2237#3118#0"
/>
<element
signature=
"e#3240#3989#0"
/>
<element
signature=
"e#4094#4595#0"
/>
<element
signature=
"e#4729#6063#0"
/>
<element
signature=
"e#6360#8356#0"
/>
<element
signature=
"e#8453#9038#0"
/>
<element
signature=
"e#9108#10417#0"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/
pictorial
.py"
>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/
user
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
4
5"
>
<caret
line=
"1
3"
selection-start-line=
"13"
selection-end-line=
"19"
selection-end-column=
"27
"
/>
<state
relative-caret-position=
"
-101
5"
>
<caret
line=
"1
88"
column=
"8"
selection-start-line=
"188"
selection-start-column=
"8"
selection-end-line=
"188"
selection-end-column=
"8
"
/>
<folding>
<element
signature=
"e#382#16835#0"
/>
<element
signature=
"e#530#960#0"
/>
<element
signature=
"e#1676#2222#0"
/>
<element
signature=
"e#2300#3181#0"
/>
<element
signature=
"e#3303#4052#0"
/>
<element
signature=
"e#4157#4658#0"
/>
<element
signature=
"e#4792#6126#0"
/>
<element
signature=
"e#9522#10831#0"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/
user
.py"
>
<entry
file=
"file://$PROJECT_DIR$/index_contrast/
pictorial
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
413
"
>
<caret
line=
"
479"
column=
"93"
selection-start-line=
"479"
selection-start-column=
"93"
selection-end-line=
"479"
selection-end-column=
"93
"
/>
<state
relative-caret-position=
"
282
"
>
<caret
line=
"
194"
column=
"52"
selection-start-line=
"194"
selection-start-column=
"52"
selection-end-line=
"194"
selection-end-column=
"52
"
/>
<folding>
<element
signature=
"e#384#17208#0"
/>
<element
signature=
"e#530#960#0"
/>
<element
signature=
"e#1648#2194#0"
/>
<element
signature=
"e#2272#3153#0"
/>
<element
signature=
"e#3275#4024#0"
/>
<element
signature=
"e#4129#4630#0"
/>
<element
signature=
"e#4762#6096#0"
/>
<element
signature=
"e#8486#9071#0"
/>
<element
signature=
"e#9141#10450#0"
/>
</folding>
</state>
</provider>
...
...
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