`
ziyu_1
  • 浏览: 192497 次
  • 来自: ...
社区版块
存档分类
最新评论

opencms给xml中指定的字段索引

阅读更多
建立新的field的后,rebuild 索引,始终找不到对应的field内容.

最后发现原来是因为mapping写错了,必须要给mapping的字段加上序号

item=Industries[1]


下面是我找到的英文资料摘录
引用

In addition to these settings, each field also contains one or more mapping definitions which map the data value to a content field in a VFS resource. The mapping definition includes a mapping type, an optional parameter, and an optional default value. There are four types of mappings to choose from:

content: This maps the field data value to the value of the VFS resource content. The value that is retrieved is based upon the resource type. Each resource type has a content extractor responsible for converting the resource content into a string value. For XML resource types, the content extractor concatenates all the data fields of the resource into a single string value. For this mapping, the Parameter field is not used.
property: This maps the field data value to a VFS resource property value. If the property value is not found, then the value will be empty. The Parameter field must contain the name of the property value to be used.
property-search: This is the same as the property mapping except when the property value is missing on the original resource. It then searches for the value on all the parent folders of the resource. The Parameter field must contain the name of the property value to be used.
item: This selection is useful only for XML content. It maps the value to an individual field in the XML content. The XML field is specified in the Parameter field using the XPath notation format. For example, for an XML field element with the name of Abstract, the notation used would be Abstract[1]. For a repeating element, multiple mappings may be added per field. For example, for the blog comments, we could map the first three comments using three mappings entries with the values: Comment[1], Comment[2], and Comment[3].


英文资料地址:http://www.packtpub.com/article/configuring-opencms-search
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics