mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
Indexer max size now in config
This commit is contained in:
parent
4005b72180
commit
adc37ab50e
2 changed files with 3 additions and 1 deletions
|
@ -21,7 +21,6 @@ from os.path import join, getsize
|
|||
from Helper import Process
|
||||
|
||||
# Config variable
|
||||
INDEX_SIZE_THRESHOLD = 500 #Mb
|
||||
TIME_WAIT = 1.0 #sec
|
||||
|
||||
# return in bytes
|
||||
|
@ -57,6 +56,7 @@ if __name__ == "__main__":
|
|||
indexRegister_path = join(os.environ['AIL_HOME'],
|
||||
p.config.get("Indexer", "register"))
|
||||
indexertype = p.config.get("Indexer", "type")
|
||||
INDEX_SIZE_THRESHOLD = p.config.get("Indexer", "index_max_size")
|
||||
if indexertype == "whoosh":
|
||||
schema = Schema(title=TEXT(stored=True), path=ID(stored=True,
|
||||
unique=True),
|
||||
|
|
|
@ -123,6 +123,8 @@ cc_tld = r'\.de$'
|
|||
[Indexer]
|
||||
type = whoosh
|
||||
path = indexdir
|
||||
#size in Mb
|
||||
index_max_size = 2000
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue