Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
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
黎涛
meta_base_code
Commits
d6c54e5d
Commit
d6c54e5d
authored
Mar 03, 2021
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ef1f9613
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
revise_data_from_es.py
utils/revise_data_from_es.py
+7
-7
No files found.
utils/revise_data_from_es.py
View file @
d6c54e5d
...
@@ -60,13 +60,13 @@ for one_scan in write_into_scan:
...
@@ -60,13 +60,13 @@ for one_scan in write_into_scan:
count
=
count
+
1
count
=
count
+
1
line
=
one_scan
[
'_source'
]
line
=
one_scan
[
'_source'
]
doc_id
=
one_scan
[
'_id'
]
doc_id
=
one_scan
[
'_id'
]
#
try:
try
:
#
if line['is_online'] == 1:
if
line
[
'is_online'
]
==
1
:
#
line['is_online'] = True
line
[
'is_online'
]
=
True
#
else:
else
:
#
line['is_online'] = False
line
[
'is_online'
]
=
False
#
except:
except
:
#
pass
pass
bulk_head
=
'{"index": {"_id":"
%
s"}}'
%
doc_id
bulk_head
=
'{"index": {"_id":"
%
s"}}'
%
doc_id
data_str
=
json
.
dumps
(
line
,
ensure_ascii
=
False
)
data_str
=
json
.
dumps
(
line
,
ensure_ascii
=
False
)
...
...
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