solr 模式中的 omitNorms 和 version 字段是什么? [英] What is omitNorms and version field in solr schema?

查看:28
本文介绍了solr 模式中的 omitNorms 和 version 字段是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白什么时候使用 omitNorms="true".我阅读了 2-3 个链接,但仍然不清楚其含义.设置为 true 以忽略与该字段关联的规范(这将禁用字段的长度规范化和索引时间提升,并节省一些内存)"是什么意思.只有全文字段或需要索引时间提升的字段需要规范."在 http://wiki.apache.org/solr/SchemaXml 页面

解决方案

规范作为单字节信息存储在每个文档每个字段的索引中.这将保存应用于字段的索引时间提升的信息或长度信息.
长度信息将允许您增加较短的字段而不是较长的字段.
此外,索引时间提升将允许一个字段比其他字段提升得更高.

因为它占用空间,如果不需要它应该关闭.
如果没有使用索引时间提升,或者字段是不需要任何长度规范化的短文本字段或非文本字段.

您可以在此处找到一些详细的说明.

<块引用>

当规范加载到 IndexReader 中时,它们会加载到每个字段的 byte[maxdoc] 数组 - 所以即使 400 个文档中的一个文档百万有一个字段,它仍然会为此加载 byte[maxdoc]字段,可能会使用大量 RAM.

<小时><块引用>

作为我们谈论的 RAM 大小的示例,10 中的一个字段百万文档索引将占用不到 10 MB 的 RAM.一百此类字段将占用近 1 GB 的 RAM.

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

解决方案

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.

这篇关于solr 模式中的 omitNorms 和 version 字段是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆