Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 68230 invoked from network); 25 Jul 2007 05:51:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2007 05:51:06 -0000 Received: (qmail 8426 invoked by uid 500); 25 Jul 2007 05:51:01 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 8380 invoked by uid 500); 25 Jul 2007 05:51:01 -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 8369 invoked by uid 99); 25 Jul 2007 05:51:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2007 22:51:01 -0700 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=FROM_HAS_ULINE_NUMS,MAILTO_TO_SPAM_ADDR,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [128.222.32.20] (HELO mexforward.lss.emc.com) (128.222.32.20) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2007 22:50:59 -0700 Received: from mailhub.lss.emc.com (nagas.lss.emc.com [10.254.144.11]) by mexforward.lss.emc.com (Switch-3.2.5/Switch-3.1.7) with ESMTP id l6P5oask028589 for ; Wed, 25 Jul 2007 01:50:36 -0400 (EDT) Received: from corpussmtp3.corp.emc.com (corpussmtp3.corp.emc.com [10.254.64.53]) by mailhub.lss.emc.com (Switch-3.2.5/Switch-3.1.7) with ESMTP id l6P5o7Y3020349 for ; Wed, 25 Jul 2007 01:50:35 -0400 (EDT) From: Liu_Andy2@emc.com Received: from CORPUSMX10B.corp.emc.com ([128.221.14.93]) by corpussmtp3.corp.emc.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 25 Jul 2007 01:50:34 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: What replaced org.apache.lucene.document.Field.Text? Date: Wed, 25 Jul 2007 01:49:06 -0400 Message-ID: In-Reply-To: <20070725043030.1920.qmail@web36206.mail.mud.yahoo.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: What replaced org.apache.lucene.document.Field.Text? Thread-Index: AcfOdKB1hvZnu5AwTwaOBkOoeyIv+AACsbfw To: X-OriginalArrivalTime: 25 Jul 2007 05:50:34.0918 (UTC) FILETIME=[B8288460:01C7CE7F] X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.6.21134 X-PerlMx-Spam: Gauge=, SPAM=1%, Reason='EMC_FROM_0+ -3, NO_REAL_NAME 0, __C230066_P5 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __IMS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' X-Virus-Checked: Checked by ClamAV on apache.org Please reference How do I get code written for Lucene 1.4.x to work with Lucene 2.x? http://wiki.apache.org/lucene-java/LuceneFAQ#head-86d479476c63a2579e867b 75d4faa9664ef6cf4d Andy -----Original Message----- From: Lindsey Hess [mailto:lindseyhess83@yahoo.com]=20 Sent: Wednesday, July 25, 2007 12:31 PM To: Lucene Subject: What replaced org.apache.lucene.document.Field.Text? I'm trying to get some relatively old Lucene code to compile (please see below), and it appears that Field.Text has been deprecated. Can someone please suggest what I should use in its place? =20 Thank you. =20 Lindsey =20 =20 =20 public static void main(String args[]) throws Exception { String indexDir =3D System.getProperty("java.io.tmpdir", "tmp") + System.getProperty("file.separator") + "address-book"; Analyzer analyzer =3D new WhitespaceAnalyzer(); boolean createFlag =3D true; =20 IndexWriter writer =3D new IndexWriter(indexDir, analyzer, = createFlag); Document contactDocument =3D new Document(); contactDocument.add(Field.Text("type", "individual")); =20 contactDocument.add(Field.Text("name", "Zane Pasolini")); contactDocument.add(Field.Text("address", "999 W. Prince St.")); contactDocument.add(Field.Text("city", "New York")); contactDocument.add(Field.Text("province", "NY")); contactDocument.add(Field.Text("postalcode", "10013")); contactDocument.add(Field.Text("country", "USA")); contactDocument.add(Field.Text("telephone", "1-212-345-6789")); writer.addDocument(contactDocument); writer.close(); } =20 --------------------------------- Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org