Commit 77dd9364 authored by Dos Santos David's avatar Dos Santos David

print size of document metadata file

parent 505aab8d
......@@ -50,4 +50,5 @@ def run(collection, args):
print('index created\n')
print('Size of the index :\t\t\t{size:,} bytes'.format(size=collection.indexer.get_index_size()))
print('Size of the map token->token_id :\t{size:,} bytes'.format(size=collection.indexer.get_tokens_map_size()))
print('Size of the map token->token_id :\t{size:,} bytes'.format(size=collection.indexer.get_token_to_token_id_size()))
print('Size of document metadata file :\t{size:,} bytes'.format(size=collection.indexer.get_document_metadata_size()))
......@@ -287,7 +287,7 @@ class BSBIIndexer(Indexer):
self.token_to_token_id = pickle.load(f)
self.status = self.INDEX_STATUS_CREATED
self.init_token_id_seq(max(self.token_to_token_id.keys()))
self.init_token_id_seq(start=max(self.token_to_token_id.values()))
return True
......@@ -300,3 +300,6 @@ class BSBIIndexer(Indexer):
def get_token_to_token_id_size(self):
return os.stat(self.TOKENS_MAP_FILE).st_size
def get_document_metadata_size(self):
return os.stat(self.DOCUMENT_METADATA_FILE).st_size
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment