Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 45596 invoked from network); 4 Dec 2001 16:18:12 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Dec 2001 16:18:12 -0000 Received: (qmail 11757 invoked by uid 97); 4 Dec 2001 16:18:13 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 11717 invoked by uid 97); 4 Dec 2001 16:18:12 -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 11706 invoked from network); 4 Dec 2001 16:18:11 -0000 From: jean-christian.gagne@prasahewitt.ch X-Authentication-Warning: l98upfw32.hewitt.com: noaccess set sender to using -f X-Lotus-FromDomain: HEWITT ASSOCIATES NA To: "Lucene Users List" Message-ID: <86256B18.005920B4.00@lintng1.hewitt.com> Date: Tue, 4 Dec 2001 17:01:10 +0100 Subject: Re: existing or not existing Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thank you for your quick answer. I agree that create=true indicates that it's ok to overwrite. But when create=false and the index does not exists, I get a FileNotFoundException. I expected something like java.io.FileOutputStream 'append' flag : false = overwrite true = If the file exists, use it. If not, create an empty one The choice of the constructor does not depend on "Does that file exist ?" but rather on "Do I overwrite a possibly existing file ?". JCG |--------+-------------------------------> | | David Spencer | | | | | | | | | 04.12.2001 16:19 | | | Please respond to | | | "Lucene Users List" | | | | |--------+-------------------------------> >-------------------------------------------------------------------------| | | | To: Lucene Users List | | cc: | | Subject: Re: existing or not existing | >-------------------------------------------------------------------------| I think the 'create' flag really indicates whether it's ok to *overwrite* the *possibly*existing* index. Despite the tricky nuance it works great. -- To unsubscribe, e-mail: For additional commands, e-mail: