You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Mostafa Hadian <ha...@gmail.com> on 2011/08/24 15:55:28 UTC

i'm having some trouble with class FSDirectory

hello.
there is this piece of code in the book "lucene in action" :
Directory dir = new FSDirectory(new File(indexDir), null);
but class FSDirectory is an abstract class and cannot be instantiated like
this.
thank you very much for your helping.

Re: i'm having some trouble with class FSDirectory

Posted by Simon Willnauer <si...@googlemail.com>.
just use the static factory method FSDirectory#open(File) to obtain a
FSDirectory instance

simon

On Wed, Aug 24, 2011 at 3:55 PM, Mostafa Hadian <ha...@gmail.com> wrote:
> hello.
> there is this piece of code in the book "lucene in action" :
> Directory dir = new FSDirectory(new File(indexDir), null);
> but class FSDirectory is an abstract class and cannot be instantiated like
> this.
> thank you very much for your helping.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org