Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 77659 invoked from network); 5 Mar 2003 18:18:56 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 5 Mar 2003 18:18:56 -0000 Received: (qmail 25744 invoked by uid 97); 5 Mar 2003 18:20:37 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 25737 invoked from network); 5 Mar 2003 18:20:37 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 5 Mar 2003 18:20:37 -0000 Received: (qmail 74819 invoked by uid 500); 5 Mar 2003 18:18:22 -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 74794 invoked from network); 5 Mar 2003 18:18:21 -0000 Received: from zzz-209254108074.splitrock.net (HELO enigmastation.com) (209.254.108.74) by daedalus.apache.org with SMTP; 5 Mar 2003 18:18:21 -0000 Received: from localhost (joeo@localhost) by enigmastation.com (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h25IBFB27558 for ; Wed, 5 Mar 2003 13:11:15 -0500 Date: Wed, 5 Mar 2003 13:11:15 -0500 (EST) From: Joseph Ottinger To: Lucene Users List Subject: Re: IndexReader.delete(int) not working for me In-Reply-To: <3E663C49.9090300@lucene.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Okay, I found the problem: it was a stupid coder. To wit, here's the salient code: Document d=indexReader.document(i); if(d.getField("key").equals(node.getKey()) { ... } The error, of course, is that getField.equals() is comparing FIELDS and not string values. When I changed this to pull the stringValue() out of getField(), everything worked as expected. Turns out my logging actually was spitting out the *wrong* message somewhere else, which deceived me^Wthe stupid coder into thinking the removal was occurring when it was not. Now everything's working fine. Thank you for your time. On Wed, 5 Mar 2003, Doug Cutting wrote: > Joseph Ottinger wrote: > > Then this means that my IndexReader.delete(i) isn't working properly. What > > would be the common causes for this? My log shows the documents being > > deleted, so something's going wrong at that point. > > Are you closing the IndexReader after doing the deletes? This is > required for the deletions to be saved. > > What makes you think that that delete is not working properly? > > Doug > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > --------------------------------------------------------- Joseph B. Ottinger joeo@enigmastation.com http://enigmastation.com IT Consultant --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org