Modify some test-queries to fit 1.2 syntax.
[cql-java-moved-to-github.git] / test / regression / queries.raw
1
2 # Simple 
3
4 cat
5 "cat"
6 comp.os.linux
7 xml:element
8 "<xml:element>"
9 "="
10 "prox/distance<3/unit=word"
11 ("cat")
12 ((dog))
13 all
14 prox
15
16 # Index Relation Term
17
18 title = "fish"
19 title exact fish
20 title any fish
21 title all fish
22 title > 9
23 title >= 23
24 dc.title any "fish chips"
25 dc.title any/stem fish
26 dc.fish all/stem/fuzzy "fish chips"
27 (title any frog)
28 ((dc.title any/stem "frog pond"))
29 dc.title any "fish frog chicken"
30 dc.title =/rel.algorithm=CORI squid
31 author any/f.foo/b.bar>1 "sanderson taylor"
32 numberOfLegs <= 4
33 numberOfLegs <> 4
34 title == jaws
35
36 # Simple Boolean
37
38 cat or dog
39 cat and fish
40 cat not frog
41 (cat not frog)
42 "cat" not "fish food"
43 xml and "prox///"
44 fred and any
45 ((fred or all))
46 a or b and c not d
47
48 # I/R/T plus Boolean
49
50 bath.author any fish and dc.title all "cat dog"
51 (title any/stem "fish dog" or and)
52
53 # Prox
54
55 cat prox hat
56 cat prox/distance=3/unit=word/ordered hat
57 cat prox/distance<3 hat
58 "fish food" prox/unit=sentence and
59 title all "chips frog" prox/distance<=5 exact
60 (dc.author == "jones" prox/distance>5/unit=element title >= "smith")
61 ((cat prox hat))
62 a and/rel.SumOfScores b
63 a and/rel.algorithm=CORI b
64
65 # Special Characters
66
67 (cat^)
68 "cat"
69 "^cat says \"fish\""
70 "cat*fish"
71 cat?dog
72 (("^cat*fishdog\"horse?"))
73
74 # Nesting Parentheses
75
76 (((cat or dog) or horse) and frog)
77 (cat and dog) or (horse and frog)
78 (cat and (horse or frog)) and chips
79
80 # Prefix Maps
81
82 > foo="http://www.loc.gov/zing/cql/dc-indexes/" dc.title="fish"
83 > "http://www.loc.gov/zing/cql/dc-indexes/" title="fish"
84 > foo="http://www.loc.gov/zing/cql/dc-indexes" > ccg = "http://srw.o-r-g.org/cql/indexSets/ccg/" foo.title="fish" and ccg.force=3
85
86 # Lame Searches
87
88 any or all:stem and all contains any prox proxfuzzy
89 (((((((((any)))))))))
90 ""
91 > any > any = exact any > any
92 sortby sortby sortby
93 sortby sortby sortby sortby sortby
94
95 # Sorting
96
97 kernighan sortby title
98 kernighan and ritchie sortby title
99 dc.creator=kernighan sortby dc.title
100 dc.creator=kernighan sortby numberOfLegs/cql.number
101 dc.creator=kernighan sortby dc.title/sort.respectCase
102 dc.creator=kernighan sortby dc.title/sort.respectCase/sort.descending
103 dc.creator=kernighan sortby dc.date dc.title
104 dc.creator=kernighan sortby dc.date/sort.missingOmit
105 dc.creator=kernighan sortby dc.date/sort.missingValue=1970
106 >dc="http://deepcustard.org/1.0" blah sortby dc.custardDepth
107 >ns1="http://uri1" >ns2="http://uri2" whatever sortby ns1.key/a/b/c=1 ns2.key2
108 (>dc=x b=c) sortby d
109 b=(>dc=x c) sortby d
110 (>dc=x c1 and c2) sortby d
111 >dc="http://deepcustard.org" (>dc="http://dublincore.org" dc.title=jaws) sortby dc.custardDepth
112 >dc="http://deepcustard.org" (fish or >dc="http://dublincore.org" dc.title=jaws) sortby dc.custardDepth