Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 25235 invoked from network); 24 Nov 2004 07:30:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Nov 2004 07:30:03 -0000 Received: (qmail 71748 invoked by uid 500); 24 Nov 2004 07:29:59 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 71728 invoked by uid 500); 24 Nov 2004 07:29:59 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 71711 invoked by uid 99); 24 Nov 2004 07:29:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [203.200.217.40] (HELO sakthi.softprosys.com) (203.200.217.40) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 23 Nov 2004 23:29:57 -0800 Received: by sakthi.softprosys.com (Postfix, from userid 517) id 5E6746701A; Wed, 24 Nov 2004 12:58:20 +0530 (IST) Received: from santoshkumar (unknown [192.168.1.157])by sakthi.softprosys.com (Postfix) with SMTP id 1BACC66FE1for ; Wed, 24 Nov 2004 12:58:20 +0530 (IST) Message-ID: <002701c4d1f8$02faec30$9d01a8c0@sprosys.com> From: "Santosh" To: "Lucene Users List" References: <001801c4d196$e84f7ec0$9d01a8c0@sprosys.com> <1101239790.24366.40.camel@localhost> Subject: Re: modifying existing index Date: Wed, 24 Nov 2004 13:04:20 +0530 MIME-Version: 1.0 Content-Type: text/plain;charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I have gon through IndexReader , I got method : delete(int docNum) , but from where I will get document number? Is this predifined? or we have to give a number prior to indexing? ----- Original Message ----- From: "Luke Francl" To: "Lucene Users List" Sent: Wednesday, November 24, 2004 1:26 AM Subject: Re: modifying existing index > On Tue, 2004-11-23 at 13:59, Santosh wrote: > > I am using lucene for indexing, when I am creating Index the docuemnts are added. but when I want to modify the single existing document and reIndex again, it is taking as new document and adding one more time, so that I am getting same document twice in the results. > > To overcome this I am deleting existing Index and again recreating whole Index. but is it possibe to index the modified document again and overwrite existing document without deleting and recreation. can I do this? If so how? > > You do not need to recreate the whole index. Just mark the document as > deleted using the IndexReader and then add it again with the > IndexWriter. Remember to close your IndexReader and IndexWriter after > doing this. > > The deleted document will be removed the next time you optimize your > index. > > Luke Francl > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org