omitNorms for field in solr schema


首先看一下官方的介绍:http://wiki.apache.org/solr/SchemaXml

omitNorms=true|false
1. This is arguably an advanced option.
2. 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.



设置 omitNorms=false 意味着忽略掉 field 的 norms,相当于禁用掉了 length normalization 和 索引时 boosting;

1. length normalization:越短的文档,得分越高;
2. boost:boost 越大,得分越高;
3. 计算方法如下:

norm(t,d)   =   lengthNorm  ·  f.boost()
 field f in d named as t



omitNorms="true" on a field will have following effect: 

1. length normalization will not work on the specific field--> Which means matching documents with shorter length will not be preferred/boost over matching documents with greater length for the specific field, at search time. 

2. Index time boosting will not be available on the field. 


If, both the above cases are not required by you, then, you can set "omitNorms=true" for the specific fields. 

This has an added advantage, it will save you some(or a lot of) RAM also, since, with "omitNorms=false" on total "N" fields in the index will require RAM of size:  Total docs in index * 1 byte * N













评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值