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