solr schema.xml Field属性详解

常用的公共属性有:
name:标识。

type:fieldType定义的类型。

indexed=true|false:是否被用来建立索引(关系到搜索和排序)

stored=true|false:是否储存

compressed=true|false,是否使用gzip压缩(只有TextField和StrField可以压缩)

compressThreshold=压缩阀值

multiValued=true|false 是否包含多个值,即一个名字可以被多个document所用。

omitNorms=true|false这是个高级选项。设置为true,省略与这一field相关的规范(这将禁用长度规范化和索引时间权重( index-time boosting for the field),并节省一些内存)。仅仅用在全文本field。

termVectors=false|true 如果设置为true,则包含了所有的term vector 信息。通常用的属性有:
termPositions=”true”:存储 term vector中的地址信息,会消耗存储开销。
termOffsets:存储 term vector 的偏移量,会消耗存储开销。
更多有关信息请参考:http://wiki.apache.org/solr/TermVectorComponent

omitTermFreqAndPositions=true|false 如果设置,省略掉freq和term vector中的地址信息

omitPositions=true|false如果设置,省略掉term vector中的地址信息

default:如果没有属性需要修改,就可以用这个标识下。
英文原文:

Common options that fields can have are...
 
default
The default value for this field if none is provided while adding documents
 
indexed=true|false
True if this field should be "indexed". If (and only if) a field is indexed, then it is searchable, sortable, and facetable.
 
stored=true|false
True if the value of the field should be retrievable during a search, or if you're using highlighting or MoreLikeThis.
 
compressed=true|false
True if this field should be stored using gzip compression. (This will only apply if the field type is compressible; among the standard field types, only TextField and StrField are.)
 
compressThreshold=<integer>
 
multiValued=true|false
True if this field may contain multiple values per document, i.e. if it can appear multiple times in a document
 
omitNorms=true|false
This is arguably an advanced option.
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.
 
termVectors=false|true <?> Solr 1.1
If set, include full term vector info.
If enabled, often also used with termPositions="true" and termOffsets="true".
To use interactively, requires TermVectorComponent
Corresponds to TV button in Luke, and V field attribute.
 
omitTermFreqAndPositions=true|false <!> Solr1.4
If set, omit term freq, positions and payloads from postings for this field. This can be a performance boost for fields that don't require that information and reduces storage space required for the index. Queries that rely on position that are issued on a field with this option fail with an exception. Prior to <!> Solr4.0 the queries would silently fail to find documents.
 
omitPositions=true|false <!> Solr3.4
If set, omits positions, but keeps term frequencies
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值