Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 72312 invoked from network); 5 May 2003 19:08:59 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 5 May 2003 19:08:59 -0000 Received: (qmail 10959 invoked by uid 97); 5 May 2003 19:11:03 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 10947 invoked from network); 5 May 2003 19:11:03 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 5 May 2003 19:11:03 -0000 Received: (qmail 71925 invoked by uid 500); 5 May 2003 19:08:55 -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 71914 invoked from network); 5 May 2003 19:08:54 -0000 Received: from mail.ideorlando.org (208.63.70.76) by daedalus.apache.org with SMTP; 5 May 2003 19:08:54 -0000 Received: by mail.ideorlando.org (Postfix, from userid 8) id E57DD367DD; Mon, 5 May 2003 19:06:06 +0000 (UTC) X-Scanned-By: AMaViS Received: from ROUTARDBW (unknown [208.62.52.106]) by mail.ideorlando.org (Postfix) with SMTP id CC7A9367D2 for ; Mon, 5 May 2003 19:06:05 +0000 (UTC) From: "Rob Outar" To: "Lucene Users List" Subject: RE: IndexReader.lastModified(); Date: Mon, 5 May 2003 15:08:58 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N My Linux admin told me that if a change to a file occurs in less than one second Linux does not update the last mod date. Has anyone else experienced this? or is this even possible? I have spent hours and hours debugging my code and the date thing is the only thing I can see as causing my queries to fail. Thanks, Rob -----Original Message----- From: Rob Outar [mailto:routar@ideorlando.org] Sent: Monday, May 05, 2003 2:42 PM To: Lucene Users List Subject: RE: IndexReader.lastModified(); /** Returns the time the index in the named directory was last modified. */ public static long lastModified(File directory) throws IOException { return FSDirectory.fileModified(directory, "segments"); } /** Returns the time the named file was last modified. */ public final long fileModified(String name) throws IOException { File file = new File(directory, name); return file.lastModified(); } /** Returns the time the named file was last modified. */ public static final long fileModified(File directory, String name) throws IOException { File file = new File(directory, name); return file.lastModified(); } Could this be a problem in Linux where the files last mod date are not being updated fast enough? Thanks, Rob Outar OneSAF A&I -- SAIC Software\Data Engineer 321-235-7660 outarr@saic.com -----Original Message----- From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com] Sent: Monday, May 05, 2003 2:37 PM To: Lucene Users List Subject: Re: IndexReader.lastModified(); I don't remember any more, but maybe lastModified() returns a new value only after the IndexWriter is close()d. You may be able to tell from looking at the source.... or you should just try that and see. Otis --- Rob Outar wrote: > Hi all, > > I am experiencing a weird problem in Linux. When I initially create > the > index I store the date with the IndexReader.lastModified() call. I > then > have a Junit test that adds a document to the index, I then have a > method > that checks if the index has changed and if it has I create a new > IndexSearcher. The problem is the date the index was created and the > most > recent call to IndexReader.lastModified()(after adding a document) > are > returning the same value so when I query on the new document I just > added it > is failing because according to the dates, the index has not changed > so I > did not create a new IndexSearcher!!! > > Has anyone experience this before? If so, is there a known fix? > > Thanks, > > Rob > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com --------------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org