The current Contact Manager Class has APIs to search contacts and ContactIds based on various filters.
In addition to the filters, it will be good to have a maxSearchLimit.
Test Case
To test the completeness of this feature run the test case tst_qcontactmanager test function fetchHint