Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 79827 invoked from network); 18 Aug 2010 15:19:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Aug 2010 15:19:38 -0000 Received: (qmail 6106 invoked by uid 500); 18 Aug 2010 15:19:37 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 5877 invoked by uid 500); 18 Aug 2010 15:19:36 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 5869 invoked by uid 99); 18 Aug 2010 15:19:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 15:19:36 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of karl.wright@nokia.com designates 192.100.122.233 as permitted sender) Received: from [192.100.122.233] (HELO mgw-mx06.nokia.com) (192.100.122.233) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 15:19:30 +0000 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o7IFJ6pV008278; Wed, 18 Aug 2010 18:19:06 +0300 Received: from vaebh102.NOE.Nokia.com ([10.160.244.23]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 18 Aug 2010 18:19:05 +0300 Received: from vaebh101.NOE.Nokia.com ([10.160.244.22]) by vaebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 18 Aug 2010 18:19:01 +0300 Received: from smtp.mgd.nokia.com ([65.54.30.8]) by vaebh101.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 18 Aug 2010 18:18:56 +0300 Received: from NOK-EUMSG-01.mgdnok.nokia.com ([65.54.30.86]) by nok-am1mhub-04.mgdnok.nokia.com ([65.54.30.8]) with mapi; Wed, 18 Aug 2010 17:18:55 +0200 From: To: , Date: Wed, 18 Aug 2010 17:18:53 +0200 Subject: RE: Question about string retrieval with FieldCache in trunk Thread-Topic: Question about string retrieval with FieldCache in trunk Thread-Index: Acs+5WxdIzySULhNRP+IZTtCNevg3AAAugQg Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 18 Aug 2010 15:18:56.0169 (UTC) FILETIME=[ACBE7990:01CB3EE8] X-Nokia-AV: Clean Exactly. getTerms() returns a DocTerms, which has this: /** The BytesRef argument must not be null; the method * returns the same BytesRef, or an empty (length=3D0) * BytesRef if the doc did not have this field or was * deleted. */ public abstract BytesRef getTerm(int docID, BytesRef ret); How in the blazes do you create the correct BytesRef in the first place? O= r is the comment wrong? Karl -----Original Message----- From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf Of ext Yonik S= eeley Sent: Wednesday, August 18, 2010 10:55 AM To: dev@lucene.apache.org Subject: Re: Question about string retrieval with FieldCache in trunk Check out getTerms and getTermsIndex -Yonik http://www.lucidimagination.com On Wed, Aug 18, 2010 at 10:49 AM, wrote: > Hi folks, > > What is the proper way to retrieve a string field from lucene in trunk?= =A0 I'm > specifically looking for the equivalent of: > > String[] fieldValues =3D FieldCache.DEFAULT.getStrings(reader,fieldName); > String actualValue =3D fieldValues[luceneID-docBase]; > > The getStrings() method seems to have gone away in FieldCache.java, and i= t's > not clear how to work with ByteRefs to do the equivalent.=A0 Any hints? > > Karl > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org