yaz_search
(PHP 4 >= 4.0.1, PECL yaz:0.9-1.0.9)
yaz_search — 검색을 준비한다.
Description
int yaz_search
( int $id
, string $type
, string $query
)
yaz_search()은 주어진 ID로 target에 검색을 준비한다. type은 쿼리 타입을 나타낸다.-세번째 변수로 지정된 Type-1 query (RPN)인 경우 단지 "rpn"만을 지원한다. yaz_connect()처럼 non-blocking 이고 yaz_wait()이 호출된 이후에 검색을 준비한다.
The RPN query
The RPN query is a textual represenation 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 operater precedes the operands. The query string is a sequence of tokens where white space is ignored is ignored unless surrounded by double quotes. Tokens beginning with an at-character (@) are considered operators, otherwise they are treated as search terms.
Syntax | Description |
---|---|
@and query1 query2 | intersection of query1 and query2 |
@or query1 query2 | union of query1 and query2 |
@not query1 query2 | query1 and not query2 |
@set name | result set reference |
@attrset set query | specifies attribute-set for query. This construction is only allowed once - in the beginning of the whole query |
@attr set type=value query | applies attribute to query. The type and value are integers specifying the attribute-type and attribute-value respectively. The set, if given, specifies the attribute-set. |
The following illustrates valid query constructions:
computer
"donald knuth"
@attr 1=4 art
@attrset gils @and @attr 1=4 art @attr 1=1003 "donald knuth"