Hi,
I am trying to index searching on uid. However as soon as I add the following index to slapd.conf:
index uid pres,eq,sub
stop slapd, run 'su openldap -c slapindex' and start slapd again, searching for any uid returns 0 results.
I am using the following search command:
ldapsearch -x "(&(objectClass=posixAccount)(uid=laurens))"
After removing the index line from slapd.conf and restarting slapd the search returns the desired result again. I set the loglevel to 480, but the log does not contain any entries which indicate a problem.
Why does adding indexes result in the search failing?
I am running OpenLDAP 2.4.17 on Debian testing with the hdb backend.
TIA,
Laurens
On 27/09/2009 14:36, Laurens Blankers wrote:
Hi,
I am trying to index searching on uid. However as soon as I add the following index to slapd.conf:
index uid pres,eq,sub
stop slapd, run 'su openldap -c slapindex' and start slapd again, searching for any uid returns 0 results.
I am using the following search command:
ldapsearch -x "(&(objectClass=posixAccount)(uid=laurens))"
After removing the index line from slapd.conf and restarting slapd the search returns the desired result again. I set the loglevel to 480, but the log does not contain any entries which indicate a problem.
Why does adding indexes result in the search failing?
I am running OpenLDAP 2.4.17 on Debian testing with the hdb backend.
Hi,
This behavior identical to what would happen if you added this configuration, but didn't run slapindex.
I note that you do run slapindex. Could you confirm that slapindex is reading the same configuration file as slapd, maybe force it using the -f option? Do you see changes on the uid.bdb file in your hdb data directory?
Regards, Jonathan
Laurens Blankers wrote:
I am trying to index searching on uid. However as soon as I add the following index to slapd.conf:
index uid pres,eq,sub
stop slapd, run 'su openldap -c slapindex' and start slapd again, searching for any uid returns 0 results.
I am using the following search command:
ldapsearch -x "(&(objectClass=posixAccount)(uid=laurens))"
After removing the index line from slapd.conf and restarting slapd the search returns the desired result again. I set the loglevel to 480, but the log does not contain any entries which indicate a problem.
Why does adding indexes result in the search failing?
I note that you executed slapindex but maybe with wrong parameters or something's wrong with ownership/permissions?
http://www.openldap.org/faq/data/cache/136.html
Ciao, Michael.
2009/9/27 Michael Ströder michael@stroeder.com
I note that you executed slapindex but maybe with wrong parameters or something's wrong with ownership/permissions?
Slapindex was indeed not running correctly. Now it is working.
Thanks guys!
Laurens
openldap-software@openldap.org