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