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=0)
* 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? Or is
the comment wrong?
Karl
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of ext Yonik Seeley
Sent: Wednesday, August 18, 2010 10:55 AM
To: [email protected]
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, <[email protected]> wrote:
> Hi folks,
>
> What is the proper way to retrieve a string field from lucene in trunk? I'm
> specifically looking for the equivalent of:
>
> String[] fieldValues = FieldCache.DEFAULT.getStrings(reader,fieldName);
> String actualValue = fieldValues[luceneID-docBase];
>
> The getStrings() method seems to have gone away in FieldCache.java, and it's
> not clear how to work with ByteRefs to do the equivalent. Any hints?
>
> Karl
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]