Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 16733 invoked from network); 28 Nov 2008 12:23:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2008 12:23:30 -0000 Received: (qmail 72255 invoked by uid 500); 28 Nov 2008 12:23:34 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 72217 invoked by uid 500); 28 Nov 2008 12:23:34 -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 72204 invoked by uid 99); 28 Nov 2008 12:23:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2008 04:23:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.221.20 as permitted sender) Received: from [209.85.221.20] (HELO mail-qy0-f20.google.com) (209.85.221.20) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2008 12:22:07 +0000 Received: by qyk13 with SMTP id 13so2164694qyk.5 for ; Fri, 28 Nov 2008 04:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=7FfD5dFic0xQ8LvxwrPDBXcnCILfSAPjdqP1uC/Hgnc=; b=myQzXvwVuVObqBziNpEbWEwexSU5OZ+U0x/WpivYSAQlHXq9XIDLYBdhNhf0wV5Lsy 2idRHE2/KmxD7pz1+ZsHYJFdDSR+mhC/rM2VZjbGXIrMneSTdRKonFYCQ9gX+TJGC77o dirAx+Vbf4ZiRhJ5agznWkiRrtFmyA/QqZtFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=sj5KJnLOpDqoImBnEuoF5ziGzZx2+iVQlMX+ki3yke2ZZGx/lQVo1nmZjG/oMH1UCR PrASHuVmwc2MBLrMeB9iDOgOPH5xTYjQx+JIbjIthavZ/IJVGJeR/eUCkWNit096SCqV S3uazEPDVkv9R+AIqwFRZkJAHh7yYaZIvD7+k= Received: by 10.214.79.7 with SMTP id c7mr7690573qab.357.1227874913562; Fri, 28 Nov 2008 04:21:53 -0800 (PST) Received: by 10.214.241.8 with HTTP; Fri, 28 Nov 2008 04:21:53 -0800 (PST) Message-ID: <8c4e68610811280421l58656d71n58a90b09456e47a7@mail.gmail.com> Date: Fri, 28 Nov 2008 12:21:53 +0000 From: "Ian Lea" To: java-user@lucene.apache.org Subject: Re: Maintain last indexed information in a file or DB In-Reply-To: <0dd401c95152$1fbdcb70$330bc30a@sv.us.sonicwall.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <0dd401c95152$1fbdcb70$330bc30a@sv.us.sonicwall.com> X-Virus-Checked: Checked by ClamAV on apache.org I'm a bit confused about what exactly is stored in folder and index and database, but how about you store the bookmark information in the same lucene index that you are using for the file data. One lucene document per folder, with fields something like folder: /some/dir/somewhere bookmark: some_bookmark_value That way the bookmark info should always be in line with the indexed data. Oh, and I'd also try and stop the application from crashing! -- Ian. On Fri, Nov 28, 2008 at 12:09 PM, Ganesh wrote: > I am using Lucene v2.4. I am indexing files from various folder and i have > to maintain a bookmark of what i have last indexed in each folder. > > Initially i thought to save the state in each respective folder. Index > Wrtier always has documents in memory and it commits in a intervals. In an > unexpected application crash, sometimes the last saved bookmark and the last > indexed document in the database is not matching. > > One another option is to keep the information in a same or different > database. > > I think many might have faced this situitation. > > Regards > Ganesh --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org