code: public static OIndexDefinition createIndexDefinition(final OClass oClass, final List<String> fieldNames, final List<OType> types) {
      checkTypes(oClass, fieldNames, types);
  
      if (fieldNames.size() == 1)
        return createSingleFieldIndexDefinition(oClass, fieldNames.get(0), types.get(0));
      else
        return createMultipleFieldIndexDefinition(oClass, fieldNames, types);
    }
docs: Creates an instance of {@link OIndexDefinition} for automatic index.
  
  @param oClass
  class which will be indexed
  @param fieldNames
  list of properties which will be indexed. Format should be '<property> [by key|value]', use 'by key' or 'by value' to
  describe how to index maps. By default maps indexed by key
  @param types
  types of indexed properties
  @return index definition instance