code: public Set<Entity> search(String entityType, String searchTerm) {
          if (StringUtils.isBlank(entityType) && StringUtils.isBlank(searchTerm)) {
              return null;
          }
          Set<Entity> results = new HashSet<Entity>();
          EntityEnum entityEnum = EntityEnum.getEntityEnum(entityType);
          EntityIdentifier[] identifiers;
          Class<?> identifierType;
  
          // if the entity type is a group, use the group service's findGroup method
          // to locate it
          if (entityEnum.isGroup()) {
              identifiers =
                      GroupService.searchForGroups(
                              searchTerm,
                              GroupService.SearchMethod.CONTAINS_CI,
                              entityEnum.getClazz());
              identifierType = IEntityGroup.class;
          }
          // otherwise use the getGroupMember method
          else {
              identifiers =
                      GroupService.searchForEntities(
                              searchTerm,
                              GroupService.SearchMethod.CONTAINS_CI,
                              entityEnum.getClazz());
              identifierType = entityEnum.getClazz();
          }
  
          for (EntityIdentifier entityIdentifier : identifiers) {
              if (entityIdentifier.getType().equals(identifierType)) {
                  IGroupMember groupMember = GroupService.getGroupMember(entityIdentifier);
                  Entity entity = getEntity(groupMember);
                  results.add(entity);
              }
          }
  
          return results;
      }
docs: External search, thus case insensitive.