code: public void addIndex(final OIndexDefinition indexDefinition) {
      indexDefinitions.add(indexDefinition);
      if (indexDefinition instanceof OIndexDefinitionMultiValue) {
        if (multiValueDefinitionIndex == -1)
          multiValueDefinitionIndex = indexDefinitions.size() - 1;
        else
          throw new OIndexException("Composite key can not contain more than one collection item");
      }
  
    }
docs: Add new indexDefinition in current composite.
  
  @param indexDefinition
  Index to add.