Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 9974 invoked from network); 22 Aug 2010 22:14:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Aug 2010 22:14:46 -0000 Received: (qmail 51141 invoked by uid 500); 22 Aug 2010 22:14:44 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 51013 invoked by uid 500); 22 Aug 2010 22:14:44 -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 51005 invoked by uid 99); 22 Aug 2010 22:14:44 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Aug 2010 22:14:44 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Aug 2010 22:14:22 +0000 Received: by qwk3 with SMTP id 3so5772283qwk.35 for ; Sun, 22 Aug 2010 15:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=QuYWxhT4x495stwYd6eX3dRmm+rYCNudHMLea42zEhA=; b=vc4o4Mpi+ba4ZhjZ1q5XwHutLA1dGQgEto5n5PeHGlG9vwyYHcjGyIxf+oaHcdPzJB IbaYTxo6h2SC4tvO5sDU5l3shqocqTgRkOrZRcBJ0wLVqGe6EZEMNYg10fApwoyPajK/ mVXON8oj0NmZ3biot5ru2rQqALwxlyJg8xRpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=WZ98awJUz/PDLeELYx0clxkG2w19rQ/YuEwn+gzDYgH0CpDqtN4ZhhXpHJi1Vu58VF HDuneBmKj7dUgDeKBuGaWhHC6cUEQMhVEDjrU46pkpvQsHkbHxbaw+6yHUjL9scuaHXc W7MfL5Heep+66eBinwlZ8N5ke+IHQLmfAGDMs= MIME-Version: 1.0 Received: by 10.224.121.65 with SMTP id g1mr2708850qar.370.1282515241432; Sun, 22 Aug 2010 15:14:01 -0700 (PDT) Received: by 10.229.186.83 with HTTP; Sun, 22 Aug 2010 15:14:01 -0700 (PDT) In-Reply-To: <69DF7A51-3064-4187-9265-1070BDADF168@lucasmail.org> References: <4370895A-AA21-439F-9601-5B3E1DCB7845@lucasmail.org> <69DF7A51-3064-4187-9265-1070BDADF168@lucasmail.org> Date: Sun, 22 Aug 2010 15:14:01 -0700 Message-ID: Subject: Re: IndexWriter.deleteDocuments(Query[]) not deleting From: Erick Erickson To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=00c09f88d3d46278c2048e70d9f0 X-Virus-Checked: Checked by ClamAV on apache.org --00c09f88d3d46278c2048e70d9f0 Content-Type: text/plain; charset=ISO-8859-1 Yep, sure hate it when that happens, which doesn't prevent it happening to me more often than I'd like :). Glad you figured it out. Erick On Sun, Aug 22, 2010 at 3:04 PM, Paul J. Lucas wrote: > On Aug 22, 2010, at 1:47 PM, Erick Erickson wrote: > > > Did you issue a commit (or close) the IndexWriter after you deleted the > > documents? > > I originally wrote: > > > I create/close a new IndexWriter for the delete. > > So the answer is "yes." > > > ... are you sure your cases match when you submit your term queries? > > Yes. > > > An interesting test would be to write out the file names you create your > > terms from, and see what happens if you search on those fields etc.... > > Never mind. I figured it out. (Don't you hate it when you can't figure > something out, you write-up a detailed question, post it, then go off an > figure it out afterwards?) > > The problem was the directory was being stored in the index like: > > /path/to/file/ > > (with the trailing slash). The delete query, however, didn't have the > trailing slash since File.getAbsolutePath() doesn't return trailing file > separator characters. D'oh! > > - Paul > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --00c09f88d3d46278c2048e70d9f0--