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
e4a4bd18
Commit
e4a4bd18
authored
Aug 05, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
f6e84f20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
workspace.xml
.idea/workspace.xml
+0
-0
topic.py
index_contrast/topic.py
+4
-3
No files found.
.idea/workspace.xml
View file @
e4a4bd18
This diff is collapsed.
Click to expand it.
index_contrast/topic.py
View file @
e4a4bd18
...
...
@@ -199,8 +199,10 @@ class ESPerform(object):
batch_search
=
False
,
routing
=
None
):
try
:
assert
(
es_cli
is
not
None
)
official_index_name
=
sub_index_name
if
sub_index_name
!=
"mv-alpha-topic-high-star-prod-190801001"
:
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
(
official_index_name
)
if
not
index_exists
:
if
not
auto_create_index
:
...
...
@@ -487,7 +489,7 @@ for lev in content_level:
"is_online"
:
True
}
}
result_dict_test
=
ESPerform
.
get_search_results
(
es_cli_obj
,
"
topic
"
,
q
,
0
,
1
)
result_dict_test
=
ESPerform
.
get_search_results
(
es_cli_obj
,
"
mv-alpha-topic-high-star-prod-190801001
"
,
q
,
0
,
1
)
for
new_item
in
result_dict_test
[
"hits"
]:
new_source
=
new_item
[
"_source"
]
new_id
=
new_source
[
"id"
]
...
...
@@ -677,4 +679,3 @@ for lev in content_level:
print
(
old_source
[
"user_nick_name_pre"
])
print
(
new_source
[
"user_nick_name_pre"
])
print
(
"-----user_nick_name_pre-----"
)
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