[Yazlist] ZOOM api reading to end of an estimated result set

Ashley Sanders a.sanders at manchester.ac.uk
Thu Mar 20 11:37:51 UTC 2014


Hi,

this concerns when my z39.50 server responds with an estimated result set size (as in previous email.)

Say the server sends a search response of:

searchResponse {
    resultCount 134
    numberOfRecordsReturned 0
    nextResultSetPosition 1
    searchStatus TRUE
    resultSetStatus 4
}

and it turns out there are actually only 130 records in the set.

The client sends a presentRequest for 134 records and gets all 130. The presentResponse
sets nextResultSetPosition to 0 (which seems reasonable and correct according to
the standard) and sets presentStatus to 4. Now I’m not sure what presentStatus 4
is and I think the YAZ server API must be setting that.

The ZOOM client then tries to get records 131 to 134 with a series of present requests
as shown below. Is there some way the ZOOM client API can recognise it has come to the end
of an estimated result set and not emit all these presentRequests. I’m slightly concerned
about all the extra request/response handshakes that are going to happen when the over estimate
is large.

presentRequest {
    resultSetId '1'
    resultSetStartPoint 1
    numberOfRecordsRequested 134
}
presentResponse {
    numberOfRecordsReturned 130
    nextResultSetPosition 0
    presentStatus 4
    records choice

[ 130 records deleted for clarity. ]

}
presentRequest {
    resultSetId '1'
    resultSetStartPoint 131
    numberOfRecordsRequested 4
}
presentResponse {
    numberOfRecordsReturned 0
    nextResultSetPosition 0
    presentStatus 4
    records choice
    databaseOrSurDiagnostics {
    }
}
presentRequest {
    resultSetId '1'
    resultSetStartPoint 132
    numberOfRecordsRequested 3
}
presentResponse {
    numberOfRecordsReturned 0
    nextResultSetPosition 0
    presentStatus 4
    records choice
    databaseOrSurDiagnostics {
    }
}
presentRequest {
    resultSetId '1'
    resultSetStartPoint 133
    numberOfRecordsRequested 2
}
presentResponse {
    numberOfRecordsReturned 0
    nextResultSetPosition 0
    presentStatus 4
    records choice
    databaseOrSurDiagnostics {
    }
}
presentRequest {
    resultSetId '1'
    resultSetStartPoint 134
    numberOfRecordsRequested 1
}
presentResponse {
    numberOfRecordsReturned 0
    nextResultSetPosition 0
    presentStatus 4
    records choice
    databaseOrSurDiagnostics {
    }
}

Regards,

Ashley.
--
Ashley Sanders a.sanders at manchester.ac.uk
http://copac.ac.uk -- A Mimas service funded by JISC at the University of Manchester




More information about the Yazlist mailing list