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?

Reply via email to