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