@@ -0,0 +1,1115 @@
+package de.hsmannheim.iws2014.analyzers;%0A%0Aimport org.apache.lucene.analysis.Analyzer;%0Aimport org.apache.lucene.document.Document;%0Aimport org.apache.lucene.document.Field;%0Aimport org.apache.lucene.document.TextField;%0Aimport org.apache.lucene.index.IndexWriter;%0Aimport org.apache.lucene.index.IndexWriterConfig;%0Aimport org.apache.lucene.store.Directory;%0Aimport org.apache.lucene.util.Version;%0A%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0A/**%0A * Indexer using a custom analyzer.%0A */%0Apublic class CustomAnalyzingIndexer %7B%0A%0A    private final IndexWriter indexWriter;%0A%0A    public CustomAnalyzingIndexer(Analyzer analyzer, Directory directory) throws IOException %7B%0A        IndexWriterConfig config = new IndexWriterConfig(Version.LATEST, analyzer);%0A        indexWriter = new IndexWriter(directory, config);%0A    %7D%0A%0A    public void index(List%3CString%3E texts) throws IOException %7B%0A        for (String text : texts) %7B%0A            Document doc = new Document();%0A            doc.add(new TextField(%22content%22, text, Field.Store.NO));%0A            indexWriter.addDocument(doc);%0A        %7D%0A        indexWriter.close();%0A    %7D%0A%7D%0A

Add custom analyzing indexer