-
-http://www.loc.gov/z3950/agency/document.html
-
- PQF and BIB-1 stuff to be explained
- <ulink url="http://www.loc.gov/z3950/agency/defns/bib1.html">
- http://www.loc.gov/z3950/agency/defns/bib1.html</ulink>
-
- <ulink url="http://www.loc.gov/z3950/agency/bib1.html">
- http://www.loc.gov/z3950/agency/bib1.html</ulink>
-
- http://www.loc.gov/z3950/agency/markup/13.html
-
- </para>
- </sect1>
-
-
-These attribute types are recognized regardless of attribute set. Some are recognized for search, others for scan.
-
-Search
-
-Type Name Version
-7 Embedded Sort 1.1
-8 Term Set 1.1
-9 Rank weight 1.1
-9 Approx Limit 1.4
-10 Term Ref 1.4
-
-Embedded Sort
-
-The embedded sort is a way to specify sort within a query - thus removing the need to send a Sort Request separately. It is both faster and does not require clients that deal with the Sort Facility.
-
-The value after attribute type 7 is 1=ascending, 2=descending.. The attributes+term (APT) node is separate from the rest and must be @or'ed. The term associated with APT is the level .. 0=primary sort, 1=secondary sort etc.. Example:
-
-Search for water, sort by title (ascending):
-
- @or @attr 1=1016 water @attr 7=1 @attr 1=4 0
-
-Search for water, sort by title ascending, then date descending:
-
- @or @or @attr 1=1016 water @attr 7=1 @attr 1=4 0 @attr 7=2 @attr 1=30 1
-
-Term Set
-
-The Term Set feature is a facility that allows a search to store hitting terms in a "pseudo" resultset; thus a search (as usual) + a scan-like facility. Requires a client that can do named result sets since the search generates two result sets. The value for attribute 8 is the name of a result set (string). The terms in term set are returned as SUTRS records.
-
-Seach for u in title, right truncated.. Store result in result set named uset.
-
- @attr 5=1 @attr 1=4 @attr 8=uset u
-
-The model as one serious flaw.. We don't know the size of term set.
-
-Rank weight
-
-Rank weight is a way to pass a value to a ranking algorithm - so that one APT has one value - while another as a different one.
-
-Search for utah in title with weight 30 as well as any with weight 20.
-
- @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 utah
-
-Approx Limit
-
-Newer Zebra versions normally estemiates hit count for every APT (leaf) in the query tree. These hit counts are returned as part of the searchResult-1 facility.
-
-By setting a limit for the APT we can make Zebra turn into approximate hit count when a certain hit count limit is reached. A value of zero means exact hit count.
-
-We are intersted in exact hit count for a, but for b we allow estimates for 1000 and higher..
-
- @and a @attr 9=1000 b
-
-This facility clashes with rank weight! Fortunately this is a Zebra 1.4 thing so we can change this without upsetting anybody!
-
-Term Ref
-
-Zebra supports the searchResult-1 facility.
-
-If attribute 10 is given, that specifies a subqueryId value returned as part of the search result. It is a way for a client to name an APT part of a query.
-
-Scan
-
-Type Name Version
-8 Result set narrow 1.3
-9 Approx Limit 1.4
-
-Result set narrow
-
-If attribute 8 is given for scan, the value is the name of a result set. Each hit count in scan is @and'ed with the result set given.
-
-Approx limit
-
-The approx (as for search) is a way to enable approx hit counts for scan hit counts. However, it does NOT appear to work at the moment.
-
-
- AdamDickmeiss - 19 Dec 2005
-
-
--->
-
-
- </chapter>
-
- <!-- Keep this Emacs mode comment at the end of the file
-Local variables:
-mode: nxml
-End:
--->
-
+ Starting with <literal>&zebra;</literal> version 2.0.5 or newer, it is
+ possible to use a special element set which has the prefix
+ <literal>zebra::</literal>.
+ </para>
+ <para>
+ 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).
+ </para>
+ <table id="special-retrieval-types">
+ <title>Special Retrieval Elements</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Element Set</entry>
+ <entry>Description</entry>
+ <entry>Syntax</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>zebra::meta::sysno</literal></entry>
+ <entry>Get &zebra; record system ID</entry>
+ <entry>&acro.xml; and &acro.sutrs;</entry>
+ </row>
+ <row>
+ <entry><literal>zebra::data</literal></entry>
+ <entry>Get raw record</entry>
+ <entry>all</entry>
+ </row>
+ <row>
+ <entry><literal>zebra::meta</literal></entry>
+ <entry>Get &zebra; record internal metadata</entry>
+ <entry>&acro.xml; and &acro.sutrs;</entry>
+ </row>
+ <row>
+ <entry><literal>zebra::index</literal></entry>
+ <entry>Get all indexed keys for record</entry>
+ <entry>&acro.xml; and &acro.sutrs;</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>zebra::index::</literal><replaceable>f</replaceable>
+ </entry>
+ <entry>
+ Get indexed keys for field <replaceable>f</replaceable> for record
+ </entry>
+ <entry>&acro.xml; and &acro.sutrs;</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>zebra::index::</literal><replaceable>f</replaceable>:<replaceable>t</replaceable>
+ </entry>
+ <entry>
+ Get indexed keys for field <replaceable>f</replaceable>
+ and type <replaceable>t</replaceable> for record
+ </entry>
+ <entry>&acro.xml; and &acro.sutrs;</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>zebra::snippet</literal>
+ </entry>
+ <entry>
+ 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
+ <literal><s></literal>. The snippet facility requires
+ Zebra 2.0.16 or later.
+ </entry>
+ <entry>&acro.xml; and &acro.sutrs;</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>zebra::facet::</literal><replaceable>f1</replaceable>:<replaceable>t1</replaceable>,<replaceable>f2</replaceable>:<replaceable>t2</replaceable>,..
+ </entry>
+ <entry>
+ 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.
+ </entry>
+ <entry>&acro.xml;</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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:
+ <screen>
+ 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
+ </screen>
+ </para>
+ <para>
+ The special
+ <literal>zebra::data</literal> 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.
+ </para>
+ <para>
+ Also, &zebra; internal metadata about the record can be accessed:
+ <screen>
+ Z> f @attr 1=title my
+ Z> format xml
+ Z> elements zebra::meta::sysno
+ Z> s 1+1
+ </screen>
+ displays in <literal>&acro.xml;</literal> record syntax only internal
+ record system number, whereas
+ <screen>
+ Z> f @attr 1=title my
+ Z> format xml
+ Z> elements zebra::meta
+ Z> s 1+1
+ </screen>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <para>
+ The special
+ <literal>zebra::index</literal> element set names are provided to
+ access information on per record indexed fields. For example, the
+ queries
+ <screen>
+ Z> f @attr 1=title my
+ Z> format sutrs
+ Z> elements zebra::index
+ Z> s 1+1
+ </screen>
+ will display all indexed tokens from all indexed fields of the
+ first record, and it will display in <literal>&acro.sutrs;</literal>
+ record syntax, whereas
+ <screen>
+ 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
+ </screen>
+ displays in <literal>&acro.xml;</literal> record syntax only the content
+ of the zebra string index <literal>title</literal>, or
+ even only the type <literal>p</literal> phrase indexed part of it.
+ </para>
+ <note>
+ <para>
+ Trying to access numeric <literal>&acro.bib1;</literal> 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.
+ </para>
+ </note>
+ </section>
+
+ </chapter>
+
+ <!-- Keep this comment at the end of the file
+ Local variables:
+ mode: sgml
+ sgml-omittag:t
+ sgml-shorttag:t
+ sgml-minimize-attributes:nil
+ sgml-always-quote-attributes:t
+ sgml-indent-step:1
+ sgml-indent-data:t
+ sgml-parent-document: "idzebra.xml"
+ sgml-local-catalogs: nil
+ sgml-namecase-general:t
+ End:
+ -->