On 12/4/06, Otis Gospodnetic <otis_gospodnetic@yahoo.com> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
|