opencms给xml中指定的字段索引

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

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

item=Industries[1]


下面是我找到的英文资料摘录
[quote]
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:

[b]content:[/b] 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.
[b]property:[/b] 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.
[b]property-search:[/b] 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.
[b][color=red]item: [/color][/b]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].
[/quote]

英文资料地址:http://www.packtpub.com/article/configuring-opencms-search
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值