lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <>
Subject Re: Search a folder with File name and retrieve all the files matched
Date Sat, 09 Mar 2013 00:16:47 GMT
Since this is a POC you could simply run this command with the default example schema:

cd solr/example/exampledocs
java -Dauto -Drecursive=0 -jar post.jar path/to/folder

You will get the full file name with path in field "resourcename"
If you need to search just the filename, you can achieve that through adding a new field "filename"
with a copyField resourcename->filename and a custom fieldType for filename with a PatternReplaceFilterFactory
to remove the path.

Jan Høydahl, search solution architect
Cominvent AS -
Solr Training -

7. mars 2013 kl. 22:11 skrev Alexandre Rafalovitch <>:

> You could use DataImportHandler with FileListEntityProcessor to get the
> file names in:
> Then, if it is recursive enumeration and not just one level, you probably
> want a tokenizer that splits on path separator characters (e.g. /). Or
> maybe you want to index filename as a separate field from full path (can do
> it in FileListEntityProcessor itself).
> And if you combined the list of files with inner entity using Tika, you can
> load the file content for searching as well:
> Regards,
>   Alex.
> Personal blog:
> LinkedIn:
> - Time is the quality of nature that keeps events from happening all at
> once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)
> On Thu, Mar 7, 2013 at 3:39 PM, pavangolla <> wrote:
>> HI,
>> I am new to apache solr,
>> I am doing a poc, where there is a folder (in sys or some repository) which
>> has different files with diff extensions pdf, doc, xls..,
>> I want to search with a file name and retrieve all the files with the name
>> matching
>> How do i proceed on this.
>> Please help me on this.
>> --
>> View this message in context:
>> Sent from the Solr - User mailing list archive at

View raw message