From java-user-return-16782-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Fri Oct 07 00:18:44 2005 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 12921 invoked from network); 7 Oct 2005 00:18:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Oct 2005 00:18:44 -0000 Received: (qmail 62764 invoked by uid 500); 7 Oct 2005 00:18:40 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 62733 invoked by uid 500); 7 Oct 2005 00:18:39 -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 62722 invoked by uid 99); 7 Oct 2005 00:18:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 17:18:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [65.209.1.80] (HELO webmail.cymfony.com) (65.209.1.80) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 17:18:42 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: IllegalArgumentException: attempt to access a deleted document Date: Thu, 6 Oct 2005 20:16:01 -0400 Message-ID: <13F36D2926AD444697093282F20041B7037AFFD4@buf-ex01.cymfony.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: IllegalArgumentException: attempt to access a deleted document Thread-Index: AcXKytDUEJzjWVc5QFW+bhoiu84++AACTn/w From: "Peter Kim" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I think my best option will just be to optimize the index after each deletion. I guess this will be good for me anyways... For the cases where optimizing is not a luxury one can afford, it would be nice if there was another way around this. Peter=20 > -----Original Message----- > From: Peter Kim [mailto:pkim@cymfony.com]=20 > Sent: Thursday, October 06, 2005 7:08 PM > To: java-user@lucene.apache.org > Subject: IllegalArgumentException: attempt to access a=20 > deleted document >=20 > Hi, >=20 > I'm getting this error from trying to access a document in my=20 > custom hit > collector: >=20 > java.lang.IllegalArgumentException: attempt to access a=20 > deleted document > at > org.apache.lucene.index.SegmentReader.document(SegmentReader.java:235 > ) > at > org.apache.lucene.index.MultiReader.document(MultiReader.java:108) > at > org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:74) > at > org.apache.lucene.search.MultiSearcher.doc(MultiSearcher.java:66) >=20 >=20 > Does anyone know why I'm getting this error? Shouldn't the=20 > ids passed to >=20 > HitCollector.collect(int id, float score) all be valid? Or=20 > are deleted ids not ignored? >=20 > I noticed one way to get around this is to use=20 > IndexReader.isDeleted() to check if it's deleted or not. The=20 > problem with that is I only have access to a MultiSearcher in=20 > my HitCollector which doesn't give me access to the=20 > underlying IndexReader. I don't want to have to open an=20 > IndexReader in my custom hit collector to use its isDeleted() method. >=20 > Anyone know any workarounds? >=20 > Thanks! > peter >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org