I am not understanding when to use omitNorms="true". I read 2-3 links but still I am not clear with its meaning. what does it mean "Set to true to omit the norms associated with this field (this disables length normalization and index-time boosting for the field, and saves some memory). Only full-text fields or fields that need an index-time boost need norms." at http://wiki.apache.org/solr/SchemaXml page
问题:
回答1:
Norms are stored as a Single byte information in the index per document per field. This will hold information for the index time boost applied to the field or Length information.
Length information would allow you to boost shorter fields more that longer fields.
Also, Index time boost will allow one field to be boosted higher then other.
As it takes up space, it should be turned off if not needed.
If no index time boost is used OR if the fields are short text fields or non-text fields which do not need any length normalization.
You can find a little detailed explanation here.
When norms are loaded up into an IndexReader, they are loaded into a byte[maxdoc] array for each field – so even if one document out of 400 million has a field, it is still going to load byte[maxdoc] for that field, potentially using a lot of RAM.
As an example of how much RAM we are talking about, one field in a 10 million doc index will take up just under 10 MB of RAM. One hundred such fields will take nearly a gigabyte of RAM.