X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Ftools.xml;h=9385c8a7df88f357bc6be0ff284df1ccd3b26869;hb=6f5c63a8b759040d31028a4f1437a9cbc7a21fd6;hp=4e91c27563aff072a0a7261d72e19499549f9384;hpb=719e0dcf2d15c08086a06457701e21c6aff3d791;p=yaz-moved-to-github.git diff --git a/doc/tools.xml b/doc/tools.xml index 4e91c27..9385c8a 100644 --- a/doc/tools.xml +++ b/doc/tools.xml @@ -1,4 +1,4 @@ - + Supporting Tools @@ -575,7 +575,7 @@ u=value - Use attribute. Common use attributes are + Use attribute (1). Common use attributes are 1 Personal-name, 4 Title, 7 ISBN, 8 ISSN, 30 Date, 62 Subject, 1003 Author), 1016 Any. Specify value as an integer. @@ -585,7 +585,7 @@ r=value - Relation attribute. Common values are + Relation attribute (2). Common values are 1 <, 2 <=, 3 =, 4 >=, 5 >, 6 <>, 100 phonetic, 101 stem, 102 relevance, 103 always matches. @@ -594,7 +594,7 @@ p=value - Position attribute. Values: 1 first in field, 2 + Position attribute (3). Values: 1 first in field, 2 first in any subfield, 3 any position in field. @@ -602,7 +602,7 @@ s=value - Structure attribute. Values: 1 phrase, 2 word, + Structure attribute (4). Values: 1 phrase, 2 word, 3 key, 4 year, 5 date, 6 word list, 100 date (un), 101 name (norm), 102 name (un), 103 structure, 104 urx, 105 free-form-text, 106 document-text, 107 local-number, @@ -613,7 +613,7 @@ t=value - Truncation attribute. Values: 1 right, 2 left, + Truncation attribute (5). Values: 1 right, 2 left, 3 left& right, 100 none, 101 process #, 102 regular-1, 103 regular-2, 104 CCL. @@ -622,7 +622,7 @@ c=value - Completeness attribute. Values: 1 incomplete subfield, + Completeness attribute (6). Values: 1 incomplete subfield, 2 complete subfield, 3 complete field. @@ -673,8 +673,27 @@ r=o - Allows operators greather-than, less-than, ... equals and - sets relation attribute accordingly (relation ordered). + Allows ranges and the operators greather-than, less-than, ... + equals. + This sets Bib-1 relation attribute accordingly (relation + ordered). A query construct is only treated as a range if + dash is used and that is surrounded by white-space. So + -1980 is treated as term + "-1980" not <= 1980. + If - 1980 is used, however, that is + treated as a range. + + + + r=r + Similar to r=o but assumes that terms + are non-negative (not prefixed with -). + Thus, a dash will always be treated as a range. + The construct 1980-1990 is + treated as a range with r=r but as a + single term "1980-1990" with + r=o. The special attribute + r=r is available in YAZ 2.0.24 or later. @@ -722,11 +741,6 @@ date u=30 r=o - Four qualifiers are defined - ti, - au, ranked and - date. - - ti and au both set structure attribute to phrase (s=1). ti @@ -749,9 +763,9 @@ Query - year > 1980 + date > 1980 - is a valid query, while + is a valid query. But ti > 1980 @@ -1035,34 +1049,28 @@ struct cql_node *cql_parser_result(CQL_parser cp); #define CQL_NODE_ST 1 #define CQL_NODE_BOOL 2 -#define CQL_NODE_MOD 3 struct cql_node { int which; union { struct { char *index; + char *index_uri; char *term; char *relation; + char *relation_uri; struct cql_node *modifiers; - struct cql_node *prefixes; } st; struct { char *value; struct cql_node *left; struct cql_node *right; struct cql_node *modifiers; - struct cql_node *prefixes; } boolean; - struct { - char *name; - char *value; - struct cql_node *next; - } mod; } u; }; - There are three kinds of nodes, search term (ST), boolean (BOOL), - and modifier (MOD). + There are two node types: search term (ST) and boolean (BOOL). + A modifier is treated as a search term too. The search term node has five members: @@ -1073,6 +1081,10 @@ struct cql_node { If an index is unspecified for a search term, index will be NULL. + + index_uri: index URi for search term + or NULL if none could be resolved for the index. + @@ -1086,18 +1098,14 @@ struct cql_node { - modifiers: relation modifiers for search - term. The modifiers is a simple linked - list (NULL for last entry). Each relation modifier node - is of type MOD. + relation_uri: relation URI for search term. - prefixes: index prefixes for search - term. The prefixes is a simple linked - list (NULL for last entry). Each prefix node - is of type MOD. + modifiers: relation modifiers for search + term. The modifiers list itself of cql_nodes + each of type ST. @@ -1119,37 +1127,6 @@ struct cql_node { modifiers: proximity arguments. - - - prefixes: index prefixes. - The prefixes is a simple linked - list (NULL for last entry). Each prefix node - is of type MOD. - - - - - - - The modifier node is a "utility" node used for name-value pairs, - such as prefixes, proximity arguements, etc. - - - - name name of mod node. - - - - - value value of mod node. - - - - - next: pointer to next node which is - always a mod node (NULL for last entry). - -