lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anand Stephen" <an...@sonic.net>
Subject IndexWriter.optimize bug in version 1.3-final?
Date Tue, 06 Jan 2004 17:10:42 GMT
Greetings,
I upgraded from  lucene-1.2.jar to lucene-1.3-final.jar (29-Dec-2003).
I get the following error with the new version any ideas?

<error>
java.io.FileNotFoundException:
C:\resin-2.1.4\ML4.1Admin_index.temp\_88.fnm (The system cannot find the
file specified)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:143)
at
org.apache.lucene.store.FSInputStream$Descriptor.<init>(FSDirectory.java:389)
at org.apache.lucene.store.FSInputStream.<init>(FSDirectory.java:418)
at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:291)
at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:80)
at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:138)
at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:423)
at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:311)
</error>

<code>
       IndexWriter writer = new IndexWriter(<workDir>, new
StandardAnalyzer(), true);
        writer.mergeFactor = <mergeFactor>;
       long start = System.currentTimeMillis();
        // pass in a dummy new Object
        Iterator iter;// returns approriate iterator
        while (condition) {
            try {
   writer.addDocument(<doc>);
            } catch (Exception e) {
                logger.error("Failed to index doc " );
           }
        }
       writer.optimize();
          writer.close();

</code>

-- anand stephen





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/2004
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message