graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java
public <T extends Element> Set<String> getIndexedKeys(final Class<T> elementClass, final boolean includeClassNames) {
    makeActive();

    if (elementClass == null)
      throw ExceptionFactory.classForElementCannotBeNull();

    final OSchema schema = getRawGraph().getMetadata().getImmutableSchemaSnapshot();
    final String elementOClassName = getClassName(elementClass);

    Set<String> result = new HashSet<String>();
    final Collection<? extends OIndex<?>> indexes = getRawGraph().getMetadata().getIndexManager().getIndexes();
    for (OIndex<?> index : indexes) {
      String indexName = index.getName();
      int point = indexName.indexOf(".");
      if (point > 0) {
        String oClassName = indexName.substring(0, point);
        OClass oClass = schema.getClass(oClassName);
        if (oClass != null) {
          if (oClass.isSubClassOf(elementOClassName)) {
            if (includeClassNames)
              result.add(index.getName());
            else
              result.add(index.getDefinition().getFields().get(0));
          }
        }
      }
    }
    return result;
  }
public <T extends Element> Set<String> getIndexedKeys(final Class<T> elementClass, final boolean includeClassNames) {
    makeActive();

    if (elementClass == null)
      throw ExceptionFactory.classForElementCannotBeNull();

    final OSchema schema = getRawGraph().getMetadata().getImmutableSchemaSnapshot();
    final String elementOClassName = getClassName(elementClass);

    Set<String> result = new HashSet<String>();
    final Collection<? extends OIndex<?>> indexes = getRawGraph().getMetadata().getIndexManager().getIndexes();
    for (OIndex<?> index : indexes) {
      String indexName = index.getName();
      int point = indexName.indexOf(".");
      if (point > 0) {
        String oClassName = indexName.substring(0, point);
        OClass oClass = schema.getClass(oClassName);
        if (oClass != null) {
          if (oClass.isSubClassOf(elementOClassName)) {
            if (includeClassNames)
              result.add(index.getName());
            else
              result.add(index.getDefinition().getFields().get(0));
          }
        }
      }
    }
    return result;
  }
Returns the indexed properties.

@param elementClass      the element class that the index is for
@param includeClassNames If true includes also the class name as prefix of fields

@return Set of String containing the indexed properties