code: public void setCategories(String[] categories) {
  
          List<String> setCategories = new ArrayList<String>();
          if (categories != null) {
              if (categories.length != 0) {
                  // ensure all categories are not null, trimmed, not-empty and lowercased
                  String cat;
                  for (int i = 0; i < categories.length; i++) {
                      cat = categories[i];
                      if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(cat)) {
                          // all categories must internally be lower case,
                          // since the index keywords are lower cased as well
                          cat = cat.trim().toLowerCase();
                          setCategories.add(cat);
                      }
                  }
              }
          }
          m_parameters.setCategories(setCategories);
          resetLastResult();
      }
docs: Sets the search categories, all search results must be in one of the categories,
  the category set must match the indexed category exactly.<p>
  
  All categories will automatically be trimmed and lower cased, since search categories
  are also stored this way in the index.<p>
  
  @param categories the categories to set