1 # CQL queries for testing.
2 # from http://www.loc.gov/z3950/agency/zing/cql/sample-queries.html
11 "prox/distance<3/unit=word"
25 dc.title any "fish chips"
26 dc.title any/stem fish
27 dc.fish all/stem/fuzzy "fish chips"
29 ((dc.title any/stem "frog pond"))
30 dc.title = "fish frog chicken"
31 dc.title =/rel.algorithm=CORI squid
32 creator any/f.foo/b.bar>1 "sanderson taylor"
46 # Index Relation Term plus Boolean
48 bath.uniformTitle any fish and dc.title any "cat dog"
49 (title any/stem "fish dog" or and)
51 # Proximity and Boolean Modifiers
54 cat prox/distance=3/unit=word/ordered hat
55 cat prox/distance<3 hat
56 "fish food" prox/unit=sentence and
57 title all "chips frog" prox/distance<=5 exact
58 (dc.author == "jones" prox/distance>5/unit=element title >= "smith")
59 a and/rel.SumOfScores b
60 a and/rel.algorithm=CORI b
69 (("^cat*fishdog\"horse?"))
73 (((cat or dog) or horse) and frog)
74 (cat and dog) or (horse and frog)
75 (cat and (horse or frog)) and chips
79 > foo="info:srw/cql-context-set/1/dc-v1.1" dc.title="fish"
80 > "info:srw/cql-context-set/1/dc-v1.1" title="fish"
81 > 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
85 any or all:stem and all == any prox prox=fuzzy
88 > any > any = exact any > any
90 # Invalid searches [should error]
98 missingParen any fish)
100 title = ("illegal parentheses")
101 > illegal="urn:missingQuery"
112 # free-form term (Syntax error)