The dsconf analyze-index-filters command when enabled, displays the Directory Server search filters with their statistics.
Enable index filter analyzer using the following command:
$ dsconf enable-index-filter-analyzer [--max-entries INT] SUFFIX_DN |
For example, to enable index filter analyzer on o=example.com, run the following command:
$ dsconf enable-index-filter-analyzer -p port-number o=example.com $ dsconf get-suffix-prop -p port-number o=example.com \ index-filter-analyzer-enabled index-filter-analyzer-max-entries index-filter-analyzer-enabled : on index-filter-analyzer-max-entries : 2000 |
Analyze index filters to know the indexes that need to be reindexed.
$ dsconf analyze-index-filters -p port-number SUFFIX_DN |
The output displays all the attributes that need to be reindexed, index filter usage statistics, number of hits, and number of allids hits. Based on the output, you can configure indexes differently by modifying the all-ids-threshold property or by creating indexes, to improve performance.
$ dsconf analyze-index-filters -p port-number o=example.com Observations started at Nov 13, 2008 12:01:29 PM Total number of search requests : 8 Total number of Allids : 7 filter Type #allids/#hits Threshold Max matching Additional info entries ------------------- ---- ------------- --------- ------------ --------------- (departmentNumber eq 1/1 2 "departmentNumber" =9415) is not indexed (objectClass eq 1/1 *4000 10000 To investigate =inetOrgPerson) (objectClass=*) pres 1/1 10006 "pres" type is disabled for "objectClass" system index (roomNumber=*) pres 1/1 10000 "roomNumber" is not indexed (roomNumber=1*) eq 1/1 4071 "roomNumber" is not indexed (telephoneNumber=*) pres 2/2 *4000 10000 To investigate (telephoneNumber=1*) eq 0/1 4000 10000 ## * indicates thresholds which have been crossed. No attributes need to be reindexed Use "dsconf set-index-prop o=example.com ATTR_NAME..." to set the allids threshold value and to take benefit of indexes. |
The displayed filters are the basic filter elements along with the following information:
Type that is used during processing.
How many times the filter element is used and how many times the index value is Allids.
Allids can occur because of unsufficient privileges or if the index type configuration is changed. In the latter case, data may be skewed.
Complex filters are broken down to these basic elements and will not appear in their entirety.
The example output displays the following information:
Some index values are Allids
Some attributes are not indexed, that is, roomNumber, departmentNumber.
Total 4071 entries matched the roomNumber=1* filter
Some indexes are well configured for some filter use, that is, telephoneNumber=1*.
Create the new index for the attribute roomNumber.
$ dsconf create-index -p port-number o=example.com roomNumber |
Run the analyze-index-filters command again to check the status.
$ dsconf analyze-index-filters -p port-number o=example.com Observations started at Nov 13, 2008 12:01:29 PM Total number of search requests : 9 Total number of Allids : 8 filter Type #allids/#hits Threshold Max matching Additional info entries -------------------- ---- ------------- --------- ------------ ----------------- (departmentNumber eq 1/1 2 "departmentNumber" =9415) is not indexed (objectClass eq 1/1 *4000 10000 To investigate =inetOrgPerson) (objectClass=*) pres 1/1 10006 "pres" type is disabled for "objectClass" system index (roomNumber=*) pres 1/1 *4000 10000 To investigate (roomNumber=1*) eq 1/1 *4000 4071 To investigate (telephoneNumber=*) pres 2/2 *4000 10000 To investigate (telephoneNumber=1*) eq 0/1 4000 10000 ## * indicates thresholds which have been crossed. Attributes to reindex : roomNumber Use "dsconf reindex --attr ATTR_NAME... o=example.com" to reindex. Use "dsconf set-index-prop o=example.com ATTR_NAME..." to set the allids threshold value and to take benefit of indexes. |
As required, follow the appropriate procedure as displayed at the end of the output.
Restart the index filter analyzer to consider the latest index updates.
To restart the index filter analyzer, disable the analyzer using the disable-index-filter-analyzer subcommand and then start the analyzer again using the enable-index-filter-analyzer subcommand.
Monitoring affects performance. It also requires heavy memory resources, based on the configured maximum number of filters to monitor.
Run the dsconf info command to know when the analyzer was enabled. If you do not want to monitor indexes and analyze-index-filters, it is not recommended to keep the analyzer running.
Directory Server tries to optimize the search so that when complex filters are evaluated, not all elements could be processed. Do not expect a one-to-one relation with what appears in the access log, and a complex filter and its constituent elements.
For more information, see dsconf(1M).