X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Ftools.xml;h=242cdae4ff7e63094f88b2592a11fe3e88a47622;hb=f43cb3097bc38bd3e38c5bb3024d567793ab30fe;hp=e490b1c071b9b83234a219511e2a6530cf4ef407;hpb=6a8bbb0642cc2256976e0f2e0203c4b61bd7f3ad;p=yaz-moved-to-github.git
diff --git a/doc/tools.xml b/doc/tools.xml
index e490b1c..242cdae 100644
--- a/doc/tools.xml
+++ b/doc/tools.xml
@@ -686,8 +686,8 @@
s=ag
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
@@ -867,6 +867,11 @@
?
+ mask
+ Masking character. Requires YAZ 4.2.58 or later
+ #
+
+
field
Specifies how multiple fields are to be
combined. There are two modes: or:
@@ -1092,6 +1097,7 @@ struct cql_node *cql_parser_result(CQL_parser cp);
#define CQL_NODE_ST 1
#define CQL_NODE_BOOL 2
+#define CQL_NODE_SORT 3
struct cql_node {
int which;
union {
@@ -1109,10 +1115,17 @@ struct cql_node {
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;
};
- 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.
@@ -1157,8 +1170,8 @@ struct cql_node {
- The boolean node represents both and,
- or, not as well as
+ The boolean node represents and,
+ or, not +
proximity.
@@ -1175,6 +1188,10 @@ struct cql_node {
+
+ The sort node represents both the SORTBY clause.
+
+
CQL to PQF conversion
@@ -1557,6 +1574,27 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
a file.
+
+ PQF to CQL conversion
+
+ 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).
+
+#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);
+
+ The configuration is the same as used in CQL to PQF conversions.
+
+
Object Identifiers