@@ -0,0 +1,2043 @@
+package de.tblsoft.solr.pipeline;%0A%0Aimport com.google.api.client.repackaged.com.google.common.base.Strings;%0Aimport com.google.common.base.Splitter;%0Aimport com.google.common.io.Files;%0Aimport de.tblsoft.solr.pipeline.bean.Document;%0Aimport de.tblsoft.solr.util.IOUtils;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.nio.charset.Charset;%0Aimport java.nio.charset.StandardCharsets;%0A%0A/**%0A * Created by tblsoft on 19.11.17.%0A */%0Apublic class FilelineReader extends AbstractReader %7B%0A%0A    public void read() %7B%0A    %09String absoluteFilename;%0A    %09boolean addMeta = false;%0A%0A        String charset = getProperty(%22charset%22, StandardCharsets.UTF_8.name());%0A        String filename = getProperty(%22filename%22, null);%0A        absoluteFilename = IOUtils.getAbsoluteFile(getBaseDir(), filename);%0A%0A        addMeta = getPropertyAsBoolean(%22addMeta%22, false);%0A        Long maxRows = getPropertyAsInteger(%22maxRows%22, Long.MAX_VALUE);%0A        String delimiter = getProperty(%22delimiter%22, %22,%22);%0A        String commentPrefix = getProperty(%22commentPrefix%22, %22#%22);%0A        String fieldName = getProperty(%22fieldName%22, %22line%22);%0A%0A        try %7B%0A            BufferedReader br = Files.newReader(new File(absoluteFilename), Charset.forName(charset));%0A            String line;%0A            long countLines = 0;%0A            while ((line = br.readLine()) != null) %7B%0A                countLines++;%0A                if(countLines %3E maxRows) %7B%0A                    break;%0A                %7D%0A                if (line.startsWith(commentPrefix)) %7B%0A                    continue;%0A                %7D%0A                if(Strings.isNullOrEmpty(line)) %7B%0A                    continue;%0A                %7D%0A                Document document = new Document();%0A                for (String item : Splitter.on(delimiter).trimResults().split(line)) %7B%0A                    document.addField(fieldName, item);%0A                %7D%0A                executer.document(document);%0A            %7D%0A            br.close();%0A        %7D catch (Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%7D%0A

add a file line reader