我已经安装了一个openldap服务器,通过slapd.conf:需要配置的一部分在centos上运行成员功能?:
index objectClass eq,pres
index ou,cn,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub在openldap日志中:
SRCH attr=uid displayName mail member
Jun 21 15:53:52 rhsfugt001 slapd[26924]: <= bdb_equality_candidates: (memberOf) not indexed我还没找到解决办法.
发布于 2018-08-17 10:03:30
我通过重新编制索引来修正此警告:
systemctl stop slapd
rm /var/lib/ldap/alock
slapindex
chown -R ldap:ldap /var/lib/ldap/
systemctl start slapd发布于 2018-07-20 22:47:00
这只是一个警告,在过滤器中用于特定搜索结果的一些属性没有被索引。
索引属性是否有意义只能通过查看导致此警告的筛选器来确定。
在为具有不同值的大结果集的属性添加索引时,还可以显著降低搜索性能。
索引反模式的典型示例:
假设(uid=foobar)总是返回一个搜索结果。
因此很明显,索引属性uid:
index uid eq
现在,通常使用稍微复杂的过滤器,例如只搜索“活动”用户:
(&(uid=foobar)(organizationalStatus=active))
如果您有许多用户匹配(organizationalStatus=active),如果您只是一个索引,因为这个未索引的警告,搜索性能将显着下降!
原因是,对于每个索引属性,生成了一个搜索候选集,在第二步中,搜索候选集被用取消索引的断言过滤。因此,在上面的示例中,index uid eq将生成一个搜索候选集基数为1,而index uid,organizationalStatus eq将生成两个搜索候选集,uid仍然是基数1,而organizationalStatus将生成基数为all。
=>不添加索引只是为了消除警告,而不分析使用的搜索过滤器和搜索候选集的可能大小!
https://unix.stackexchange.com/questions/451118
复制相似问题