fix
This commit is contained in:
parent
1960d9b985
commit
81a3992b38
14
VRE.py
14
VRE.py
|
@ -45,7 +45,7 @@ class VRE:
|
|||
|
||||
def init(self):
|
||||
#first run
|
||||
if not os.path.isfile(self.directory + self.name + '_dataset' + '.json') or not os.path.isfile(self.directory + self.name + '_paper' + '.json') or not os.path.isfile(self.directory + self.name + '_content' + '.json') or not os.path.isfile(self.directory + self.name + '_post' + '.json'):
|
||||
if True or not os.path.isfile(self.directory + self.name + '_dataset' + '.json') or not os.path.isfile(self.directory + self.name + '_paper' + '.json') or not os.path.isfile(self.directory + self.name + '_content' + '.json') or not os.path.isfile(self.directory + self.name + '_post' + '.json'):
|
||||
self.get_content()
|
||||
if self.index['dataset_titles_index'] is None:
|
||||
self.create_index('dataset_db', 'title', 'dataset_titles_index', 'janet_dataset_titles_index')
|
||||
|
@ -75,20 +75,20 @@ class VRE:
|
|||
if self.new_income:
|
||||
if len(self.db['content_db'])%100 != 0:
|
||||
self.create_index('content_db', 'content', 'content_index', 'janet_content_index')
|
||||
self.populate_index('content_db', 'content', 'content_index', 'janet_content_index')
|
||||
self.populate_index('content_db', 'content', 'content_index', 'janet_content_index')
|
||||
if len(self.db['post_db'])%100 != 0:
|
||||
self.create_index('post_db', 'content', 'post_index', 'janet_post_index')
|
||||
self.populate_index('post_db', 'content', 'post_index', 'janet_post_index')
|
||||
self.populate_index('post_db', 'content', 'post_index', 'janet_post_index')
|
||||
if len(self.db['paper_db'])%100 != 0:
|
||||
self.create_index('paper_db', 'title', 'paper_titles_index', 'janet_paper_titles_index')
|
||||
self.populate_index('paper_db', 'title', 'paper_titles_index', 'janet_paper_titles_index')
|
||||
self.create_index('paper_db', 'notes', 'paper_desc_index', 'janet_paper_desc_index')
|
||||
self.populate_index('paper_db', 'notes', 'paper_desc_index', 'janet_paper_desc_index')
|
||||
self.populate_index('paper_db', 'title', 'paper_titles_index', 'janet_paper_titles_index')
|
||||
self.populate_index('paper_db', 'notes', 'paper_desc_index', 'janet_paper_desc_index')
|
||||
if len(self.db['dataset_db'])%100 != 0:
|
||||
self.create_index('dataset_db', 'title', 'dataset_titles_index', 'janet_dataset_titles_index')
|
||||
self.populate_index('dataset_db', 'title', 'dataset_titles_index', 'janet_dataset_titles_index')
|
||||
self.create_index('dataset_db', 'notes', 'dataset_desc_index', 'janet_dataset_desc_index')
|
||||
self.populate_index('dataset_db', 'notes', 'dataset_desc_index', 'janet_dataset_desc_index')
|
||||
self.populate_index('dataset_db', 'title', 'dataset_titles_index', 'janet_dataset_titles_index')
|
||||
self.populate_index('dataset_db', 'notes', 'dataset_desc_index', 'janet_dataset_desc_index')
|
||||
self.new_income = False
|
||||
|
||||
def create_index(self, db_type, attribute, index_type, filename):
|
||||
|
|
Loading…
Reference in New Issue