使用合并规则
使用元数据编辑器创建用于结合两条记录的合并规则的概述和说明。
- 编目管理员
主要记录
| 方案 | 主要记录 |
|---|---|
| 使用导入配置文件导入记录 | Alma现有记录 |
| 从OCLC连接导入记录 | Alma现有记录 |
| 合并两个现有记录 | 元数据编辑器左面板的记录(首先打开) |
| 使用外部资源讨论编目 | 外部资源 |
When you want to use a merge rule in Alma, the rule description, rather than its name, is what appears in the Merge Method dropdown and in the Choose Merge Routine dropdown (under Record Actions > Merge Records & Combine Inventory).
基本合并规则
| 合并规则: | 示例 | 描述 |
|---|---|---|
| 删除 | remove MARC."035" | 从主要记录中删除此字段的所有行。 |
| 添加 | add MARC."035" | 将此字段的所有行从次要记录添加到主要记录。 |
|
替换 |
replace MARC."505" |
从主要记录中删除带有该字段的所有行,然后将该字段的所有行从次要记录添加到主记录。
替换的结果和移除再添加的结果相同,除非使用“if exists”语句时,次级记录没有指定的字段,则该字段不会用主要记录中移除。例如:
replace MARC."505"
始终从主要记录中移除505。如果次级记录中存在505,则主要记录现在含有该505。If 505 does not exist in the secondary record, the primary record contains no 505.
replace MARC."505" if exists
removes 505 from the primary record, only if 505 exists in the secondary record.如果次级记录中存在505,则主要记录现在含有该505。If 505 does not exist in the secondary record, the primary record retains its original 505.
This logic is only true when you specify a field such as MARC."505" in the Replace action.If you use the Replace action formats below, Alma treats the Replace rule as if "if exists" is written.So, for example, if you have a 260 field in the Alma primary record, a 264 field in the incoming secondary record, and you are using replace MARC.XXX, Alma keeps the 260 field and adds the 264 during merge processing (as if the "if exists" is written).
For more information see the Merge Rule Syntax table.
|
创建合并规则
- 在元数据编辑器页面(资源 > 编目 > 打开元数据编辑器),选择规则选项卡。“合并规则”文件夹将打开。
- Select New > Merge and enter your merge rule properties in the Merge Rule Properties dialog box.

- 指示创建规则为专用或共享。This determines in which folder the indication rule is saved.You may want to save the rule to the Private folder and test it first, before moving it to the Shared folder (by changing the Properties).Private merge rules do not appear in the Merge Method dropdown, when you want to subsequently use a merge rule in Alma.请注意,共享区文件夹含有供您复制并创建自己的规则的合并规则。
- Select Save in the dialog.元数据编辑器编辑面板打开。
- 输入规则详细信息。
- 输入合并规则的具体信息。For information on the syntax to be used, see Merge Rules Syntax and Examples.
- Select Save.保存的合并规则出现在“规则”选项卡下。The saved merge rules can be edited, deleted, duplicated (to create new merge rules), and contributed to the Community Zone for sharing (see Contributing to the Community Zone - Normalization, Merge, and Indication Rules for more information).也可以修改保存的合并规则的属性。
- 与规范化规则不同,无法预览合并规则。
Merge Rules Syntax and Examples
导入配置文件和套录编目规则示例
Rule Syntax
| 表达 | 意义 |
|---|---|
| add MARC."{tag}" | Add the content of the field specified in the {tag}.
例如,以下内容增加了950字段的内容: add MARC."950" |
| add MARC."{tag}"("{ind1}","{ind2}") | Add the content of the field specified in the {tag}, as well as the stipulated indicators . 例如,以下内容添加950字段指示符0和1的内容: add MARC."950"("0","1") |
|
add MARC."{TAG}"("{ind1}","{ind2}") if does not exist
|
Add the field specified in the {tag} only if the field and indicators are not already present in the primary record.如果主记录没有字段且次级记录有含有相同标签和指示符的两个字段,两个字段都添加。
例如,主记录在以下合并情况下不更改,因为标签和指示符已经在主记录中:
Syntax:add MARC."600"("0","0") if does not exists
Primary record:600 00 $a history
Secondary record:600 00 $a history of Israel
|
|
add MARC."{TAG}" excluding {ind1} "{comma separated values}" excluding {ind2} "{comma separated values}" excluding subfield ("{subfield}","{subfield value}")
|
Add all unique values of the field specified in the {tag}, except for the ones with a specific value in the first indicator, a specific value in the second indicator, or a specific value in one of the subfields.要排除字段需要满足全部条件。条件之间的关系为AND。三个条件非必需。可能只存在一个或两个。
例如,下文添加的次级记录#1中没有唯一655字段值,次级记录#2中有唯一655字段值。请注意,下例中的句法只使用两个条件。
Syntax:add MARC."655" excluding second indicator "7" excluding subfield ("2","local")
Secondary record #1:655_7 $a Art stories.$2 local
Secondary record #2:655_7 $a Irish stories.$2 fast
|
| add MARC."{tag}" if does not exists | Add the content of the field specified in the {tag} if this field does not already exist.
例如,如果此字段不存在,则下列内容将添加950字段: add MARC."950" if does not exists |
| add MARC."{prefix}"X | Add the content of the fields prefixed by {prefix}.
例如,以下将所有字段的内容添加到920到929之间: add MARC."92"X |
| add MARC."{prefix}"XX | Add the content of the fields prefixed by {prefix}.
例如,以下添加900和999之间的所有字段内容: add MARC."9"XX |
| add MARC."{prefix}"X excluding "{list}" | Add the content of the fields prefixed by {prefix}, excluding the specified fields and subfields.
例如,以下添加990和999之间的所有字段内容,但990和991除外: add MARC."99"X excluding "990,991" |
| add MARC."{prefix}"XX excluding "{list}" | Add the content of the fields prefixed by {prefix}, excluding the specified fields and subfields.
例如,以下添加900和999之间的所有字段内容,但950和951除外: add MARC."9"XX excluding "950,951" |
| add MARC."{tag}" when MARC."{condtag}"."{condsf}" contains "{condstring}" | Add the field specified in the {tag} when the stipulated field/subfield contains the specified string.
例如,仅当250.a字段包含文本“history”时添加950标签。 add MARC."950" when MARC."250"."a" contains "history" |
| remove MARC."{prefix}"X | Remove the fields prefixed by {prefix}.
例如,以下内容将删除920和929之间的所有字段: remove MARC."92"X |
| remove MARC."{prefix}"XX | Remove the fields prefixed by {prefix}.
例如,以下内容将删除900和999之间的所有字段: remove MARC."9"XX |
| remove MARC."{tag}" | Remove the field specified in the {tag}. 例如,以下内容将删除950字段: remove MARC."950" |
|
remove MARC."{TAG}" excluding "{excluded field}"("{ind1}","{ind2}") |
移除在{tag}中指定的字段,不包括列出的指定字段和指示符。 例如,以下移除650字段,除了含有第一指示符1,第一指示符0和第二指示符1,第二指示符2或没有指示符的650字段: remove MARC."650" excluding "650"("1"," ") remove MARC."650" excluding "650"("0","1") remove MARC."650" excluding "650"(" ","2") remove MARC."650" excluding "650"(" "," ") |
|
remove MARC."{TAG}" if not exists subfield "{comma separated values}"
|
Remove the field specified in the {tag} from the primary record if the subfields specified (one or more) in {comma separated values} do not exist.如果指定多于一个子字段,所有子字段需要同时存在/不存在以满足条件。
例如,因为不存在子字段5,以下主记录中的700字段移除。
Syntax:remove MARC."700" if not exists subfield "5"
Primary record #1:700 1_ $a Burgess, Anne.
|
|
remove MARC."{TAG}" if exists subfield "{comma separated values}"
|
Remove the field specified in the {tag} from the primary record if the subfields specified (one or more) in {comma separated values} do exist.如果指定多于一个子字段,所有子字段需要同时存在/不存在以满足条件。
例如,因为不存在子字段5,以下主记录中的700字段移除。
Syntax:remove MARC."700" if exists subfield "5"
Primary record:700 1_ $a Jefferson, Thomas, $d 1743-1826, $e former owner.$ 5MH
|
| remove MARC."{prefix}"X excluding "{list}" | Remove the fields prefixed by {prefix}, excluding the specified list of fields
例如,以下内容将删除990和999之间的所有字段,除了990和991: remove MARC."99"X excluding "990,991" |
| remove MARC."{prefix}"XX excluding "{list}" | Remove the fields prefixed by {prefix}, excluding the specified list of fields.
例如,以下内容将删除900和999之间的所有字段,除了950和951: remove MARC."9"XX excluding "950,951" 以下删除所有字段,除了001、084、773和980-999。 remove MARC."XXX" excluding "001,084,773,98X,99X" |
| remove MARC."{prefix}"XX excluding "{excluded field}"("{ind1}","{ind2}") | Remove the fields prefixed by {prefix}, excluding the specified list of fields and indicators.
例如,以下移除6XX字段,除了含有第一指示符1,第一指示符0和第二指示符1,第二指示符2或没有指示符的650字段: remove MARC."6"XX excluding "650"("1"," ") remove MARC."6"XX excluding "650"("0","1") remove MARC."6"XX excluding "650"(" ","2") remove MARC."6"XX excluding "650"(" "," ") |
| replace MARC."{tag}" if exists | Replace the content of the field specified in the {tag} only if the field exists in the secondary record.如果次级记录中没有该字段,主记录字段的内容保留。
For example, the following replaces the 950 field in the primary record, if the field exists in the secondary record replace MARC."950" if exists |
| replace MARC."{tag}" | Replace the content of the primary record's field specified in the {tag}.If the field does not exist in the secondary record, the primary record will contains no {tag} field.
例如,以下替换主记录中的950字段: replace MARC."950" |
| replace MARC."{prefix}"X if exists | Replace the content of the fields prefixed by {prefix} if these fields exist in the secondary record.If these fields do not exist in the secondary record, the {prefix} fields of the primary record remain.
例如,如果次级记录中有这些字段,则以下替换主记录中920到929的全部字段: replace MARC."92"X if exists |
| replace MARC."{prefix}"X | Replace the content of the primary record's fields prefixed by {prefix}.If these fields do not exist in the secondary record, the primary record will contain no {prefix} fields.
例如,以下替换主记录中的920到929的全部字段: replace MARC."92"X |
| replace MARC."{prefix}"XX if exists | Replace the content of the primary record's fields prefixed by {prefix} if these fields exist in the secondary record.If these fields do not exist in the secondary record, the {prefix} fields of the primary record remain.
例如,如果次级记录中有这些字段,则以下替换主记录中900到999的全部字段: replace MARC."9"XX if exists |
| replace MARC."{prefix}"XX | Replace the content of the primary record's fields prefixed by {prefix}.If these fields do not exist in the secondary record, the primary record will contain no {prefix} fields.
例如,以下内容将替换900和999之间的所有字段: replace MARC."9"XX |
| replace MARC."{prefix}"X excluding "{list}" | Replace the content of the primary record's fields prefixed by {prefix}, excluding the specified fields.
例如,以下替换990和999之间的所有字段内容,但990和991除外。请注意,如果次级字段中没有这些字段,在主记录中创建它们: replace MARC."99"X excluding "990,991" |
| replace MARC."{prefix}"XX excluding "{list}" | Replace the content of the primary record's fields prefixed by {prefix}, excluding the specified fields.
例如,以下替换900和999之间的所有字段内容,但950和951除外。请注意,如果次级字段中没有这些字段,在主记录中创建它们: replace MARC."9"XX excluding "950,951" |
| replace MARC.XXX excluding "{list}" | 替换主记录全部MARC字段中的内容,指定的字段除外。
例如,以下替换主要记录中所有字段内容与次要记录的所有字段内容,除了指定的字段。请注意,如果次级字段中没有这些字段,在主记录中创建它们: replace MARC.XXX excluding "100,245,9XX,5XX" |
| replace MARC."{prefix}"X excluding MARC."{exclTag}"("{ind1}","{ind2}") | Replace the content of primary record's fields prefixed by {prefix}, excluding the specified fields and indicators.
例如,以下代替主记录中990到999的全部字段内容,次级记录的MARC字段995(0,1)除外。注意,MARC字段995(1,1)被替换。 If the fields do not exist in the secondary record, they are created in the primary record: replace MARC."99"X excluding MARC."995"("0","1") |
| replace MARC."{prefix}"XX excluding MARC."{exclTag}"("{ind1}","{ind2}") | Replace the content of primary record's fields prefixed by {prefix}, excluding the specified fields and indicators.
例如,以下代替主记录中900到999的全部字段内容,次级记录的MARC字段995(0,1)除外。注意,MARC字段995(1,1)被替换。 如果次级字段中不存在这些字段,则在主记录中创建: replace MARC."9"XX excluding MARC."995"("0","1") |
| replace MARC."{tag}" excluding MARC."{exclTag}"("{ind1}","{ind2}") | Replace the primary record's field specified in the {tag}, excluding the specified fields and indicators.
例如,以下代替主记录的995字段,次级记录的995(0,1)除外。注意,MARC字段995(1,1)被替换。 如果次级字段中不存在这些字段,则在主记录中创建: replace MARC."995" excluding MARC."995"("0","1") |
| replace MARC."{tag}" when MARC."{condtag}"."{condsf}" contains "{text}" excluding MARC."{exclTag}"("{ind1}","{ind2}") | 将包含指定字符串的主记录字段的内容替换为包含指定字符串的次级记录。If the secondary record does not have a field with the specified string, the primary record's fields that contains the specified string is removed.
例如: replace MARC."035" when MARC."035"."a"contains"OCoLC" excluding MARC."035"("9","9") |
| replace MARC.XXX excluding MARC."{exclTag}"("{ind1}","{ind2}") | 替换主记录全部MARC字段中的内容,指定的字段和指示符除外。
例如,以下代替主记录中所有字段内容与次要记录内容,除了995(0,1)之外。注意,MARC字段995(1,1)被替换。 如果次级字段中不存在这些字段,则在主记录中创建: replace MARC.XXX excluding MARC."995"("0","1") |
| replace MARC.control."{ctrl}" | 替换指定的主记录的MARC控制字段。
例如,以下代替主要记录中的MARC 008控制字段的内容与次要记录的内容。 如果字段不存在,则创建: replace MARC.control."008" |
| replace MARC.control.position."LDR.{starting position,length}" | 替换主记录控制字段的特定位置。这是通过指定起始位置和长度来实现的。
例如,以下代替了主记录从位置8开始的控制字段中指定的内容,并替换为次级字段的2个位置。 replace MARC.control.position."LDR.{8,2}" |
Page tags: article:topicproduct:almacontent:Documentationlang:englishmerge recordsmerge rule syntax