Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 28065 invoked from network); 27 Jul 2007 08:51:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jul 2007 08:51:01 -0000 Received: (qmail 51764 invoked by uid 500); 27 Jul 2007 08:50:55 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 51727 invoked by uid 500); 27 Jul 2007 08:50:55 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 51716 invoked by uid 99); 27 Jul 2007 08:50:55 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 01:50:55 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 08:50:48 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IELWm-0007Jy-A9 for java-user@lucene.apache.org; Fri, 27 Jul 2007 01:50:28 -0700 Message-ID: <11823559.post@talk.nabble.com> Date: Fri, 27 Jul 2007 01:50:28 -0700 (PDT) From: miztaken To: java-user@lucene.apache.org Subject: Re: Strange Error while deleting Documents from index while indexing. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: manish@ccnep.com.np References: <11804824.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Where shall i post this issue. I am naive to Lucene. Now i have switched to lucene 1.9.1.4 And about IndexWriter Closing. Now i am trying like this: 1. Open New IndexReader. 2. Delete Documents. 3. Close IndexReader. 4. Open New IndexWriter. 5. Write Documents. 6. Close IndexWriter. 7. Repeat the process for n times the in nth time optimize the index before closing indexwriter. By doing this i am not getting any of my previous problems but i got the new problem. When i close my application then i call indexwriter.optimize() and then indexwriter.close() eventually. For small amount of indexing, things are working fine but for larger indexing indexwriter.optimze() terminated unexpectedly and it also didnt threw any exception. My application simply shut downs. After that when i try to open the same index using IndexReader and fetch the document then it says "trying to access deleted document". After getting such error, i opened the indexWriter, optimized and then closed it. Then again i tried to get the documents using indexreader and its working all fine. What can be the problem. Well the pseudo code will be like: Not Working pseudo-code 1. Open Application (declare int countWriting=0;) 2. Open IndexReader 3. Delete Document 4. Close IndexReader. 5. Open IndexWriter 6. Add Documents 7. countWriting++; 8. Close IndexWriter. 9. If countWriting==10 then optimize(); 10. if user donot cacel, repeat the whole process. 11. else try optimize The program terminates abnormally in step 11. But afterwards in the same index, when i try to open indexReader to fetch documents then it says "trying to access deleted documents" but when i open indexwriter optimize the index and then close it and open indexreader then everything works fine. -- View this message in context: http://www.nabble.com/Strange-Error-while-deleting-Documents-from-index-while-indexing.-tf4149570.html#a11823559 Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org