yaz_search
yaz_search
Prepares for a search
bool **yaz_search** resource $id string $type string $query
prepares for a search on the given
connection.
yaz_search
Like this function is non-blocking and
only prepares for a search to be executed later when
is called.
yaz_connect``yaz_wait
id
The connection resource returned by .
yaz_connect
type
This parameter represents the query type - only
is supported now in which case the third argument specifies a Type-1
query in prefix query notation.
"rpn"
query
The RPN query is a textual representation of the Type-1 query as
defined by the Z39.50 standard. However, in the text representation
as used by YAZ a prefix notation is used, that is the operator
precedes the operands. The query string is a sequence of tokens where
white space is ignored unless surrounded by double quotes. Tokens beginning
with an at-character () are considered operators,
otherwise they are treated as search terms.
@
You can find information about attributes at the
site.
Z39.50 Maintenance Agency
Opmerking: > If you would like to use a more friendly notation, use the CCL parser - functions and .
yaz_ccl_conf``yaz_ccl_parse
return.success
Voorbeeld: Query Examples
You can search for simple terms, like this:
which matches documents where "computer" occur. No attributes are
specified.
computer
The query
matches documents where "knuth donald" occur (provided that the
server supports phrase search).
"knuth donald"
This query applies two attributes for the same phrase.
First attribute is type 1 (Bib-1 use), attribute value is 1003
(Author).
Second attribute has is type 4 (structure), value 1 (phrase),
so this should match documents where Donald Knuth is author.
@attr 1=1003 @attr 4=1 "knuth donald"
The query
would in infix notation look like .
@and @or a b @not @or c d e
(a or b) and ((c or d) not e)
Another, more complex, one:
The query as a whole uses the GILS attributeset. The query matches
documents where occur in the title (GILS,BIB-1)
and in which occur as Distributor (GILS).
@attrset gils @and @attr 1=4 art @attr 1=2000 company
art``company