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