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 03BDC7486 for ; Fri, 11 Nov 2011 13:37:33 +0000 (UTC) Received: (qmail 3802 invoked by uid 500); 11 Nov 2011 13:37:30 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 3723 invoked by uid 500); 11 Nov 2011 13:37:30 -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 3715 invoked by uid 99); 11 Nov 2011 13:37:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2011 13:37:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.215.176 as permitted sender) Received: from [209.85.215.176] (HELO mail-ey0-f176.google.com) (209.85.215.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2011 13:37:23 +0000 Received: by eyh5 with SMTP id 5so5233118eyh.35 for ; Fri, 11 Nov 2011 05:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=8r5Ee2UprrbjB5wka7e0zf17YnNosB16w07dLi4kQWE=; b=jMUSEzMw3mIH75OLC39pTKk+EZWvqUKuwDAKFX4+ctDV9430Zwu4iVGt6udgQ2yxCV z8B1QduZqlv4t4H6x6MLI/ke6HnfyKyhnmdP9P6DvOaMyizIEo/+ODhtxfRq2voayJIx MsSDRhB0ZeR6xu48vAAPTOxMUU0grIZDld7Uk= MIME-Version: 1.0 Received: by 10.182.131.34 with SMTP id oj2mr2783903obb.71.1321018622413; Fri, 11 Nov 2011 05:37:02 -0800 (PST) Received: by 10.182.182.66 with HTTP; Fri, 11 Nov 2011 05:37:02 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Nov 2011 08:37:02 -0500 Message-ID: Subject: Re: Modify Field.Index.NO to Field.Index.NOT_ANALYZED From: Erick Erickson To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org In addition to Peter's comment, changing future documents to Field.index.NOT_ANALYZED won't affect your current documents. If (and only if) you stored all your data, you could conceivably read through your entire index and re-index into another location and have your PK available. *BUT* the only data you have available to put in your new documents is in fields for which Field.Store.YES was specified, fields that were indexed-only don't have any way to recover the original data that isn't lossy. Best Erick On Fri, Nov 11, 2011 at 12:38 AM, ppp c wrote: > terrible. > > you have made a big mistake, since you in fact made the primary key > unsearchable. > There is no any other method, since deleteDocument, updateDocument both > need Term to be searchable. > The only way is during the traversal of all the docs and finding the > matched field and delete it. > > On Fri, Nov 11, 2011 at 12:37 PM, Thanh Ha wrote: > >> I indexed my document using Field.Index.NO as the field index type, so >> now I cannot search it to make updates. >> Here's how the document was added: >> >> Document doc =3D new Document(); >> doc.add(new Field("content_id", "1234", Field.Store.YES, >> Field.Index.NO, =A0Field.TermVector.NO)); >> >> The content_id is the primary key for my documents. >> Using updateDocument(Term,doc) won't work because the field must be >> indexed in order to match (?). >> >> >> Since I did store the value, is it possible to update this field index >> type to Field.Index.NOT_ANALYZED ? >> >> >> It will be very difficult to reindex, so any feedback is appreciated. >> >> >> Thanks, >> Tommy >> >> --------------------------------------------------------------------- >> 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