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

Re: I need get random entries

Elier Delgado wrote:

> It's very strange but I need get random entries from the OpenLdap,
> specifically get randoms users (N users) .. it's a requirement of the
> system
> that I'm designing ....
> I'm using PHP and is not efficient get all results and do the random with
> the index of the result array ...because the results must be many ..
> And I'm not happy to apply a random to a filter values, for example
> generating randomly uid and getting near results ...
> So, I will appreciate any idea ...

Your description of the feature you seem to need is rather vague.  What
do you mean?  What's the requirement?  A search is a well defined
operation in LDAP, so you need to clearly describe what you expect from
it when modified according to your needs.

For example:

- would it make any sense to receive more than one entry?

- would it be acceptable to receive the same entry twice during the same

- would the search need to be complete?  Namely, does your "randomness"
need to affect the (absence of) order in receiving the results, keeping
the set of returned data consistent with the search request and the
contents of the database, after applying appropriate access control,
size/time limits and so?

- ...

Technically, I don't see any particular criticality in implementing
something that complies with most of the above requirements, and in
general I don't see significant obstacles in implementing even fancier
stuff; but until you clarify what you want, I'm afraid no one would be
able to help you.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it