lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject Re: NO_NORMS and fakeNorms
Date Mon, 04 Dec 2006 22:36:30 GMT
Ah, yes, I forgot about that.  I see that byte[] ones now, which is lazily populated and reused.


----- Original Message ----
From: Yonik Seeley <>
Sent: Monday, December 4, 2006 4:20:29 PM
Subject: Re: NO_NORMS and fakeNorms

On 12/4/06, Otis Gospodnetic <> 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 ).  Why is that?  Why
are fake norms needed,

fakeNorms are needed for backward compatability when someone calls

> 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
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message