lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dheeraj Kv <>
Subject Re: Apache Lucene file search
Date Mon, 06 Feb 2012 10:00:31 GMT

             The issue of searching file name is resolved with some modifications in
A field named path has been added in the code.
String field = "path";
Also appended parser.setAllowLeadingWildcard(true)  for  searching leading wildcard strings,
which was not available by default.
If parser.setAllowLeadingWildcard(true)  is set to false the code cant find the file name.

If the file name consists of a string xyz, the query option should have *xyz*. 

Dheeraj KV

-----Original Message-----
From: Dheeraj Kv <>
To: java-user <>
Sent: Wed, Feb 1, 2012 1:10 pm
Subject: Apache Lucene  file search

        I learnt about Lucene from google and i thought of implementing it my company.
I don't want to use Lucene as a web search application. I have a large backup storage and
which consists of html file, doc files and pdf files.
I need to search inside a file as well as search for file names. For that purpose I thought
I will try Lucene. I m not good in JAVA. 
I installed  it on the server and it worked me for normal search  inside the files, but  found
out that file name search is not supported. 
Also it takes the same amount of time for making the index and updating the index of the same
Can you put some light on it. I used IndexFiles and SearchFiles APIsfor this purpose. 
Commands I used was:

java org.apache.lucene.demo.IndexFiles -index /mnt1 -docs /Documents 

java org.apache.lucene.demo.SearchFiles -index /mnt1 


Dheeraj KV


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message