conf.setInt(Constants.NumReduceTasks, indexPartitions);
conf.set(Constants.PostingsListsType,
ivory.core.data.index.PostingsListDocSortedPositional.class.getCanonicalName());
new BuildIPInvertedIndexDocSorted(conf).run();
new BuildIntPostingsForwardIndex(conf).run();
} else if (cmdline.hasOption(POSITIONAL_INDEX_LP)) {
LOG.info(String.format(" -%s", POSITIONAL_INDEX_LP));
conf.set(Constants.IndexPath, indexPath);
conf.setInt(Constants.NumReduceTasks, indexPartitions);
conf.set(Constants.PostingsListsType,
ivory.core.data.index.PostingsListDocSortedPositional.class.getCanonicalName());
conf.setFloat("Ivory.IndexingMapMemoryThreshold", 0.9f);
conf.setFloat("Ivory.IndexingReduceMemoryThreshold", 0.9f);
conf.setInt("Ivory.MaxHeap", 2048);
conf.setInt("Ivory.MaxNDocsBeforeFlush", 50000);
new BuildLPInvertedIndexDocSorted(conf).run();
new BuildIntPostingsForwardIndex(conf).run();
} else if (cmdline.hasOption(NONPOSITIONAL_INDEX_IP)) {
LOG.info(String.format(" -%s", NONPOSITIONAL_INDEX_IP));
conf.set(Constants.IndexPath, indexPath);
conf.setInt(Constants.NumReduceTasks, indexPartitions);
conf.set(Constants.PostingsListsType,
ivory.core.data.index.PostingsListDocSortedNonPositional.class.getCanonicalName());
new BuildIPInvertedIndexDocSorted(conf).run();
new BuildIntPostingsForwardIndex(conf).run();
} else {
LOG.info(String.format("Nothing to do. Specify one of the following: %s, %s, %s",
POSITIONAL_INDEX_IP, POSITIONAL_INDEX_LP, NONPOSITIONAL_INDEX_IP));
}