The PingDirectory Server filtered index is useful when client search requests consisting of a compound &-filter with individual components matching a large number of entries, potentially greater than the index entry limit, have an intersection of a relatively small number of entries.
For example, assume a database contains several thousand company profiles and each company profile is represented by many entries. The "(objectClass=company)" filter matches a small set of entries per company, and therefore may exceed the index entry limit since there are many companies. Also assume that the "(companyDomain=example.com)" filter matches many of the entries for the company with domain example.com and can also result in an unindexed search. The more narrow filter "(&(objectClass=company)(companyDomain=example.com))" also results in an unindexed search but only matches a small number of entries. The filtered index makes it possible to index this compound filter by defining an equality index on the companyDomain attribute with a static filter of "(objectClass=company)" in the equality-index-filter property of the index.
- The AND filter itself matches a relatively small number of entries, but each of the individual components may match a very large number of entries.
- The filter has a dynamic component that does change, and that dynamic component always uses the same attribute.
- The filter has a static component that doesn't change.
- The filter must be narrowed to a base DN, for data structures with many branches, or if indexed attribute values appear in a very large number of entries.
The filtered index can be maintained independently from the equality filter for that attribute. Further, the filtered index will be used only for searches containing the equality component with the associated attribute type ANDed with this filter. When configuring a filtered index, be aware of the equality-index-filter and maintain-equality-index-without-filter properties of the index.
(&(objectClass=company)(companyDomain=example.com)) (&(objectClass=company)(|(companyDomain=example.com)(companyDomain=example.org))) (&(companyDomain=example.com)(objectClass=company)) (&(companyDomain=example.com)(&(objectClass=company))) (&(companyDomain=example.com)(objectClass=company)(something=else)) (&(companyDomain=example.com)(&(objectClass=company)(something=else))) (|(&(objectClass=company)(companyDomain=example.com))(&(objectClass=company)(companyDomain=example.org)))
When configuring a filtered index, define the following properties:
|Filtered Index Properties||Description|
|equality-index-filter||Specifies a search filter that may be used in conjunction with an equality component for the associated attribute type. If an equality index filter is defined, then an additional equality index will be maintained for the associated attribute, but only for entries that match the provided filter. Further, the index will be used only for searches containing an equality component with the associated attribute type ANDed with this filter.|
|maintain-equality-index-without-filter||Specifies whether to maintain a separate equality index for the associated attribute without any filter, in addition to maintaining an index for each equality index filter that is defined. If this is false, then the attribute will not be indexed for equality by itself but only in conjunction with the defined equality index filters.|