X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fregression%2Fqueries.raw;h=6075e697db8e4eb7506dc0bb93370ce7deeb55a4;hb=b306a0bee75d8a4cc9eef354a217fe8d335b36e8;hp=5366fb949652a0c926dd3c2fb3f4b8564498d38b;hpb=6bcdff4c474737f8e983873fdde87fbc01631405;p=cql-java-moved-to-github.git diff --git a/test/regression/queries.raw b/test/regression/queries.raw index 5366fb9..6075e69 100644 --- a/test/regression/queries.raw +++ b/test/regression/queries.raw @@ -1,4 +1,5 @@ -# Simple + +# Simple cat "cat" @@ -6,11 +7,13 @@ comp.os.linux xml:element "" "=" -"prox/>=/5/word" +"prox/distance<3/unit=word" ("cat") ((dog)) +all +prox -# index relation term +# Index Relation Term title = "fish" title exact fish @@ -23,6 +26,12 @@ dc.title any/stem fish dc.fish all/stem/fuzzy "fish chips" (title any frog) ((dc.title any/stem "frog pond")) +dc.title any "fish frog chicken" +dc.title =/rel.algorithm=CORI squid +author any/f.foo/b.bar>1 "sanderson taylor" +numberOfLegs <= 4 +numberOfLegs <> 4 +title == jaws # Simple Boolean @@ -31,25 +40,30 @@ cat and fish cat not frog (cat not frog) "cat" not "fish food" -xml and "prox///word/" +xml and "prox///" +fred and any +((fred or all)) a or b and c not d # I/R/T plus Boolean bath.author any fish and dc.title all "cat dog" -(title any/stem "fish dog" or "and") +(title any/stem "fish dog" or and) # Prox cat prox hat -cat prox/=/3/word/ordered hat -cat prox//3 hat -"fish food" prox///sentence "and" -title all "chips frog" prox//5/word "any" -(dc.author exact "jones" prox//5 title >= "smith") +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 == "jones" prox/distance>5/unit=element title >= "smith") ((cat prox hat)) +a and/rel.SumOfScores b +a and/rel.algorithm=CORI b + +# Special Characters -# Special characters (cat^) "cat" "^cat says \"fish\"" @@ -57,30 +71,42 @@ title all "chips frog" prox//5/word "any" cat?dog (("^cat*fishdog\"horse?")) -# Nesting Parens +# Nesting Parentheses (((cat or dog) or horse) and frog) (cat and dog) or (horse and frog) (cat and (horse or frog)) and chips -# Lame searches - -"any" or "all:stem" and "all" exact "any" prox///word "prox"="fuzzy" -((((((((("any"))))))))) - - -# Invalid searches [should error] - -> -=== -cat or -index any -index any/wrong term -a prox/wrong b -() -(a -index any fish) -(cat any dog or ()) -fred and any -((fred or all)) -sorry = (mike) +# Prefix Maps + +> foo="http://www.loc.gov/zing/cql/dc-indexes/" dc.title="fish" +> "http://www.loc.gov/zing/cql/dc-indexes/" title="fish" +> 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 + +# Lame Searches + +any or all:stem and all contains any prox proxfuzzy +(((((((((any))))))))) +"" +> any > any = exact any > any +sortby sortby sortby +sortby sortby sortby sortby sortby + +# Sorting + +kernighan sortby title +kernighan and ritchie sortby title +dc.creator=kernighan sortby dc.title +dc.creator=kernighan sortby numberOfLegs/cql.number +dc.creator=kernighan sortby dc.title/sort.respectCase +dc.creator=kernighan sortby dc.title/sort.respectCase/sort.descending +dc.creator=kernighan sortby dc.date dc.title +dc.creator=kernighan sortby dc.date/sort.missingOmit +dc.creator=kernighan sortby dc.date/sort.missingValue=1970 +>dc="http://deepcustard.org/1.0" blah sortby dc.custardDepth +>ns1="http://uri1" >ns2="http://uri2" whatever sortby ns1.key/a/b/c=1 ns2.key2 +(>dc=x b=c) sortby d +b=(>dc=x c) sortby d +(>dc=x c1 and c2) sortby d +>dc="http://deepcustard.org" (>dc="http://dublincore.org" dc.title=jaws) sortby dc.custardDepth +>dc="http://deepcustard.org" (fish or >dc="http://dublincore.org" dc.title=jaws) sortby dc.custardDepth