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

Re: Question on slapd.conf indexes and attribute properties in schemas



Tak Fujiwara wrote:

First Question:
What is the purpose of the "pres" index? How can I use it when I
search for particular entries?



searches like "(cn=*)" are sped up by using a "pres" index, which simply indicates whether an attribute is present in the entry regardless of its value.


Second Question:
How do these indexes work? Like for instance, in the schema, you can
use substrings for mail. I can use ldapsearch to search for an email
and find the entry successfully using substrings without having to
create a "mail sub" entry for mail in slapd.conf. However, searching
for a specfic given name using ldapsearch and setting a "gn eq" in
slapd.conf would yield no results.



As indicated in the docs, aftr changing indices in slapd.conf you need to update/generate them by running slapindex, otherwise not only they're ineffective, but the presence of the index directive in the absence of the file (or its presence with incomplete indices) tricks slapd into believing that there's no match while actually there's no indices. Of course searches for unindexed attributes work; indices ar only required to improve performances (the improvement can be dramatic).


p.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497