lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee <>
Subject Re: Using Lucene for File Name indexing / searching only
Date Fri, 12 Oct 2012 07:50:28 GMT
Hi Bernd

If all you want to do is search files by name, Lucene is not the tool 
for you.

Lucene is a very powerful document search library.

You would have to code using Lucene to write your tool, it does not 

It would be quicker and more efficient to write your own routine to list 
the directory and run a regular expression on the file names.

Even if the directory listing is extremely large (which is a bad idea 
anyway), or needs to be watched, it will still be easier to write your 
own tool than use Lucene.

I hope that helps

On 12/10/2012 09:32, Bernd Kappler wrote:
> Hi Danil,
 > thank's for your quick response. Indeed: a library is what I am
 > looking for - since I want to make use of it from within a server
 > based java application. When I read the Lucene documentation, I
 > became confident that Lucene *can* do this job. My question is more:
 > is it the best library for this task? Since this uses only a subset
 > of the functionality Lucene was designed for, Lucene might not be
 > optimized for this. Do you know, if there are other java libraries
 > available that are desingned and optimized for searching files by
 > name? Or do you think that Lucene - while being optimized for
 > indexing file contents - will do also a great job on this specific
 > sub task?
 > Thanks and regards
 > Bernd
 > Am 10/12/2012 09:13 AM, schrieb Danil Ε’ORIN:
 >> Lucene is just a library.
 >> You will have to write the tool, and it's up to you what data you
 >> choose to index and how to query the index you created.. It can be
 >> filename, partial filename, prefix or even regexp on filename, it's
 >> all up to you...
 >> On Fri, Oct 12, 2012 at 10:00 AM, Bernd Kappler
 >> <> wrote:
 >>> Hi,
 >>> I am looking for a java based tool for creating an index of all
 >>> files in a specific direcoty that allows me to find the files by
 >>> name - similar to UNIXs locate tool.
 >>> From the genereal documentation I have the impression that lucene
 >>> could do this. But I also noticed that the primary usage scenario
 >>> is indexing file contents - and it might just be an overkill to
 >>> use lucene for this sub-task.
 >>> Based on your experience: is lucene the right tool for this or
 >>> would you recommend something different?
 >>> Thanks and regards
 >>> Bernd

View raw message