this.recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph
.getRawGraph()
.getMetadata()
.getIndexManager()
.createIndex("__@recordmap@___" + indexName, OClass.INDEX_TYPE.DICTIONARY.toString(),
new OSimpleKeyIndexDefinition(OType.LINK, OType.STRING), null, null, null));
final String className;
if (Vertex.class.isAssignableFrom(indexClass))
className = VERTEX;
else if (Edge.class.isAssignableFrom(indexClass))
className = EDGE;
else
className = indexClass.getName();
final ODocument metadata = new ODocument();
metadata.field(CONFIG_CLASSNAME, className);
metadata.field(CONFIG_RECORD_MAP_NAME, recordKeyValueIndex.getName());
// CREATE THE MAP
this.underlying = new OIndexTxAwareMultiValue(graph.getRawGraph(), (OIndex<Collection<OIdentifiable>>) graph.getRawGraph()
.getMetadata().getIndexManager()
.createIndex(indexName, OClass.INDEX_TYPE.NOTUNIQUE.toString(), new OSimpleKeyIndexDefinition(iKeyType), null, null
, metadata));
}