2.19. cn=task_name,cn=index,cn=tasks,cn=config
可以通过命令行来索引目录属性,方法是创建一个特殊任务条目来定义任务的参数并启动任务。任务完成后,任务条目会从目录中删除。
cn=index 条目是索引任务操作的容器条目。cn=index 条目本身没有属性,但此条目中的每个任务条目(如 cn=task_ID,cn=index,cn=tasks,cn=config )都使用以下属性来定义备份任务。
cn=index 下的索引任务条目可以通过标识要索引的属性和要创建的索引类型(在 nsIndexAttribute 属性中定义)来创建标准索引。
或者,可使用 nsIndexVLVAttribute 属性为属性生成虚拟列表视图(VLV)索引。这与运行 vlvindex 脚本相同。
例如:
dn: cn=example presence index,cn=index,cn=tasks,cn=config
objectclass: top
objectclass: extensibleObject
cn: example presence index
nsInstance: userRoot
nsIndexAttribute: cn:pres
dn: cn=example VLV index,cn=index,cn=tasks,cn=config
objectclass: extensibleObject
cn: example VLV index
nsIndexVLVAttribute: "by MCC ou=people,dc=example,dc=com"
当索引操作运行时,任务条目将包含 cn=tasks,cn=config 下的 Common task invocation 属性中列出的所有服务器生成的任务属性。
2.19.1. nsIndexAttribute 复制链接链接已复制到粘贴板!
此属性提供要索引和要应用的索引类型的属性名称。属性值的格式是属性名称和以逗号分隔的索引类型列表,用双引号括起来。例如:
nsIndexAttribute: attribute:index1,index2
| 参数 | 描述 |
|---|---|
| 条目 DN | cn=task_name,cn=index,cn=tasks,cn=config |
| 有效值 | * 任何属性
* 索引类型,可以是 |
| 默认值 | |
| 语法 | 不区分大小写的字符串,多值 |
| 示例 | * nsIndexAttribute: cn:pres,eq * nsIndexAttribute: description:sub |
2.19.2. nsIndexVLVAttribute 复制链接链接已复制到粘贴板!
此属性提供 VLV 索引的目标条目的名称。虚拟列表视图基于浏览索引条目,用于定义虚拟列表基本 DN、范围和过滤器。nsIndexVLVAttribute 值是浏览索引条目,VLV 创建任务会根据浏览索引条目参数运行。
| 参数 | 描述 |
|---|---|
| 条目 DN | cn=task_name,cn=index,cn=tasks,cn=config |
| 有效值 | VLV 条目定义的子条目 RDN |
| 默认值 | |
| 语法 | DirectoryString |
| 示例 | nsIndexVLVAttribute: "浏览索引排序标识符" |