[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    Re: newbie question again
From:       Michael McCandless <lucene () mikemccandless ! com>
Date:       2009-03-30 8:05:31
Message-ID: 9ac0c6aa0903300105k427f3a02kcf73a05a90950677 () mail ! gmail ! com
[Download RAW message or body]

My guess is you're not using a 2.9-dev (nightly) version of Lucene's jar?

That constructor for FSDirectory is new in 2.9-dev, and the book's
sources are actively tracking Lucene's.

However, you don't need to create your own Makefile: there's an ant
build.xml script.  You should be able to just run 'ant Indexer', and
Lucene's 2.9-dev jar comes with the book's source code (in the lib
subdirectory).

Please ask future questions about LIA in particular on Manning's forum:

    http://www.manning-sandbox.com/forum.jspa?forumID=451&start=0

Mike

On Mon, Mar 30, 2009 at 3:43 AM, Timon Roth <timon.roth@digitalforce.ch> wrote:
> hello list
>
> sory, this is maeby a stupid questin, but i can't resolve. so maeby you can
> help me:
>
> i try to compile the indexer-example from the book lucene in action, 2nd
> edition (http://www.manning.com/hatcher3/hatcher_meapch1.pdf), but get the
> following error:
> ----------------------------------------------------------------------
> javac -Xlint -cp ":.:./lucene/lucene-core-2.4.1.jar" Indexer.java
> Indexer.java:37: cannot find symbol
> symbol  : constructor FSDirectory(java.io.File,<nulltype>)
> location: class org.apache.lucene.store.FSDirectory
>        Directory dir = new FSDirectory(new File(indexDir), null);
>                        ^
> 1 error
> ----------------------------------------------------------------------
>
> it means the following codesgement:
>
> public Indexer(String indexDir) throws IOException {
>    Directory dir = new FSDirectory(new File(indexDir));
>    writer = new IndexWriter(dir, new StandardAnalyzer(), true,
> IndexWriter.maxFieldLength.UNLIMITED);
>    }
>
>
> im using debian testing with..
> java -version
> java version "1.6.0_0"
> OpenJDK  Runtime Environment (build 1.6.0_0-b11)
> OpenJDK Server VM (build 1.6.0_0-b11, mixed mode)
>
> sourcecode+makefile are attached:
>
> thanks for your help,
> timon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic