[turba] How do Turba LDAP filters work?

Kevin Myer kevin_myer at iu13.org
Thu Jul 21 20:07:23 PDT 2005


Quoting Chuck Hagenbuch <chuck at horde.org>:
>> And I'm finding that for all the results returned (approximately 
>> 1400 users),
>> there is a search occuring against base="uid=uid,ou=people.." for each user.
>> This is very inefficient.
>
> Are you saying Turba is doing 1400 searches?

Yep.  Well, actually 1390, but close ;)

> You're going to have to say more about what exactly you're doing, how
> you're using Turba, etc, because that's not how Turba does searches.

1) Goto the search screen.  Default address book in my case is our directory
server.

2) Hit return.  This should execute a search with no additional 
criteria applied
and return all results that match filter in sources.php and whatever you chose
to search on.  Example, with my filter set to objectclass=person, and the
search field set to name:

21/Jul/2005:22:26:38 -0400] conn=13035767 op=1 SRCH
base="ou=People,dc=iu13,dc=k12,dc=pa,dc=us" scope=1
filter="(&(objectClass=person)(&(cn=*)))" attrs="dn uid cn mail sn title o
postalAddress telephoneNumber facsimileTelephoneNumber homePostalAddress
homePhone mobile description roomNumber ou displayName labeledUri
object_pgppublickey calFBURL l

With results like:
[21/Jul/2005:22:26:39 -0400] conn=13035767 op=1 RESULT err=0 tag=101
nentries=1389 etime=1

3) Results should be returned in an array with attributes.  But...

4) For each of the entries found (1389 of them) a new search is done, 
using the
concatenation of the uid + the basedn.  I don't know why this is 
happening. But thats what Turba is doing.  So what should have been 1 
search turns into
1390 of them..  That search generically looks like:

[21/Jul/2005:22:26:43 -0400] conn=13038804 op=1 SRCH
base="uid=firstname_lastname, ou=People, dc=iu13, dc=k12, dc=pa, dc=us" 
scope=0
filter="(|(objectClass=top)(objectClass=person)(objectClass=inetOrgPerson)(objectClass=calEntry)(objectClass=organizationalPerson))"
attrs="dn uid cn mail sn title o postalAddress telephoneNumber
facsimileTelephoneNumber homePostalAddress homePhone mobile description
roomNumber ou displayName labeledUri object_pgppublickey calFBURL l"

So it looks like turba builds a list of search results, then searches 
the search
results individually.

Kevin

-- 
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13  http://www.iu13.org




More information about the turba mailing list