From e70a548d193a5187b8074c439f2d7fa687a8e8c4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Nov 2006 13:05:11 +0000 Subject: [PATCH] Moved section about special retrieval zebra:: to Architecture chapter. Added table with supported zebra:: elements. --- doc/architecture.xml | 156 ++++++++++++++++++++++++++++++++++++++++++++++- doc/field-structure.xml | 130 +-------------------------------------- 2 files changed, 155 insertions(+), 131 deletions(-) diff --git a/doc/architecture.xml b/doc/architecture.xml index b139038..dfc8335 100644 --- a/doc/architecture.xml +++ b/doc/architecture.xml @@ -1,7 +1,6 @@ - + Overview of Zebra Architecture -
Local Representation @@ -370,6 +369,159 @@
+
+ Retrieval of Zebra internal record data + + Starting with Zebra version 2.0.5 or newer, it is + possible to use a special element set which has the prefix + zebra::. + + + Using this element will, regardless of record type, return + Zebra's internal index structure/data for a record. + In particular, the regular record filters are not invoked when + these are in use. + This can in some cases make the retrival faster than regular + retrieval operations (for MARC, XML etc). + + + Special Retrieval Elements + + + + Element Set + Description + Syntax + + + + + zebra::meta::sysno + Get Zebra record system ID + XML and SUTRS + + + zebra::data + Get raw record + all + + + zebra::meta + Get Zebra record internal metadata + XML and SUTRS + + + zebra::index + Get all indexed keys for record + XML and SUTRS + + + + zebra::index::f + + + Get indexed keys for field f of record + + XML and SUTRS + + + + zebra::index::field:t + + + Get indexed keys for field f + and type t of record + + XML and SUTRS + + + +
+ + For example, to fetch the raw binary record data stored in the + zebra internal storage, or on the filesystem, the following + commands can be issued: + + Z> f @attr 1=title my + Z> format xml + Z> elements zebra::data + Z> s 1+1 + Z> format sutrs + Z> s 1+1 + Z> format usmarc + Z> s 1+1 + + + + The special + zebra::data element set name is + defined for any record syntax, but will always fetch + the raw record data in exactly the original form. No record syntax + specific transformations will be applied to the raw record data. + + + Also, Zebra internal metadata about the record can be accessed: + + Z> f @attr 1=title my + Z> format xml + Z> elements zebra::meta::sysno + Z> s 1+1 + + displays in XML record syntax only internal + record system number, whereas + + Z> f @attr 1=title my + Z> format xml + Z> elements zebra::meta + Z> s 1+1 + + displays all available metadata on the record. These include sytem + number, database name, indexed filename, filter used for indexing, + score and static ranking information and finally bytesize of record. + + + Sometimes, it is very hard to figure out what exactly has been + indexed how and in which indexes. Using the indexing stylesheet of + the Alvis filter, one can at least see which portion of the record + went into which index, but a similar aid does not exist for all + other indexing filters. + + + The special + zebra::index element set names are provided to + access information on per record indexed fields. For example, the + queries + + Z> f @attr 1=title my + Z> format sutrs + Z> elements zebra::index + Z> s 1+1 + + will display all indexed tokens from all indexed fields of the + first record, and it will display in SUTRS + record syntax, whereas + + Z> f @attr 1=title my + Z> format xml + Z> elements zebra::index::title + Z> s 1+1 + Z> elements zebra::index::title:p + Z> s 1+1 + + displays in XML record syntax only the content + of the zebra string index title, or + even only the type p phrase indexed part of it. + + + + Trying to access numeric Bib-1 use + attributes or trying to access non-existent zebra intern string + access points will result in a Diagnostic 25: Specified element set + 'name not valid for specified database. + + +
+
+ Field Structure and Character Sets @@ -262,134 +262,6 @@ -
- Accessing Zebra internal record data using - the <literal>zebra::</literal> element sets - - Starting with Zebra version - 2.0.4-2 or newer, one has the possibility to - use the special - zebra::data, - zebra::meta and - zebra::index element set names. - - - - Usage of the zebra:: element sets accesses - record data directly from the internal storage, and will - therefore work exactly the same way, irrespectively of indexing - filter used. - - - These element set names are optimized for retrieval speed, and - will perform better than using for example - alvis filter XSLT based extraction of small - parts of the records. - - - - For example, to fetch the raw binary record data stored in the - zebra internal storage, or on the filesystem, the following - commands can be issued: - - Z> f @attr 1=title my - Z> format xml - Z> elements zebra::data - Z> s 1+1 - Z> format sutrs - Z> s 1+1 - Z> format usmarc - Z> s 1+1 - - - - - The special - zebra::data element set name is - defined for any record syntax, but will always fetch - the raw record data in exactly the original form. No record syntax - specific transformations will be applied to the raw record data. - - - - Also, Zebra internal metadata about the record can be accessed: - - Z> f @attr 1=title my - Z> format xml - Z> elements zebra::meta::sysno - Z> s 1+1 - - displays in XML record syntax only internal - record system number, whereas - - Z> f @attr 1=title my - Z> format xml - Z> elements zebra::meta - Z> s 1+1 - - displays all available metadata on the record. These include sytem - number, database name, indexed filename, filter used for indexing, - score and static ranking information and finally bytesize of record. - - - - The special - zebra::meta element set names are only - defined for - SUTRS and XML record - syntaxes. - - - - Sometimes, it is very hard to figure out what exactly has been - indexed how and in which indexes. Using the indexing stylesheet of - the Alvis filter, one can at least see which portion of the record - went into which index, but a similar aid does not exist for all - other indexing filters. - - - The special - zebra::index element set names are provided to - access information on per record indexed fields. For example, the - queries - - Z> f @attr 1=title my - Z> format sutrs - Z> elements zebra::index - Z> s 1+1 - - will display all indexed tokens from all indexed fields of the - first record, and it will display in SUTRS - record syntax, whereas - - Z> f @attr 1=title my - Z> format xml - Z> elements zebra::index::title - Z> s 1+1 - Z> elements zebra::index::title:p - Z> s 1+1 - - displays in XML record syntax only the content - of the zebra string index title, or - even only the type p phrase indexed part of it. - - - - The special zebra::index - element set names are only - defined for - SUTRS and XML record - syntaxes. - - Trying to access numeric Bib-1 use - attributes or trying to access non-existent zebra intern string - access points will result in a - - Diagnostic [25]: Specified element set name not valid for specified database - - - -