CQL v1.2 functionality except sort.
authorAdam Dickmeiss <adam@indexdata.dk>
Sun, 6 Jan 2008 13:08:09 +0000 (13:08 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Sun, 6 Jan 2008 13:08:09 +0000 (13:08 +0000)
Modify CQL parser and transform code to become more CQL 1.2 compliant.
Default relation is '=' instead 'scr'. Relation for exact is ==
instead of 'exact'. Work on bug #609: HDCQL.

48 files changed:
etc/pqf.properties
src/cql.y
src/cqltransform.c
src/cqlutil.c
test/cql/1.1.out
test/cql/1.10.out
test/cql/1.11.out
test/cql/1.2.out
test/cql/1.3.out
test/cql/1.4.out
test/cql/1.5.out
test/cql/1.6.out
test/cql/1.7.out
test/cql/1.8.out
test/cql/1.9.out
test/cql/2.12.out
test/cql/2.2.out
test/cql/3.1.out
test/cql/3.2.out
test/cql/3.3.out
test/cql/3.4.out
test/cql/3.5.out
test/cql/3.6.out
test/cql/3.7.out
test/cql/3.8.out
test/cql/3.9.out
test/cql/4.2.out
test/cql/5.1.out
test/cql/5.2.out
test/cql/5.3.out
test/cql/5.4.out
test/cql/5.5.out
test/cql/5.6.out
test/cql/5.7.out
test/cql/5.8.out
test/cql/6.1.out
test/cql/6.2.out
test/cql/6.3.out
test/cql/6.4.out
test/cql/6.5.out
test/cql/6.6.out
test/cql/7.1.out
test/cql/7.2.out
test/cql/7.3.out
test/cql/9.1.out
test/cql/9.2.out
test/cql/9.3.out
test/cqlsample

index 8a700f5..fda24d5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: pqf.properties,v 1.13 2006-09-20 10:12:29 mike Exp $
+# $Id: pqf.properties,v 1.14 2008-01-06 13:08:09 adam Exp $
 #
 # Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF()
 # back-end and the YAZ CQL-to-PQF converter.  This specifies the
@@ -12,7 +12,7 @@
 # attributes.
 
 # Identifiers for prefixes used in this file. (index.*)
-set.cql                = info:srw/cql-context-set/1/cql-v1.1
+set.cql                = info:srw/cql-context-set/1/cql-v1.2
 set.rec                = info:srw/cql-context-set/2/rec-1.1
 set.dc         = info:srw/cql-context-set/1/dc-v1.1
 set.bath       = http://zing.z3950.org/cql/bath/2.0/
index 20013cb..8daf2cb 100644 (file)
--- a/src/cql.y
+++ b/src/cql.y
@@ -1,4 +1,4 @@
-/* $Id: cql.y,v 1.15 2007-10-31 21:58:07 adam Exp $
+/* $Id: cql.y,v 1.16 2008-01-06 13:08:09 adam Exp $
    Copyright (C) 2002-2006
    Index Data ApS
 
@@ -58,14 +58,13 @@ See the file LICENSE.
 %}
 
 %pure_parser
-%token TERM AND OR NOT PROX GE LE NE
-%expect 9
+%token DOTTERM TERM AND OR NOT PROX GE LE NE EXACT
 
 %%
 
 top: { 
     $$.rel = cql_node_mk_sc(((CQL_parser) parm)->nmem,
-                           "cql.serverChoice", "scr", 0);
+                           "cql.serverChoice", "=", 0);
     ((CQL_parser) parm)->top = 0;
 } cqlQuery1 {
     cql_node_destroy($$.rel);
@@ -80,10 +79,27 @@ cqlQuery1: cqlQuery
 }
 ;
 
-cqlQuery: 
+cqlQuery:
+  scopedClause
+ |
+  '>' searchTerm '=' searchTerm {
+    $$.rel = $0.rel;
+  } cqlQuery {
+    $$.cql = cql_apply_prefix(((CQL_parser) parm)->nmem,
+                             $6.cql, $2.buf, $4.buf);
+  }
+| '>' searchTerm {
+      $$.rel = $0.rel;
+  } cqlQuery {
+    $$.cql = cql_apply_prefix(((CQL_parser) parm)->nmem, 
+                             $4.cql, 0, $2.buf);
+   }
+;
+
+scopedClause: 
   searchClause
 |
-  cqlQuery boolean modifiers { 
+  scopedClause boolean modifiers { 
       $$.rel = $0.rel;
   } searchClause {
       struct cql_node *cn = cql_node_mk_boolean(((CQL_parser) parm)->nmem,
@@ -118,18 +134,6 @@ searchClause:
       $$.cql = $5.cql;
       cql_node_destroy($4.rel);
   }
-| '>' searchTerm '=' searchTerm {
-      $$.rel = $0.rel;
-  } cqlQuery {
-    $$.cql = cql_apply_prefix(((CQL_parser) parm)->nmem,
-                             $6.cql, $2.buf, $4.buf);
-  }
-| '>' searchTerm {
-      $$.rel = $0.rel;
-  } cqlQuery {
-    $$.cql = cql_apply_prefix(((CQL_parser) parm)->nmem, 
-                             $4.cql, 0, $2.buf);
-   }
 ;
 
 /* unary NOT search TERM here .. */
@@ -160,6 +164,11 @@ modifiers '/' searchTerm mrelation searchTerm
 }
 ;
 
+/*
+extraTerms:
+   extraTerms TERM | ;
+*/
+
 mrelation:
   '=' 
 | '>' 
@@ -167,6 +176,7 @@ mrelation:
 | GE
 | LE
 | NE
+| EXACT
 ;
 
 relation: 
@@ -176,7 +186,8 @@ relation:
 | GE
 | LE
 | NE
-| TERM
+| EXACT
+| DOTTERM
 ;
 
 index: 
@@ -184,6 +195,7 @@ index:
 
 searchTerm:
   TERM
+| DOTTERM
 | AND
 | OR
 | NOT
@@ -244,7 +256,18 @@ int yylex(YYSTYPE *lval, void *vp)
     {
         int c1;
         putb(lval, cp, c);
-        if (c == '>')
+       if (c == '=')
+       {
+            c1 = cp->getbyte(cp->client_data);
+            if (c1 == '=')
+            {
+                putb(lval, cp, c1);
+                return EXACT;
+            }
+            else
+                cp->ungetbyte(c1, cp->client_data);
+       }
+        else if (c == '>')
         {
             c1 = cp->getbyte(cp->client_data);
             if (c1 == '=')
@@ -287,47 +310,57 @@ int yylex(YYSTYPE *lval, void *vp)
            putb(lval, cp, c);
         }
         putb(lval, cp, 0);
+       return TERM;
     }
     else
     {
-        while (c != 0 && !strchr(" \n()=<>/", c))
-        {
-            if (c == '\\')
+       int relation_like = 0;
+       while (c != 0 && !strchr(" \n()=<>/", c))
+       {
+           if (c == '.')
+               relation_like = 1;
+           if (c == '\\')
            {
                putb(lval, cp, c);
-                c = cp->getbyte(cp->client_data);
+               c = cp->getbyte(cp->client_data);
                if (!c)
                    break;
            }
-            putb(lval, cp, c);
+           putb(lval, cp, c);
            c = cp->getbyte(cp->client_data);
-        }
+       }
        putb(lval, cp, 0);
 #if YYDEBUG
-        printf ("got %s\n", lval->buf);
+       printf ("got %s\n", lval->buf);
 #endif
-        if (c != 0)
-            cp->ungetbyte(c, cp->client_data);
-        if (!cql_strcmp(lval->buf, "and"))
+       if (c != 0)
+           cp->ungetbyte(c, cp->client_data);
+       if (!cql_strcmp(lval->buf, "and"))
        {
            lval->buf = "and";
-            return AND;
+           return AND;
        }
-        if (!cql_strcmp(lval->buf, "or"))
+       if (!cql_strcmp(lval->buf, "or"))
        {
            lval->buf = "or";
-            return OR;
+           return OR;
        }
-        if (!cql_strcmp(lval->buf, "not"))
+       if (!cql_strcmp(lval->buf, "not"))
        {
            lval->buf = "not";
-            return NOT;
+           return NOT;
        }
-        if (!cql_strcmp(lval->buf, "prox"))
+       if (!cql_strcmp(lval->buf, "prox"))
        {
            lval->buf = "prox";
-            return PROX;
+           return PROX;
        }
+       if (!cql_strcmp(lval->buf, "all"))
+           relation_like = 1;
+       if (!cql_strcmp(lval->buf, "any"))
+           relation_like = 1;
+       if (relation_like)
+           return DOTTERM;
     }
     return TERM;
 }
index 8411878..fa7da0e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: cqltransform.c,v 1.30 2007-12-20 22:45:37 adam Exp $
+/* $Id: cqltransform.c,v 1.31 2008-01-06 13:08:09 adam Exp $
    Copyright (C) 1995-2007, Index Data ApS
    Index Data Aps
 
@@ -185,6 +185,18 @@ int cql_pr_attr_uri(cql_transform_t ct, const char *category,
     {
         if (!res)
             res = cql_lookup_property(ct, category, prefix, eval);
+        /* we have some aliases for some relations unfortunately.. */
+        if (!res && !prefix && !strcmp(category, "relation"))
+        {
+            if (!strcmp(val, "=="))
+                res = cql_lookup_property(ct, category, prefix, "exact");
+            if (!strcmp(val, "="))
+                res = cql_lookup_property(ct, category, prefix, "eq");
+            if (!strcmp(val, "<="))
+                res = cql_lookup_property(ct, category, prefix, "le");
+            if (!strcmp(val, ">="))
+                res = cql_lookup_property(ct, category, prefix, "ge");
+        }
         if (!res)
             res = cql_lookup_property(ct, category, prefix, "*");
     }
@@ -572,18 +584,7 @@ void cql_transform_r(cql_transform_t ct,
             }
         }
         cql_pr_attr(ct, "always", 0, 0, pr, client_data, 0);
-        if (cn->u.st.relation && !cql_strcmp(cn->u.st.relation, "="))
-            cql_pr_attr(ct, "relation", "eq", "scr",
-                        pr, client_data, 19);
-        else if (cn->u.st.relation && !cql_strcmp(cn->u.st.relation, "<="))
-            cql_pr_attr(ct, "relation", "le", "scr",
-                        pr, client_data, 19);
-        else if (cn->u.st.relation && !cql_strcmp(cn->u.st.relation, ">="))
-            cql_pr_attr(ct, "relation", "ge", "scr",
-                        pr, client_data, 19);
-        else
-            cql_pr_attr(ct, "relation", cn->u.st.relation, "eq",
-                        pr, client_data, 19);
+        cql_pr_attr(ct, "relation", cn->u.st.relation, 0, pr, client_data, 19);
         cql_pr_attr(ct, "structure", cn->u.st.relation, 0,
                     pr, client_data, 24);
         if (cn->u.st.relation && !cql_strcmp(cn->u.st.relation, "all"))
index 7550535..836d840 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: cqlutil.c,v 1.11 2007-01-03 08:42:15 adam Exp $
+/* $Id: cqlutil.c,v 1.12 2008-01-06 13:08:09 adam Exp $
    Copyright (C) 1995-2007, Index Data ApS
    Index Data Aps
 
@@ -86,7 +86,7 @@ struct cql_node *cql_node_mk_boolean(NMEM nmem, const char *op)
 
 const char *cql_uri(void)
 {
-    return "info:srw/cql-context-set/1/cql-v1.1";
+    return "info:srw/cql-context-set/1/cql-v1.2";
 }
 
 struct cql_node *cql_apply_prefix(NMEM nmem,
index 04e6f3f..48aee99 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat</term>
 </searchClause>
index a44a871..c5ac7f6 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>all</term>
 </searchClause>
index 6aa73cd..88da9eb 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>prox</term>
 </searchClause>
index 04e6f3f..48aee99 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat</term>
 </searchClause>
index 216c15c..af191d3 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>comp.os.linux</term>
 </searchClause>
index 9b2ab93..ea3207a 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>ml:element</term>
 </searchClause>
index 4ce7bc2..6ec410e 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>&lt;xml:element&gt;</term>
 </searchClause>
index d7786cb..da69755 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>=</term>
 </searchClause>
index 29742fc..851a5c1 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>prox/distance&lt;3/unit=word</term>
 </searchClause>
index 04e6f3f..48aee99 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat</term>
 </searchClause>
index b8cbb85..d41b39e 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>dog</term>
 </searchClause>
index a648cc5..fc3287e 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>dc.title</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>fish frog chicken</term>
 </searchClause>
index 2b78ddf..fd085e3 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>title</index>
   <relation>
-    <value>exact</value>
+    <value>==</value>
   </relation>
   <term>fish</term>
 </searchClause>
index de0acae..fc1b678 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>dog</term>
     </searchClause>
index f5dba0b..55ae66a 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>fish</term>
     </searchClause>
index 895ee06..2f4f6c0 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>frog</term>
     </searchClause>
index 895ee06..2f4f6c0 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>frog</term>
     </searchClause>
index 4627440..9ad0700 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>fish food</term>
     </searchClause>
index 049b9d8..7b8dae8 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>xml</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>prox///</term>
     </searchClause>
index 0a62182..5e0076e 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>fred</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>any</term>
     </searchClause>
index d971224..f080d4b 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>fred</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>all</term>
     </searchClause>
index 9b7f604..4f3ade7 100644 (file)
@@ -16,7 +16,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>a</term>
             </searchClause>
@@ -25,7 +25,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>b</term>
             </searchClause>
@@ -36,7 +36,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>c</term>
         </searchClause>
@@ -47,7 +47,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>d</term>
     </searchClause>
index 682adcd..0dcb869 100644 (file)
@@ -20,7 +20,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>and</term>
     </searchClause>
index b42c733..406d103 100644 (file)
@@ -6,7 +6,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -15,7 +15,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>hat</term>
     </searchClause>
index 323a671..53fa314 100644 (file)
@@ -21,7 +21,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -30,7 +30,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>hat</term>
     </searchClause>
index aa8ab2d..25c5377 100644 (file)
@@ -13,7 +13,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>cat</term>
     </searchClause>
@@ -22,7 +22,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>hat</term>
     </searchClause>
index a08a64e..a6e2198 100644 (file)
@@ -13,7 +13,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>fish food</term>
     </searchClause>
@@ -22,7 +22,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>and</term>
     </searchClause>
index 9212ca4..a59341f 100644 (file)
@@ -22,7 +22,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>exact</term>
     </searchClause>
index b202f00..b05d320 100644 (file)
@@ -18,7 +18,7 @@
     <searchClause>
       <index>dc.author</index>
       <relation>
-        <value>exact</value>
+        <value>==</value>
       </relation>
       <term>jones</term>
     </searchClause>
index 3a1f51b..57f4037 100644 (file)
@@ -11,7 +11,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>a</term>
     </searchClause>
@@ -20,7 +20,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>b</term>
     </searchClause>
index d406c53..1dc3602 100644 (file)
@@ -13,7 +13,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>a</term>
     </searchClause>
@@ -22,7 +22,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>b</term>
     </searchClause>
index 6e59421..0dcc5fb 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat^</term>
 </searchClause>
index 04e6f3f..48aee99 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat</term>
 </searchClause>
index b3f98bd..68b2dd5 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>^cat says \"fish\"</term>
 </searchClause>
index 4c5cf95..ee38b0e 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat*fish</term>
 </searchClause>
index d82b932..dc59539 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>cat?dog</term>
 </searchClause>
index 4328f85..2a0cd96 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>^cat*fishdog\"horse?</term>
 </searchClause>
index e9baec9..3338a9f 100644 (file)
@@ -16,7 +16,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>cat</term>
             </searchClause>
@@ -25,7 +25,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>dog</term>
             </searchClause>
@@ -36,7 +36,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>horse</term>
         </searchClause>
@@ -47,7 +47,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>frog</term>
     </searchClause>
index 8df4539..1324889 100644 (file)
@@ -11,7 +11,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>cat</term>
         </searchClause>
@@ -20,7 +20,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>dog</term>
         </searchClause>
@@ -36,7 +36,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>horse</term>
         </searchClause>
@@ -45,7 +45,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>frog</term>
         </searchClause>
index 3a057fd..202af98 100644 (file)
@@ -11,7 +11,7 @@
         <searchClause>
           <index>cql.serverChoice</index>
           <relation>
-            <value>scr</value>
+            <value>=</value>
           </relation>
           <term>cat</term>
         </searchClause>
@@ -25,7 +25,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>horse</term>
             </searchClause>
@@ -34,7 +34,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>frog</term>
             </searchClause>
@@ -47,7 +47,7 @@
     <searchClause>
       <index>cql.serverChoice</index>
       <relation>
-        <value>scr</value>
+        <value>=</value>
       </relation>
       <term>chips</term>
     </searchClause>
index eac3a28..ff98d6f 100644 (file)
@@ -16,7 +16,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>any</term>
             </searchClause>
@@ -25,7 +25,7 @@
             <searchClause>
               <index>cql.serverChoice</index>
               <relation>
-                <value>scr</value>
+                <value>=</value>
               </relation>
               <term>all:stem</term>
             </searchClause>
@@ -36,7 +36,7 @@
         <searchClause>
           <index>all</index>
           <relation>
-            <value>exact</value>
+            <value>==</value>
           </relation>
           <term>any</term>
         </searchClause>
index eb0d4a9..dd7c8f0 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term>any</term>
 </searchClause>
index ee798ea..1eeff16 100644 (file)
@@ -1,7 +1,7 @@
 <searchClause>
   <index>cql.serverChoice</index>
   <relation>
-    <value>scr</value>
+    <value>=</value>
   </relation>
   <term></term>
 </searchClause>
index 3fba953..f08ff47 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: cqlsample,v 1.2 2004-03-10 18:50:56 adam Exp $
+# $Id: cqlsample,v 1.3 2008-01-06 13:08:09 adam Exp $
 # CQL queries for testing.
 # from http://www.loc.gov/z3950/agency/zing/cql/sample-queries.html
 # Simple Term
@@ -18,7 +18,7 @@ prox
 # Index Relation Term
 
 title = "fish"
-title exact fish
+title == fish
 title any fish
 title all fish
 title > 9
@@ -28,7 +28,7 @@ dc.title any/stem fish
 dc.fish all/stem/fuzzy "fish chips"
 (title any frog)
 ((dc.title any/stem "frog pond"))
-dc.title scr "fish frog chicken"
+dc.title = "fish frog chicken"
 dc.title =/rel.algorithm=CORI squid
 creator any/f.foo/b.bar>1 "sanderson taylor" 
 
@@ -56,7 +56,7 @@ cat prox/distance=3/unit=word/ordered hat
 cat prox/distance<3 hat
 "fish food" prox/unit=sentence and
 title all "chips frog" prox/distance<=5 exact
-(dc.author exact "jones" prox/distance>5/unit=element title >= "smith")
+(dc.author == "jones" prox/distance>5/unit=element title >= "smith")
 a and/rel.SumOfScores b
 a and/rel.algorithm=CORI b 
 
@@ -83,7 +83,7 @@ cat?dog
 
 # Lame Searches
 
-any or all:stem and all exact any prox prox=fuzzy
+any or all:stem and all == any prox prox=fuzzy
 (((((((((any)))))))))
 ""
 > any > any = exact any > any