Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 8915 invoked from network); 16 Mar 2006 19:11:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Mar 2006 19:11:34 -0000 Received: (qmail 22706 invoked by uid 500); 16 Mar 2006 19:11:22 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 22671 invoked by uid 500); 16 Mar 2006 19:11:22 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 22660 invoked by uid 99); 16 Mar 2006 19:11:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 11:11:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 11:11:22 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 27334D49FE for ; Thu, 16 Mar 2006 19:11:01 +0000 (GMT) Message-ID: <1860355326.1142536261157.JavaMail.jira@ajax> Date: Thu, 16 Mar 2006 19:11:01 +0000 (GMT) From: "Keith Morgan (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-521) Documents do not get added from RAMDirectory to FSDirectory if documents is less than 10. In-Reply-To: <381613429.1142532908145.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-521?page=comments#action_12370738 ] Keith Morgan commented on LUCENE-521: ------------------------------------- Sorry, I did not include this, but I am optimzing and closing the IndexWriter. diskWriter.optimize(); diskWriter.close(); Why would this happen if the documents are less than 10???? > Documents do not get added from RAMDirectory to FSDirectory if documents is less than 10. > ----------------------------------------------------------------------------------------- > > Key: LUCENE-521 > URL: http://issues.apache.org/jira/browse/LUCENE-521 > Project: Lucene - Java > Type: Bug > Components: Index > Versions: 1.9 > Environment: Windows XP, J2EE 1.4 > Reporter: Keith Morgan > > Disk index does not get updated unless 10 or more documents exist in a RAM directory. > Below is the code used: > //Adding documents to RAMDirectory > RAMDirectory ramDirectory = new RAMDirectory(); > IndexWriter ramWriter = new IndexWriter(ramDirectory, new StandardAnalyzer(), true); > ......code looping and adding docs to IndexWriter > ramWriter.addDocument(doc); > WriteIndex.writeRAMDirectory(ramDirectory); > //Sending RAMDirectory to Disk > public static void writeRAMDirectory(RAMDirectory ramDirectory) { > boolean exists = IndexReader.indexExists(indexDir); > IndexWriter diskWriter = new IndexWriter(indexDir, new StandardAnalyzer(), !exists); > diskWriter.setMergeFactor(1000); > diskWriter.setMaxMergeDocs(10000); > diskWriter.addIndexes(new Directory[] { ramDirectory }); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org