X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Ftools.xml;h=3efd91772141e3ffebdf955ca8b6a2aa0b226101;hb=4115b78fa9956fa4b594aec7c7792e18bf1e1542;hp=bb7d90cc6786f4d9641bb5d383e583f4312f45d2;hpb=c63b8160e6b822d640a4e92ca4c3d5fb79828bbc;p=yaz-moved-to-github.git diff --git a/doc/tools.xml b/doc/tools.xml index bb7d90c..3efd917 100644 --- a/doc/tools.xml +++ b/doc/tools.xml @@ -1,4 +1,4 @@ - + Supporting Tools @@ -181,45 +181,70 @@ - Z39.50 version 3 defines various encoding of terms. - Use the @term operator to indicate the encoding type: - general, numeric, - string (for InternationalString), .. + Version 3 of the Z39.50 specification defines various encoding of terms. + Use the @term type, + where type is one of: general, + numeric, string + (for InternationalString), .. If no term type has been given, the general form is used which is the only encoding allowed in both version 2 - and 3 of the Z39.50 standard. - - The following are all examples of valid queries in the PQF. - - - - dylan - - "bob dylan" - - @or "dylan" "zimmerman" - - @set Result-1 - - @or @and bob dylan @set Result-1 - - @attr 1=4 computer - - @attr 4=1 @and @attr 1=1 "bob dylan" @attr 1=4 "slow train coming" - - @attr 4=1 @attr 1=4 "self portrait" - - @prox 0 3 1 2 k 2 dylan zimmerman - - @and @attr 2=4 @attr gils 1=2038 -114 @attr 2=2 @attr gils 1=2039 -109 - - @term string "a UTF-8 string, maybe?" - - @attr 1=/book/title computer - + PQF queries + Queries using simple terms. + + dylan + "bob dylan" + + + Boolean operators. + + @or "dylan" "zimmerman" + @and @or dylan zimmerman when + @and when @or dylan zimmerman + + + + Reference to result sets. + + @set Result-1 + @and @set seta setb + + + + Attributes for terms. + + @attr 1=4 computer + @attr 1=4 @attr 4=1 "self portrait" + @attr exp1 @attr 1=1 CategoryList + @attr gils 1=2008 Copenhagen + @attr 1=/book/title computer + + + + Proximity. + + @prox 0 3 1 2 k 2 dylan zimmerman + + + + Specifying term type. + + @term string "a UTF-8 string, maybe?" + + + Mixed queries + + @or @and bob dylan @set Result-1 + + @attr 4=1 @and @attr 1=1 "bob dylan" @attr 1=4 "slow train coming" + + @and @attr 2=4 @attr gils 1=2038 -114 @attr 2=2 @attr gils 1=2039 -109 + + + Common Command Language @@ -600,7 +625,7 @@ struct cql_node { struct cql_node *right; struct cql_node *modifiers; struct cql_node *prefixes; - } bool; + } boolean; struct { char *name; char *value; @@ -907,7 +932,7 @@ int cql_transform_FILE(cql_transform_t ct, This small file defines two index sets, three qualifiers and three relations, a position pattern and a default structure. - + + + With the mappings above, the CQL query + + computer + + is converted to the PQF: + + @attr 1=1016 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 "computer" + + by rules qualifier.srw.serverChoice, + relation.scr, structure.*, + position.any. + + + CQL query + + computer^ + + is rejected, since position.right is + undefined. + + + CQL query + + >my = "http://www.loc.gov/zing/cql/dc-indexes/v1.0/" my.title = x + + is converted to + + @attr 1=4 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 "x" + + CQL to XCQL conversion