@@ -0,0 +1,1581 @@
+package de.hsmannheim.iws2014.indexing;%0A%0Aimport org.apache.lucene.document.*;%0Aimport org.apache.lucene.index.IndexWriter;%0A%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0A/**%0A * This class does all the hard work. Indexing developers.%0A */%0Apublic class Indexer %7B%0A%0A    private final IndexWriter index;%0A%0A    public Indexer(IndexWriter index) %7B%0A        this.index = index;%0A    %7D%0A%0A    public void index(List%3CDeveloper%3E developers) %7B%0A        try %7B%0A            try %7B%0A                for (Developer developer : developers) %7B%0A                    Document doc = new Document();%0A                    doc.add(stringField(%22firstname%22, developer.firsname));%0A                    doc.add(stringField(%22surname%22, developer.surname));%0A                    doc.add(stringField(%22residence%22, developer.residence));%0A                    doc.add(textField(%22personalAbstract%22, developer.personalAbstract));%0A                    index.addDocument(doc);%0A                %7D%0A            %7D finally %7B%0A                index.close();%0A            %7D%0A        %7D catch (IOException e) %7B%0A            new IndexerException(%22Cannot add dcoument to index.%22, e);%0A        %7D%0A    %7D%0A%0A    private static StringField stringField(String name, String value) %7B%0A        return new StringField(name, value, Field.Store.YES);%0A    %7D%0A%0A    private static TextField textField(String name, String value) %7B%0A        return new TextField(name, value, Field.Store.NO);%0A    %7D%0A%0A    static class IndexerException extends RuntimeException %7B%0A        public IndexerException(String message, Throwable e) %7B%0A            super(message, e);%0A        %7D%0A    %7D%0A%7D

Add indexer class