[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: size limits



Hallvard B Furuseth wrote:

Daniel Henninger writes:


I'm trying to accomplish the following:
1. if someone searches within the ou=people,dc=ncsu,dc=edu tree, then
  the most results they can get is 50
2. if someone searches anywhere else (ou=printers,dc=ncsu,dc=edu for
  example) there is no limit to the number of results they can get

Is this possible? It -almost- looks like the limits command would do it,
but I can not figure it out.



'Limits' lets you say that different limits can apply to different users, not that different limits can apply to different parts of your tree.

I think you must put ou=people,... in a separate database with its own
limit.  Then searches based at dc=ncsu,dc=edu will by default not
descend into ou=people.  You can put the 'subordinate' keyword in
ou=people's database definition if you wish to change that.  (I have
not tested that.)


Not sure, but I think in cse of glued databases limits apply to the overall
operation, i.e. the limits of the superior database are used for all subordinates;
for sure thre has been some work in the area to make glued database behavior
consistent. I think the possibility to limit the number of results based on some
type of "filter" (e.g. subtree, scope, a real filter) could be an interesting
extension, but right now the only solution seems to be separate databases,
which may not be Daniel wants.


Note that the problem is not well posed. Let's say :
- if I search -b "ou=people,dc=ncsu,dc=edu" I should get no more than 50 entries
- if I search -b "ou=printers,dc=ncsu,dc=edu" I should get no more than one entry
- if I search -b "dc=ncsu,dc=edu" how many entries from subtree "ou=people",
and how many from subtree "ou=printers" should I get? 51 in total, 50 people
and 1 printer? And how many from other subtrees? The point is that if I return
1 entry from printers + 50 from people + more from other subtrees, I also need
to return sizeLimitExceeded (or adminLimitExceeded), otherwise the client
would think that there are exactly 50 people and 1 printer in the database, and that
the search was completely successful. This behavior may be interesting, but
we need to examine it very carefully otherwise it could lead to inconsistent
results.


p.



   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497