}
private void contributionAdded(Contribution contribution, IndexWriter indexWriter) throws IndexException {
DomainSearchDocumentProcessorsMap docProcessors = new DomainSearchDocumentProcessorsMap();
DocumentMap docs = new DocumentMap();
try {
docProcessors.process(docProcessors, docs, contribution, null, "");
} catch (Exception e) {
e.printStackTrace();
}
// FileWriter writer = new FileWriter("indexed.txt");
for (Document doc : docs.values()) {
org.apache.lucene.document.Document luceneDoc = doc.createLuceneDocument();
// writer.write(luceneDoc.toString());
// writer.write('\n');
// writer.write('\n');