DB: Add refentryinfo for man pages
[metaproxy-moved-to-github.git] / doc / virt_db.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
2     "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3  <!ENTITY copyright SYSTEM "copyright.xml">
4  <!ENTITY % idcommon SYSTEM "common/common.ent">
5      %idcommon;
6 ]>
7 <refentry id="ref-virt_db">
8  <refentryinfo>
9   <productname>Metaproxy</productname>
10   <info><orgname>Index Data</orgname></info>
11  </refentryinfo>
12
13  <refmeta>
14   <refentrytitle>virt_db</refentrytitle>
15   <manvolnum>3mp</manvolnum>
16   <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
17  </refmeta>
18  
19  <refnamediv>
20   <refname>virt_db</refname>
21   <refpurpose>Metaproxy Virtual Databases Module</refpurpose>
22  </refnamediv>
23  
24  <refsect1><title>DESCRIPTION</title>
25   <para>
26    This filter allows one Z39.50 database to be me mapped to
27    another target; or even multiple targets.
28   </para>
29   <para>
30    The configuration of virt_db consists of zero or more 
31    <literal>&lt;virtual&gt;</literal> elements each describing the
32    Z39.50 virtual database recognized.
33    The name of the database is the text content of the
34    <literal>&lt;database&gt;</literal> element which should be
35    first element inside the virtual section. 
36   </para>
37   <para>
38    For Metaproxy 1.0.20 and later, the database is treated as a glob pattern.
39    This allows operators * (any number of any character) and 
40    ? (any single character). The virtual sections are inspected in
41    the order given. The first matching virtual database is used.
42   </para>
43   <para>
44    Following that is one or more <literal>&lt;target&gt;</literal>
45    elements with the identifier of each target that the virtual database
46    maps to. If a database is given for a target (following a slash), that
47    database name is used as Z39.50 database for this target. If the
48    database is omitted for the target, the original (virtual) database
49    is used as Z39.50 database.
50   </para>
51   <para>
52    If multiple targets are given that has special meaning depending on the
53    filter following virt_db. If the following filter is load_balance, then
54    the load_balance filter will load balance between the targets given
55    (assuming they serve same content). If the following filter is multi,
56    then results will be merged from all targets instead.
57   </para>
58   <para>
59    The z3950_filter, on the other hand, does not support multiple targets.
60   </para>
61   <para>
62    For <literal>&lt;virtual&gt;</literal> a route may be given as
63    an attribute. This will make Metaproxy route traffic to the route
64    given. Note that virtual databases may not be combined if all
65    databases do not result in the same routing.
66   </para>
67  </refsect1>
68  
69  <refsect1><title>EXAMPLES</title>
70   <para>
71    Consider this virt_db configuration:
72    <screen><![CDATA[
73     <filter type="virt_db">
74       <virtual>
75         <database>db1</database>
76         <target>localhost:9999/Default</target>
77       </virtual>
78       <virtual>
79         <database>db2</database>
80         <target>indexdata.com/gils</target>
81       </virtual>
82       <virtual>
83         <database>combined</database>
84         <target>indexdata.com/gils</target>
85         <target>localhost:9999/Default</target>
86       </virtual>
87       <virtual route="special">
88         <database>db3</database>
89         <target>indexdata.com/special</target>
90       </virtual>
91       <virtual>
92         <database>*</database><!-- default -->
93         <target>localhost:9999</target><-- database not altered -->
94       </virtual>
95     </filter>
96 ]]>
97    </screen>
98    This will offer 4 databases, <literal>db1</literal>, 
99    <literal>db2</literal>, <literal>combined</literal> and
100    <literal>db3</literal>. If a Z39.50 specifies <literal>db1</literal>
101    and <literal>db2</literal> that will have same effect as specifying
102    the single database <literal>combined</literal>.
103   </para>
104   <para>
105    Since <literal>db3</literal> routes differently from the other databases,
106    this database may not be combined with the others.
107   </para>
108  </refsect1> 
109  
110  <refsect1><title>SEE ALSO</title>
111   <para>
112    <citerefentry>
113     <refentrytitle>metaproxy</refentrytitle>
114     <manvolnum>1</manvolnum>
115    </citerefentry>
116   </para>
117   <para>
118    <citerefentry>
119     <refentrytitle>multi</refentrytitle>
120     <manvolnum>3mp</manvolnum>
121    </citerefentry>
122    <citerefentry>
123     <refentrytitle>load_balance</refentrytitle>
124     <manvolnum>3mp</manvolnum>
125    </citerefentry>
126   </para>
127  </refsect1>
128  
129  &copyright;
130 </refentry>
131
132 <!-- Keep this comment at the end of the file
133 Local variables:
134 mode: sgml
135 sgml-omittag:t
136 sgml-shorttag:t
137 sgml-minimize-attributes:nil
138 sgml-always-quote-attributes:t
139 sgml-indent-step:1
140 sgml-indent-data:t
141 sgml-parent-document:nil
142 sgml-local-catalogs: nil
143 sgml-namecase-general:t
144 End:
145 -->