private void index() throws IOException {
IndexWriter indexWriter = new IndexWriter(indexDir, new IndexWriterConfig(FacetExamples.EXAMPLES_VER,
new WhitespaceAnalyzer(FacetExamples.EXAMPLES_VER)));
// Writes facet ords to a separate directory from the main index
DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
// Reused across documents, to add the necessary facet fields
FacetFields facetFields = new FacetFields(taxoWriter, indexingParams);
add(indexWriter, facetFields, "Author/Bob", "Publish Date/2010/10/15");
add(indexWriter, facetFields, "Author/Lisa", "Publish Date/2010/10/20");
add(indexWriter, facetFields, "Author/Lisa", "Publish Date/2012/1/1");
add(indexWriter, facetFields, "Author/Susan", "Publish Date/2012/1/7");
add(indexWriter, facetFields, "Author/Frank", "Publish Date/1999/5/5");
indexWriter.close();
taxoWriter.close();
}