X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=doc%2Frecordmodel-grs.xml;h=bd11180c58d0d55486905a7322969b05387a6b10;hp=a2c798e2c132fcc8793d1e25810f41a2bc5f5b1d;hb=37dc985516f52f34fc8434cc8beb982bb0c8988f;hpb=819007639f67bdf6a147a8fc5e66c7fbad9ada6a diff --git a/doc/recordmodel-grs.xml b/doc/recordmodel-grs.xml index a2c798e..bd11180 100644 --- a/doc/recordmodel-grs.xml +++ b/doc/recordmodel-grs.xml @@ -1,7 +1,6 @@ - - + + GRS Record Model and Filter Modules - The record model described in this chapter applies to the fundamental, @@ -11,7 +10,7 @@ - +
GRS Record Filters Many basic subtypes of the grs type are @@ -21,120 +20,116 @@ - grs.sgml + grs.sgml This is the canonical input format described . It is using simple SGML-like syntax. - - grs.marc + grs.marc.type This allows Zebra to read records in the ISO2709 (MARC) encoding standard. - + well as the indexing rules. + + The grs.marc uses an internal represtantion + which is not XML conformant. In particular MARC tags are + presented as elements with the same name. And XML elements + may not start with digits. Therefore this filter is only + suitable for systems returning GRS-1 and MARC records. For XML + use grs.marcxml filter instead (see below). The loadable grs.marc filter module is packaged in the GNU/Debian package - libidzebra1.4-mod-grs-marc - + libidzebra2.0-mod-grs-marc + - grs.marcxml + grs.marcxml.type - This allows Zebra to read - records in the ISO2709??? (MARCXML) encoding standard. + This allows Zebra to read ISO2709 encoded records. + Last parameter type names the + .abs file (see below) + which describes the specific MARC structure of the input record as + well as the indexing rules. - The loadable grs.marcxml filter module - is also contained in the GNU/Debian package - libidzebra1.4-mod-grs-marc - - - - - grs.danbib - - - The grs.danbib filter parses DanBib - records, a danish MARC record variant called DANMARC. - DanBib is the Danish Union Catalogue hosted by the - Danish Bibliographic Centre (DBC). + The internal representation for grs.marcxml + is the same as for MARCXML. + It slightly more complicated to work with than + grs.marc but XML conformant. - The loadable grs.danbib filter module - is packages in the GNU/Debian package - libidzebra1.4-mod-grs-danbib. + + The loadable grs.marcxml filter module + is also contained in the GNU/Debian package + libidzebra2.0-mod-grs-marc - grs.xml + grs.xml - This filter reads XML records and uses Expat to + This filter reads XML records and uses + Expat to parse them and convert them into IDZebra's internal grs record model. - Only one record per file - is supported. The filter is only available if Zebra/YAZ - is compiled with EXPAT support. + Only one record per file is supported, due to the fact XML does + not allow two documents to "follow" each other (there is no way + to know when a document is finished). + This filter is only available if Zebra is compiled with EXPAT support. - The loadable grs.xml filter module - is packagged in the GNU/Debian package - libidzebra1.4-mod-grs-xml + The loadable grs.xml filter module + is packagged in the GNU/Debian package + libidzebra2.0-mod-grs-xml - grs.regx + grs.regx.filter This enables a user-supplied Regular Expressions input - filter described in - . + filter described in . - The loadable grs.regx filter module - is packaged in the GNU/Debian package - libidzebra1.4-mod-grs-regx - + The loadable grs.regx filter module + is packaged in the GNU/Debian package + libidzebra2.0-mod-grs-regx + - grs.tcl + grs.tcl.filter Similar to grs.regx but using Tcl for rules, described in . - The loadable grs.tcl filter module - is also packaged in the GNU/Debian package - libidzebra1.4-mod-grs-regx - + The loadable grs.tcl filter module + is also packaged in the GNU/Debian package + libidzebra2.0-mod-grs-regx + - +
GRS Canonical Input Format @@ -207,7 +202,7 @@ structured data element such a Supplier element. - +
Record Root @@ -234,9 +229,9 @@ - +
- +
Variants @@ -272,7 +267,7 @@ The available values for the class and type fields are given by the variant set that is associated with the current schema - (see ). + (see ). @@ -331,11 +326,11 @@ of the end-user. - +
- +
- +
GRS REGX And TCL Input Filters @@ -578,11 +573,11 @@ mechanisms for modifying the elements of a record. - +
- +
- +
GRS Internal Record Representation @@ -633,7 +628,7 @@ different tag path. - +
Tagged Elements @@ -650,9 +645,9 @@ reached from the root of the record). - +
- +
Variants @@ -686,9 +681,9 @@ type, value, corresponding to the variant mechanism of Z39.50. - +
- +
Data Elements @@ -702,11 +697,11 @@ --> - +
- +
- +
GRS Record Model Configuration @@ -717,7 +712,7 @@ setting in the zebra.cfg file. - +
The Abstract Syntax @@ -810,9 +805,9 @@ describe the given objects. - +
- +
The Configuration Files @@ -841,9 +836,9 @@ mandatory (m). - +
- +
The Abstract Syntax (.abs) Files @@ -954,7 +949,7 @@ - any tags + all tags (o) This directive specifies a list of attributes @@ -981,16 +976,16 @@ the attributes specifies which attributes to use when indexing the element in a comma-separated list. - A ! in place of the attribute name is equivalent to - specifying an attribute name identical to the element name. - A - in place of the attribute name + A ! in place of the attribute name is equivalent + to specifying an attribute name identical to the element name. + A - in place of the attribute name specifies that no indexing is to take place for the given element. The attributes can be qualified with field types to specify which character set should govern the indexing procedure for that field. The same data element may be indexed into several different fields, using different character set definitions. - See the . + See the . The default field type is w for word. @@ -1208,9 +1203,9 @@ - +
- +
The Attribute Set (.att) Files @@ -1294,9 +1289,9 @@ - +
- +
The Tag Set (.tag) Files @@ -1452,9 +1447,9 @@ - +
- +
The Variant Set (.var) Files @@ -1533,9 +1528,9 @@ - +
- +
The Element Set (.est) Files @@ -1673,9 +1668,9 @@ - +
- +
The Schema Mapping (.map) Files @@ -1737,9 +1732,9 @@ - +
- +
The MARC (ISO2709) Representation (.mar) Files @@ -1754,253 +1749,10 @@ handled by the system. --> - - - - Field Structure and Character Sets - - - - In order to provide a flexible approach to national character set - handling, Zebra allows the administrator to configure the set up the - system to handle any 8-bit character set — including sets that - require multi-octet diacritics or other multi-octet characters. The - definition of a character set includes a specification of the - permissible values, their sort order (this affects the display in the - SCAN function), and relationships between upper- and lowercase - characters. Finally, the definition includes the specification of - space characters for the set. - - - - The operator can define different character sets for different fields, - typical examples being standard text fields, numerical fields, and - special-purpose fields such as WWW-style linkages (URx). - - - - The default.idx file - - The field types, and hence character sets, are associated with data - elements by the .abs files (see above). - The file default.idx - provides the association between field type codes (as used in the .abs - files) and the character map files (with the .chr suffix). The format - of the .idx file is as follows - - - - - - - index field type code - - - This directive introduces a new search index code. - The argument is a one-character code to be used in the - .abs files to select this particular index type. An index, roughly, - corresponds to a particular structure attribute during search. Refer - to . - - - - sort field code type - - - This directive introduces a - sort index. The argument is a one-character code to be used in the - .abs fie to select this particular index type. The corresponding - use attribute must be used in the sort request to refer to this - particular sort index. The corresponding character map (see below) - is used in the sort process. - - - - completeness boolean - - - This directive enables or disables complete field indexing. - The value of the boolean should be 0 - (disable) or 1. If completeness is enabled, the index entry will - contain the complete contents of the field (up to a limit), with words - (non-space characters) separated by single space characters - (normalized to " " on display). When completeness is - disabled, each word is indexed as a separate entry. Complete subfield - indexing is most useful for fields which are typically browsed (eg. - titles, authors, or subjects), or instances where a match on a - complete subfield is essential (eg. exact title searching). For fields - where completeness is disabled, the search engine will interpret a - search containing space characters as a word proximity search. - - - - charmap filename - - - This is the filename of the character - map to be used for this index for field type. - - - - - - - - The character map file format - - The contents of the character map files are structured as follows: - +
+
- - - - - lowercase value-set - - - This directive introduces the basic value set of the field type. - The format is an ordered list (without spaces) of the - characters which may occur in "words" of the given type. - The order of the entries in the list determines the - sort order of the index. In addition to single characters, the - following combinations are legal: - - - - - - - - Backslashes may be used to introduce three-digit octal, or - two-digit hex representations of single characters - (preceded by x). - In addition, the combinations - \\, \\r, \\n, \\t, \\s (space — remember that real - space-characters may not occur in the value definition), and - \\ are recognized, with their usual interpretation. - - - - - - Curly braces {} may be used to enclose ranges of single - characters (possibly using the escape convention described in the - preceding point), eg. {a-z} to introduce the - standard range of ASCII characters. - Note that the interpretation of such a range depends on - the concrete representation in your local, physical character set. - - - - - - paranthesises () may be used to enclose multi-byte characters - - eg. diacritics or special national combinations (eg. Spanish - "ll"). When found in the input stream (or a search term), - these characters are viewed and sorted as a single character, with a - sorting value depending on the position of the group in the value - statement. - - - - - - - - - uppercase value-set - - - This directive introduces the - upper-case equivalencis to the value set (if any). The number and - order of the entries in the list should be the same as in the - lowercase directive. - - - - space value-set - - - This directive introduces the character - which separate words in the input stream. Depending on the - completeness mode of the field in question, these characters either - terminate an index entry, or delimit individual "words" in - the input stream. The order of the elements is not significant — - otherwise the representation is the same as for the - uppercase and lowercase - directives. - - - - map value-set - target - - - This directive introduces a mapping between each of the - members of the value-set on the left to the character on the - right. The character on the right must occur in the value - set (the lowercase directive) of the - character set, but it may be a paranthesis-enclosed - multi-octet character. This directive may be used to map - diacritics to their base characters, or to map HTML-style - character-representations to their natural form, etc. The - map directive can also be used to ignore leading articles in - searching and/or sorting, and to perform other special - transformations. See section . - - - - - - - Ignoring leading articles - - In addition to specifying sort orders, space (blank) handling, - and upper/lowercase folding, you can also use the character map - files to make Zebra ignore leading articles in sorting records, - or when doing complete field searching. - - - This is done using the map directive in the - character map file. In a nutshell, what you do is map certain - sequences of characters, when they occur in the - beginning of a field, to a space. Assuming that the - character "@" is defined as a space character in your file, you - can do: - - map (^The\s) @ - map (^the\s) @ - - The effect of these directives is to map either 'the' or 'The', - followed by a space character, to a space. The hat ^ character - denotes beginning-of-field only when complete-subfield indexing - or sort indexing is taking place; otherwise, it is treated just - as any other character. - - - Because the default.idx file can be used to - associate different character maps with different indexing types - -- and you can create additional indexing types, should the need - arise -- it is possible to specify that leading articles should - be ignored either in sorting, in complete-field searching, or - both. - - - If you ignore certain prefixes in sorting, then these will be - eliminated from the index, and sorting will take place as if - they weren't there. However, if you set the system up to ignore - certain prefixes in searching, then these - are deleted both from the indexes and from query terms, when the - client specifies complete-field searching. This has the effect - that a search for 'the science journal' and 'science journal' - would both produce the same results. - - - -
- - +
GRS Exchange Formats @@ -2085,8 +1837,326 @@ - +
+ +
+ Extended indexing of MARC records + + Extended indexing of MARC records will help you if you need index a + combination of subfields, or index only a part of the whole field, + or use during indexing process embedded fields of MARC record. + + + Extended indexing of MARC records additionally allows: + + + + to index data in LEADER of MARC record + + + + to index data in control fields (with fixed length) + + + + to use during indexing the values of indicators + + + + to index linked fields for UNIMARC based formats + + + + + + In compare with simple indexing process the extended indexing + may increase (about 2-3 times) the time of indexing process for MARC + records. + +
+ The index-formula + + At the beginning, we have to define the term + index-formula for MARC records. This term helps + to understand the notation of extended indexing of MARC records by Zebra. + Our definition is based on the document + "The table + of conformity for Z39.50 use attributes and RUSMARC fields". + The document is available only in russian language. + + + The index-formula is the combination of + subfields presented in such way: + + + + 71-00$a, $g, $h ($c){.$b ($c)} , (1) + + + + We know that Zebra supports a Bib-1 attribute - right truncation. + In this case, the index-formula (1) consists from + forms, defined in the same way as (1) + + + 71-00$a, $g, $h + 71-00$a, $g + 71-00$a + + + + The original MARC record may be without some elements, which included in index-formula. + + + + This notation includes such operands as: + + + + # + It means whitespace character. + + + + - + The position may contain any value, defined by + MARC format. + For example, index-formula + + + 70-#1$a, $g , (2) + + + includes + + + 700#1$a, $g + 701#1$a, $g + 702#1$a, $g + + + + + + + {...} + + The repeatable elements are defined in figure-brackets {}. + For example, + index-formula + + + 71-00$a, $g, $h ($c){.$b ($c)} , (3) + + + includes + + + 71-00$a, $g, $h ($c). $b ($c) + 71-00$a, $g, $h ($c). $b ($c). $b ($c) + 71-00$a, $g, $h ($c). $b ($c). $b ($c). $b ($c) + + + + + + + + + All another operands are the same as accepted in MARC world. + + + +
+ +
+ Notation of <emphasis>index-formula</emphasis> for Zebra + + + Extended indexing overloads path of + elm definition in abstract syntax file of Zebra + (.abs file). It means that names beginning with + "mc-" are interpreted by Zebra as + index-formula. The database index is created and + linked with access point (Bib-1 use attribute) + according to this formula. + + For example, index-formula + + + 71-00$a, $g, $h ($c){.$b ($c)} , (4) + + + in .abs file looks like: + + + mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} + + + + The notation of index-formula uses the operands: + + + + _ + It means whitespace character. + + + + . + The position may contain any value, defined by + MARC format. For example, + index-formula + + + 70-#1$a, $g , (5) + + + matches mc-70._1_$a,_$g_ and includes + + + 700_1_$a,_$g_ + 701_1_$a,_$g_ + 702_1_$a,_$g_ + + + + + + {...} + The repeatable elements are defined in + figure-brackets {}. For example, + index-formula + + + 71#00$a, $g, $h ($c) {.$b ($c)} , (6) + + + matches + mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} and + includes + + + 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_) + 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_) + 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_).$b_(_$c_) + + + + + + <...> + Embedded index-formula (for + linked fields) is between <>. For example, + index-formula + + + + 4--#-$170-#1$a, $g ($c) , (7) + + + matches + mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ and + includes + + + 463_._$1<70._1_$a,_$g_(_$c_)>_ + + + + + + + + + All another operands are the same as accepted in MARC world. + + +
+ Examples + + + + + + + indexing LEADER + + You need to use keyword "ldr" to index leader. For example, + indexing data from 6th and 7th position of LEADER + + + elm mc-ldr[6] Record-type ! + elm mc-ldr[7] Bib-level ! + + + + + + + indexing data from control fields + + indexing date (the time added to database) + + + elm mc-008[0-5] Date/time-added-to-db ! + + + or for RUSMARC (this data included in 100th field) + + + elm mc-100___$a[0-7]_ Date/time-added-to-db ! + + + + + + + using indicators while indexing + + For RUSMARC index-formula + 70-#1$a, $g matches + + + elm 70._1_$a,_$g_ Author !:w,!:p + + + When Zebra finds a field according to + "70." pattern it checks the indicators. In this + case the value of first indicator doesn't mater, but the value of + second one must be whitespace, in another case a field is not + indexed. + + + + + indexing embedded (linked) fields for UNIMARC based + formats + + For RUSMARC index-formula + 4--#-$170-#1$a, $g ($c) matches + + _ Author !:w,!:p + ]]> + + Data are extracted from record if the field matches to + "4.._." pattern and data in linked field + match to embedded + index-formula + 70._1_$a,_$g_(_$c_). + + + + + + + +
+
+
+