> I'm writing a very "simple" SRU-server. I'm worried about the response
> parameter "numberOfRecords". For me it would seem natural to request
> for
> the "numberOfRecords" only when you need it, fex. by
> using "maximumRecords=0".
A request for maximumRecords=0 is useful for when the client *only*
wants a count, but the assumption is that numberOfRecords is always
returned regardless of however many records are requested/returned.
There is no need for the client to actually use this data (it could just
ignore it), and intelligent servers may cache the count (and the result
set) say keyed on the query term, rather than repeat the count (and
query) should the client ask for a different set of records for the same
query.
There may be situations where a server cannot return an accurate count
for whatever reason (e.g. too expensive, or in the case of relevance
based text retrieval engines ala Google). In this case, it is suggested
that you return an arbitrarily large value in the numberOfRecords.
Matthew
|