Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 17943 invoked from network); 15 Feb 2006 18:24:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 18:24:05 -0000 Received: (qmail 55783 invoked by uid 500); 15 Feb 2006 18:23:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 55570 invoked by uid 500); 15 Feb 2006 18:23: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 55550 invoked by uid 500); 15 Feb 2006 18:23:52 -0000 Delivered-To: apmail-jakarta-lucene-user@jakarta.apache.org Received: (qmail 55531 invoked by uid 99); 15 Feb 2006 18:23:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2006 10:23:51 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of yseeley@gmail.com designates 64.233.182.207 as permitted sender) Received: from [64.233.182.207] (HELO nproxy.gmail.com) (64.233.182.207) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2006 10:23:51 -0800 Received: by nproxy.gmail.com with SMTP id n15so638492nfc for ; Wed, 15 Feb 2006 10:23:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=McMqlVTIKUzW/nvdfGCj27UVmaXyTdecB2wxRyewhBBbBpOla/HVd8b+jNh8HnZBUaAWEdp6SGcVsajBN5Jl+4avt6ZGgZN6ji+N1/8a4BC2kpm1Qqjk0I2wCEP/cDf6wptwl1mc9HMriJsYNMOfP/Lc+IDaG5gOWUaXK6Fh3ms= Received: by 10.48.49.13 with SMTP id w13mr105398nfw; Wed, 15 Feb 2006 10:23:29 -0800 (PST) Received: by 10.49.93.9 with HTTP; Wed, 15 Feb 2006 10:23:29 -0800 (PST) Message-ID: Date: Wed, 15 Feb 2006 13:23:29 -0500 From: Yonik Seeley To: java-user@lucene.apache.org Subject: Re: Iterating hits Cc: Lucene Users List In-Reply-To: <43F36BF5.60501@fib.upc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43F36BF5.60501@fib.upc.edu> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Try using a different reader to delete the documents. Hits can re-execute a query, and if the searcher you are using is sharing the reader you are deleting with, it's like changing a list you are iterating over (fewer hits will be found the next time the query is executed). -Yonik On 2/15/06, Daniel Cortes wrote: > Hi lucene users I have a strange error and I don't know to do? > My logs say this: > java.lang.ArrayIndexOutOfBoundsException: 100 >=3D 100 > at java.util.Vector.elementAt(Vector.java:431) > at org.apache.lucene.search.Hits.hitDoc(Hits.java:127) > at org.apache.lucene.search.Hits.doc(Hits.java:89) > > my code is this > PrefixQuery p =3D new PrefixQuery(new > Term("TOOL_REF_ID",getINITIAL(tool))); > Hits h =3D sr.search(p); > for (int i=3D0;i log.debug(h.doc(i).getField("TYPE") + " > "+h.doc(i).getField("TOOL_REF_ID")); > reader.delete(h.id(i)); > } > > Why? How can I do to delete all the documents that the tool_ref_if > begins with for example "AK"? > > > Searching about it I find this : > http://mail-archives.apache.org/mod_mbox/lucene-java-dev/200306.mbox/%3C2= 0030630124930.1324.qmail@nagoya.betaversion.org%3E > > thks for any reply. > > > > --------------------------------------------------------------------- > 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