4. Implementazione WAIS di Z39.50-1988
Lavorando con il gruppo di implementatori Z39.50 (Z39.50 Implementors Group, ZIG), gli sviluppatori WAIS hanno usato un sottoinsieme raccomandato di Z39.50-1988 e ipotesi specifiche per soddisfare i propri requisiti. Nel tempo, molti di questi
requisiti sono confluiti nella definizione delle versioni successive di Z39.50. Man mano che emergono nuovi requisiti, WAIS documenterà eventuali ipotesi aggiuntive e collaborerà con lo ZIG nello sviluppo di estensioni.
WAIS supportava le funzionalità Init e Search di Z39.50-1988. Sia la ricerca sia il recupero sono stati implementati mediante la funzionalità Search, come descritto in questa sezione.
La ricerca veniva avviata dal client con un APDU (Application Protocol Data Unit) di Search Request utilizzando una query di Tipo 3. La query conteneva due campi principali:
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.
Un APDU di Search Response restituito dal server conteneva un elenco di record ordinati per rilevanza, ovvero le citazioni WAIS. Una citazione WAIS fa riferimento a un documento presente sul server. Ogni citazione WAIS contiene i seguenti campi:
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.
Il numero di citazioni WAIS restituite era limitato dalle dimensioni preferite del messaggio negoziate durante l'Init.
Il recupero di un documento veniva avviato dal client con un APDU di Search Request utilizzando una query di Tipo 1. La query conteneva fino a quattro termini:
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"
Poiché spesso il testo integrale e le immagini avevano dimensioni superiori al buffer di ricezione del client, i client sono stati progettati per recuperare facoltativamente i documenti in blocchi, specificando nella query le posizioni di inizio e fine del blocco. Un esempio di query di recupero completamente specificata è:
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 )
)
Una risposta di recupero veniva emessa dal server con un APDU di Search Response. In questo caso veniva restituito un unico record corrispondente al documento richiesto, o a una sua parte, nel formato specificato.