跳到主要内容

4. Z39.50-1988 的 WAIS 实现

通过与 Z39.50 实现者组 (Z39.50 Implementors Group, ZIG) 合作, WAIS 开发人员使用了 Z39.50-1988 的一个推荐子集以及特定的假设来满足其需求. 随着时间的推移, 其中许多

需求随后被纳入 Z39.50 后续版本的定义之中. 随着新需求逐渐显现, WAIS 将记录任何附加的假设, 并与 ZIG 合作开发扩展.

WAIS 支持 Z39.50-1988 的 Init 和 Search Facilities. 如本节所述, 搜索和检索都是使用 Search Facility 实现的.

搜索由客户端发起, 使用 Type-3 查询发送 Search Request APDU (Application Protocol Data Unit, 应用协议数据单元). 该查询包含两个主要字段:

      1. The "seed words", or text, typed by the user.
2. A list of document objects, where a document object is a
full document, or portion thereof, to be used in relevance
feedback. Each document object contains a document
identifier (Doc-ID) [5], type, chunk-code, and start and
end locations. The Doc-ID and type specify the location and
format, respectively, of the document. The chuck-code
determines the unit of measure for the start and end
locations. Examples of chunk-codes used include
byte, line, paragraph, and full document. If the chunk code
is a full document, the start and end locations are ignored.

服务器返回的 Search Response APDU 包含一个按相关性排序的记录列表, 即 WAIS 引文 (WAIS Citations). WAIS 引文指向服务器上的一个文档. 每条 WAIS 引文都包含以下字段:

      1. Headline - a set of words that convey the main idea of the
document.
2. Rank - the numerical score of the document based on its
relevance to the query, normalized to a top score of 1000.
3. List of available formats - e.g. text, postscript, tiff, etc.
4. Doc-ID - the location of the document.
5. Length - the length of the document in bytes.

返回的 WAIS 引文数量受 Init 期间协商的首选消息大小的限制.

文档的检索由客户端发起, 使用 Type-1 查询发送 Search Request APDU. 该查询最多包含四个词项:

      1. Term: Doc-ID
Use Attribute: system-control-number code = "un"
Relation Attribute: equal code = "re"
2. Term: the requested document format
Use Attribute: data-type code = "wt"
Relation Attribute: equal code = "re"
3. Term: the start location
Use Attribute: paragraph, line, byte code = "wp", "wl",
"wb"
Relation Attribute: greater-than-or-equal code = "ro"
4. Term: the end location
Use Attribute: paragraph, line, byte code = "wp", "wl",
"wb"
Relation Attribute: less-than code = "rl"

由于全文和图像的大小往往超过客户端的接收缓冲区, 因此客户端被设计为可以选择性地分块检索文档, 并在查询中指定块的起始和结束位置. 一个完整指定的检索查询示例如下:

query = ( ( use = "un", relation = "re", term = <Doc-ID> )
AND
( use = "wt", relation = "re", term = postscript )
AND
( use = "wb", relation = "ro", term = 0 )
AND
( use = "wb", relation = "ro", term = 2000 )
)

服务器用 Search Response APDU 发出检索响应. 在这种情况下, 返回的是与所请求的文档或其一部分相对应的单条记录, 格式按指定要求.