Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 9792 invoked from network); 7 Jan 2004 07:14:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Jan 2004 07:14:43 -0000 Received: (qmail 81026 invoked by uid 500); 7 Jan 2004 07:14:19 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 81006 invoked by uid 500); 7 Jan 2004 07:14:18 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 80991 invoked from network); 7 Jan 2004 07:14:18 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 7 Jan 2004 07:14:18 -0000 Received: (qmail 12808 invoked by uid 50); 7 Jan 2004 07:14:22 -0000 Date: 7 Jan 2004 07:14:22 -0000 Message-ID: <20040107071422.12807.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: lucene-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 25945] New: - IndexWriter.optimize bug in version 1.3-final X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25945 IndexWriter.optimize bug in version 1.3-final Summary: IndexWriter.optimize bug in version 1.3-final Product: Lucene Version: unspecified Platform: Other OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Index AssignedTo: lucene-dev@jakarta.apache.org ReportedBy: stephen_a100@hotmail.com From: To: Cc: ; Subject: Re: IndexWriter.optimize bug in version 1.3-final? Date: Tuesday, January 06, 2004 12:25 PM The source code of the method. It fails at ( writer.optimize();// This is where it fails), which is not within a try/catch. It works great with the lucene-1.2 version but fails with the lucene-1.3-final.jar Any ideas would be appreciated. Apologies for posting this question to the dev list initially. ---- code ---- public synchronized void index() throws Exception { final ProductDocumentBuilder productDocument = ProductDocumentBuilder.getInstance(); productFactory = new ProductFactory(productHome, pgroupHome); registerDocumentBuilder("ml.product", productDocument); registerFactory("ml.product", productFactory); logger.info("index() starting."); logger.info(" loaded data, indexing"); // create the indexer IndexWriter writer = new IndexWriter(workDir, new StandardAnalyzer(), true); writer.mergeFactor = mergeFactor; long start = System.currentTimeMillis(); // pass in a dummy new Object Iterator allProducts = productFactory.contentIterate(new Object()); int i = 0; while (allProducts.hasNext()) { i++; SearchProduct product = (SearchProduct) allProducts.next(); try { writer.addDocument(productDocument.getDocument(product)); } catch (Exception e) { logger.warn("Failed to index Product: " + product.getPK(), e); } } writer.optimize();// This is where it fails writer.close(); logger.info(" indexer took " + (System.currentTimeMillis() - start) + " milliseconds. To index " + i + " products "); productFactory.flush(); } -- end code ------------------- - thank you, --a > This is a question for lucene-user list...redirecting. > > Looks okay, except it doesn't look like real code. Also, you are > catching Exception and only logging it. Maybe that exception hides the > source of the problem. > > Otis > > --- anand@sonic.net wrote: >> 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? >> >> >> 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.(RandomAccessFile.java:98) >> at java.io.RandomAccessFile.(RandomAccessFile.java:143) >> at >> > org.apache.lucene.store.FSInputStream$Descriptor.(FSDirectory.java:389) >> at org.apache.lucene.store.FSInputStream.(FSDirectory.java:418) >> at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:291) >> at org.apache.lucene.index.FieldInfos.(FieldInfos.java:80) at >> org.apache.lucene.index.SegmentReader.(SegmentReader.java:138) >> at >> > org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:423) >> at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:311) >> >> >> >> IndexWriter writer = new IndexWriter(, new >> StandardAnalyzer(), true); >> writer.mergeFactor = ; >> long start = System.currentTimeMillis(); >> // pass in a dummy new Object >> Iterator iter;// returns approriate iterator >> while (condition) { >> try { >> writer.addDocument(); >> } catch (Exception e) { >> logger.error("Failed to index doc " ); >> } >> } >> writer.optimize(); >> writer.close(); >> >> >> >> -- anand stephen >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org