Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 78680 invoked from network); 13 Dec 2009 03:24:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Dec 2009 03:24:57 -0000 Received: (qmail 80850 invoked by uid 500); 13 Dec 2009 03:24:55 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 80734 invoked by uid 500); 13 Dec 2009 03:24:52 -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 80724 invoked by uid 99); 13 Dec 2009 03:24:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2009 03:24:51 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ww.wang.cs@gmail.com designates 209.85.210.192 as permitted sender) Received: from [209.85.210.192] (HELO mail-yx0-f192.google.com) (209.85.210.192) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2009 03:24:47 +0000 Received: by yxe30 with SMTP id 30so2253555yxe.29 for ; Sat, 12 Dec 2009 19:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=eDwdVWWWDdtWU7zoQq6OKfRP7086Ek0oyPNtPp6gJsk=; b=mAw9HVGB4Eg+MrPdr4YHWnq6eLbsnjZghyV3vq1OUCP6lViHli4fUkGeqRlR3uqOBe 6VaNgqObP9zj2MFljHNmrKrmvoZx2pyenLFLAOeBwzWRqWVizW4sX9W3paDb/ejv+k9X hFm+7AwZQNry/vdVj0tk1g/wcIlkbXoy4ufRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pApzb76ParUeUuWigUd0g2hcrACp3ZwS5H+82l3HNUC4K2exhrVlzwE3bEMY5YUj3I 8hKoBJ+QXlcK6On06Vuix7UaQ6TNWDEmG/l9sEOtq5KTvc9cCs1uEMdJpSc017cSx7I3 rebkLn9sNeRIvcYBds5UQai1BkYk9wWaOVmUw= MIME-Version: 1.0 Received: by 10.91.161.26 with SMTP id n26mr529975ago.88.1260674664287; Sat, 12 Dec 2009 19:24:24 -0800 (PST) In-Reply-To: <359a92830912121918j5e7c4a9cs87be4f60465dbb33@mail.gmail.com> References: <7d94dcde0912120425ue632fc7s3d244765c57d2624@mail.gmail.com> <88FB1CAEBD7D49CE9B40D323CC816311@VEGA> <7d94dcde0912120608x7bde51f3l97d0b9fafa6a5245@mail.gmail.com> <359a92830912121918j5e7c4a9cs87be4f60465dbb33@mail.gmail.com> Date: Sun, 13 Dec 2009 11:24:24 +0800 Message-ID: <7d94dcde0912121924m4653c03bwe5222f0c7b36f49d@mail.gmail.com> Subject: Re: Index Update From: Weiwei Wang To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001485f9a8108ad08a047a93b13b --001485f9a8108ad08a047a93b13b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable What I'm doing now is to indexing all file paths in a bunch of ftp servers. For ftp server administrator, he can add, delete or rename the files. So as to keep pace with times, i need to do updating very often. the process should be: 1. delete the old documents 2. add the new crawled ones 3. if error happend in process 2, rollback is performed 4. finish I used two indexed mainly to do rollback, otherwise the logic may be confused and not very clear. Currently, i'm thinking how to do this job with only one copy of index. On Sun, Dec 13, 2009 at 11:18 AM, Erick Erickson w= rote: > Quick addition. Even if you commit/close your indexwriter, you > *still* won't see the changes in your search unless you repoen the > indexreader. But you have to do both (in the order above) to > see all the changes you've added via your indexwriter..... > > but there's no reason to hold off on committing changes in > your indexwriter for a long time and risk losing the changes > should your program abort..... > > HTH > Erick > > On Sat, Dec 12, 2009 at 9:08 AM, Weiwei Wang wrote= : > > > Gotcha, tThanks, Uwe > > > > 2009/12/12 Uwe Schindler > > > > > No. As long as you not commit or close the IndexWriter and reopen the > > > IndexReader on the search side, nothing happens on the search side. > > > > > > Copying like you do is absolutely not needed. > > > > > > ----- > > > Uwe Schindler > > > H.-H.-Meier-Allee 63, D-28213 Bremen > > > http://www.thetaphi.de > > > eMail: uwe@thetaphi.de > > > > > > > -----Original Message----- > > > > From: Weiwei Wang [mailto:ww.wang.cs@gmail.com] > > > > Sent: Saturday, December 12, 2009 1:25 PM > > > > To: java-user@lucene.apache.org > > > > Subject: Index Update > > > > > > > > Hi, all, > > > > I need to update my index everyday so as to keep pace with > times. > > > > Current I have two copy of indexes, one is used to provide search > > > service, > > > > the other is used to do updating. Once the updating process is done= , > I > > > > write > > > > all the updated documents to the index which provide search service= . > > > > > > > > I want to use only one copy of index, and do updating searching on > the > > > > same > > > > index? Does the updating process will effect the search result when > the > > > > updating process is running? > > > > > > > > -- > > > > Weiwei Wang > > > > Alex Wang > > > > =E7=8E=8B=E5=B7=8D=E5=B7=8D > > > > Room 403, Mengmin Wei Building > > > > Computer Science Department > > > > Gulou Campus of Nanjing University > > > > Nanjing, P.R.China, 210093 > > > > > > > > Homepage: http://cs.nju.edu.cn/rl/weiweiwang > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > > > > > > -- > > Weiwei Wang > > Alex Wang > > =E7=8E=8B=E5=B7=8D=E5=B7=8D > > Room 403, Mengmin Wei Building > > Computer Science Department > > Gulou Campus of Nanjing University > > Nanjing, P.R.China, 210093 > > > > Homepage: http://cs.nju.edu.cn/rl/weiweiwang > > > --=20 Weiwei Wang Alex Wang =E7=8E=8B=E5=B7=8D=E5=B7=8D Room 403, Mengmin Wei Building Computer Science Department Gulou Campus of Nanjing University Nanjing, P.R.China, 210093 Homepage: http://cs.nju.edu.cn/rl/weiweiwang --001485f9a8108ad08a047a93b13b--