ner tagging
This commit is contained in:
+8
-2
@@ -118,7 +118,7 @@ class ElasticHelper():
|
||||
|
||||
##############################
|
||||
|
||||
def backupIndexToZipfile(self, path_back, index_name, out_name= '', body={}, byzip = True, fields=[]) :
|
||||
def backupIndexToZipfile(self, path_back, index_name, out_name= '', body={}, byzip = True, fields=[], noFields=[]) :
|
||||
print('*' * 50, ' start backup -->', index_name)
|
||||
self.counter = 0
|
||||
|
||||
@@ -160,7 +160,13 @@ class ElasticHelper():
|
||||
if kf in item['_source'] :
|
||||
item2['_source'][kf] = item['_source'][kf]
|
||||
else :
|
||||
item2=item
|
||||
item2=item
|
||||
|
||||
if noFields :
|
||||
for kf in noFields :
|
||||
if kf in item2['_source']:
|
||||
del item2['_source'][kf]
|
||||
|
||||
|
||||
out_json.append(item2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user