[turba] Composite fields

Richard Heggs richard.heggs at nottinghamcity.gov.uk
Wed Nov 26 07:58:36 PST 2003


Sorry for the delay, I've been away from work for a few days.  I've had the
chains of oppression re-fitted now.

Quoting Chuck Hagenbuch <chuck () horde ! org>:

>Okay. Can you maybe do some poking and see what's being passed to the LDAP
>server when the search is done on the composite field? This works on the
>SQL
>source I tested it on, so it's probably something in the way the LDAP
>driver
>puts the search query together.

Hmm.  Interesting (not to mention verbose) results when I turn OpenLDAP
logging on.  If I search the 'name' composite field for 'heggs', this is
the search filter that is passed:

(&(&(givenName=*heggs*)(sn=*heggs*)))

This looks a little odd, and testing it with ldapsearch also yields 0
results.  I've done some experimentation with ldapsearch, and I've
discovered that this filter is correct when searching for a match in either
of two fields:

(|(givenName=*heggs*)(sn=*heggs*))
- (ie match givenName OR sn)

To extend this to include additional fields to search, add another term
inside the outermost parentheses:

(|(givenName=*heggs*)(sn=*heggs*)(alias=*heggs*))
- (ie match givenName OR sn OR alias)

This Works For Me, anyway - OpenLDAP version 2.0.23 on SuSE Professional
Edition 8.0.

--
Richard Heggs
Systems Analyst
Nottingham City Council

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


######################################################################
This e-mail (and any attachments) is confidential and may contain personal
views which are not the views of Nottingham City Council unless specifically
stated. If you have received it in error, please delete it from your system,
do not use, copy or disclose the information in any way nor act in reliance
on it and notify the sender immediately. Please note that Nottingham City
Council monitors e-mails sent or received. Further communication will
signify your consent to this.
######################################################################


More information about the turba mailing list