zoie-solr doesn't support to choose the model of Diectory.

Description

In ZoieSystemHome.java

if (isTypeZoie) {
ZoieSystem<IndexReader, DocumentWithID> zoieSystem = new ZoieSystem<IndexReader, DocumentWithID>(idxFile,
new ZoieSolrIndexableInterpreter(), new DefaultIndexReaderDecorator(), zoieConfig);

It doesn't support to choose the model of Diectory.
The DefaultDirectoryManager use the default model : SIMPLE

I suggest to change by follow :

String modelValue = config.get("zoie.model", "SIMPLE");
DIRECTORY_MODE model = DIRECTORY_MODE.SIMPLE;
if (modelValue.equals("NIO")) {
model = DIRECTORY_MODE.NIO;
} else if (modelValue.equals("MMAP")) {
model = DIRECTORY_MODE.MMAP;
}
log.info("DIRECTORY_MODE:" + model);
if (isTypeZoie) {
DirectoryManager dirMgr = new DefaultDirectoryManager(idxFile, model);

ZoieSystem<IndexReader, DocumentWithID> zoieSystem = new ZoieSystem<IndexReader, DocumentWithID>(dirMgr,
new ZoieSolrIndexableInterpreter(), new DefaultIndexReaderDecorator(), zoieConfig);

Environment

None

Status

Assignee

John Wang

Reporter

yuzhenyuan

Labels

None

Fix versions

Affects versions

3.0.0

Priority

Major
Configure