Added standalone document, which describe MARC indexing process.
[idzebra-moved-to-github.git] / doc / marc_indexing.sgml
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2
3 <!-- $Id: marc_indexing.sgml,v 1.1 2003-03-10 13:27:38 oleg Exp $ -->
4
5 <book>
6 <bookinfo>
7  <title>Indexing of MARC records by Zebra</title>
8  <abstract>
9   <simpara>Zebra is suitable for distribution of MARC records via Z39.50. We
10         have a several possibilities to describe the indexing process of MARC records.
11         This document shows these possibilities.
12   </simpara>
13  </abstract>
14 </bookinfo>
15
16 <chapter>
17  <title>Simple indexing of MARC records</title>
18 <para>Simple indexing is not described yet.</para>
19 </chapter>
20
21 <chapter>
22  <title>Extended indexing of MARC records</title>
23
24 <para>Extended indexing of MARC records will help you if you need index a
25 combination of subfields, or index only a part of the whole field,
26 or use during indexing process embedded fields of MARC record.
27 </para>
28
29 <para>Extended indexing of MARC records additionally allows:
30 <itemizedlist>
31
32 <listitem>
33 <para>to index data in LEADER of MARC record</para>
34 </listitem>
35
36 <listitem>
37 <para>to index data in control fields (with fixed length)</para>
38 </listitem>
39
40 <listitem>
41 <para>to use during indexing the values of indicators</para>
42 </listitem>
43
44 <listitem>
45 <para>to index linked fields for UNIMARC based formats</para>
46 </listitem>
47
48 </itemizedlist>
49 </para>
50
51 <note><para>In compare with simple indexing process the extended indexing
52 may increase (about 2-3 times) the time of indexing process for MARC
53 records.</para></note>
54
55 <sect1>
56 <title>The index-formula</title>
57
58 <para>At the beginning, we have to define the term <emphasis>index-formula</emphasis>
59 for MARC records. This term helps to understand the notation of extended indexing of MARC records
60 by Zebra. Our definition is based on the document <ulink url="http://www.rba.ru/rusmarc/soft/Z39-50.htm">"The
61 table of conformity for Z39.50 use attributes and RUSMARC fields"</ulink>.
62 The document is available only in russian language.</para>
63
64 <para>The <emphasis>index-formula</emphasis> is the combination of subfields presented in such way:</para>
65
66 <screen>
67     71-00$a, $g, $h ($c){.$b ($c)} ,       (1)
68 </screen>
69
70 <para>We know that Zebra supports a Bib-1 attribute - right truncation.
71 In this case, the <emphasis>index-formula</emphasis> (1) consists from 
72 forms, defined in the same way as (1)</para>
73
74 <screen>
75     71-00$a, $g, $h
76     71-00$a, $g
77     71-00$a
78 </screen>
79
80 <note><para>The original MARC record may be without some elements, which included in <emphasis>index-formula</emphasis>.</para>
81 </note>
82
83 <para>This notation incudes such operands as:
84 <variablelist>
85
86 <varlistentry>
87  <term>#</term>
88  <listitem><para>It means whitespace character.</para></listitem>
89 </varlistentry>
90
91 <varlistentry>
92  <term>-</term>
93  <listitem><para>The position may contain any value, defined by MARC format.
94  For example, <emphasis>index-formula</emphasis></para>
95
96 <screen>
97     70-#1$a, $g , (2)
98 </screen>
99
100 <para>includes</para> 
101
102 <screen>
103     700#1$a, $g
104     701#1$a, $g
105     702#1$a, $g
106 </screen>
107
108 </listitem>
109 </varlistentry>
110
111 <varlistentry>
112 <term>{...}</term>
113 <listitem><para>The repeatable elements are defined in figure-brackets {}. For example,
114 <emphasis>index-formula</emphasis></para>
115
116
117 <screen>
118     71-00$a, $g, $h ($c){.$b ($c)} , (3)
119 </screen>
120
121 <para>includes</para>
122
123 <screen>
124     71-00$a, $g, $h ($c). $b ($c)
125     71-00$a, $g, $h ($c). $b ($c). $b ($c)
126     71-00$a, $g, $h ($c). $b ($c). $b ($c). $b ($c)
127 </screen>
128
129 </listitem>
130 </varlistentry>
131 </variablelist>
132
133 <note><para>All another operands are the same as accepted in MARC world.</para>
134 </note>
135
136 </sect1>
137
138 <sect1>
139 <title>Notation of <emphasis>index-formula</emphasis> for Zebra</title>
140
141
142 <para>Extended indexing overloads <literal>path</literal> of
143 <literal>elm</literal> definition in abstract syntax file of Zebra
144 (<literal>.abs</literal> file). It means that names beginning with
145 <literal>"mc-"</literal> are interpreted by Zebra as
146 <emphasis>index-formula</emphasis>. The database index is created and
147 linked with <emphasis>access point</emphasis> (Bib-1 use attribute)
148 according to this formula.</para>
149
150 <para>For example, <emphasis>index-formula</emphasis></para>
151
152 <screen>
153     71-00$a, $g, $h ($c){.$b ($c)} , (4)
154 </screen>
155
156 <para>in <literal>.abs</literal> file looks like:</para>
157
158 <screen>
159     mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)}
160 </screen>
161
162
163 <para>The notation of <emphasis>index-formula</emphasis> uses the operands:
164 <variablelist>
165
166 <varlistentry>
167 <term>_</term>
168 <listitem><para>It means whitespace character.</para></listitem>
169 </varlistentry>
170
171 <varlistentry>
172 <term>.</term>
173 <listitem><para>The position may contain any value, defined by MARC format. For example,
174 <emphasis>index-formula</emphasis></para>
175
176 <screen>
177     70-#1$a, $g , (5)
178 </screen>
179
180 <para>matches <literal>mc-70._1_$a,_$g_</literal> and includes</para>
181
182 <screen>
183     700_1_$a,_$g_
184     701_1_$a,_$g_
185     702_1_$a,_$g_
186 </screen>
187 </listitem>
188 </varlistentry>
189
190 <varlistentry>
191 <term>{...}</term>
192 <listitem><para>The repeatable elements are defined in figure-brackets {}. For example,
193 <emphasis>index-formula</emphasis></para>
194
195 <screen>
196     71#00$a, $g, $h ($c) {.$b ($c)} , (6)
197 </screen>
198
199 <para>matches <literal>mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)}</literal> and
200 includes</para>
201
202 <screen>
203     71.00_$a,_$g,_$h_(_$c_).$b_(_$c_)
204     71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_)
205     71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_).$b_(_$c_)
206 </screen>
207 </listitem>
208 </varlistentry>
209
210
211 <varlistentry>
212 <term>&#60;...&#62;</term>
213 <listitem><para>Embedded <emphasis>index-formula</emphasis> (for linked fields) is between &#60;&#62;. For example,
214 <emphasis>index-formula</emphasis></para>
215
216 <screen>
217     4--#-$170-#1$a, $g ($c) , (7)
218 </screen>
219
220 <para>matches <literal>mc-4.._._$1&#60;70._1_$a,_$g_(_$c_)&#62;_</literal> and
221 includes</para>
222
223 <screen>
224     463_._$1&#60;70._1_$a,_$g_(_$c_)&#62;_
225 </screen>
226
227 </listitem>
228 </varlistentry>
229 </variablelist>
230 </para>
231
232 <note>
233 <para>All another operands are the same as accepted in MARC world.</para>
234 </note>
235
236 <sect2>
237 <title>Examples</title>
238
239 <para>
240 <orderedlist>
241
242 <listitem>
243
244 <para>indexing LEADER</para>
245
246 <para>You need to use keyword "ldr" to index leader. For example, indexing data from 6th
247 and 7th position of LEADER</para>
248
249 <screen>
250     elm mc-ldr[6]               Record-type                     !
251     elm mc-ldr[7]               Bib-level                       !
252 </screen>
253
254 </listitem>
255
256 <listitem>
257
258 <para>indexing data from control fields</para>
259
260 <para>indexing date (the time added to database)</para>
261
262 <screen>
263     elm mc-008[0-5]             Date/time-added-to-db           !       
264 </screen>
265
266 <para>or for RUSMARC (this data included in 100th field)</para>
267
268 <screen>
269     elm mc-100___$a[0-7]_   Date/time-added-to-db               !
270 </screen>
271
272 </listitem>
273
274 <listitem>
275
276 <para>using indicators while indexing</para>
277
278 <para>For RUSMARC <emphasis>index-formula</emphasis>
279 <literal>70-#1$a, $g</literal> matches</para>
280
281 <screen>
282     elm 70._1_$a,_$g_       Author          !:w,!:p
283 </screen>
284
285 <para>When Zebra finds a field according to <literal>"70."</literal> pattern it checks
286 the indicators.  In this case the value of first indicator doesn't mater, but
287 the value of second one must be whitespace, in another case a field is not 
288 indexed.</para>
289
290 </listitem>
291
292 <listitem>
293
294 <para>indexing embedded (linked) fields for UNIMARC based formats</para>
295
296 <para>For RUSMARC <emphasis>index-formula</emphasis> 
297 <literal>4--#-$170-#1$a, $g ($c)</literal> matches</para>
298
299 <screen>
300     elm mc-4.._._$1<70._1_$a,_$g_(_$c_)>_   Author          !:w,!:p
301 </screen>
302
303 <para>Data are extracted from record if the field matches to
304 <literal>"4.._."</literal> pattern and data in linked field match to embedded
305 <emphasis>index-formula</emphasis> <literal>70._1_$a,_$g_(_$c_)</literal>.</para>
306
307 </listitem>
308
309 </orderedlist>
310 </para>
311
312
313 </sect2>
314 </sect1>
315
316 </chapter>
317 </book>