Document doc = new Document();
CategoryAssociationsContainer associations = new CategoryAssociationsContainer();
for (int j = 0; j < CATEGORIES[i].length; j++) {
associations.setAssociation(CATEGORIES[i][j], ASSOCIATIONS[i][j]);
}
facetFields.addFields(doc, associations);
indexWriter.addDocument(doc);
}
indexWriter.close();
taxoWriter.close();