What is omitNorms and version field in solr schema?

坚强是说给别人听的谎言 提交于 2020-01-01 07:33:48

问题


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.



来源:https://stackoverflow.com/questions/18694242/what-is-omitnorms-and-version-field-in-solr-schema

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!