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