lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mufaddal Khumri" <>
Subject Index location
Date Mon, 29 Aug 2005 16:29:03 GMT

I have been trying to control where lucene creates the search index for
my web application.

I am tweaking the following code in order to specify the location for
the index, but it seems that lucene is creating the index in the
location from where my CreateIndex.class is invoked.

Here is the code:

public class CreateSearchIndex
  // ....
  // .....
  public static void main(String[] args)
	  String indexPath = 
    catch(Exception ex)

  // ...
  // ...
  public void initIndex(String indexPath) throws IOException
     fsWriter = new IndexWriter(indexPath, analyzer, true);

I invoke the above class via an ant task from the default-site directory
and my index gets created in the same directory. I want to create it in
the default-site/WEB-INF directory instead? Any pointers as to where I
might be going wrong?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message