apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SearchController.java/SearchController/searchByItem
class SearchController:  private PageDTO<App> searchByItem(String itemKey, Pageable pageable) {
    List<App> result = Lists.newLinkedList();

    if (StringUtils.isEmpty(itemKey)) {
      return new PageDTO<>(result, pageable, 0);
    }

    //use the env witch has the most namespace as page index.
    final AtomicLong maxTotal = new AtomicLong(0);

    List<Env> activeEnvs = portalSettings.getActiveEnvs();

    activeEnvs.forEach(env -> {
      PageDTO<NamespaceDTO> namespacePage = namespaceService.findNamespacesByItem(env, itemKey, pageable);
      if (!namespacePage.hasContent()) {
        return;
      }

      long currentEnvNSTotal = namespacePage.getTotal();
      if (currentEnvNSTotal > maxTotal.get()) {
        maxTotal.set(namespacePage.getTotal());
      }

      List<NamespaceDTO> namespaceDTOS = namespacePage.getContent();

      namespaceDTOS.forEach(namespaceDTO -> {
        String cluster = namespaceDTO.getClusterName();
        String namespaceName = namespaceDTO.getNamespaceName();

        App app = new App();
        app.setAppId(namespaceDTO.getAppId());
        app.setName(env.getName() + " / " + cluster + " / " + namespaceName);
        app.setOrgId(env.getName() + "+" + cluster + "+" + namespaceName);
        app.setOrgName("SearchByItem" + "+" + itemKey);

        result.add(app);
      });
    });

    return new PageDTO<>(result, pageable, maxTotal.get());
  }