1 # $Id: cqlsample,v 1.2 2004-03-10 18:50:56 adam Exp $
2 # CQL queries for testing.
3 # from http://www.loc.gov/z3950/agency/zing/cql/sample-queries.html
12 "prox/distance<3/unit=word"
26 dc.title any "fish chips"
27 dc.title any/stem fish
28 dc.fish all/stem/fuzzy "fish chips"
30 ((dc.title any/stem "frog pond"))
31 dc.title scr "fish frog chicken"
32 dc.title =/rel.algorithm=CORI squid
33 creator any/f.foo/b.bar>1 "sanderson taylor"
47 # Index Relation Term plus Boolean
49 bath.uniformTitle any fish and dc.title any "cat dog"
50 (title any/stem "fish dog" or and)
52 # Proximity and Boolean Modifiers
55 cat prox/distance=3/unit=word/ordered hat
56 cat prox/distance<3 hat
57 "fish food" prox/unit=sentence and
58 title all "chips frog" prox/distance<=5 exact
59 (dc.author exact "jones" prox/distance>5/unit=element title >= "smith")
60 a and/rel.SumOfScores b
61 a and/rel.algorithm=CORI b
70 (("^cat*fishdog\"horse?"))
74 (((cat or dog) or horse) and frog)
75 (cat and dog) or (horse and frog)
76 (cat and (horse or frog)) and chips
80 > foo="info:srw/cql-context-set/1/dc-v1.1" dc.title="fish"
81 > "info:srw/cql-context-set/1/dc-v1.1" title="fish"
82 > 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
86 any or all:stem and all exact any prox prox=fuzzy
89 > any > any = exact any > any
91 # Invalid searches [should error]
99 missingParen any fish)
101 title = ("illegal parentheses")
102 > illegal="urn:missingQuery"