public static void main(String[] args) throws IOException {boolean printTree = false;String path = null;for(int i=0;i<args.length;i++) {if (args[i].equals("-printTree")) {printTree = true;} else {path = args[i];}}if (args.length != (printTree ? 2 : 1)) {System.out.println("\nUsage: java -classpath ... org.apache.lucene.facet.util.PrintTaxonomyStats [-printTree] /path/to/taxononmy/index\n");System.exit(1);}Directory dir = FSDirectory.open(Paths.get(path));TaxonomyReader r = new DirectoryTaxonomyReader(dir);printStats(r, System.out, printTree);r.close();dir.close();}