<row><entry><literal>s=ag</literal></entry><entry>
Tokens that appears as phrases (with blank in them) gets
- structure phrase attached. Tokens that appers as words
- gets structure phrase attached. Phrases and words are
+ structure phrase attached (4=1). Tokens that appear to be words
+ gets structure word attached (4=2). Phrases and words are
ANDed. This is a variant of s=al and s=pw, with the main
difference that words are not split (with operator AND)
but instead kept in one RPN token. This facility appeared
<entry><literal>?</literal></entry>
</row>
<row>
+ <entry>mask</entry>
+ <entry>Masking character. Requires YAZ 4.2.58 or later</entry>
+ <entry><literal>#</literal></entry>
+ </row>
+ <row>
<entry>field</entry>
<entry>Specifies how multiple fields are to be
combined. There are two modes: <literal>or</literal>:
<synopsis>
#define CQL_NODE_ST 1
#define CQL_NODE_BOOL 2
+#define CQL_NODE_SORT 3
struct cql_node {
int which;
union {
struct cql_node *right;
struct cql_node *modifiers;
} boolean;
+ struct {
+ char *index;
+ struct cql_node *next;
+ struct cql_node *modifiers;
+ struct cql_node *search;
+ } sort;
} u;
};
</synopsis>
- There are two node types: search term (ST) and boolean (BOOL).
+ There are three node types: search term (ST), boolean (BOOL)
+ and sortby (SORT).
A modifier is treated as a search term too.
</para>
<para>
</para>
<para>
- The boolean node represents both <literal>and</literal>,
- <literal>or</literal>, not as well as
+ The boolean node represents <literal>and</literal>,
+ <literal>or</literal>, <literal>not</literal> +
proximity.
<itemizedlist>
<listitem>
</itemizedlist>
</para>
+ <para>
+ The sort node represents both the SORTBY clause.
+ </para>
+
</sect3>
<sect3 id="cql.to.pqf"><title>CQL to PQF conversion</title>
<para>
a file.
</para>
</sect3>
+ <sect3 id="rpn.to.cql">
+ <title>PQF to CQL conversion</title>
+ <para>
+ Conversion from PQF to CQL is offered by the two functions shown
+ below. The former uses a generic stream for result. The latter
+ puts result in a WRBUF (string container).
+ <synopsis>
+#include <yaz/rpn2cql.h>
+
+int cql_transform_rpn2cql_stream(cql_transform_t ct,
+ void (*pr)(const char *buf, void *client_data),
+ void *client_data,
+ Z_RPNQuery *q);
+
+int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
+ WRBUF w,
+ Z_RPNQuery *q);
+ </synopsis>
+ The configuration is the same as used in CQL to PQF conversions.
+ </para>
+ </sect3>
</sect2>
</sect1>
<sect1 id="tools.oid"><title>Object Identifiers</title>
</itemizedlist>
</para>
</example>
+
+ <example id="tools.retrieval.marcxml">
+ <title>MARCXML backend</title>
+ <para>
+ SRW/SRU and Solr backends returns records in XML.
+ If they return MARCXML or MarcXchange, the retrieval module
+ can convert those into ISO2709 formats, most commonly USMARC
+ (AKA MARC21).
+ In this example, the backend returns MARCXML for schema="marcxml".
+ </para>
+ <programlisting><![CDATA[
+ <retrievalinfo>
+ <retrieval syntax="usmarc">
+ <backend syntax="xml" name="marcxml">
+ <marc inputformat="xml" outputformat="marc"
+ outputcharset="marc-8"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="marcxml"
+ identifier="info:srw/schema/1/marcxml-v1.1"/>
+ <retrieval syntax="xml" name="dc">
+ <backend syntax="xml" name="marcxml">
+ <xslt stylesheet="MARC21slim2DC.xsl"/>
+ </backend>
+ </retrieval>
+ </retrievalinfo>
+]]>
+ </programlisting>
+ <para>
+ This means that our frontend supports:
+ <itemizedlist>
+ <listitem>
+ <para>
+ MARC21 records (any element set name) in MARC-8 encoding.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ MARCXML records for element-set=marcxml
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Dublin core records for element-set=dc.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </example>
+
</sect2>
<sect2 id="tools.retrieval.api">
<title>API</title>