code: public void checkFieldsCompatible(final String... fields) {
          final Set<String> indexFields = Sets.newHashSet(index.getDefinition().getFields());
          final Joiner joiner = Joiner.on(",");
          check(indexFields.equals(Sets.newHashSet(fields)),
                  "Existing index '%s' (class '%s') fields '%s' are different from '%s'.",
                  index.getName(), index.getDefinition().getClassName(), joiner.join(indexFields), joiner.join(fields));
      }
docs: Checks if existing index consists of exactly the same fields. If not, error thrown to indicate
  probable programmer error.
  
  @param fields new signature index fields