X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=doc%2Farchitecture.xml;h=5b3a27ebd2b5cc89cc08f7225dca9864c90487be;hp=1def20e55667f09607cba1183db604ebd752b898;hb=31b0ba1ecb737f9db4cf3340e93964c6679897fd;hpb=2c0ee3249ef46031064a0e8e7d63bd400317f5e9 diff --git a/doc/architecture.xml b/doc/architecture.xml index 1def20e..5b3a27e 100644 --- a/doc/architecture.xml +++ b/doc/architecture.xml @@ -1,41 +1,39 @@ - - Overview of Zebra Architecture - + Overview of &zebra; Architecture - +
Local Representation - + - As mentioned earlier, Zebra places few restrictions on the type of + As mentioned earlier, &zebra; places few restrictions on the type of data that you can index and manage. Generally, whatever the form of the data, it is parsed by an input filter specific to that format, and - turned into an internal structure that Zebra knows how to handle. This + turned into an internal structure that &zebra; knows how to handle. This process takes place whenever the record is accessed - for indexing and retrieval. The RecordType parameter in the zebra.cfg file, or - the -t option to the indexer tells Zebra how to + the -t option to the indexer tells &zebra; how to process input records. Two basic types of processing are available - raw text and structured data. Raw text is just that, and it is selected by providing the - argument text to Zebra. Structured records are + argument text to &zebra;. Structured records are all handled internally using the basic mechanisms described in the subsequent sections. - Zebra can read structured records in many different formats. + &zebra; can read structured records in many different formats. - +
- +
Main Components - The Zebra system is designed to support a wide range of data management + The &zebra; system is designed to support a wide range of data management applications. The system can be configured to handle virtually any kind of structured data. Each record in the system is associated with a record schema which lends context to the data @@ -45,173 +43,342 @@ one database, the system poses no such restrictions. - The Zebra indexer and information retrieval server consists of the - following main applications: the zebraidx - indexing maintenance utility, and the zebrasrv - information query and retireval server. Both are using some of the + The &zebra; indexer and information retrieval server consists of the + following main applications: the zebraidx + indexing maintenance utility, and the zebrasrv + information query and retrieval server. Both are using some of the same main components, which are presented here. - This virtual package installs all the necessary packages to start - working with Zebra - including utility programs, development libraries, - documentation and modules. - idzebra1.4 + The virtual Debian package idzebra-2.0 + installs all the necessary packages to start + working with &zebra; - including utility programs, development libraries, + documentation and modules. - - Core Zebra Module Containing Common Functionality +
+ Core &zebra; Libraries Containing Common Functionality - - loads external filter modules used for presenting - the recods in a search response. - - executes search requests in PQF/RPN, which are handed over from - the YAZ server frontend API - - calls resorting/reranking algorithms on the hit sets - - returns - possibly ranked - result sets, hit - numbers, and the like internal data to the YAZ server backend API. - + The core &zebra; module is the meat of the zebraidx + indexing maintenance utility, and the zebrasrv + information query and retrieval server binaries. Shortly, the core + libraries are responsible for + + + Dynamic Loading + + of external filter modules, in case the application is + not compiled statically. These filter modules define indexing, + search and retrieval capabilities of the various input formats. + + + + + Index Maintenance + + &zebra; maintains Term Dictionaries and ISAM index + entries in inverted index structures kept on disk. These are + optimized for fast inset, update and delete, as well as good + search performance. + + + + + Search Evaluation + + by execution of search requests expressed in &acro.pqf;/&acro.rpn; + data structures, which are handed over from + the &yaz; server frontend &acro.api;. Search evaluation includes + construction of hit lists according to boolean combinations + of simpler searches. Fast performance is achieved by careful + use of index structures, and by evaluation specific index hit + lists in correct order. + + + + + Ranking and Sorting + + + components call resorting/re-ranking algorithms on the hit + sets. These might also be pre-sorted not only using the + assigned document ID's, but also using assigned static rank + information. + + + + + Record Presentation + + returns - possibly ranked - result sets, hit + numbers, and the like internal data to the &yaz; server backend &acro.api; + for shipping to the client. Each individual filter module + implements it's own specific presentation formats. + + + + + - This package contains all run-time libraries for Zebra. - libidzebra1.4 - This package includes documentation for Zebra in PDF and HTML. - idzebra1.4-doc - This package includes common essential Zebra configuration files - idzebra1.4-common + The Debian package libidzebra-2.0 + contains all run-time libraries for &zebra;, the + documentation in PDF and HTML is found in + idzebra-2.0-doc, and + idzebra-2.0-common + includes common essential &zebra; configuration files. - +
- - Zebra Indexer +
+ &zebra; Indexer - the core Zebra indexer which - - loads external filter modules used for indexing data records of - different type. - - creates, updates and drops databases and indexes + The zebraidx + indexing maintenance utility + loads external filter modules used for indexing data records of + different type, and creates, updates and drops databases and + indexes according to the rules defined in the filter modules. - This package contains Zebra utilities such as the zebraidx indexer - utility and the zebrasrv server. - idzebra1.4-utils + The Debian package idzebra-2.0-utils contains + the zebraidx utility. - +
- - Zebra Searcher/Retriever +
+ &zebra; Searcher/Retriever - the core Zebra searcher/retriever which + This is the executable which runs the &acro.z3950;/&acro.sru;/&acro.srw; server and + glues together the core libraries and the filter modules to one + great Information Retrieval server application. - This package contains Zebra utilities such as the zebraidx indexer - utility and the zebrasrv server, and their associated man pages. - idzebra1.4-utils + The Debian package idzebra-2.0-utils contains + the zebrasrv utility. - +
- - YAZ Server Frontend +
+ &yaz; Server Frontend - The YAZ server frontend is - a full fledged stateful Z39.50 server taking client + The &yaz; server frontend is + a full fledged stateful &acro.z3950; server taking client connections, and forwarding search and scan requests to the - Zebra core indexer. + &zebra; core indexer. - In addition to Z39.50 requests, the YAZ server frontend acts - as HTTP server, honouring - SRW SOAP requests, and SRU REST requests. Moreover, it can - translate inco ming CQL queries to PQF/RPN queries, if + In addition to &acro.z3950; requests, the &yaz; server frontend acts + as HTTP server, honoring + &acro.sru; &acro.soap; + requests, and + &acro.sru; &acro.rest; + requests. Moreover, it can + translate incoming + &acro.cql; + queries to + &acro.pqf; + queries, if correctly configured. - YAZ is a toolkit that allows you to develop software using the - ANSI Z39.50/ISO23950 standard for information retrieval. - SRW/ SRU - libyazthread.so - libyaz.so - libyaz + &yaz; + is an Open Source + toolkit that allows you to develop software using the + &acro.ansi; &acro.z3950;/ISO23950 standard for information retrieval. + It is packaged in the Debian packages + yaz and libyaz. - +
- +
Record Models and Filter Modules - all filter modules which do indexing and record display filtering: -This virtual package contains all base IDZebra filter modules. EMPTY ??? - libidzebra1.4-modules + The hard work of knowing what to index, + how to do it, and which + part of the records to send in a search/retrieve response is + implemented in + various filter modules. It is their responsibility to define the + exact indexing and record display filtering rules. + + + The virtual Debian package + libidzebra-2.0-modules installs all base filter + modules. - - TEXT Record Model and Filter Module +
+ &acro.dom; &acro.xml; Record Model and Filter Module + + The &acro.dom; &acro.xml; filter uses a standard &acro.dom; &acro.xml; structure as + internal data model, and can thus parse, index, and display + any &acro.xml; document. + - Plain ASCII text filter - + A parser for binary &acro.marc; records based on the ISO2709 library + standard is provided, it transforms these to the internal + &acro.marcxml; &acro.dom; representation. - - - - GRS Record Model and Filter Modules - - - - grs.danbib GRS filters of various kind (*.abs files) -IDZebra filter grs.danbib (DBC DanBib records) - This package includes grs.danbib filter which parses DanBib records. - DanBib is the Danish Union Catalogue hosted by DBC - (Danish Bibliographic Centre). - libidzebra1.4-mod-grs-danbib - - - - grs.marc - - grs.marcxml - This package includes the grs.marc and grs.marcxml filters that allows - IDZebra to read MARC records based on ISO2709. - - libidzebra1.4-mod-grs-marc - - - grs.regx - - grs.tcl GRS TCL scriptable filter - This package includes the grs.regx and grs.tcl filters. - libidzebra1.4-mod-grs-regx - - - - grs.sgml - libidzebra1.4-mod-grs-sgml not packaged yet ?? - - - grs.xml - This package includes the grs.xml filter which uses Expat to - parse records in XML and turn them into IDZebra's internal grs node. - libidzebra1.4-mod-grs-xml + The internal &acro.dom; &acro.xml; representation can be fed into four + different pipelines, consisting of arbitrarily many successive + &acro.xslt; transformations; these are for + + input parsing and initial + transformations, + indexing term extraction + transformations + transformations before internal document + storage, and + retrieve transformations from storage to output + format + + + + The &acro.dom; &acro.xml; filter pipelines use &acro.xslt; (and if supported on + your platform, even &acro.exslt;), it brings thus full &acro.xpath; + support to the indexing, storage and display rules of not only + &acro.xml; documents, but also binary &acro.marc; records. + + + Finally, the &acro.dom; &acro.xml; filter allows for static ranking at index + time, and to to sort hit lists according to predefined + static ranks. - + + Details on the experimental &acro.dom; &acro.xml; filter are found in + . + + + The Debian package libidzebra-2.0-mod-dom + contains the &acro.dom; filter module. + +
+ +
+ ALVIS &acro.xml; Record Model and Filter Module + + + The functionality of this record model has been improved and + replaced by the &acro.dom; &acro.xml; record model. See + . + + - - ALVIS Record Model and Filter Module - - - alvis Experimental Alvis XSLT filter - mod-alvis.so - libidzebra1.4-mod-alvis + The Alvis filter for &acro.xml; files is an &acro.xslt; based input + filter. + It indexes element and attribute content of any thinkable &acro.xml; format + using full &acro.xpath; support, a feature which the standard &zebra; + &acro.grs1; &acro.sgml; and &acro.xml; filters lacked. The indexed documents are + parsed into a standard &acro.xml; &acro.dom; tree, which restricts record size + according to availability of memory. + + + The Alvis filter + uses &acro.xslt; display stylesheets, which let + the &zebra; DB administrator associate multiple, different views on + the same &acro.xml; document type. These views are chosen on-the-fly in + search time. + + + In addition, the Alvis filter configuration is not bound to the + arcane &acro.bib1; &acro.z3950; library catalogue indexing traditions and + folklore, and is therefore easier to understand. + + + Finally, the Alvis filter allows for static ranking at index + time, and to to sort hit lists according to predefined + static ranks. This imposes no overhead at all, both + search and indexing perform still + O(1) irrespectively of document + collection size. This feature resembles Google's pre-ranking using + their PageRank algorithm. + + + Details on the experimental Alvis &acro.xslt; filter are found in + . + + + The Debian package libidzebra-2.0-mod-alvis + contains the Alvis filter module. - +
+ +
+ &acro.grs1; Record Model and Filter Modules + + + The functionality of this record model has been improved and + replaced by the &acro.dom; &acro.xml; record model. See + . + + + + The &acro.grs1; filter modules described in + + are all based on the &acro.z3950; specifications, and it is absolutely + mandatory to have the reference pages on &acro.bib1; attribute sets on + you hand when configuring &acro.grs1; filters. The GRS filters come in + different flavors, and a short introduction is needed here. + &acro.grs1; filters of various kind have also been called ABS filters due + to the *.abs configuration file suffix. + + + The grs.marc and + grs.marcxml filters are suited to parse and + index binary and &acro.xml; versions of traditional library &acro.marc; records + based on the ISO2709 standard. The Debian package for both + filters is + libidzebra-2.0-mod-grs-marc. + + + &acro.grs1; TCL scriptable filters for extensive user configuration come + in two flavors: a regular expression filter + grs.regx using TCL regular expressions, and + a general scriptable TCL filter called + grs.tcl + are both included in the + libidzebra-2.0-mod-grs-regx Debian package. + + + A general purpose &acro.sgml; filter is called + grs.sgml. This filter is not yet packaged, + but planned to be in the + libidzebra-2.0-mod-grs-sgml Debian package. + + + The Debian package + libidzebra-2.0-mod-grs-xml includes the + grs.xml filter which uses Expat to + parse records in &acro.xml; and turn them into ID&zebra;'s internal &acro.grs1; node + trees. Have also a look at the Alvis &acro.xml;/&acro.xslt; filter described in + the next session. + +
+ +
+ TEXT Record Model and Filter Module + + Plain ASCII text filter. TODO: add information here. + +
- + + SAFARI filter module TODO: add information here. - +
+ --> -
+
-
+ - +
Indexing and Retrieval Workflow @@ -226,8 +393,8 @@ IDZebra filter grs.danbib (DBC DanBib records) When records are accessed by the system, they are represented - in their local, or native format. This might be SGML or HTML files, - News or Mail archives, MARC records. If the system doesn't already + in their local, or native format. This might be &acro.sgml; or HTML files, + News or Mail archives, &acro.marc; records. If the system doesn't already know how to read the type of data you need to store, you can set up an input filter by preparing conversion rules based on regular expressions and possibly augmented by a flexible scripting language @@ -254,15 +421,195 @@ IDZebra filter grs.danbib (DBC DanBib records) Before transmitting records to the client, they are first converted from the internal structure to a form suitable for exchange - over the network - according to the Z39.50 standard. + over the network - according to the &acro.z3950; standard. - +
+
+ 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 retrieval faster than regular + retrieval operations (for &acro.marc;, &acro.xml; etc). + + + Special Retrieval Elements + + + + Element Set + Description + Syntax + + + + + zebra::meta::sysno + Get &zebra; record system ID + &acro.xml; and &acro.sutrs; + + + zebra::data + Get raw record + all + + + zebra::meta + Get &zebra; record internal metadata + &acro.xml; and &acro.sutrs; + + + zebra::index + Get all indexed keys for record + &acro.xml; and &acro.sutrs; + + + + zebra::index::f + + + Get indexed keys for field f for record + + &acro.xml; and &acro.sutrs; + + + + zebra::index::f:t + + + Get indexed keys for field f + and type t for record + + &acro.xml; and &acro.sutrs; + + + + zebra::snippet + + + Get snippet for record for one or more indexes (f1,f2,..). + This includes a phrase from the original + record at the point where a match occurs (for a query). By default + give terms before - and after are included in the snippet. The + matching terms are enclosed within element + <s>. The snippet facility requires + Zebra 2.0.16 or later. + + &acro.xml; and &acro.sutrs; + + + + zebra::facet::f1:t1,f2:t2,.. + + + Get facet of a result set. The facet result is returned + as if it was a normal record, while in reality is a + recap of most "important" terms in a result set for the fields + given. + The facet facility first appeared in Zebra 2.0.20. + + &acro.xml; + + + +
+ + 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 &acro.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 system + 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 &acro.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 &acro.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 &acro.bib1; 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. + + +