You haven't specified that DIH should put the file name in the document
as it indexes it, i.e. <field column="file" name="${f.fileName}" /> or some
such...

Best
Erick

On Thu, May 12, 2011 at 11:15 AM, Marcel Panse <marcel.pa...@gmail.com> wrote:
> Hi Solr community,
>
> I'm new to solr and trying to scan all pdf/doc files in a directory. This
> works fine and I am able to scan all documents. The next thing i'm trying to
> do is also receiving the filename of the file in the search results. The
> filename however never shows up. I tried a couple of things, but the
> documentation is not very helpfull about how to do this.
>
> This is my dataConfig:
>
> <dataConfig>
>    <dataSource type="BinFileDataSource" name="bin"/>
>    <document>
> <entity name="f" processor="FileListEntityProcessor" recursive="true"
> rootEntity="false"
>  dataSource="null"  baseDir="H:/solrtestsmall"
> fileName=".*\.(DOC)|(PDF)|(pdf)|(doc)" onError="skip">
>
> <entity name="tika-test" processor="TikaEntityProcessor"
> url="${f.fileAbsolutePath}" format="text" dataSource="bin" onError="skip">
>                <field column="Author" name="author" meta="true"/>
>                <field column="title" name="title" meta="true"/>
>                <field column="text" name="text"/>
> </entity>
>  <field column="fileName" name="fileName"/>
> </entity>
>    </document>
> </dataConfig>
>
>
> Thanks,
> Marcel Panse
>

Reply via email to