Doc: fix misplaced variablelist tag.
[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 id="service_conf">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 id="metadata-rank">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
390              this on a per target since it is usually target-specific.
391              See limitmap for format.
392             </para>
393            </listitem>
394           </varlistentry>
395
396           <varlistentry>
397            <term id="metadata_facetmap">facetmap</term>
398            <listitem>
399             <para>
400              Specifies a default facetmap for this field. This is to avoid mass
401              configuring of targets. However it is important to review/do
402              this on a per target since it is usually target-specific.
403              See facetmap for format.
404             </para>
405            </listitem>
406           </varlistentry>
407
408           <varlistentry>
409            <term>setting</term>
410            <listitem>
411             <para>
412              This attribute allows you to make use of static database
413              settings in the processing of records. Three possible values
414              are allowed. 'no' is the default and doesn't do anything.
415              'postproc' copies the value of a setting with the same name
416              into the output of the normalization stylesheet(s). 'parameter'
417              makes the value of a setting with the same name available
418              as a parameter to the normalization stylesheet, so you
419              can further process the value inside of the stylesheet, or use
420              the value to decide how to deal with other data values.
421             </para>
422             <para>
423              The purpose of using settings in this way can either be to
424              control the behavior of normalization stylesheet in a database-
425              dependent way, or to easily make database-dependent values
426              available to display-logic in your user interface, without having
427              to implement complicated interactions between the user interface
428              and your configuration system.
429             </para>
430            </listitem>
431           </varlistentry>
432
433          </variablelist> <!-- attributes to metadata -->
434
435         </listitem>
436        </varlistentry>
437
438        <varlistentry>
439         <term id="servicexslt" xreflabel="xslt">xslt</term>
440         <listitem>
441          <para>
442           Defines a XSLT stylesheet. The <literal>xslt</literal>
443           element takes exactly one attribute <literal>id</literal>
444           which names the stylesheet. This can be referred to in target
445           settings <xref linkend="pzxslt"/>.
446          </para>
447          <para>
448           The content of the xslt element is the embedded stylesheet XML
449          </para>
450         </listitem>
451        </varlistentry>
452        <varlistentry>
453         <term id="icuchain" xreflabel="icu_chain">icu_chain</term>
454         <listitem>
455          <para>
456           Specifies a named ICU rule set. The icu_chain element must include
457           attribute 'id' which specifies the identifier (name) for the ICU
458           rule set.
459           Pazpar2 uses the particular rule sets for particular purposes.
460           Rule set 'relevance' is used to normalize
461           terms for relevance ranking. Rule set 'sort' is used to
462           normalize terms for sorting. Rule set 'mergekey' is used to
463           normalize terms for making a mergekey and, finally. Rule set 'facet'
464           is normally used to normalize facet terms, unless
465           <xref linkend="facetrule">facetrule</xref> is given for a
466           metadata field.
467          </para>
468          <para>
469           The icu_chain element must also include a 'locale'
470           attribute which must be set to one of the locale strings
471           defined in ICU. The child elements listed below can be
472           in any order, except the 'index' element which logically
473           belongs to the end of the list. The stated tokenization,
474           transformation and charmapping instructions are performed
475           in order from top to bottom.
476          </para>
477          <variablelist> <!-- Level 2 -->
478           <varlistentry>
479            <term>casemap</term>
480            <listitem>
481             <para>
482              The attribute 'rule' defines the direction of the
483              per-character casemapping, allowed values are "l"
484              (lower), "u" (upper), "t" (title).
485             </para>
486            </listitem>
487           </varlistentry>
488           <varlistentry>
489            <term>transform</term>
490            <listitem>
491             <para>
492              Normalization and transformation of tokens follows
493              the rules defined in the 'rule' attribute. For
494              possible values we refer to the extensive ICU
495              documentation found at the
496              <ulink url="&url.icu.transform;">ICU
497              transformation</ulink> home page. Set filtering
498              principles are explained at the
499              <ulink url="&url.icu.unicode.set;">ICU set and
500              filtering</ulink> page.
501             </para>
502            </listitem>
503           </varlistentry>
504           <varlistentry>
505            <term>tokenize</term>
506            <listitem>
507             <para>
508              Tokenization is the only rule in the ICU chain
509              which splits one token into multiple tokens. The
510              'rule' attribute may have the following values:
511              "s" (sentence), "l" (line-break), "w" (word), and
512              "c" (character), the later probably not being
513              very useful in a pruning Pazpar2 installation.
514             </para>
515            </listitem>
516           </varlistentry>
517          </variablelist>
518          <para>
519           From Pazpar2 version 1.1 the ICU wrapper from YAZ is used.
520           Refer to the <ulink url="&url.yaz.yaz-icu;">yaz-icu</ulink>
521           utility for more information.
522          </para>
523         </listitem>
524        </varlistentry>
525
526        <varlistentry>
527         <term>relevance</term>
528         <listitem>
529          <para>
530           Specifies the ICU rule set used for relevance ranking.
531           The child element of 'relevance' must be 'icu_chain' and the
532           'id' attribute of the icu_chain is ignored. This
533           definition is obsolete and should be replaced by the equivalent
534           construct:
535           <screen>
536            &lt;icu_chain id="relevance" locale="en">..&lt;icu_chain>
537           </screen>
538          </para>
539         </listitem>
540        </varlistentry>
541
542        <varlistentry>
543         <term>sort</term>
544         <listitem>
545          <para>
546           Specifies the ICU rule set used for sorting.
547           The child element of 'sort' must be 'icu_chain' and the
548           'id' attribute of the icu_chain is ignored. This
549           definition is obsolete and should be replaced by the equivalent
550           construct:
551           <screen>
552            &lt;icu_chain id="sort" locale="en">..&lt;icu_chain>
553           </screen>
554          </para>
555         </listitem>
556        </varlistentry>
557
558        <varlistentry>
559         <term>mergekey</term>
560         <listitem>
561          <para>
562           Specifies ICU tokenization and transformation rules
563           for tokens that are used in Pazpar2's mergekey.
564           The child element of 'mergekey' must be 'icu_chain' and the
565           'id' attribute of the icu_chain is ignored. This
566           definition is obsolete and should be replaced by the equivalent
567           construct:
568           <screen>
569            &lt;icu_chain id="mergekey" locale="en">..&lt;icu_chain>
570           </screen>
571          </para>
572         </listitem>
573        </varlistentry>
574
575        <varlistentry>
576         <term>facet</term>
577         <listitem>
578          <para>
579           Specifies ICU tokenization and transformation rules
580           for tokens that are used in Pazpar2's facets.
581           The child element of 'facet' must be 'icu_chain' and the
582           'id' attribute of the icu_chain is ignored. This
583           definition is obsolete and should be replaced by the equivalent
584           construct:
585           <screen>
586            &lt;icu_chain id="facet" locale="en">..&lt;icu_chain>
587           </screen>
588          </para>
589         </listitem>
590        </varlistentry>
591
592        <varlistentry>
593         <term>ccldirective</term>
594         <listitem>
595          <para>
596           Customizes the CCL parsing (interpretation of query parameter
597           in search).
598           The name and value of the CCL directive is gigen by attributes
599           'name' and 'value' respectively. Refer to possible list of names
600           in the
601           <ulink
602               url="http://www.indexdata.com/yaz/doc/tools.html#ccl.directives.table">
603            YAZ manual
604            </ulink>.
605          </para>
606         </listitem>
607        </varlistentry>
608
609        <varlistentry id="service-rank">
610         <term>rank</term>
611         <listitem>
612          <para>
613           Customizes the ranking (relevance) algorithm. Also known as
614           rank tweaks. The rank element
615           accepts the following attributes - all being optional:
616          </para>
617          <variablelist>
618           <varlistentry>
619            <term>cluster</term>
620            <listitem>
621             <para>
622              Attribute 'cluster' is a boolean
623              that controls whether Pazpar2 should boost ranking for merged
624              records. Is 'yes' by default. A value of 'no' will make
625              Pazpar2 average ranking of each record in a cluster.
626             </para>
627            </listitem>
628           </varlistentry>
629           <varlistentry>
630            <term>debug</term>
631            <listitem>
632             <para>
633              Attribute 'debug' is a boolean
634              that controls whether Pazpar2 should include details
635              about ranking for each document in the show command's
636              response. Enable by using value "yes", disable by using
637              value "no" (default).
638             </para>
639            </listitem>
640           </varlistentry>
641           <varlistentry>
642            <term>follow</term>
643            <listitem>
644             <para>
645              Attribute 'follow' is a a floating point number greater than
646              or equal to 0. A positive number will boost weight for terms
647              that occur close to each other (proximity, distance).
648              A value of 1, will double the weight if two terms are in
649              proximity distance of 1 (next to each other). The default
650              value of 'follow' is 0 (order will not affect weight).
651             </para>
652            </listitem>
653           </varlistentry>
654           <varlistentry>
655            <term>lead</term>
656            <listitem>
657             <para>
658              Attribute 'lead' is a floating point number.
659              It controls if term weight should be reduced by position
660              from start in a metadata field. A positive value of 'lead'
661              will reduce weight as it apperas further away from the lead
662              of the field. Default value is 0 (no reduction of weight by
663              position).
664             </para>
665            </listitem>
666           </varlistentry>
667           <varlistentry>
668            <term>length</term>
669            <listitem>
670             <para>
671              Attribute 'length' determines how/if term weight should be
672              divided by lenght of metadata field. A value of "linear"
673              divide by length. A value of "log" will divide by log2(length).
674              A value of "none" will leave term weight as is (no division).
675              Default value is "linear".
676             </para>
677            </listitem>
678           </varlistentry>
679          </variablelist>
680          <para>
681           Refer to <xref linkend="relevance_ranking"/> to see how
682           these tweaks are used in computation of score.
683          </para>
684          <para>
685           Customization of ranking algorithm was introduced with
686           Pazpar2 1.6.18. The semantics of some of the fields changed
687           in versions up to 1.6.22.
688          </para>
689         </listitem>
690        </varlistentry>
691
692        <varlistentry id="sort-default">
693         <term>sort-default</term>
694         <listitem>
695          <para>
696           Specifies the default sort criteria (default 'relevance'),
697           which previous was hard-coded as default criteria in search.
698           This is a fix/work-around to avoid re-searching when using
699           target-based sorting. In order for this to work efficient,
700           the search must also have the sort critera parameter; otherwise
701           pazpar2 will do re-searching on search criteria changes, if
702           changed between search and show command.
703          </para>
704          <para>
705           This configuration was added in pazpar2 1.6.20.
706          </para>
707         </listitem>
708        </varlistentry>
709
710 <!--
711        <varlistentry>
712         <term>set</term>
713         <listitem>
714          <para>
715           Specifies a variable that will be inherited by all targets defined in settings
716           <screen>
717            &lt;set name="test" value="en"..&lt;set>
718           </screen>
719          </para>
720         </listitem>
721        </varlistentry>
722 -->
723        <varlistentry>
724         <term>settings</term>
725         <listitem>
726          <para>
727           Specifies target settings for this service. Refer to
728           <xref linkend="target_settings"/>.
729          </para>
730         </listitem>
731        </varlistentry>
732
733        <varlistentry>
734         <term>timeout</term>
735         <listitem>
736          <para>
737           Specifies timeout parameters for this service.
738           The <literal>timeout</literal>
739           element supports the following attributes:
740           <literal>session</literal>, <literal>z3950_operation</literal>,
741           <literal>z3950_session</literal> which specifies
742           'session timeout', 'Z39.50 operation timeout',
743           'Z39.50 session timeout' respectively. The Z39.50 operation
744           timeout is the time Pazpar2 will wait for an active Z39.50/SRU
745           operation before it gives up (times out). The Z39.50 session
746           time out is the time Pazpar2 will keep the session alive for
747           an idle session (no operation).
748          </para>
749          <para>
750           The following is recommended but not required:
751           z3950_operation (30) &lt; session (60) &lt; z3950_session (180) .
752           The default values are given in parantheses.
753          </para>
754         </listitem>
755        </varlistentry>
756       </variablelist>     <!-- Data elements in service directive -->
757      </listitem>
758     </varlistentry>
759    </variablelist>           <!-- Data elements in server directive -->
760   </refsect2>
761  </refsect1>
762
763  <refsect1>
764   <title>EXAMPLE</title>
765   <para>
766    Below is a working example configuration:
767   </para>
768   <screen>
769    <![CDATA[
770 <?xml version="1.0" encoding="UTF-8"?>
771 <pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
772
773  <threads number="10"/>
774  <server>
775   <listen port="9004"/>
776   <service>
777    <rank debug="yes"/>
778    <metadata name="title" brief="yes" sortkey="skiparticle"
779              merge="longest" rank="6"/>
780    <metadata name="isbn" merge="unique"/>
781    <metadata name="date" brief="yes" sortkey="numeric"
782              type="year" merge="range" termlist="yes"/>
783    <metadata name="author" brief="yes" termlist="yes"
784              merge="longest" rank="2"/>
785    <metadata name="subject" merge="unique" termlist="yes" rank="3" limitmap="local:"/>
786    <metadata name="url" merge="unique"/>
787    <icu_chain id="relevance" locale="el">
788     <transform rule="[:Control:] Any-Remove"/>
789     <tokenize rule="l"/>
790     <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
791     <casemap rule="l"/>
792    </icu_chain>
793    <settings src="mysettings"/>
794    <timeout session="60"/>
795   <service>
796  </server>
797 </pazpar2>
798    ]]>
799   </screen>
800  </refsect1>
801
802  <refsect1 id="config-include">
803   <title>INCLUDE FACILITY</title>
804   <para>
805    The XML configuration may be partitioned into multiple files by using
806    the <literal>include</literal> element which takes a single attribute,
807    <literal>src</literal>. The <literal>src</literal> attribute is
808    regular Shell like glob-pattern. For example,
809    <screen><![CDATA[
810    <include src="/etc/pazpar2/conf.d/*.xml"/>
811    ]]></screen>
812   </para>
813   <para>
814    The include facility requires Pazpar2 version 1.2.
815   </para>
816  </refsect1>
817
818  <refsect1 id="target_settings">
819   <title>TARGET SETTINGS</title>
820   <para>
821    Pazpar2 features a cunning scheme by which you can associate various
822    kinds of attributes, or settings with search targets. This can be done
823    through XML files which are read at startup; each file can associate
824    one or more settings with one or more targets. The file format is generic
825    in nature, designed to support a wide range of application requirements.
826    The settings can be purely technical things, like, how to perform a title
827    search against a given target, or it can associate arbitrary name=value
828    pairs with groups of targets -- for instance, if you would like to
829    place all commercial full-text bases in one group for selection
830    purposes, or you would like to control what targets are accessible
831    to users by default. Per-database settings values can even be used
832    to drive sorting, facet/termlist generation, or end-user interface display
833    logic.
834   </para>
835
836   <para>
837    During startup, Pazpar2 will recursively read a specified directory
838    (can be identified in the pazpar2.cfg file or on the command line), and
839    process any settings files found therein.
840   </para>
841
842   <para>
843    Clients of the Pazpar2 webservice interface can selectively override
844    settings for individual targets within the scope of one session. This
845    can be used in conjunction with an external authentication system to
846    determine which resources are to be accessible to which users. Pazpar2
847    itself has no notion of end-users, and so can be used in conjunction
848    with any type of authentication system. Similarly, the authentication
849    tokens submitted to access-controlled search targets can similarly be
850    overridden, to allow use of Pazpar2 in a consortial or multi-library
851    environment, where different end-users may need to be represented to
852    some search targets in different ways. This, again, can be managed
853    using an external database or other lookup mechanism. Setting overrides
854    can be performed either using the
855    <link linkend="command-init">init</link> or the
856    <link linkend="command-settings">settings</link> webservice
857    command.
858   </para>
859
860   <para>
861    In fact, every setting that applies to a database (except pz:id, which
862    can only be used for filtering targets to use for a search) can be overridden
863    on a per-session basis.
864    This allows the client to override specific CCL fields for
865    searching, etc., to meet the needs of a session or user.
866   </para>
867
868   <para>
869    Finally, as an extreme case of this, the webservice client can
870    introduce entirely new targets, on the fly, as part of the
871    <link linkend="command-init">init</link> or
872    <link linkend="command-settings">settings</link> command.
873    This is useful if you desire to manage information
874    about your search targets in a separate application such as a database.
875    You do not need any static settings file whatsoever to run Pazpar2 -- as
876    long as the webservice client is prepared to supply the necessary
877    information at the beginning of every session.
878   </para>
879
880   <note>
881    <para>
882     The following discussion of practical issues related to session
883     and settings management are cast in terms of a user interface based on
884     Ajax/Javascript technology. It would apply equally well to many other
885     kinds of browser-based logic.
886    </para>
887   </note>
888
889   <para>
890    Typically, a Javascript client is not allowed to directly alter the
891    parameters of a session. There are two reasons for this. One has to do
892    with access to information; typically, information about a user will
893    be stored in a system on the server side, or it will be accessible in
894    some way from the server.  However, since the Javascript client cannot
895    be entirely trusted (some hostile agent might in fact 'pretend' to be
896    a regular ws client), it is more robust to control session settings
897    from scripting that you run as part of your webserver. Typically, this
898    can be handled during the session initialization, as follows:
899   </para>
900
901   <para>
902    Step 1: The Javascript client loads, and asks the webserver for a
903    new Pazpar2 session ID. This can be done using a Javascript call, for
904    instance. Note that it is possible to submit Ajax HTTPXmlRequest calls
905    either to Pazpar2 or to the webserver that Pazpar2 is proxying
906    for. See (XXX Insert link to Pazpar2 protocol).
907   </para>
908
909   <para>
910    Step 2: Code on the webserver authenticates the user, by database lookup,
911    LDAP access, NCIP, etc. Determines which resources the user has access to,
912    and any user-specific parameters that are to be applied during this session.
913   </para>
914
915   <para>
916    Step 3: The webserver initializes a new Pazpar2 settings, and sets
917    user-specific parameters as necessary, using the init webservice
918    command. A new session ID is returned.
919   </para>
920
921   <para>
922    Step 4: The webserver returns this session ID to the Javascript
923    client, which then uses the session ID to submit searches, show
924    results, etc.
925   </para>
926
927   <para>
928    Step 5: When the Javascript client ceases to use the session,
929    Pazpar2 destroys any session-specific information.
930   </para>
931
932   <refsect2>
933    <title>SETTINGS FILE FORMAT</title>
934    <para>
935     Each file contains a root element named &lt;settings&gt;. It may
936     contain one or more &lt;set&gt; elements. The settings and set
937     elements may contain the following attributes. Attributes in the set
938     node overrides those in the setting root element. Each set node must
939     specify (directly, or inherited from the parent node) at least a
940     target, name, and value.
941    </para>
942
943    <variablelist>
944     <varlistentry>
945      <term>target</term>
946      <listitem>
947       <para>
948        This specifies the search target to which this setting should be
949        applied. Targets are identified by their Z39.50 URL, generally
950        including the host, port, and database name, (e.g.
951        <literal>bagel.indexdata.com:210/marc</literal>).
952        Two wildcard forms are accepted:
953        * (asterisk) matches all known targets;
954        <literal>bagel.indexdata.com:210/*</literal> matches all
955        known databases on the given host.
956       </para>
957       <para>
958        A precedence system determines what happens if there are
959        overlapping values for the same setting name for the same
960        target. A setting for a specific target name overrides a
961        setting which specifies target using a wildcard. This makes it
962        easy to set defaults for all targets, and then override them
963        for specific targets or hosts. If there are
964        multiple overlapping settings with the same name and target
965        value, the 'precedence' attribute determines what happens.
966       </para>
967       <para>
968        For Pazpar2 1.6.4 or later, the target ID may be user-defined, in
969        which case, the actual host, port, etc is given by setting
970        <xref linkend="pzurl"/>.
971       </para>
972      </listitem>
973     </varlistentry>
974     <varlistentry>
975      <term>name</term>
976      <listitem>
977       <para>
978        The name of the setting. This can be anything you like.
979        However, Pazpar2 reserves a number of setting names for
980        specific purposes, all starting with 'pz:', and it is a good
981        idea to avoid that prefix if you make up your own setting
982        names. See below for a list of reserved variables.
983       </para>
984      </listitem>
985     </varlistentry>
986     <varlistentry>
987      <term>value</term>
988      <listitem>
989       <para>
990        The value of the setting. Generally, this can be anything you
991        want -- however, some of the reserved settings may expect
992        specific kinds of values.
993       </para>
994      </listitem>
995     </varlistentry>
996     <varlistentry>
997      <term>precedence</term>
998      <listitem>
999       <para>
1000        This should be an integer. If not provided, the default value
1001        is 0. If two (or more) settings have the same content for
1002        target and name, the precedence value determines the outcome.
1003        If both settings have the same precedence value, they are both
1004        applied to the target(s). If one has a higher value, then the
1005        value of that setting is applied, and the other one is ignored.
1006       </para>
1007      </listitem>
1008     </varlistentry>
1009    </variablelist>
1010
1011    <para>
1012     By setting defaults for target, name, or value in the root
1013     settings node, you can use the settings files in many different
1014     ways. For instance, you can use a single file to set defaults for
1015     many different settings, like search fields, retrieval syntaxes,
1016     etc. You can have one file per server, which groups settings for
1017     that server or target. You could also have one file which associates
1018     a number of targets with a given setting, for instance, to associate
1019     many databases with a given category or class that makes sense
1020     within your application.
1021    </para>
1022
1023    <para>
1024     The following examples illustrate uses of the settings system to
1025     associate settings with targets to meet different requirements.
1026    </para>
1027
1028    <para>
1029     The example below associates a set of default values that can be
1030     used across many targets. Note the wildcard for targets.
1031     This associates the given settings with all targets for which no
1032     other information is provided.
1033     <screen><![CDATA[
1034     <settings target="*">
1035
1036     <!-- This file introduces default settings for pazpar2 -->
1037
1038     <!-- mapping for unqualified search -->
1039     <set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/>
1040
1041     <!-- field-specific mappings -->
1042     <set name="pz:cclmap:ti" value="u=4 s=al"/>
1043     <set name="pz:cclmap:su" value="u=21 s=al"/>
1044     <set name="pz:cclmap:isbn" value="u=7"/>
1045     <set name="pz:cclmap:issn" value="u=8"/>
1046     <set name="pz:cclmap:date" value="u=30 r=r"/>
1047
1048     <set name="pz:limitmap:title" value="rpn:@attr 1=4 @attr 6=3"/>
1049     <set name="pz:limitmap:date" value="ccl:date"/>
1050
1051     <!-- Retrieval settings -->
1052
1053     <set name="pz:requestsyntax" value="marc21"/>
1054     <set name="pz:elements" value="F"/>
1055
1056     <!-- Query encoding -->
1057     <set name="pz:queryencoding" value="iso-8859-1"/>
1058
1059     <!-- Result normalization settings -->
1060
1061     <set name="pz:nativesyntax" value="iso2709"/>
1062     <set name="pz:xslt" value="../etc/marc21.xsl"/>
1063
1064     </settings>
1065
1066     ]]></screen>
1067    </para>
1068
1069    <para>
1070     The next example shows certain settings overridden for one target,
1071     one which returns XML records containing DublinCore elements, and
1072     which furthermore requires a username/password.
1073     <screen><![CDATA[
1074     <settings target="funkytarget.com:210/db1">
1075     <set name="pz:requestsyntax" value="xml"/>
1076     <set name="pz:nativesyntax" value="xml"/>
1077     <set name="pz:xslt" value="../etc/dublincore.xsl"/>
1078
1079     <set name="pz:authentication" value="myuser/password"/>
1080     </settings>
1081     ]]></screen>
1082    </para>
1083
1084    <para>
1085     The following example associates a specific name/value combination
1086     with a number of targets. The targets below are access-restricted,
1087     and can only be used by users with special credentials.
1088     <screen><![CDATA[
1089     <settings name="pz:allow" value="0">
1090     <set target="funkytarget.com:210/*"/>
1091     <set target="commercial.com:2100/expensiveDb"/>
1092     </settings>
1093     ]]></screen>
1094    </para>
1095
1096   </refsect2>
1097
1098   <refsect2>
1099    <title>RESERVED SETTING NAMES</title>
1100    <para>
1101     The following setting names are reserved by Pazpar2 to control the
1102     behavior of the client function.
1103    </para>
1104
1105    <variablelist>
1106
1107     <varlistentry>
1108      <term>pz:allow</term>
1109      <listitem>
1110       <para>
1111        Allows or denies access to the resources it is applied to. Possible
1112        values are '0' and '1'.
1113        The default is '1' (allow access to this resource).
1114       </para>
1115      </listitem>
1116     </varlistentry>
1117
1118     <varlistentry>
1119      <term>pz:apdulog</term>
1120      <listitem>
1121       <para>
1122        If the 'pz:apdulog' setting is defined and has other value than 0,
1123        then Z39.50 APDUs are written to the log.
1124       </para>
1125      </listitem>
1126     </varlistentry>
1127
1128     <varlistentry>
1129      <term>pz:authentication</term>
1130      <listitem>
1131       <para>
1132        Sets an authentication string for a given database. For Z39.50,
1133        this is carried as part of the Initialize Request. In order to carry
1134        the information in the "open" elements, separate
1135        username and password with a slash (In Z39.50 it is a VisibleString).
1136        In order to carry the information in the idPass  elements, separate
1137        username term, password term and,  optionally, a group term with a
1138        single blank.
1139        If three terms are given, the order is
1140        <emphasis>user, group, password</emphasis>.
1141        If only two terms are given, the order is
1142        <emphasis>user, password</emphasis>.
1143       </para>
1144       <para>
1145        For HTTP based procotols, such as SRU and Solr, the authentication
1146        string includes a username term and, optionally, a password term.
1147        Each term is separated by a single blank. The
1148        authentication information is passed either by HTTP basic
1149        authentication or via URL parameters. The mode is operation is
1150        determined by <literal>pz:authentication_mode</literal> setting.
1151       </para>
1152      </listitem>
1153     </varlistentry>
1154
1155     <varlistentry>
1156      <term>pz:authentication_mode</term>
1157      <listitem>
1158       <para>
1159        Determines how authentication is carried in HTTP based protocols.
1160        Value may be "<literal>basic</literal>" or "<literal>url</literal>".
1161       </para>
1162      </listitem>
1163     </varlistentry>
1164
1165     <varlistentry>
1166      <term>pz:block_timeout</term>
1167      <listitem>
1168       <para>
1169        (Not yet implemented).
1170        Specifies the time for which a block should be released anyway.
1171       </para>
1172      </listitem>
1173     </varlistentry>
1174
1175     <varlistentry>
1176      <term>pz:cclmap:xxx</term>
1177      <listitem>
1178       <para>
1179        This establishes a CCL field definition or other setting, for
1180        the purpose of mapping end-user queries. XXX is the field or
1181        setting name, and the value of the setting provides parameters
1182        (e.g. parameters to send to the server, etc.). Please consult
1183        the YAZ manual for a full overview of the many capabilities of
1184        the powerful and flexible CCL parser.
1185       </para>
1186       <para>
1187        Note that it is easy to establish a set of default parameters,
1188        and then override them individually for a given target.
1189       </para>
1190      </listitem>
1191     </varlistentry>
1192
1193     <varlistentry>
1194      <term>pz:elements</term>
1195      <listitem>
1196       <para>
1197        The element set name to be used when retrieving records from a
1198        server.
1199       </para>
1200      </listitem>
1201     </varlistentry>
1202
1203     <varlistentry>
1204      <term>pz:extendrecs</term>
1205      <listitem>
1206       <para>
1207        If a show command goes to the boundary of a result set for a
1208        database - depends on sorting - and pz:extendrecs is set to a positive
1209        value. then Pazpar2 wait for show to fetch pz:extendrecs more
1210        records. This setting is best used if a database does native
1211        sorting, because the result set otherwise may be completely
1212        re-sorted during extended fetch.
1213        The default value of pz:extendrecs is 0 (no extended fetch).
1214       </para>
1215       <warning>
1216        <para>
1217         The pz:extendrecs setting appeared in Pazpar2 version 1.6.26.
1218         But the bahavior changed with the release of Pazpar2 1.6.29.
1219        </para>
1220       </warning>
1221      </listitem>
1222     </varlistentry>
1223
1224     <varlistentry>
1225      <term>pz:facetmap:<replaceable>name</replaceable></term>
1226      <listitem>
1227       <para>
1228        Specifies that for field <replaceable>name</replaceable>, the target
1229        supports (native) facets. The value is the name of the
1230        field on the target.
1231       </para>
1232       <note>
1233        <para>
1234         At this point only Solr targets have been tested with this
1235         facility.
1236        </para>
1237       </note>
1238      </listitem>
1239     </varlistentry>
1240
1241     <varlistentry>
1242      <term>pz:id</term>
1243      <listitem>
1244       <para>
1245        This setting can't be 'set' -- it contains the ID (normally
1246        ZURL) for a given target, and is useful for filtering --
1247        specifically when you want to select one or more specific
1248        targets in the search command.
1249       </para>
1250      </listitem>
1251     </varlistentry>
1252
1253     <varlistentry id="limitmap">
1254      <term>pz:limitmap:<replaceable>name</replaceable></term>
1255      <listitem>
1256       <para>
1257        Specifies attributes for limiting a search to a field - using
1258        the limit parameter for search. It can be used to filter locally
1259        or remotely (search in a target). In some cases the mapping of
1260        a field to a value is identical to an existing cclmap field; in
1261        other cases the field must be specified in a different way - for
1262        example to match a complete field (rather than parts of a subfield).
1263       </para>
1264       <para>
1265        The value of limitmap may have one of three forms: referral to
1266        an existing CCL field, a raw PQF string or a local limit. Leading string
1267        determines type; either <literal>ccl:</literal> for CCL field,
1268        <literal>rpn:</literal> for PQF/RPN, or <literal>local:</literal>
1269        for filtering in Pazpar2. The local filtering may be followed
1270        by a field a metadata field (default is to use the name of the
1271        limitmap itself).
1272       </para>
1273       <para>
1274        For Pazpar2 version 1.6.23 and later the limitmap may include multiple
1275        specifications, separated by <literal>,</literal> (comma).
1276        For example:
1277        <literal>ccl:title,local:ltitle,rpn:@attr 1=4</literal>.
1278       </para>
1279       <note>
1280        <para>
1281         The limitmap facility is supported for Pazpar2 version 1.6.0.
1282         Local filtering is supported in Pazpar2 1.6.6.
1283        </para>
1284       </note>
1285      </listitem>
1286     </varlistentry>
1287
1288     <varlistentry>
1289      <term>pz:maxrecs</term>
1290      <listitem>
1291       <para>
1292        Controls the maximum number of records to be retrieved from a
1293        server. The default is 100.
1294       </para>
1295      </listitem>
1296     </varlistentry>
1297
1298     <varlistentry>
1299      <term>pz:memcached</term>
1300      <listitem>
1301       <para>
1302        If set and non-empty,
1303        <ulink url="&url.libmemcached;">libMemcached</ulink> will
1304        configured and enabled for the target.
1305        The value of this setting is same as the ZOOM option
1306        <literal>memcached</literal>, which  in turn is the configuration
1307        string passed to the <function>memcached</function> function
1308        of <ulink url="&url.libmemcached;">libMemcached</ulink>.
1309       </para>
1310       <para>
1311        This setting is honored in Pazpar2 1.6.39 or later. Pazpar2 must
1312        be using YAZ version 5.0.13 or later.
1313       </para>
1314      </listitem>
1315     </varlistentry>
1316
1317     <varlistentry>
1318      <term>pz:nativesyntax</term>
1319      <listitem>
1320       <para>
1321        Specifies how Pazpar2 shoule map retrieved records to XML. Currently
1322        supported values are <literal>xml</literal>,
1323        <literal>iso2709</literal> and <literal>txml</literal>.
1324       </para>
1325       <para>
1326        The value <literal>iso2709</literal> makes Pazpar2 convert retrieved
1327        MARC records to MARCXML. In order to convert to XML, the exact
1328        chacater set of the MARC must be known (if not, the resulting
1329        XML is probably not well-formed). The character set may be
1330        specified by adding:
1331        <literal>;</literal><replaceable>charset</replaceable> to
1332        <literal>iso2709</literal>. If omitted, a charset of
1333        MARC-8 is assumed. This is correct for most MARC21/USMARC records.
1334       </para>
1335       <para>
1336        The value <literal>txml</literal> is like <literal>iso2709</literal>
1337        except that records are converted to TurboMARC instead of MARCXML.
1338       </para>
1339       <para>
1340        The value <literal>xml</literal> is used if Pazpar2 retrieves
1341        records that are already XML (no conversion takes place).
1342       </para>
1343      </listitem>
1344     </varlistentry>
1345
1346     <varlistentry>
1347      <term>pz:negotiation_charset</term>
1348      <listitem>
1349       <para>
1350        Sets character set for Z39.50 negotiation. Most targets do not support
1351        this, and some will even close connection if set (crash on server
1352        side or similar). If set, you probably want to set it to
1353        <literal>UTF-8</literal>.
1354       </para>
1355      </listitem>
1356     </varlistentry>
1357
1358     <varlistentry>
1359      <term>pz:piggyback</term>
1360      <listitem>
1361       <para>
1362        Piggybacking enables the server to retrieve records from the
1363        server as part of the search response in Z39.50. Almost all
1364        servers support this (or fail it gracefully), but a few
1365        servers will produce undesirable results.
1366        Set to '1' to enable piggybacking, '0' to disable it. Default
1367        is 1 (piggybacking enabled).
1368       </para>
1369      </listitem>
1370     </varlistentry>
1371     <varlistentry>
1372      <term>pz:pqf_prefix</term>
1373      <listitem>
1374       <para>
1375        Allows you to specify an arbitrary PQF query language substring.
1376        The provided string is prefixed to the user's query after it has been
1377        normalized to PQF internally in pazpar2.
1378        This allows you to attach complex 'filters' to queries for a given
1379        target, sometimes necessary to select sub-catalogs
1380        in union catalog systems, etc.
1381       </para>
1382      </listitem>
1383     </varlistentry>
1384
1385     <varlistentry>
1386      <term>pz:pqf_strftime</term>
1387      <listitem>
1388       <para>
1389        Allows you to extend a query with dates and operators.
1390        The provided string allows certain substitutions and serves as a
1391        format string.
1392        The special two character sequence '%%' gets converted to the
1393        original query. Other characters leading with the percent sign are
1394        conversions supported by strftime.
1395        All other characters are copied verbatim. For example, the string
1396        <literal>@and @attr 1=30 @attr 2=3 %Y %%</literal>
1397        would search for current year combined with the original PQF (%%).
1398       </para>
1399       <para>
1400        This setting can also be used as more general alternative to
1401        pz:pqf_prefix -- a way of embedding the submitted query
1402        anywhere in the string rather than appending it to prefix.  For
1403        example, if it is desired to omit all records satisfying the
1404        query <literal>@attr 1=pica.bib 0007</literal> then this
1405        subquery can be combined with the submitted query as the second
1406        argument of <literal>@andnot</literal> by using the
1407        pz:pqf_strftime value <literal>@not %% @attr 1=pica.bib
1408        0007</literal>.
1409       </para>
1410      </listitem>
1411     </varlistentry>
1412
1413     <varlistentry>
1414      <term>pz:preferred</term>
1415      <listitem>
1416       <para>
1417        Specifies that a target is preferred, e.g. possible local, faster
1418        target. Using block=pref on show command will wait for all these
1419        targets to return records before releasing the block.
1420        If no target is preferred, the block=pref will identical to block=1,
1421        which release when one target has returned records.
1422       </para>
1423      </listitem>
1424     </varlistentry>
1425
1426     <varlistentry>
1427      <term>pz:presentchunk</term>
1428      <listitem>
1429       <para>
1430        Controls the chunk size in present requests. Pazpar2 will
1431        make (maxrecs / chunk) request(s). The default is 20.
1432       </para>
1433      </listitem>
1434     </varlistentry>
1435
1436     <varlistentry>
1437      <term>pz:queryencoding</term>
1438      <listitem>
1439       <para>
1440        The encoding of the search terms that a target accepts. Most
1441        targets do not honor UTF-8 in which case this needs to be specified.
1442        Each term in a query will be converted if this setting is given.
1443       </para>
1444      </listitem>
1445     </varlistentry>
1446
1447     <varlistentry>
1448      <term>pz:recordfilter</term>
1449      <listitem>
1450       <para>
1451        Specifies a filter which allows Pazpar2 to only include
1452        records that meet a certain criteria in a result.
1453        Unmatched records  will be ignored.
1454        The filter takes the form name, name~value, or name=value, which
1455        will include only records with metadata element (name) that has the
1456        substring (~value) given, or matches exactly (=value).
1457        If value is omitted all records with the named metadata element
1458        present will be included.
1459       </para>
1460      </listitem>
1461     </varlistentry>
1462
1463     <varlistentry id="requestsyntax">
1464      <term>pz:requestsyntax</term>
1465      <listitem>
1466       <para>
1467        This specifies the record syntax to use when requesting
1468        records from a given server. The value can be a symbolic name like
1469        marc21 or xml, or it can be a Z39.50-style dot-separated OID.
1470       </para>
1471      </listitem>
1472     </varlistentry>
1473
1474     <varlistentry>
1475      <term>pz:sort</term>
1476      <listitem>
1477       <para>
1478        Specifies sort criteria to be applied to the result set.
1479        Only works for targets which support the sort service.
1480       </para>
1481      </listitem>
1482     </varlistentry>
1483
1484     <varlistentry id="pzsortmap">
1485      <term>pz:sortmap:<replaceable>field</replaceable></term>
1486      <listitem>
1487       <para>
1488        Specifies native sorting for a target where
1489        <replaceable>field</replaceable> is a sort criteria (see command
1490        show). The value has to components separated by colon: strategy and
1491        native-field. Strategy is one of <literal>z3950</literal>,
1492        <literal>type7</literal>, <literal>cql</literal>,
1493        <literal>sru11</literal>, or <literal>embed</literal>.
1494        The second component, native-field, is the field that is recognized
1495        by the target.
1496       </para>
1497       <note>
1498        <para>
1499         Only supported for Pazpar2 1.6.4 and later.
1500        </para>
1501       </note>
1502      </listitem>
1503     </varlistentry>
1504
1505     <varlistentry>
1506      <term>pz:sru</term>
1507      <listitem>
1508       <para>
1509        This setting enables
1510        <ulink url="&url.sru;">SRU</ulink>/<ulink url="&url.solr;">Solr</ulink>
1511        support.
1512        It has four possible settings.
1513        'get', enables SRU access through GET requests. 'post' enables SRU/POST
1514        support, less commonly supported, but useful if very large requests are
1515        to be submitted. 'soap' enables the SRW (SRU over SOAP) variation of
1516        the protocol.
1517       </para>
1518       <para>
1519        A value of 'solr' enables Solr client support. This is supported
1520        for Pazpar version 1.5.0 and later.
1521       </para>
1522      </listitem>
1523     </varlistentry>
1524
1525     <varlistentry>
1526      <term>pz:sru_version</term>
1527      <listitem>
1528       <para>
1529        This allows SRU version to be specified. If unset Pazpar2
1530        will the default of YAZ (currently 1.2). Should be set
1531        to 1.1 or 1.2. For Solr, the current supported/tested version
1532        is 1.4 and 3.x.
1533       </para>
1534      </listitem>
1535     </varlistentry>
1536
1537     <varlistentry>
1538      <term>pz:termlist_term_count</term>
1539      <listitem>
1540       <para>
1541        Specifies number of facet terms to be requested from the target.
1542        The default is unspecified e.g. server-decided. Also see pz:facetmap.
1543       </para>
1544      </listitem>
1545     </varlistentry>
1546
1547     <varlistentry>
1548      <term>pz:termlist_term_factor</term>
1549      <listitem>
1550       <para>
1551        Specifies whether to use a factor for pazpar2 generated facets (1)
1552        or not (0).
1553        When mixing locally generated (by the downloaded (pz:maxrecs) samples)
1554        facet with native (target-generated) facets, the later will
1555        dominated the dominate the facet list since they are generated
1556        based on the complete result set.
1557        By scaling up the facet count using the ratio between total hit
1558        count and the sample size,
1559        the total facet count can be approximated and thus better compared
1560        with native facets. This is not enabled by default.
1561       </para>
1562      </listitem>
1563     </varlistentry>
1564
1565     <varlistentry id="pzurl">
1566      <term>pz:url</term>
1567      <listitem>
1568       <para>
1569        Specifies URL for the target and overrides the target ID.
1570       </para>
1571       <note>
1572        <para>
1573         <literal>pz:url</literal> is only recognized for
1574         Pazpar2 1.6.4 and later.
1575        </para>
1576       </note>
1577      </listitem>
1578     </varlistentry>
1579
1580     <varlistentry>
1581      <term id="pzxslt" xreflabel="pz:xslt">pz:xslt</term>
1582      <listitem>
1583       <para>
1584        Is a comma separated list of of stylesheet names that specifies
1585        how to convert incoming records to the internal representation.
1586       </para>
1587       <para>
1588        For each name, the embedded stylesheets (XSL) that comes with the
1589        service definition are consulted first and takes precedence over
1590        external files; see <xref linkend="servicexslt"/>
1591        of service definition).
1592        If the name does not match an embedded stylesheet it is
1593        considered a filename.
1594       </para>
1595       <para>
1596        The suffix of each file specifies the kind of tranformation.
1597        Suffix "<literal>.xsl</literal>" makes an XSL transform. Suffix
1598        "<literal>.mmap</literal>" will use the MMAP transform (described below).
1599       </para>
1600       <para>
1601        The special value "<literal>auto</literal>" will use a file
1602        which is the <link linkend="requestsyntax">pz:requestsyntax's</link>
1603        value followed by
1604        <literal>'.xsl'</literal>.
1605       </para>
1606       <para>
1607        When mapping MARC records, XSLT can be bypassed for increased
1608        performance with the alternate "MARC map" format.  Provide the
1609        path of a file with extension ".mmap" containing on each line:
1610        <programlisting>
1611        &lt;field&gt; &lt;subfield&gt; &lt;metadata element&gt;</programlisting>
1612        For example:
1613        <programlisting>
1614         245 a title
1615         500 $ description
1616         773 * citation
1617        </programlisting>
1618        To map the field value specify a subfield of '$'.  To store a
1619        concatenation of all subfields, specify a subfield of '*'.
1620       </para>
1621      </listitem>
1622     </varlistentry>
1623
1624     <varlistentry>
1625      <term>pz:zproxy</term>
1626      <listitem>
1627       <para>
1628        The 'pz:zproxy' setting has the value syntax
1629        'host.internet.adress:port', it is used to tunnel Z39.50
1630        requests through the named Z39.50 proxy.
1631       </para>
1632      </listitem>
1633     </varlistentry>
1634
1635    </variablelist>
1636   </refsect2>
1637
1638  </refsect1>
1639  <refsect1>
1640   <title>SEE ALSO</title>
1641   <para>
1642    <citerefentry>
1643     <refentrytitle>pazpar2</refentrytitle>
1644     <manvolnum>8</manvolnum>
1645    </citerefentry>
1646    <citerefentry>
1647     <refentrytitle>yaz-icu</refentrytitle>
1648     <manvolnum>1</manvolnum>
1649    </citerefentry>
1650    <citerefentry>
1651     <refentrytitle>pazpar2_protocol</refentrytitle>
1652     <manvolnum>7</manvolnum>
1653    </citerefentry>
1654   </para>
1655  </refsect1>
1656 </refentry>
1657 <!-- Keep this comment at the end of the file
1658 Local variables:
1659 mode: nxml
1660 nxml-child-indent: 1
1661 End:
1662 -->