Ah, yes, I forgot about that. I see that byte[] ones now, which is lazily populated and reused. Thanks!
Otis ----- Original Message ---- From: Yonik Seeley <[EMAIL PROTECTED]> To: java-dev@lucene.apache.org Sent: Monday, December 4, 2006 4:20:29 PM Subject: Re: NO_NORMS and fakeNorms On 12/4/06, Otis Gospodnetic <[EMAIL PROTECTED]> wrote: > I was looking at NO_NORMS, but then spotted fakeNorms in SegmentReader. From > a quick look it seems that even if NO_NORMS is used on a field, these > fakeNorms get generated. > (see the patch in http://issues.apache.org/jira/browse/LUCENE-448 ). Why is > that? Why are fake norms needed, fakeNorms are needed for backward compatability when someone calls IndexReader.norms() > aren't we actually not saving the memory that NO_NORMS should save? 1) fakeNorms is per-reader and shared between all fields that have omitNorms=true 2) fakeNorms is allocated on-demand... so if no one calls norms() on a field that has no norms, then it will never be allocated. -Yonik --------------------------------------------------------------------- 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]