Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09E52118D6 for ; Wed, 14 May 2014 11:18:04 +0000 (UTC) Received: (qmail 31204 invoked by uid 500); 13 May 2014 13:31:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 31143 invoked by uid 500); 13 May 2014 13:31:23 -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 31135 invoked by uid 99); 13 May 2014 13:31:23 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 13:31:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.179] (HELO mail-vc0-f179.google.com) (209.85.220.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 13:31:19 +0000 Received: by mail-vc0-f179.google.com with SMTP id im17so423900vcb.24 for ; Tue, 13 May 2014 06:30:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=C9gf5ZMPXjSku3tWhM1UuFP5lZgOiL8MUk9lJktPL0g=; b=mZRDV/44w1s1RqEiVD64SlsSJWNRbJJxbsxbwHhWql0KQ/B5yPC8zdSlCALHAnufwW wl1PIQ37ilies6Q+3YzurdvQVmmmHoLcg/N+nePdZ3wn2UKIj6WwFkNvMp1S8CdmZmKS NRZJoWs3nuXRNIBDQ57Ab/pl0aV3daEqXiAC4IhflXUUUye4sR8Fl4k8zNFD2T0zi72l 268BO5GGpG4PfLF0ddjjNM0RpNGC+0ZU33FywswjfKDDjEkTyEKgcY2F/V4E7aNdlzeV InqnHb/DpeQw1YhN4J8U1lBlLFPwxYKl8oyc5Zx83u51gIBhhYMYXmQ/qX0CVVDfAFHl 17fQ== X-Gm-Message-State: ALoCoQl15Np6iFjB5prnbHGq/lZoHaTfWX1iIsX8wQ4udYZGUXXNeciaXmhs09KGW6/PSQvgNeHo X-Received: by 10.58.161.101 with SMTP id xr5mr1290719veb.36.1399987858553; Tue, 13 May 2014 06:30:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.221.5.3 with HTTP; Tue, 13 May 2014 06:30:37 -0700 (PDT) In-Reply-To: <53721CFC.8070009@mailarchiva.com> References: <53721CFC.8070009@mailarchiva.com> From: Michael McCandless Date: Tue, 13 May 2014 09:30:37 -0400 Message-ID: Subject: Re: writer.updateDocument() not working (possible bug?) To: Lucene Users Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org How did you produce the document that you are sending to updateDocument? Are you loading it from IndexReader.document() or IndexSearcher.doc(), changing it, then passing that to IW.updateDocument? If so, that's probably your bug: a loaded document is not identical to the original Document you indexed. In 5.0 we've fixed this to be strongly typed ... Mike McCandless http://blog.mikemccandless.com On Tue, May 13, 2014 at 9:24 AM, Jamie wrote: > Greetings > > I am using Lucene NRT search. After calling writer.updateDocument(term, doc) > and then search(), the document is no longer visible in the search results. > The program must be restarted to see it again. In addition, the update is > not being applied. The original document (before the update) is visible in > the search results. If updateDocument(term,doc) is called, passing the > original doc (without any changes), the doc is still removed from the index > (i.e. the change is not the cause). On each search I am calling indexReader > = DirectoryReader.open(writer, true); We have tried to call commit() and/or > close() immediately after the update, but it makes no difference. > > This occurs both in Lucene 4.7.2 and 4.8. As far as we know, our code used > to work with prior versions of Lucene. Has anyone encountered this? > > Regards > > Jamie > > > > > > --------------------------------------------------------------------- > 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