X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fcqlsample;fp=test%2Fcqlsample;h=c9f88b51c07b69ad30d20234cce1b38f6b88bd65;hb=42f18e58ed67f77727cde23bcee44dbd32ed242a;hp=0000000000000000000000000000000000000000;hpb=a4c9e87155ec7e343559946290ed8262cf5acf81;p=yaz-moved-to-github.git diff --git a/test/cqlsample b/test/cqlsample new file mode 100644 index 0000000..c9f88b5 --- /dev/null +++ b/test/cqlsample @@ -0,0 +1,103 @@ +# $Id: cqlsample,v 1.1 2004-03-10 16:34:30 adam Exp $ +# CQL queries for testing. +# Simple Term + +cat +"cat" +comp.os.linux +ml:element +"" +"=" +"prox/distance<3/unit=word" +("cat") +((dog)) +all +prox + +# Index Relation Term + +title = "fish" +title exact fish +title any fish +title all fish +title > 9 +title >= 23 +dc.title any "fish chips" +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 =/rel.algorithm=CORI squid +creator any/f.foo/b.bar>1 "sanderson taylor" + +# Simple Boolean + +cat or dog +cat and fish +cat not frog +(cat not frog) +"cat" not "fish food" +xml and "prox///" +fred and any +((fred or all)) +a or b and c not d + +# Index Relation Term plus Boolean + +bath.uniformTitle any fish and dc.title any "cat dog" +(title any/stem "fish dog" or and) + +# Proximity and Boolean Modifiers + +cat prox hat +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") +a and/rel.SumOfScores b +a and/rel.algorithm=CORI b + +# Special Characters + +(cat^) +"cat" +"^cat says \"fish\"" +"cat*fish" +cat?dog +(("^cat*fishdog\"horse?")) + +# Nesting Parentheses + +(((cat or dog) or horse) and frog) +(cat and dog) or (horse and frog) +(cat and (horse or frog)) and chips + +# Prefix Maps + +> foo="info:srw/cql-context-set/1/dc-v1.1" dc.title="fish" +> "info:srw/cql-context-set/1/dc-v1.1" title="fish" +> foo="info:srw/cql-context-set/1/dc-v1.1" > ccg = "http://srw.cheshire3.org/contextSets/ccg/1.1/" foo.title="fish" and ccg.force=3 + +# Lame Searches + +any or all:stem and all exact any prox prox=fuzzy +(((((((((any))))))))) +"" +> any > any = exact any > any + +# Invalid searches [should error] + +< +=== +missingClause or +missingTerm any +() +(missingParen +missingParen any fish) +(emptyParens or ()) +title = ("illegal parentheses") +> illegal="urn:missingQuery" + +