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
|
from Helper import Process
|
||||||
|
|
||||||
# Config variable
|
# Config variable
|
||||||
INDEX_SIZE_THRESHOLD = 500 #Mb
|
|
||||||
TIME_WAIT = 1.0 #sec
|
TIME_WAIT = 1.0 #sec
|
||||||
|
|
||||||
# return in bytes
|
# return in bytes
|
||||||
|
@ -57,6 +56,7 @@ if __name__ == "__main__":
|
||||||
indexRegister_path = join(os.environ['AIL_HOME'],
|
indexRegister_path = join(os.environ['AIL_HOME'],
|
||||||
p.config.get("Indexer", "register"))
|
p.config.get("Indexer", "register"))
|
||||||
indexertype = p.config.get("Indexer", "type")
|
indexertype = p.config.get("Indexer", "type")
|
||||||
|
INDEX_SIZE_THRESHOLD = p.config.get("Indexer", "index_max_size")
|
||||||
if indexertype == "whoosh":
|
if indexertype == "whoosh":
|
||||||
schema = Schema(title=TEXT(stored=True), path=ID(stored=True,
|
schema = Schema(title=TEXT(stored=True), path=ID(stored=True,
|
||||||
unique=True),
|
unique=True),
|
||||||
|
|
|
@ -123,6 +123,8 @@ cc_tld = r'\.de$'
|
||||||
[Indexer]
|
[Indexer]
|
||||||
type = whoosh
|
type = whoosh
|
||||||
path = indexdir
|
path = indexdir
|
||||||
|
#size in Mb
|
||||||
|
index_max_size = 2000
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue