I'm sorry, there is FsDirectory in my method, not DCFsDirectory.
-----Original Message-----
From: Ilya Vishnevsky [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 22, 2007 4:42 PM
To: [email protected]
Subject: Lucene IndexWriter and Nutch index
Hello! I'm trying to write a document to an existing index. I've created
the following method:
public void testIndexWriter () {
Analyzer analyzer = new StandardAnalyzer();
Document testDoc = new Document ();
testDoc.add(new Field("apple", "apple", Field.Store.YES,
Field.Index.NO));
try {
Directory fsd = new DCFsDirectory(fs, new Path
("C:/webdb/aay/indexes/part-00000"), false, conf);
IndexWriter writer = new IndexWriter(fsd, analyzer, false);
writer.addDocument(testDoc);
writer.close ();
} catch (IOException e) {
e.printStackTrace();
}
}
Here's it's output:
java.lang.UnsupportedOperationException
at
org.apache.nutch.indexer.FsDirectory$DfsIndexOutput.seek(FsDirectory.jav
a:232)
...
Is it possible to solve this problem?