How to count the number of entries matched by a LD

2019-07-15 10:47发布

How to count the number of entries matched by a LDAP query without retrieving the records?

I am trying several different LDAP filters on a big set of entries and for performance reasons I want to know only the number of returned entries, not to get them all.

Is this possible, how?

1条回答
看我几分像从前
2楼-- · 2019-07-15 11:34

No. The LDAP protocol does not provide support for counting. A server implementation could provide this information via an supportedControl or supportedExtension or some other "Feature", but I do not know of any that do this.

UnboundID's SDK can perform the search and provide a searchResult count, but the search has to be completed before the count is complete. This would only save you the iteration of the results to perform the counting.

查看更多
登录 后发表回答