The proprietary matching entry count request control may be included in a search request to indicate that instead of returning the set of matching entries, it should instead return a result with a response control that provides an estimate of the number of matching entries, along with potential debug information describing how the server used indexes to arrive at that result. The control has an OID of 1.3.6.1.4.1.30221.2.5.36, and it takes a value. The following fields may be present in the value-json
representation of the value:
maximum-candidates-to-examine
: An optional integer field whose value is the maximum number of entries that the server should retrieve and examine to determine whether they actually match the search criteria and whether they would be returned to the client in a normal search operation. If this is not provided, then a default value of zero is used.
always-examine-candidates
: An optional Boolean field that indicates whether the server should always examine candidate entries to determine whether they would actually be returned to the client (for example, that the requester has permission to retrieve those entries), even if the search is fully indexed and the server knows that all of the candidates match the search criteria. If this is not provided, then a default value of false
is used.
process-search-if-unindexed
: An optional Boolean field that indicates whether the server should actually process the search to identify the set of matching entries if the search is completely unindexed. If this is not provided, then a default value of false
is used.
include-debug-info
: An optional Boolean field that indicates whether the server should include debug information in the response that provides additional details about the processing it performed to arrive at that result. If this is not provided, then a default value of false
is used.
skip-resolving-exploded-indexes
: An optional Boolean field that indicates whether the server should not resolve exploded indexes in cases where the size of the ID set is known. This can reduce the time required to obtain the final result, but that result may be less accurate. If this is not provided, then a default value of false
is used.
fast-short-circuit-threshold
: An optional integer field whose value is the short-circuit threshold that the server should use for “fast” filter components (those in which the server may need to only examine a single index key, like presence, equality, and approximate-match components). If this is not provided, the server automatically chooses an appropriate threshold.
slow-short-circuit-threshold
: An optional integer field whose value is the short-circuit threshold that the server should use for “slow” filter components (those that are not considered “fast” and may require examining multiple index keys, like substring, greater-or-equal, and less-or-equal components). If this is not provided, the server automatically chooses an appropriate threshold.
include-extended-response-data
: An optional Boolean field that indicates whether the server should include additional information in the response, like whether all of the identified candidates are known to be within the scope of the search and which components of the filter may not have been evaluated. If this is not provided, then a default value of false
is used.
The following sample shows the JSON encoding for the control:
{
"oid":"1.3.6.1.4.1.30221.2.5.36",
"control-name":"Matching Entry Count Request Control",
"criticality":true,
"value-json": {
"maximum-candidates-to-examine":10000,
"include-debug-info":true
}
}