if(line.hasOption('h') || args.length <= 0){
printHelp();
System.exit(0);
}
Indexer indexer;
IndexerFactory factory = IndexerFactory.getInstance();
String path = null;
if(args.length > 1){
path = args[1];
}
if("init".equalsIgnoreCase(args[0]) ||
"index".equalsIgnoreCase(args[0]) ||
"postprocess".equalsIgnoreCase(args[0]) ||
"finalise".equalsIgnoreCase(args[0])){
if(path != null){
indexer = factory.create(path);
} else {
indexer = factory.create();
}
if(line.hasOption('c')){
int cunckSize = Integer.parseInt(line.getOptionValue('c'));
indexer.setChunkSize(cunckSize);
}