Doc: more on pz:extendrecs and spell fix
[pazpar2-moved-to-github.git] / doc / pazpar2_conf.xml
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
4 [
5      <!ENTITY % local SYSTEM "local.ent">
6      %local;
7      <!ENTITY % entities SYSTEM "entities.ent">
8      %entities;
9      <!ENTITY % idcommon SYSTEM "common/common.ent">
10      %idcommon;
11 ]>
12 <refentry id="pazpar2_conf">
13  <refentryinfo>
14   <productname>Pazpar2</productname>
15   <productnumber>&version;</productnumber>
16   <info><orgname>Index Data</orgname></info>
17  </refentryinfo>
18  
19  <refmeta>
20   <refentrytitle>Pazpar2 conf</refentrytitle>
21   <manvolnum>5</manvolnum>
22   <refmiscinfo class="manual">File formats and conventions</refmiscinfo>
23  </refmeta>
24  
25  <refnamediv>
26   <refname>pazpar2_conf</refname>
27   <refpurpose>Pazpar2 Configuration</refpurpose>
28  </refnamediv>
29  
30  <refsynopsisdiv>
31   <cmdsynopsis>
32    <command>pazpar2.conf</command>
33   </cmdsynopsis>
34  </refsynopsisdiv>
35  
36  <refsect1>
37   <title>DESCRIPTION</title>
38   <para>
39    The Pazpar2 configuration file, together with any referenced XSLT files,
40    govern Pazpar2's behavior as a client, and control the normalization and
41    extraction of data elements from incoming result records, for the
42    purposes of merging, sorting, facet analysis, and display.
43   </para>
44   
45   <para>
46    The file is specified using the option -f on the Pazpar2 command line.
47    There is not presently a way to reload the configuration file without
48    restarting Pazpar2, although this will most likely be added some time
49    in the future.
50   </para>
51  </refsect1>
52  
53  <refsect1>
54   <title>FORMAT</title>
55   <para>
56    The configuration file is XML-structured. It must be well-formed XML. All
57    elements specific to Pazpar2 should belong to the namespace
58    <literal>http://www.indexdata.com/pazpar2/1.0</literal> 
59    (this is assumed in the
60    following examples). The root element is named "<literal>pazpar2</literal>".
61    Under the  root element are a number of elements which group categories of
62    information. The categories are described below.
63   </para>
64   
65   <refsect2 id="config-threads">
66    <title>threads</title>
67    <para>
68     This section is optional and is supported for Pazpar2 version 1.3.1 and
69     later . It is identified by element "<literal>threads</literal>" which
70     may include one attribute "<literal>number</literal>" which specifies
71     the number of worker-threads that the Pazpar2 instance is to use.
72     A value of 0 (zero) disables worker-threads (all work is carried out
73     in main thread).
74    </para>
75   </refsect2>
76   <refsect2 id="config-server">
77    <title>server</title>
78    <para>
79     This section governs overall behavior of a server endpoint. It is identified
80     by the element "server" which takes an optional attribute, "id", which
81     identifies this particular Pazpar2 server. Any string value for "id"
82     may be given.
83    </para>
84    <para>
85     The data
86     elements are described below. From Pazpar2 version 1.2 this is
87     a repeatable element.
88    </para>
89    <variablelist> <!-- level 1 -->
90     <varlistentry>
91      <term>listen</term>
92      <listitem>
93       <para>
94        Configures the webservice -- this controls how you can connect
95        to Pazpar2 from your browser or server-side code. The
96        attributes 'host' and 'port' control the binding of the
97        server. The 'host' attribute can be used to bind the server to
98        a secondary IP address of your system, enabling you to run
99        Pazpar2 on port 80 alongside a conventional web server. You
100        can override this setting on the command line using the option -h.
101       </para>
102      </listitem>
103     </varlistentry>
104     
105     <varlistentry>
106      <term>proxy</term>
107      <listitem>
108       <para>
109        If this item is given, Pazpar2 will forward all incoming HTTP
110        requests that do not contain the filename 'search.pz2' to the
111        host and port specified using the 'host' and 'port'
112        attributes. The 'myurl' attribute is required, and should provide
113        the base URL of the server. Generally, the HTTP URL for the host
114        specified in the 'listen' parameter. This functionality is
115        crucial if you wish to use
116        Pazpar2 in conjunction with browser-based code (JS, Flash,
117        applets, etc.) which operates in a security sandbox. Such code
118        can only connect to the same server from which the enclosing
119        HTML page originated. Pazpar2s proxy functionality enables you
120        to host all of the main pages (plus images, CSS, etc) of your
121        application on a conventional webserver, while efficiently
122        processing webservice requests for metasearch status, results,
123        etc.
124       </para>
125      </listitem>
126     </varlistentry>
127
128     <varlistentry>
129      <term>icu_chain</term>
130      <listitem>
131       <para>
132        Specifies character set normalization for relevancy / sorting /
133        mergekey and facets - for the server. These definitions serves as
134        default for services that don't have these given. For the meaning
135        of these settings refer to the
136        <xref linkend="icuchain"/> element inside service.
137       </para>
138      </listitem>
139     </varlistentry>
140     
141     <varlistentry>
142      <term>relevance / sort / mergekey / facet</term>
143      <listitem>
144       <para>
145        Obsolete. Use element icu_chain instead.
146       </para>
147      </listitem>
148     </varlistentry>
149     
150     <varlistentry>
151      <term>settings</term>
152      <listitem>
153       <para>
154        Specifies target settings for the server.. These settings serves
155        as default for all services which don't have these given.
156        The settings element requires one attribute 'src' which specifies
157        a settings file or a directory . If a directory is given all
158        files with suffix <filename>.xml</filename> is read from this
159        directory. Refer to 
160        <xref linkend="target_settings"/> for more information.
161       </para>
162      </listitem>
163     </varlistentry>
164     
165     <varlistentry>
166      <term>service</term>
167      <listitem>
168       <para>
169        This nested element controls the behavior of Pazpar2 with
170        respect to your data model. In Pazpar2, incoming records are
171        normalized, using XSLT, into an internal representation.
172        The 'service' section controls the further processing and
173        extraction of data from the internal representation, primarily
174        through the 'metadata' sub-element.
175       </para>
176       <para>
177        Pazpar2 version 1.2 and later allows multiple service elements.
178        Multiple services must be given a unique ID by specifying
179        attribute <literal>id</literal>.
180        A single service may be unnamed (service ID omitted). The
181        service ID is referred to in the
182        <link linkend="command-init"><literal>init</literal></link> webservice
183        command's <literal>service</literal> parameter.
184       </para>
185
186       <variablelist> <!-- Level 2 -->
187        <varlistentry>
188         <term>metadata</term>
189         <listitem>
190          <para>
191           One of these elements is required for every data element in
192           the internal representation of the record (see
193           <xref linkend="data_model"/>. It governs
194           subsequent processing as pertains to sorting, relevance
195           ranking, merging, and display of data elements. It supports
196           the following attributes:
197          </para>
198          
199          <variablelist> <!-- level 3 -->
200           <varlistentry>
201            <term>name</term>
202            <listitem>
203             <para>
204              This is the name of the data element. It is matched
205              against the 'type' attribute of the
206              'metadata' element 
207              in the normalized record. A warning is produced if
208              metadata elements with an unknown name are
209              found in the 
210              normalized record. This name is also used to
211              represent 
212              data elements in the records returned by the
213              webservice API, and to name sort lists and browse
214              facets.
215             </para>
216            </listitem>
217           </varlistentry>
218           
219           <varlistentry>
220            <term>type</term>
221            <listitem>
222             <para>
223              The type of data element. This value governs any
224              normalization or special processing that might take
225              place on an element. Possible values are 'generic'
226              (basic string), 'year' (a range is computed if
227              multiple years are found in the record). Note: This
228              list is likely to increase in the future.
229             </para>
230            </listitem>
231           </varlistentry>
232           
233           <varlistentry>
234            <term>brief</term>
235            <listitem>
236             <para>
237              If this is set to 'yes', then the data element is
238              includes in brief records in the webservice API. Note
239              that this only makes sense for metadata elements that
240              are merged (see below). The default value is 'no'.
241             </para>
242            </listitem>
243           </varlistentry>
244           
245           <varlistentry>
246            <term>sortkey</term>
247            <listitem>
248             <para>
249              Specifies that this data element is to be used for
250              sorting. The possible values are 'numeric' (numeric
251              value), 'skiparticle' (string; skip common, leading
252              articles), and 'no' (no sorting). The default value is
253              'no'.
254             </para>
255            </listitem>
256           </varlistentry>
257           
258           <varlistentry>
259            <term>rank</term>
260            <listitem>
261             <para>
262              Specifies that this element is to be used to
263              help rank 
264              records against the user's query (when ranking is
265              requested). 
266              The valus is of the form 
267              <literallayout>
268               M [F N]
269              </literallayout>
270              where M is an integer, used as a
271              weight against the basic TF*IDF score. A value of
272              1 is the base, higher values give additional weight to
273              elements of this type. The default is '0', which
274              excludes this element from the rank calculation.
275             </para>
276             <para>
277              F is a CCL field and N is the multipler for terms
278              that matches those part of the CCL field in search.
279              The F+N combo allows the system to use a different
280              multipler for a certain field. For example, a rank value of
281              "<literal>1 au 3</literal>" gives a multipler of 3 for
282              all terms part of the au(thor) terms and 1 for everything else.
283             </para>
284             <para>
285              For Pazpar2 1.6.13 and later, the rank may also defined
286              "per-document", by the normalization stylesheet. 
287             </para>
288             <para>
289              The per field rank was introduced in Pazpar2 1.6.15. Earlier
290              releases only allowed a rank value M (simple integer).
291             </para>
292             See <xref linkend="relevance_ranking"/> for more
293             about ranking.
294            </listitem>
295           </varlistentry>
296           
297           <varlistentry>
298            <term>termlist</term>
299            <listitem>
300             <para>
301              Specifies that this element is to be used as a
302              termlist, or browse facet. Values are tabulated from
303              incoming records, and a highscore of values (with
304              their associated frequency) is made available to the
305              client through the webservice API. 
306              The possible values
307              are 'yes' and 'no' (default).
308             </para>
309            </listitem>
310           </varlistentry>
311           
312           <varlistentry>
313            <term>merge</term>
314            <listitem>
315             <para>
316              This governs whether, and how elements are extracted
317              from individual records and merged into cluster
318              records. The possible values are: 'unique' (include
319              all unique elements), 'longest' (include only the
320              longest element (strlen), 'range' (calculate a range
321              of values across all matching records), 'all' (include
322              all elements), or 'no' (don't merge; this is the
323              default);
324             </para>
325             <para>
326              Pazpar 1.6.24 also offers a new value for merge, 'first', which
327              is like 'all' but only takes all from first database that returns
328              the particular metadata field.
329             </para>
330            </listitem>
331           </varlistentry>
332           
333           <varlistentry>
334            <term>mergekey</term>
335            <listitem>
336             <para>
337              If set to '<literal>required</literal>', the value of this
338              metadata element is appended to the resulting mergekey if
339              the metadata is present in a record instance.
340              If the metadata element is not present, the a unique mergekey
341              will be generated instead.
342             </para>
343             <para>
344              If set to '<literal>optional</literal>', the value of this
345              metadata element is appended to the resulting mergekey if the
346              the metadata is present in a record instance. If the metadata
347              is not present, it will be empty.
348             </para>
349             <para>
350              If set to '<literal>no</literal>' or the mergekey attribute is
351              omitted, the metadata will not be used in the creation of a
352              mergekey.
353             </para>
354            </listitem>
355           </varlistentry>
356
357           <varlistentry>
358            <term id="facetrule">facetrule</term>
359            <listitem>
360             <para>
361              Specifies the ICU rule set to be used for normalizing
362              facets. If facetrule is omitted from metadata, the
363              rule set 'facet' is used.
364             </para>
365            </listitem>
366           </varlistentry>
367           
368           <varlistentry>
369            <term id="limitcluster">limitcluster</term>
370            <listitem>
371             <para>
372              Allow a limit on merged metadata. The value of this attribute
373              is the name of actual metadata content to be used for matching
374              (most often same name as metadata name).
375             </para>
376             <note>
377              <para>
378               Requires Pazpar2 1.6.23 or later.
379              </para>
380             </note>
381            </listitem>
382           </varlistentry>
383           
384           <varlistentry>
385            <term id="metadata_limitmap">limitmap</term>
386            <listitem>
387             <para>
388              Specifies a default limitmap for this field. This is to avoid mass 
389              configuring of targets. However it is important to review/do this on a per
390              target since it is usually target-specific. See limitmap for format. 
391             </para>
392            </listitem>
393           </varlistentry>
394           
395           <varlistentry>
396            <term id="metadata_facetmap">facetmap</term>
397            <listitem>
398             <para>
399              Specifies a default facetmap for this field. This is to avoid mass 
400              configuring of targets. However it is important to review/do this on a per
401              target since it is usually target-specific. See facetmap for format. 
402             </para>
403            </listitem>
404           </varlistentry>
405           
406           <varlistentry>
407            <term>setting</term>
408            <listitem>
409             <para>
410              This attribute allows you to make use of static database
411              settings in the processing of records. Three possible values
412              are allowed. 'no' is the default and doesn't do anything.
413              'postproc' copies the value of a setting with the same name
414              into the output of the normalization stylesheet(s). 'parameter'
415              makes the value of a setting with the same name available 
416              as a parameter to the normalization stylesheet, so you
417              can further process the value inside of the stylesheet, or use
418              the value to decide how to deal with other data values.
419             </para>
420             <para>
421              The purpose of using settings in this way can either be to
422              control the behavior of normalization stylesheet in a database-
423              dependent way, or to easily make database-dependent values
424              available to display-logic in your user interface, without having
425              to implement complicated interactions between the user interface
426              and your configuration system.
427             </para>
428            </listitem>
429           </varlistentry>
430           
431          </variablelist> <!-- attributes to metadata -->
432          
433         </listitem>
434        </varlistentry>
435
436        <varlistentry>
437         <term id="servicexslt" xreflabel="xslt">xslt</term>
438         <listitem>
439          <para>
440           Defines a XSLT stylesheet. The <literal>xslt</literal>
441           element takes exactly one attribute <literal>id</literal>
442           which names the stylesheet. This can be referred to in target
443           settings <xref linkend="pzxslt"/>.
444          </para>
445          <para>
446           The content of the xslt element is the embedded stylesheet XML
447          </para>
448         </listitem>
449        </varlistentry>
450        <varlistentry>
451         <term id="icuchain" xreflabel="icu_chain">icu_chain</term>
452         <listitem>
453          <para>
454           Specifies a named ICU rule set. The icu_chain element must include
455           attribute 'id' which specifies the identifier (name) for the ICU
456           rule set.
457           Pazpar2 uses the particular rule sets for particular purposes.
458           Rule set 'relevance' is used to normalize
459           terms for relevance ranking. Rule set 'sort' is used to 
460           normalize terms for sorting. Rule set 'mergekey' is used to
461           normalize terms for making a mergekey and, finally. Rule set 'facet'
462           is normally used to normalize facet terms, unless
463           <xref linkend="facetrule">facetrule</xref> is given for a
464           metadata field.
465          </para>
466          <para>
467           The icu_chain element must also include a 'locale'
468           attribute which must be set to one of the locale strings
469           defined in ICU. The child elements listed below can be
470           in any order, except the 'index' element which logically
471           belongs to the end of the list. The stated tokenization,
472           transformation and charmapping instructions are performed
473           in order from top to bottom. 
474          </para>
475          <variablelist> <!-- Level 2 -->
476           <varlistentry>
477            <term>casemap</term>
478            <listitem>
479             <para>
480              The attribute 'rule' defines the direction of the
481              per-character casemapping, allowed values are "l"
482              (lower), "u" (upper), "t" (title).  
483             </para>
484            </listitem>
485           </varlistentry>
486           <varlistentry>
487            <term>transform</term>
488            <listitem>
489             <para>
490              Normalization and transformation of tokens follows
491              the rules defined in the 'rule' attribute. For
492              possible values we refer to the extensive ICU
493              documentation found at the 
494              <ulink url="&url.icu.transform;">ICU
495              transformation</ulink> home page. Set filtering
496              principles are explained at the 
497              <ulink url="&url.icu.unicode.set;">ICU set and
498              filtering</ulink> page.
499             </para>
500            </listitem>
501           </varlistentry>
502           <varlistentry>
503            <term>tokenize</term>
504            <listitem>
505             <para>
506              Tokenization is the only rule in the ICU chain
507              which splits one token into multiple tokens. The
508              'rule' attribute may have the following values:
509              "s" (sentence), "l" (line-break), "w" (word), and
510              "c" (character), the later probably not being
511              very useful in a pruning Pazpar2 installation. 
512             </para>
513            </listitem>
514           </varlistentry>
515          </variablelist>
516          <para>
517           From Pazpar2 version 1.1 the ICU wrapper from YAZ is used.
518           Refer to the <ulink url="&url.yaz.yaz-icu;">yaz-icu</ulink>
519           utility for more information.
520          </para>
521         </listitem>
522        </varlistentry>
523        
524        <varlistentry>
525         <term>relevance</term>
526         <listitem>
527          <para>
528           Specifies the ICU rule set used for relevance ranking.
529           The child element of 'relevance' must be 'icu_chain' and the
530           'id' attribute of the icu_chain is ignored. This
531           definition is obsolete and should be replaced by the equivalent
532           construct:
533           <screen>
534            &lt;icu_chain id="relevance" locale="en">..&lt;icu_chain>
535           </screen>
536          </para>
537         </listitem>
538        </varlistentry>
539        
540        <varlistentry>
541         <term>sort</term>
542         <listitem>
543          <para>
544           Specifies the ICU rule set used for sorting.
545           The child element of 'sort' must be 'icu_chain' and the
546           'id' attribute of the icu_chain is ignored. This
547           definition is obsolete and should be replaced by the equivalent
548           construct:
549           <screen>
550            &lt;icu_chain id="sort" locale="en">..&lt;icu_chain>
551           </screen>
552          </para>
553         </listitem>
554        </varlistentry>
555        
556        <varlistentry>
557         <term>mergekey</term>
558         <listitem>
559          <para>
560           Specifies ICU tokenization and transformation rules
561           for tokens that are used in Pazpar2's mergekey. 
562           The child element of 'mergekey' must be 'icu_chain' and the
563           'id' attribute of the icu_chain is ignored. This
564           definition is obsolete and should be replaced by the equivalent
565           construct:
566           <screen>
567            &lt;icu_chain id="mergekey" locale="en">..&lt;icu_chain>
568           </screen>
569          </para>
570         </listitem>
571        </varlistentry>
572
573        <varlistentry>
574         <term>facet</term>
575         <listitem>
576          <para>
577           Specifies ICU tokenization and transformation rules
578           for tokens that are used in Pazpar2's facets.
579           The child element of 'facet' must be 'icu_chain' and the
580           'id' attribute of the icu_chain is ignored. This
581           definition is obsolete and should be replaced by the equivalent
582           construct:
583           <screen>
584            &lt;icu_chain id="facet" locale="en">..&lt;icu_chain>
585           </screen>
586          </para>
587         </listitem>
588        </varlistentry>
589
590        <varlistentry>
591         <term>ccldirective</term>
592         <listitem>
593          <para>
594           Customizes the CCL parsing (interpretation of query parameter
595           in search).
596           The name and value of the CCL directive is gigen by attributes
597           'name' and 'value' respectively. Refer to possible list of names
598           in the
599           <ulink 
600               url="http://www.indexdata.com/yaz/doc/tools.html#ccl.directives.table">
601            YAZ manual
602            </ulink>.
603          </para>
604         </listitem>
605        </varlistentry>
606
607        <varlistentry>
608         <term>rank</term>
609         <listitem>
610          <para>
611           Customizes the ranking (relevance) algorithm. Also known as
612           rank tweaks. The rank element
613           accepts the following attributes - all being optional:
614          </para>
615          <variablelist>
616           <varlistentry>
617            <term>cluster</term>
618            <listitem>
619             <para>
620              Attribute 'cluster' is a boolean
621              that controls whether Pazpar2 should boost ranking for merged
622              records. Is 'yes' by default. A value of 'no' will make
623              Pazpar2 average ranking of each record in a cluster.
624             </para>
625            </listitem>
626           </varlistentry>
627           <varlistentry>
628            <term>debug</term>
629            <listitem>
630             <para>
631              Attribute 'debug' is a boolean
632              that controls whether Pazpar2 should include details
633              about ranking for each document in the show command's
634              response. Enable by using value "yes", disable by using
635              value "no" (default).
636             </para>
637            </listitem>
638           </varlistentry>
639           <varlistentry>
640            <term>follow</term>
641            <listitem>
642             <para>
643              Attribute 'follow' is a a floating point number greater than
644              or equal to 0. A positive number will boost weight for terms
645              that occur close to each other (proximity, distance).
646              A value of 1, will double the weight if two terms are in
647              proximity distance of 1 (next to each other). The default
648              value of 'follow' is 0 (order will not affect weight).
649             </para>
650            </listitem>
651           </varlistentry>
652           <varlistentry>
653            <term>lead</term>
654            <listitem>
655             <para>
656              Attribute 'lead' is a floating point number.
657              It controls if term weight should be reduced by position
658              from start in a metadata field. A positive value of 'lead'
659              will reduce weight as it apperas further away from the lead
660              of the field. Default value is 0 (no reduction of weight by
661              position).
662             </para>
663            </listitem>
664           </varlistentry>
665           <varlistentry>
666            <term>length</term>
667            <listitem>
668             <para>
669              Attribute 'length' determines how/if term weight should be
670              divided by lenght of metadata field. A value of "linear"
671              divide by length. A value of "log" will divide by log2(length).
672              A value of "none" will leave term weight as is (no division).
673              Default value is "linear".
674             </para>
675            </listitem>
676           </varlistentry>
677          </variablelist>
678          <para>
679           Refer to <xref linkend="relevance_ranking"/> to see how
680           these tweaks are used in computation of score.
681          </para>
682          <para>
683           Customization of ranking algorithm was introduced with
684           Pazpar2 1.6.18. The semantics of some of the fields changed
685           in versions up to 1.6.22.
686          </para>
687         </listitem>
688        </varlistentry>
689        
690        <varlistentry id="sort-default">
691         <term>sort-default</term>
692         <listitem>
693          <para>
694           Specifies the default sort criteria (default 'relevance'),
695           which previous was hard-coded as default criteria in search. 
696           This is a fix/work-around to avoid re-searching when using 
697           target-based sorting. In order for this to work efficient, 
698           the search must also have the sort critera parameter; otherwise 
699           pazpar2 will do re-searching on search criteria changes, if
700           changed between search and show command.
701          </para>
702          <para>
703           This configuration was added in pazpar2 1.6.20.
704          </para>
705         </listitem>
706        </varlistentry>
707
708 <!--       
709        <varlistentry>
710         <term>set</term>
711         <listitem>
712          <para>
713           Specifies a variable that will be inherited by all targets defined in settings
714           <screen>
715            &lt;set name="test" value="en"..&lt;set>
716           </screen>
717          </para>
718         </listitem>
719        </varlistentry>
720 -->   
721        <varlistentry>
722         <term>settings</term>
723         <listitem>
724          <para>
725           Specifies target settings for this service. Refer to
726           <xref linkend="target_settings"/>.
727          </para>
728         </listitem>
729        </varlistentry>
730
731        <varlistentry>
732         <term>timeout</term>
733         <listitem>
734          <para>
735           Specifies timeout parameters for this service.
736           The <literal>timeout</literal>
737           element supports the following attributes: 
738           <literal>session</literal>, <literal>z3950_operation</literal>,
739           <literal>z3950_session</literal> which specifies
740           'session timeout', 'Z39.50 operation timeout',
741           'Z39.50 session timeout' respectively. The Z39.50 operation
742           timeout is the time Pazpar2 will wait for an active Z39.50/SRU
743           operation before it gives up (times out). The Z39.50 session
744           time out is the time Pazpar2 will keep the session alive for
745           an idle session (no operation).
746          </para>
747          <para>
748           The following is recommended but not required:
749           z3950_operation (30) &lt; session (60) &lt; z3950_session (180) .
750           The default values are given in parantheses.
751          </para>
752         </listitem>
753        </varlistentry>
754       </variablelist>     <!-- Data elements in service directive -->
755      </listitem>
756     </varlistentry>
757    </variablelist>           <!-- Data elements in server directive -->
758   </refsect2>
759  </refsect1>
760
761  <refsect1>
762   <title>EXAMPLE</title>
763   <para>
764    Below is a working example configuration:
765   </para>
766   <screen>
767    <![CDATA[
768 <?xml version="1.0" encoding="UTF-8"?>
769 <pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
770
771  <threads number="10"/>
772  <server>
773   <listen port="9004"/>
774   <service>
775    <metadata name="title" brief="yes" sortkey="skiparticle"
776              merge="longest" rank="6"/>
777    <metadata name="isbn" merge="unique"/>
778    <metadata name="date" brief="yes" sortkey="numeric"
779              type="year" merge="range" termlist="yes"/>
780    <metadata name="author" brief="yes" termlist="yes"
781              merge="longest" rank="2"/>
782    <metadata name="subject" merge="unique" termlist="yes" rank="3" limitmap="local:"/>
783    <metadata name="url" merge="unique"/>
784    <icu_chain id="relevance" locale="el">
785     <transform rule="[:Control:] Any-Remove"/>
786     <tokenize rule="l"/>
787     <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
788     <casemap rule="l"/>
789    </icu_chain>
790    <settings src="mysettings"/>
791    <timeout session="60"/>
792   <service>
793  </server>
794 </pazpar2>
795    ]]>
796   </screen>
797  </refsect1> 
798
799  <refsect1 id="config-include">
800   <title>INCLUDE FACILITY</title>
801   <para>
802    The XML configuration may be partitioned into multiple files by using
803    the <literal>include</literal> element which takes a single attribute,
804    <literal>src</literal>. The <literal>src</literal> attribute is
805    regular Shell like glob-pattern. For example,
806    <screen><![CDATA[
807    <include src="/etc/pazpar2/conf.d/*.xml"/>
808    ]]></screen>
809   </para>
810   <para>
811    The include facility requires Pazpar2 version 1.2.
812   </para>
813  </refsect1>
814
815  <refsect1 id="target_settings">
816   <title>TARGET SETTINGS</title>
817   <para>
818    Pazpar2 features a cunning scheme by which you can associate various
819    kinds of attributes, or settings with search targets. This can be done
820    through XML files which are read at startup; each file can associate
821    one or more settings with one or more targets. The file format is generic
822    in nature, designed to support a wide range of application requirements. The
823    settings can be purely technical things, like, how to perform a title
824    search against a given target, or it can associate arbitrary name=value
825    pairs with groups of targets -- for instance, if you would like to
826    place all commercial full-text bases in one group for selection
827    purposes, or you would like to control what targets are accessible
828    to users by default. Per-database settings values can even be used
829    to drive sorting, facet/termlist generation, or end-user interface display
830    logic.
831   </para>
832   
833   <para>
834    During startup, Pazpar2 will recursively read a specified directory
835    (can be identified in the pazpar2.cfg file or on the command line), and
836    process any settings files found therein.
837   </para>
838   
839   <para>
840    Clients of the Pazpar2 webservice interface can selectively override
841    settings for individual targets within the scope of one session. This
842    can be used in conjunction with an external authentication system to
843    determine which resources are to be accessible to which users. Pazpar2
844    itself has no notion of end-users, and so can be used in conjunction
845    with any type of authentication system. Similarly, the authentication
846    tokens submitted to access-controlled search targets can similarly be
847    overridden, to allow use of Pazpar2 in a consortial or multi-library
848    environment, where different end-users may need to be represented to
849    some search targets in different ways. This, again, can be managed
850    using an external database or other lookup mechanism. Setting overrides
851    can be performed either using the
852    <link linkend="command-init">init</link> or the 
853    <link linkend="command-settings">settings</link> webservice
854    command.
855   </para>
856   
857   <para>
858    In fact, every setting that applies to a database (except pz:id, which
859    can only be used for filtering targets to use for a search) can be overridden
860    on a per-session basis. This allows the client to override specific CCL fields
861    for searching, etc., to meet the needs of a session or user.
862   </para>
863
864   <para>
865    Finally, as an extreme case of this, the webservice client can
866    introduce entirely new targets, on the fly, as part of the
867    <link linkend="command-init">init</link> or
868    <link linkend="command-settings">settings</link> command.
869    This is useful if you desire to manage information
870    about your search targets in a separate application such as a database.
871    You do not need any static settings file whatsoever to run Pazpar2 -- as
872    long as the webservice client is prepared to supply the necessary
873    information at the beginning of every session.
874   </para>
875
876   <note>
877    <para>
878     The following discussion of practical issues related to session
879     and settings management are cast in terms of a user interface based on
880     Ajax/Javascript technology. It would apply equally well to many other
881     kinds of browser-based logic.
882    </para>
883   </note>
884
885   <para>
886    Typically, a Javascript client is not allowed to directly alter the
887    parameters of a session. There are two reasons for this. One has to do
888    with access to information; typically, information about a user will
889    be stored in a system on the server side, or it will be accessible in
890    some way from the server.  However, since the Javascript client cannot
891    be entirely trusted (some hostile agent might in fact 'pretend' to be
892    a regular ws client), it is more robust to control session settings
893    from scripting that you run as part of your webserver. Typically, this
894    can be handled during the session initialization, as follows:
895   </para>
896
897   <para>
898    Step 1: The Javascript client loads, and asks the webserver for a
899    new Pazpar2 session ID. This can be done using a Javascript call, for
900    instance. Note that it is possible to submit Ajax HTTPXmlRequest calls
901    either to Pazpar2 or to the webserver that Pazpar2 is proxying
902    for. See (XXX Insert link to Pazpar2 protocol).
903   </para>
904
905   <para>
906    Step 2: Code on the webserver authenticates the user, by database lookup,
907    LDAP access, NCIP, etc. Determines which resources the user has access to,
908    and any user-specific parameters that are to be applied during this session.
909   </para>
910
911   <para>
912    Step 3: The webserver initializes a new Pazpar2 settings, and sets
913    user-specific parameters as necessary, using the init webservice
914    command. A new session ID is returned.
915   </para>
916
917   <para>
918    Step 4: The webserver returns this session ID to the Javascript
919    client, which then uses the session ID to submit searches, show
920    results, etc.
921   </para>
922
923   <para>
924    Step 5: When the Javascript client ceases to use the session,
925    Pazpar2 destroys any session-specific information.
926   </para>
927
928   <refsect2>
929    <title>SETTINGS FILE FORMAT</title>
930    <para>
931     Each file contains a root element named &lt;settings&gt;. It may
932     contain one or more &lt;set&gt; elements. The settings and set
933     elements may contain the following attributes. Attributes in the set
934     node overrides those in the setting root element. Each set node must
935     specify (directly, or inherited from the parent node) at least a
936     target, name, and value.
937    </para>
938
939    <variablelist> 
940     <varlistentry>
941      <term>target</term>
942      <listitem>
943       <para>
944        This specifies the search target to which this setting should be
945        applied. Targets are identified by their Z39.50 URL, generally
946        including the host, port, and database name, (e.g.
947        <literal>bagel.indexdata.com:210/marc</literal>).
948        Two wildcard forms are accepted:
949        * (asterisk) matches all known targets;
950        <literal>bagel.indexdata.com:210/*</literal> matches all
951        known databases on the given host.
952       </para>
953       <para>
954        A precedence system determines what happens if there are
955        overlapping values for the same setting name for the same
956        target. A setting for a specific target name overrides a
957        setting which specifies target using a wildcard. This makes it
958        easy to set defaults for all targets, and then override them
959        for specific targets or hosts. If there are
960        multiple overlapping settings with the same name and target
961        value, the 'precedence' attribute determines what happens.
962       </para>
963       <para>
964        For Pazpar2 1.6.4 or later, the target ID may be user-defined, in
965        which case, the actual host, port, etc is given by setting
966        <xref linkend="pzurl"/>.
967       </para>
968      </listitem>
969     </varlistentry>
970     <varlistentry>
971      <term>name</term>
972      <listitem>
973       <para>
974        The name of the setting. This can be anything you like.
975        However, Pazpar2 reserves a number of setting names for
976        specific purposes, all starting with 'pz:', and it is a good
977        idea to avoid that prefix if you make up your own setting
978        names. See below for a list of reserved variables.
979       </para>
980      </listitem>
981     </varlistentry>
982     <varlistentry>
983      <term>value</term>
984      <listitem>
985       <para>
986        The value of the setting. Generally, this can be anything you
987        want -- however, some of the reserved settings may expect
988        specific kinds of values.
989       </para>
990      </listitem>
991     </varlistentry>
992     <varlistentry>
993      <term>precedence</term>
994      <listitem>
995       <para>
996        This should be an integer. If not provided, the default value
997        is 0. If two (or more) settings have the same content for
998        target and name, the precedence value determines the outcome.
999        If both settings have the same precedence value, they are both
1000        applied to the target(s). If one has a higher value, then the
1001        value of that setting is applied, and the other one is ignored.
1002       </para>
1003      </listitem>
1004     </varlistentry>
1005    </variablelist>
1006
1007    <para>
1008     By setting defaults for target, name, or value in the root
1009     settings node, you can use the settings files in many different
1010     ways. For instance, you can use a single file to set defaults for
1011     many different settings, like search fields, retrieval syntaxes,
1012     etc. You can have one file per server, which groups settings for
1013     that server or target. You could also have one file which associates
1014     a number of targets with a given setting, for instance, to associate
1015     many databases with a given category or class that makes sense
1016     within your application.
1017    </para>
1018
1019    <para>
1020     The following examples illustrate uses of the settings system to
1021     associate settings with targets to meet different requirements.
1022    </para>
1023
1024    <para>
1025     The example below associates a set of default values that can be
1026     used across many targets. Note the wildcard for targets.
1027     This associates the given settings with all targets for which no
1028     other information is provided.
1029     <screen><![CDATA[
1030     <settings target="*">
1031
1032     <!-- This file introduces default settings for pazpar2 -->
1033
1034     <!-- mapping for unqualified search -->
1035     <set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/>
1036
1037     <!-- field-specific mappings -->
1038     <set name="pz:cclmap:ti" value="u=4 s=al"/>
1039     <set name="pz:cclmap:su" value="u=21 s=al"/>
1040     <set name="pz:cclmap:isbn" value="u=7"/>
1041     <set name="pz:cclmap:issn" value="u=8"/>
1042     <set name="pz:cclmap:date" value="u=30 r=r"/>
1043     
1044     <set name="pz:limitmap:title" value="rpn:@attr 1=4 @attr 6=3"/>
1045     <set name="pz:limitmap:date" value="ccl:date"/>
1046
1047     <!-- Retrieval settings -->
1048
1049     <set name="pz:requestsyntax" value="marc21"/>
1050     <set name="pz:elements" value="F"/>
1051
1052     <!-- Query encoding -->
1053     <set name="pz:queryencoding" value="iso-8859-1"/>
1054
1055     <!-- Result normalization settings -->
1056
1057     <set name="pz:nativesyntax" value="iso2709"/>
1058     <set name="pz:xslt" value="../etc/marc21.xsl"/>
1059
1060     </settings>
1061
1062     ]]></screen>
1063    </para>
1064
1065    <para>
1066     The next example shows certain settings overridden for one target,
1067     one which returns XML records containing DublinCore elements, and
1068     which furthermore requires a username/password.
1069     <screen><![CDATA[
1070     <settings target="funkytarget.com:210/db1">
1071     <set name="pz:requestsyntax" value="xml"/>
1072     <set name="pz:nativesyntax" value="xml"/>
1073     <set name="pz:xslt" value="../etc/dublincore.xsl"/>
1074
1075     <set name="pz:authentication" value="myuser/password"/>
1076     </settings>
1077     ]]></screen>
1078    </para>
1079
1080    <para>
1081     The following example associates a specific name/value combination
1082     with a number of targets. The targets below are access-restricted,
1083     and can only be used by users with special credentials.
1084     <screen><![CDATA[
1085     <settings name="pz:allow" value="0">
1086     <set target="funkytarget.com:210/*"/>
1087     <set target="commercial.com:2100/expensiveDb"/>
1088     </settings>
1089     ]]></screen>
1090    </para>
1091
1092   </refsect2>
1093
1094   <refsect2>
1095    <title>RESERVED SETTING NAMES</title>
1096    <para>
1097     The following setting names are reserved by Pazpar2 to control the
1098     behavior of the client function.
1099    </para>
1100    
1101    <variablelist>
1102     <varlistentry>
1103      <term>pz:cclmap:xxx</term>
1104      <listitem>
1105       <para>
1106        This establishes a CCL field definition or other setting, for
1107        the purpose of mapping end-user queries. XXX is the field or
1108        setting name, and the value of the setting provides parameters
1109        (e.g. parameters to send to the server, etc.). Please consult
1110        the YAZ manual for a full overview of the many capabilities of
1111        the powerful and flexible CCL parser.
1112       </para>
1113       <para>
1114        Note that it is easy to establish a set of default parameters,
1115        and then override them individually for a given target.
1116       </para>
1117      </listitem>
1118     </varlistentry>
1119     <varlistentry id="requestsyntax">
1120      <term>pz:requestsyntax</term>
1121      <listitem>
1122       <para>
1123        This specifies the record syntax to use when requesting
1124        records from a given server. The value can be a symbolic name like
1125        marc21 or xml, or it can be a Z39.50-style dot-separated OID.
1126       </para>
1127      </listitem>
1128     </varlistentry>
1129     <varlistentry>
1130      <term>pz:elements</term>
1131      <listitem>
1132       <para>
1133        The element set name to be used when retrieving records from a
1134        server.
1135       </para>
1136      </listitem>
1137     </varlistentry>
1138     <varlistentry>
1139      <term>pz:piggyback</term>
1140      <listitem>
1141       <para>
1142        Piggybacking enables the server to retrieve records from the
1143        server as part of the search response in Z39.50. Almost all
1144        servers support this (or fail it gracefully), but a few
1145        servers will produce undesirable results.
1146        Set to '1' to enable piggybacking, '0' to disable it. Default
1147        is 1 (piggybacking enabled).
1148       </para>
1149      </listitem>
1150     </varlistentry>
1151     <varlistentry>
1152      <term>pz:nativesyntax</term>
1153      <listitem>
1154       <para>
1155        Specifies how Pazpar2 shoule map retrieved records to XML. Currently
1156        supported values are <literal>xml</literal>,
1157        <literal>iso2709</literal> and <literal>txml</literal>.
1158       </para>
1159       <para>
1160        The value <literal>iso2709</literal> makes Pazpar2 convert retrieved
1161        MARC records to MARCXML. In order to convert to XML, the exact
1162        chacater set of the MARC must be known (if not, the resulting
1163        XML is probably not well-formed). The character set may be 
1164        specified by adding:
1165        <literal>;charset=</literal><replaceable>charset</replaceable> to
1166        <literal>iso2709</literal>. If omitted, a charset of
1167        MARC-8 is assumed. This is correct for most MARC21/USMARC records.
1168       </para>
1169       <para>
1170        The value <literal>txml</literal> is like <literal>iso2709</literal>
1171        except that records are converted to TurboMARC instead of MARCXML.
1172       </para>
1173       <para>
1174        The value <literal>xml</literal> is used if Pazpar2 retrieves
1175        records that are already XML (no conversion takes place).
1176       </para>
1177      </listitem>
1178     </varlistentry>
1179
1180     <varlistentry>
1181      <term>pz:queryencoding</term>
1182      <listitem>
1183       <para>
1184        The encoding of the search terms that a target accepts. Most
1185        targets do not honor UTF-8 in which case this needs to be specified.
1186        Each term in a query will be converted if this setting is given.
1187       </para>
1188      </listitem>
1189     </varlistentry>
1190
1191     <varlistentry>
1192      <term>pz:negotiation_charset</term>
1193      <listitem>
1194       <para>
1195        Sets character set for Z39.50 negotiation. Most targets do not support
1196        this, and some will even close connection if set (crash on server
1197        side or similar). If set, you probably want to set it to
1198        <literal>UTF-8</literal>.
1199       </para>
1200      </listitem>
1201     </varlistentry>
1202
1203     <varlistentry>
1204      <term id="pzxslt" xreflabel="pz:xslt">pz:xslt</term>
1205      <listitem>
1206       <para>
1207        Is a comma separated list of of stylesheet names that specifies
1208        how to convert incoming records to the internal representation.
1209       </para>
1210       <para>
1211        For each name, the embedded stylesheets (XSL) that comes with the
1212        service definition are consulted first and takes precedence over
1213        external files; see <xref linkend="servicexslt"/>
1214        of service definition).
1215        If the name does not match an embedded stylesheet it is
1216        considered a filename.
1217       </para>
1218       <para>
1219        The suffix of each file specifies the kind of tranformation.
1220        Suffix "<literal>.xsl</literal>" makes an XSL transform. Suffix
1221        "<literal>.mmap</literal>" will use the MMAP transform (described below).
1222       </para>
1223       <para>
1224        The special value "<literal>auto</literal>" will use a file
1225        which is the <link linkend="requestsyntax">pz:requestsyntax's</link>
1226        value followed by
1227        <literal>'.xsl'</literal>.
1228       </para>
1229       <para>
1230        When mapping MARC records, XSLT can be bypassed for increased 
1231        performance with the alternate "MARC map" format.  Provide the
1232        path of a file with extension ".mmap" containing on each line:
1233        <programlisting>
1234        &lt;field&gt; &lt;subfield&gt; &lt;metadata element&gt;</programlisting>
1235        For example:
1236        <programlisting>
1237         245 a title
1238         500 $ description
1239         773 * citation
1240        </programlisting>
1241        To map the field value specify a subfield of '$'.  To store a 
1242        concatenation of all subfields, specify a subfield of '*'.
1243       </para>
1244      </listitem>
1245     </varlistentry>
1246     <varlistentry>
1247      <term>pz:authentication</term>
1248      <listitem>
1249       <para>
1250        Sets an authentication string for a given server. See the section on
1251        authorization and authentication for discussion.
1252       </para>
1253      </listitem>
1254     </varlistentry>
1255     <varlistentry>
1256      <term>pz:allow</term>
1257      <listitem>
1258       <para>
1259        Allows or denies access to the resources it is applied to. Possible
1260        values are '0' and '1'.
1261        The default is '1' (allow access to this resource).
1262        See the manual section on authorization and authentication for
1263        discussion about how to use this setting.
1264       </para>
1265      </listitem>
1266     </varlistentry>
1267     <varlistentry>
1268      <term>pz:maxrecs</term>
1269      <listitem>
1270       <para>
1271        Controls the maximum number of records to be retrieved from a
1272        server. The default is 100.
1273       </para>
1274      </listitem>
1275     </varlistentry>
1276     <varlistentry>
1277      <term>pz:extendrecs</term>
1278      <listitem>
1279       <para>
1280        If a show command goes to the boundary of a result set for a
1281        database - depends on sorting - and pz:extendrecs is set to a positive
1282        value. then Pazpar2 wait for show to fetch pz:extendrecs more
1283        records. This setting is best used if a database does native
1284        sorting, because the result set otherwise may be completely
1285        re-sorted during extended fetch.
1286        The default value of pz:extendrecs is 0 (no extended fetch).
1287       </para>
1288       <warning>
1289        <para>
1290         The pz:extendrecs setting appeared in Pazpar2 version 1.6.26.
1291         But the bahavior changed with the release of Pazpar2 1.6.29.
1292        </para>
1293       </warning>
1294      </listitem>
1295     </varlistentry>
1296     <varlistentry>
1297      <term>pz:presentchunk</term>
1298      <listitem>
1299       <para>
1300        Controls the chunk size in present requests. Pazpar2 will 
1301        make (maxrecs / chunk) request(s). The default is 20.
1302       </para>
1303      </listitem>
1304     </varlistentry>
1305     <varlistentry>
1306      <term>pz:id</term>
1307      <listitem>
1308       <para>
1309        This setting can't be 'set' -- it contains the ID (normally
1310        ZURL) for a given target, and is useful for filtering --
1311        specifically when you want to select one or more specific
1312        targets in the search command.
1313       </para>
1314      </listitem>
1315     </varlistentry>
1316     <varlistentry>
1317      <term>pz:zproxy</term>
1318      <listitem>
1319       <para>
1320        The 'pz:zproxy' setting has the value syntax 
1321        'host.internet.adress:port', it is used to tunnel Z39.50
1322        requests through the named Z39.50 proxy.
1323       </para>
1324      </listitem>
1325     </varlistentry>
1326     
1327     <varlistentry>
1328      <term>pz:apdulog</term>
1329      <listitem>
1330       <para>
1331        If the 'pz:apdulog' setting is defined and has other value than 0,
1332        then Z39.50 APDUs are written to the log.
1333       </para>
1334      </listitem>
1335     </varlistentry>
1336     
1337     <varlistentry>
1338      <term>pz:sru</term>
1339      <listitem>
1340       <para>
1341        This setting enables
1342        <ulink url="&url.sru;">SRU</ulink>/<ulink url="&url.solr;">Solr</ulink>
1343        support.
1344        It has four possible settings.
1345        'get', enables SRU access through GET requests. 'post' enables SRU/POST
1346        support, less commonly supported, but useful if very large requests are
1347        to be submitted. 'srw' enables the SRW (SRU over SOAP) variation of
1348        the protocol.
1349       </para>
1350       <para>
1351        A value of 'solr' enables Solr client support. This is supported
1352        for Pazpar version 1.5.0 and later.
1353       </para>
1354      </listitem>
1355     </varlistentry>
1356     
1357     <varlistentry>
1358      <term>pz:sru_version</term>
1359      <listitem>
1360       <para>
1361        This allows SRU version to be specified. If unset Pazpar2
1362        will the default of YAZ (currently 1.2). Should be set
1363        to 1.1 or 1.2. For Solr, the current supported/tested version is 1.4 and 3.x.
1364       </para>
1365      </listitem>
1366     </varlistentry>
1367     
1368     <varlistentry>
1369      <term>pz:pqf_prefix</term>
1370      <listitem>
1371       <para>
1372        Allows you to specify an arbitrary PQF query language substring.
1373        The provided string is prefixed to the user's query after it has been
1374        normalized to PQF internally in pazpar2.
1375        This allows you to attach complex 'filters' to queries for a given
1376        target, sometimes necessary to select sub-catalogs
1377        in union catalog systems, etc.
1378       </para>
1379      </listitem>
1380     </varlistentry>
1381     
1382     <varlistentry>
1383      <term>pz:pqf_strftime</term>
1384      <listitem>
1385       <para>
1386        Allows you to extend a query with dates and operators.
1387        The provided string allows certain substitutions and serves as a
1388        format string.
1389        The special two character sequence '%%' gets converted to the
1390        original query. Other characters leading with the percent sign are
1391        conversions supported by strftime.
1392        All other characters are copied verbatim. For example, the string
1393        <literal>@and @attr 1=30 @attr 2=3 %Y %%</literal>
1394        would search for current year combined with the original PQF (%%).
1395       </para>
1396       <para>
1397        This setting can also be used as more general alternative to
1398        pz:pqf_prefix -- a way of embedding the submitted query
1399        anywhere in the string rather than appending it to prefix.  For
1400        example, if it is desired to omit all records satisfying the
1401        query <literal>@attr 1=pica.bib 0007</literal> then this
1402        subquery can be combined with the submitted query as the second
1403        argument of <literal>@andnot</literal> by using the
1404        pz:pqf_strftime value <literal>@not %% @attr 1=pica.bib
1405        0007</literal>.
1406       </para>
1407      </listitem>
1408     </varlistentry>
1409     
1410     <varlistentry>
1411      <term>pz:sort</term>
1412      <listitem>
1413       <para>
1414        Specifies sort criteria to be applied to the result set.
1415        Only works for targets which support the sort service.
1416       </para>
1417      </listitem>
1418     </varlistentry>
1419
1420     <varlistentry>
1421      <term>pz:recordfilter</term>
1422      <listitem>
1423       <para>
1424        Specifies a filter which allows Pazpar2 to only include
1425        records that meet a certain criteria in a result.
1426        Unmatched records  will be ignored.
1427        The filter takes the form name, name~value, or name=value, which
1428        will include only records with metadata element (name) that has the
1429        substring (~value) given, or matches exactly (=value).
1430        If value is omitted all records with the named metadata element
1431        present will be included.
1432       </para>
1433      </listitem>
1434     </varlistentry>
1435     
1436     <varlistentry>
1437      <term>pz:preferred</term>
1438      <listitem>
1439       <para>
1440        Specifies that a target is preferred, e.g. possible local, faster
1441        target. Using block=pref on show command will wait for all these
1442        targets to return records before releasing the block.
1443        If no target is preferred, the block=pref will identical to block=1,
1444        which release when one target has returned records.     
1445       </para>
1446      </listitem>
1447     </varlistentry>
1448     <varlistentry>
1449      <term>pz:block_timeout</term>
1450      <listitem>
1451       <para>
1452        (Not yet implemented).
1453        Specifies the time for which a block should be released anyway.      
1454       </para>
1455      </listitem>
1456     </varlistentry>
1457     <varlistentry>
1458      <term>pz:termlist_term_count</term>
1459      <listitem>
1460       <para>
1461        Specifies number of facet terms to be requested from the target. 
1462        The default is unspecified e.g. server-decided. Also see pz:facetmap.
1463       </para>
1464      </listitem>
1465     </varlistentry>
1466     <varlistentry>
1467      <term>pz:termlist_term_factor</term>
1468      <listitem>
1469       <para>
1470        Specifies whether to use a factor for pazpar2 generated facets (1) or not (0). 
1471        When mixing locallly generated (by the downloaded (pz:maxrecs) samples) 
1472        facet with native (target-generated) facets, the later will dominated the dominate the facet list
1473        since they are generated based on the complete result set. 
1474        By scaling up the facet count using the ratio between total hit count and the sample size, 
1475        the total facet count can be approximated and thus better compared with native facets. 
1476        This is not enabled by default.
1477       </para>
1478      </listitem>
1479     </varlistentry>
1480
1481     <varlistentry>
1482      <term>pz:facetmap:<replaceable>name</replaceable></term>
1483      <listitem>
1484       <para>
1485        Specifies that for field <replaceable>name</replaceable>, the target
1486        supports (native) facets. The value is the name of the
1487        field on the target.
1488       </para>
1489       <note>
1490        <para>
1491         At this point only Solr targets have been tested with this
1492         facility.
1493        </para>
1494       </note>
1495      </listitem>
1496     </varlistentry>
1497
1498     <varlistentry id="limitmap">
1499      <term>pz:limitmap:<replaceable>name</replaceable></term>
1500      <listitem>
1501       <para>
1502        Specifies attributes for limiting a search to a field - using
1503        the limit parameter for search. It can be used to filter locally
1504        or remotely (search in a target). In some cases the mapping of 
1505        a field to a value is identical to an existing cclmap field; in
1506        other cases the field must be specified in a different way - for
1507        example to match a complete field (rather than parts of a subfield).
1508       </para>
1509       <para>
1510        The value of limitmap may have one of three forms: referral to
1511        an existing CCL field, a raw PQF string or a local limit. Leading string
1512        determines type; either <literal>ccl:</literal> for CCL field, 
1513        <literal>rpn:</literal> for PQF/RPN, or <literal>local:</literal>
1514        for filtering in Pazpar2. The local filtering may be followed
1515        by a field a metadata field (default is to use the name of the 
1516        limitmap itself).
1517       </para>
1518       <para>
1519        For Pazpar2 version 1.6.23 and later the limitmap may include multiple
1520        specifications, separated by <literal>,</literal> (comma).
1521        For example:
1522        <literal>ccl:title,local:ltitle,rpn:@attr 1=4</literal>.
1523       </para>
1524       <note>
1525        <para>
1526         The limitmap facility is supported for Pazpar2 version 1.6.0.
1527         Local filtering is supported in Pazpar2 1.6.6.
1528        </para>
1529       </note>
1530      </listitem>
1531     </varlistentry>
1532
1533     <varlistentry id="pzurl">
1534      <term>pz:url</term>
1535      <listitem>
1536       <para>
1537        Specifies URL for the target and overrides the target ID.
1538       </para>
1539       <note>
1540        <para>
1541         <literal>pz:url</literal> is only recognized for
1542         Pazpar2 1.6.4 and later.
1543        </para>
1544       </note>
1545      </listitem>
1546     </varlistentry>
1547
1548     <varlistentry id="pzsortmap">
1549      <term>pz:sortmap:<replaceable>field</replaceable></term>
1550      <listitem>
1551       <para>
1552        Specifies native sorting for a target where
1553        <replaceable>field</replaceable> is a sort criteria (see command
1554        show). The value has to components separated by colon: strategy and
1555        native-field. Strategy is one of <literal>z3950</literal>,
1556        <literal>type7</literal>, <literal>cql</literal>,
1557        <literal>sru11</literal>, or <literal>embed</literal>.
1558        The second component, native-field, is the field that is recognized
1559        by the target.
1560       </para>
1561       <note>
1562        <para>
1563         Only supported for Pazpar2 1.6.4 and later.
1564        </para>
1565       </note>
1566      </listitem>
1567     </varlistentry>
1568     
1569    </variablelist>
1570    
1571   </refsect2>
1572
1573  </refsect1>
1574  <refsect1>
1575   <title>SEE ALSO</title>
1576   <para>
1577    <citerefentry>
1578     <refentrytitle>pazpar2</refentrytitle>
1579     <manvolnum>8</manvolnum>
1580    </citerefentry>
1581    <citerefentry>
1582     <refentrytitle>yaz-icu</refentrytitle>
1583     <manvolnum>1</manvolnum>
1584    </citerefentry>
1585    <citerefentry>
1586     <refentrytitle>pazpar2_protocol</refentrytitle>
1587     <manvolnum>7</manvolnum>
1588    </citerefentry>
1589   </para>
1590  </refsect1>
1591 </refentry>
1592 <!-- Keep this comment at the end of the file
1593 Local variables:
1594 mode: nxml
1595 nxml-child-indent: 1
1596 End:
1597 -->