code: @Override
    public String[] getFacetNames() {
      if (facets == null || facets.isEmpty()) {
        return new String[0];
      }
      Set<String> names = facets.keySet();
      return names.toArray(new String[names.size()]);
    }
docs: Returns a list of the facet names returned in this search.
  @return The array of names.