Field Default Properties

 

一些默认的可指定的属性, 不管是在filed types, 或者是自定义的field上, 都可以被重写。 属性的默认值依赖于FieldType class, 然而Fieldtype class也同时依赖于shcema 的version. 下面的table 是针对version="1.6" 的fieldType.

 

PropertyDescriptionValuesDefault
indexedIf true, the value of the field can be used in queries to retrieve matching documentstrue or
false
true
storedIf true, the actual value of the field can be retrieved by queries.
如果为true, 实际值域能被查询检索到
true or
false
true
docValuesIf true, the value of the field will be put in a column-oriented DocValues structure.
如果为true, 面向列的储存, 为sorting, grouping提高效率。
true or
false
false
sortMissingFirst
sortMissingLast
Control the placement of documents when a sort field is not present.
sortMissingLast:  设置成true没有该field的数据排在有该field的数据之后,而不管请求时的排序规则。
sortMissingFirst: 与sortMissingLast相反
true or
false
false
multiValuedIf true, indicates that a single document might contain multiple values for this field type.
一个域含有多个值。
true or
false
false
omitNormsIf true, omits the norms associated with this field (this disables length normalization and index-time boosting for the field, and saves some memory). Defaults to true for all primitive (non-analyzed) field types, such as int, float,data, bool, and string. Only full-text fields or fields that need an index-time boost need norms.
如果为true, 这将禁用域的长度规范化和索引加权, 有利于节省内存开销。 当field type是基本数据类型, 默认为true. 实际上只有全文索引或在index的时候要加权的field需要norm。
true or
false
*
omitTermFreqAndPositionsIf true, omits term frequency, positions, and payloads from postings for this field. This can be a performance boost for fields that don't require that information. It also reduces the storage space required for the index. Queries that rely on position that are issued on a field with this option will silently fail to find documents. This property defaults to true for all field types that are not text fields.
如果为true, 将去除在这个field上词频,地址,payload。 这会提高评分效率, 同时也会减少索引储存空间。但是依靠地址查询的query找不到相应的document.除开text field, 其它的field默认的属性为true. 主要是用于不需要term在Doc里的词频,地址信息, 只要通过term得到Doc就行了。
true or
false
*
omitPositionsSimilar to omitTermFreqAndPositions but preserves
term frequency information.
和omitTermFreqAndPositions功能相似, 但保留词频信息
true or
false
*
termVectors
termPositions
termOffsets
termPayloads
These options instruct Solr to maintain full term vectors for each document, optionally including position, offset and payload information for each term occurrence in those vectors. These can be used to accelerate highlighting and other ancillary functionality, but impose a substantial cost in terms of index size. They are not necessary for typical uses of Solr。
这些选项说明了所有term vectors的信息, 包含有地址信息,偏移量,paylod。 这会加快highlighting 和其它辅助功能, 但是也加大了索引的开销。 对于特殊使用的solr是没有必要的。
true or
false
false
requiredInstructs Solr to reject any attempts to add a document which does not have a value for this field. This property defaults to false.true or
false
false
useDocValuesAsStoredIf the field has docValues enabled, setting this to true would allow the field to be returned as if it were a stored field (even if it has stored=false) when matching "*" in an fl parameter.
如果这个field启动了docValues, 并且useDocValuesAsStored为true, 那么允许这个field值被返回到客户端, 不管stored=false.
true or
false
true
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值