if (this.useSessions && paramArray.autoInit !== false) {
this.init(this.sessionId, this.serviceId);
}
++ // Version parameter
++ this.version = paramArray.version || null;
};
pz2.prototype =
"command": "termlist",
"session": this.sessionID,
"name": this.termKeys,
-- "windowid" : window.name
++ "windowid" : window.name,
++ "version" : this.version
++
},
function(data) {
if ( data.getElementsByTagName("termlist") ) {
.childNodes[0].nodeValue || 'ERROR'
};
++ // Only for xtargets: id, records, filtered
var termIdNode =
terms[j].getElementsByTagName("id");
if(terms[j].getElementsByTagName("id").length)
term["id"] =
termIdNode[0].childNodes[0].nodeValue;
termList[listName][j] = term;
++
++ var recordsNode = terms[j].getElementsByTagName("records");
++ if (recordsNode && recordsNode.length)
++ term["records"] = recordsNode[0].childNodes[0].nodeValue;
++
++ var filteredNode = terms[j].getElementsByTagName("filtered");
++ if (filteredNode && filteredNode.length)
++ term["filtered"] = filteredNode[0].childNodes[0].nodeValue;
++
}
}
"command": "bytarget",
"session": this.sessionID,
"block": 1,
-- "windowid" : window.name
++ "windowid" : window.name,
++ "version" : this.version
},
function(data) {
if ( data.getElementsByTagName("status")[0]
ht[i].hits);
if (version >= 2) {
+ // Should not print if we know it isn't a approximation.
+ wrbuf_printf(wrbuf, "<approximation>" ODR_INT_PRINTF "</approximation>\n", ht[i].approximation);
- wrbuf_printf(wrbuf, "<records>%d</records>\n", ht[i].records);
+ wrbuf_printf(wrbuf, "<records>%d</records>\n", ht[i].records - ht[i].filtered);
wrbuf_printf(wrbuf, "<filtered>%d</filtered>\n", ht[i].filtered);
}