public void index(Collection<DiscoverabilityEntity> discoverabilityEntities) {

        /*
         * We need to ensure that the highest discoverability level wins.
         */
        for (DiscoverabilityDto discoverabilityDto : mapper.toDto(discoverabilityEntities)) {
            insertIntoIndex(createApiLookupKey(discoverabilityDto), discoverabilityDto);

            // If it's a public API, it could be that it has no attached plans.
            if (discoverabilityDto.getPlanId() != null && discoverabilityDto.getPlanVersion() != null) {
                insertIntoIndex(createPlanLookupKey(discoverabilityDto), discoverabilityDto);
            }
        }
    }
Add some DiscoverabilityDtos to the index

@param discoverabilityEntities views to index
manager/api/security/src/main/java/io/apiman/manager/api/security/impl/IndexedDiscoverabilities.java