lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: FSDirectory
Date Fri, 30 Nov 2007 14:10:33 GMT
A directory that your program can modify <G>. I assume that
you are running on a unix-like system and the directory you've
specified is protected from modification by whatever user
your process is identified as.

But two other things:
1> do you really want to create a new index as the "true" indicates?
2> This form is deprecated. I'm not sure what the first version that
deprecated this, but from the 2.1 documentation....
*getDirectory<file:///C:/lucene-2.1.0/docs/api/org/apache/lucene/store/FSDirectory.html#getDirectory%28java.io.File,%20boolean%29>
*(File <http://java.sun.com/j2se/1.4/docs/api/java/io/File.html> file,
boolean create)
          *Deprecated.* *Use IndexWriter's create flag, instead, to create a
new index.

*But I'd expect the same behavior from IndexWriter with the create flag...

Best
Erick

On Nov 30, 2007 8:34 AM, Liaqat Ali <liaqatalimian@gmail.com> wrote:

> I m facing problem with this code..
>
> dir = new FSDirectory();
>
>    dir.getDirectory(indexDir, true);
>
> i get error that FSDirectory has protected access. So what i should use
> instead of it...
>
>
> Liaqat
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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