<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
常用的公共属性有:
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。
omitNorms在建立索引时会存储相关的影响boost打分的长度因子,因此对于不需要打分排序考虑的,omitNorm设置成true。
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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
2012-04-06 企业技术架构图
2012-04-06 关于VerifyRenderingInServerForm方法的思考(转)
2007-04-06 如何自定义上传文件大小限制
2007-04-06 在IE里嵌入播放器