Apache solr index files (pdf,docx,..) over ftp

Viewed 84

how to index files over ftp , the FTP repo contain all my documents in different format, i am able to do this task for system folder but it doesn't work with ftp

i have this configuration via (DIH)

<dataConfig>
    <dataSource type="BinFileDataSource" />
    <dataSource type="BinURLDataSource" name="binSource" baseUrl="ftp://localhost:21/" onError="skip" user="solr_ftp" password="solr_ftp_pass" />
    <document>
        <!-- baseDir: path to the folder that containt the files (pdf | doc | docx | ...) -->
        <entity name="files" dataSource="binSource" baseDir="ftp://localhost" rootEntity="false" processor="FileListEntityProcessor" fileName=".*\.(doc)|(pdf)|(docx)|(txt)|(rtf)|(html)|(htm)" onError="skip" recursive="true">
            <field column="fileAbsolutePath" name="filePath" />
            <field column="resourceName" name="resourceName" />
            <field column="fileSize" name="size" />
            <field column="fileLastModified" name="lastModified" />
            <!-- tika -->
            <entity name="documentImport" processor="TikaEntityProcessor" url="${files.fileAbsolutePath}" format="text">
                <field column="title" name="title" meta="true"/>
                <field column="subject" name="subject" meta="true"/>
                <field column="description" name="description" meta="true"/>
                <field column="comments" name="comments" meta="true"/>
                <field column="Author" name="author" meta="true"/>
                <field column="Keywords" name="keywords" meta="true"/>
                <field column="category" name="category" meta="true"/>
                <field column="xmpTPg:NPages" name="Page-Count" meta="true"/>
                <field column="text" name="content"/>
            </entity>
        </entity>
    </document>
</dataConfig>  

Error:

failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: 'baseDir' value: ftp://localhost is not a directory Processing Document # 1
0 Answers
Related