lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timon Roth <timon.r...@digitalforce.ch>
Subject newbie question again
Date Mon, 30 Mar 2009 07:43:41 GMT
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

Mime
View raw message