Vladimir Dzhuvinov writes:
> From a practical and general perspective, what is the wise thing to do here:
>
> 1) return a partial result set, indicating {admin|time|size}LimitExceeded=true
>
> or
>
> 2) return the LDAP error (3,4,11) with no results at all, suggesting
> that the admin should change the limits instead?
Nitpick: If the search runs into a server limit, it is commonly the user
who should narrow his search criteria. The server admin presumably had
some reason for setting the limit. And it's quite common for users to
just try some simple search, even just '(cn=*)', to see what happens.
> At the moment I tend to favour the conservative approach, that is,
> returning only complete result sets, but still allow web clients to
> override that with an optional JSON parameter, e.g.
> "allowPartialResultSets".
That's "simple common case" vs. "simple to redesign/generalize".
Your choice... "Either search results or non-success code" is a
simple common case, but user code written just with just those two
cases in mind may break or even need redesign if tweaked to (try
to) handle allowPartialResultSets.
I don't know json2ldap. Is it a problem to return an object which
contains a result code and the entries, and let the user choose when
to use what?
Can the program process results as they arrive? In that case it won't
know the results are partial until the end, since the result code is
returned after the entries/references.
--
Hallvard