# $Id: Build,v 1.2 2002-11-20 17:20:11 mike Exp $
: ${MAKE=make}
-for dir in src/org/z3950/zing/cql test/regression docs; do
+for dir in src/main/java/org/z3950/zing/cql test/regression docs; do
echo "=== Building in $dir ==="
( cd $dir; $MAKE ${@+"$@"} )
done
The work for releases 1.0, 1.2 and 1.2.1 was sponsored by the National
Library of Australia, whose help we gratefully acknowledge.
+1.5 Tue May 25 16:44:35 CEST 2010
+ - Fix recognition of word-relations to correctly match what is
+ specified in the CQL v1.1 and v1.2 documents. In
+ particular, "encloses" and "within" are recognised, so that
+ Masterkey's use of "encloses" for IP range authentication
+ works again.
+ - Update regression tests accordingly.
+ - Extend test/random/ to emit summary line of successful
+ recompilations.
+
1.4 Thu May 20 00:38:40 BST 2010
- Add support for interpreting sequences of non-keywords as a
single multi-word term rather than a broken INDEX RELATION
<groupId>org.z3950.zing</groupId>
<artifactId>cql-java</artifactId>
<packaging>jar</packaging>
- <version>1.4</version>
+ <version>1.5</version>
<name>cql-java</name>
<url>http://maven.apache.org</url>
<build>
return generate_numeric_relation();
} else {
switch (rnd.nextInt(3)) {
- case 0: return "exact";
+ case 0: return "within";
case 1: return "all";
case 2: return "any";
}
" (" + lexer.render() + ")");
if (lexer.ttype == lexer.TT_WORD &&
(lexer.sval.indexOf('.') >= 0 ||
- lexer.sval.equals("exact") ||
lexer.sval.equals("any") ||
lexer.sval.equals("all") ||
- (lexer.sval.equals("scr") && compat == V1POINT2)))
+ lexer.sval.equals("within") ||
+ lexer.sval.equals("encloses") ||
+ (lexer.sval.equals("exact") && compat != V1POINT2) ||
+ (lexer.sval.equals("scr") && compat != V1POINT2) ||
+ (lexer.sval.equals("adj") && compat == V1POINT2)))
return true;
return isSymbolicRelation();
UnknownIndexException.class UnknownRelationException.class \
UnknownRelationModifierException.class UnknownPositionException.class
-JARPATH = ../lib/cql-java.jar
+JARPATH = ../../../lib/cql-java.jar
JAR = ../../../../../../$(JARPATH)
$(JAR): $(OBJ)
- cd ../../../../../..; jar cf $(JARPATH) main/java/org/z3950/zing/cql/*.class
+ cd ../../../..; jar cf $(JARPATH) org/z3950/zing/cql/*.class
%.class: %.java
javac -Xlint:unchecked *.java
$n = $ARGV[0];
}
+my $nok = 0;
for (my $i = 0; $i < $n; $i++) {
print $i+1, " of $n -- ";
my $query=`CQLGenerator ../../etc/generate.properties`;
print $query;
my $canon=`CQLParser -c '$query'`;
- if ($canon ne $query) {
+ if ($canon eq $query) {
+ $nok++;
+ } else {
print "ERROR: canonicalised query differs from original\n";
}
}
+
+print "Passed $nok/$n -- ", int(100*$nok/$n), "%\n";
dc.fish all/stem/fuzzy "fish chips"
(title any frog)
((dc.title any/stem "frog pond"))
-dc.title scr "fish frog chicken"
+dc.title any "fish frog chicken"
dc.title =/rel.algorithm=CORI squid
author any/f.foo/b.bar>1 "sanderson taylor"
numberOfLegs <= 4
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")
((cat prox hat))
a and/rel.SumOfScores b
a and/rel.algorithm=CORI b
# Lame Searches
-any or all:stem and all exact any prox prox=fuzzy
+any or all:stem and all contains any prox proxfuzzy
(((((((((any)))))))))
""
> any > any = exact any > any
<searchClause>
- <index>title</index>
+ <index>cql.serverChoice</index>
<relation>
- <value>exact</value>
+ <value>=</value>
</relation>
- <term>fish</term>
+ <term>title exact fish</term>
</searchClause>
<searchClause>
<index>dc.title</index>
<relation>
- <value>scr</value>
+ <value>any</value>
</relation>
<term>fish frog chicken</term>
</searchClause>
<searchClause>
<index>dc.author</index>
<relation>
- <value>exact</value>
+ <value>==</value>
</relation>
<term>jones</term>
</searchClause>
<triple>
<boolean>
- <value>prox</value>
+ <value>and</value>
</boolean>
<leftOperand>
<triple>
<boolean>
- <value>and</value>
+ <value>or</value>
</boolean>
<leftOperand>
- <triple>
- <boolean>
- <value>or</value>
- </boolean>
- <leftOperand>
- <searchClause>
- <index>cql.serverChoice</index>
- <relation>
- <value>=</value>
- </relation>
- <term>any</term>
- </searchClause>
- </leftOperand>
- <rightOperand>
- <searchClause>
- <index>cql.serverChoice</index>
- <relation>
- <value>=</value>
- </relation>
- <term>all:stem</term>
- </searchClause>
- </rightOperand>
- </triple>
+ <searchClause>
+ <index>cql.serverChoice</index>
+ <relation>
+ <value>=</value>
+ </relation>
+ <term>any</term>
+ </searchClause>
</leftOperand>
<rightOperand>
<searchClause>
- <index>all</index>
+ <index>cql.serverChoice</index>
<relation>
- <value>exact</value>
+ <value>=</value>
</relation>
- <term>any</term>
+ <term>all:stem</term>
</searchClause>
</rightOperand>
</triple>
</leftOperand>
<rightOperand>
<searchClause>
- <index>prox</index>
+ <index>all contains</index>
<relation>
- <value>=</value>
+ <value>any</value>
</relation>
- <term>fuzzy</term>
+ <term>prox proxfuzzy</term>
</searchClause>
</rightOperand>
</triple>