CoreSession adminSession = directoryService.getAdminSession();
PartitionNexus nexus = directoryService.getPartitionNexus();
// We will store each entry's DN into the Referral tree
EntryFilteringCursor cursor = nexus.search( new SearchOperationContext( adminSession, suffix, AliasDerefMode.DEREF_ALWAYS,
referralFilter, searchControl ) );
// Move to the first entry in the cursor
cursor.beforeFirst();