final String[] parameters = Arrays.copyOfRange(args, 1, args.length);
final Main main = new Main();
if (args[0].equalsIgnoreCase("index")) {
final Index indexer = new Index();
main.parseParameters(indexer, parameters);
indexer.index();
}
else if (args[0].equalsIgnoreCase("search")) {
final Search searcher = new Search();
main.parseParameters(searcher, parameters);
System.out.println(searcher.search());