Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 56898 invoked from network); 27 Apr 2009 11:08:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Apr 2009 11:08:27 -0000 Received: (qmail 75304 invoked by uid 500); 27 Apr 2009 11:08:25 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 75224 invoked by uid 500); 27 Apr 2009 11:08:25 -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 75214 invoked by uid 99); 27 Apr 2009 11:08:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2009 11:08:25 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.44.30] (HELO yx-out-2324.google.com) (74.125.44.30) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2009 11:08:17 +0000 Received: by yx-out-2324.google.com with SMTP id 8so1205927yxm.5 for ; Mon, 27 Apr 2009 04:07:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.134.8 with SMTP id l8mr8704841ybn.163.1240830475838; Mon, 27 Apr 2009 04:07:55 -0700 (PDT) In-Reply-To: <49F58284.3030606@fastmail.fm> References: <49F1E14C.7080308@fastmail.fm> <49F58284.3030606@fastmail.fm> Date: Mon, 27 Apr 2009 07:07:55 -0400 Message-ID: <9ac0c6aa0904270407j5f4850b3m303423995a8da58c@mail.gmail.com> Subject: Re: no segments* file found: files: Error on opening index From: Michael McCandless To: java-user@lucene.apache.org, paul_t100@fastmail.fm Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org It's fine if one thread is changing the index (w/ IndexWriter) while other threads are opening IndexReaders. Though, if you have IndexWriter opening with "create=3Dtrue" at the same time that an IndexReader is attempting to open the index, that would explain this. Is it possible that's happening? The fact that you see no files listed in the exception's message means the directory was empty at the time IndexReader was being openened. Mike On Mon, Apr 27, 2009 at 6:01 AM, Paul Taylor wrote: > Paul Taylor wrote: >> >> Hi I was using a RAMDirectory and this was working fine but have now mov= ed >> over to a =A0filesystem directory to preserve space, the directory is ju= st >> initialized once >> =A0 directory =3D new RAMDirectory(); >> =A0 directory =3D >> FSDirectory.getDirectory(Platform.getPlatformLicenseFolder()+ "/" + >> TAG_BROWSER_INDEX); >> >> but I create an IndexReader as required >> =A0 =A0IndexReader ir =3D IndexReader.open(directory); >> and then close it when Ive finished with it. >> >> but sometimes it is failing with >> =A0 no segments* file found: files: >> interestingly no file is specified in the error message whereas other >> reporters of this message show a reference to an actual file in the mess= age. >> >> My code is multithreaded so I'm wondering if the problem is that two >> thread have both opened an IndexReader, or one thread is using an >> IndexWriter to add a document, whilst another is trying to read. But I w= asnt >> aware either of these cases was not allowed, any ideas ? >> >> thanks Paul >> > Hi, anybody have an idea about this, Im sure Im not the only one to > encounter this. > > Paul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org