private void indexRelationship(final AbstractRelationship rel) throws FrameworkException {

    String uuid = rel.getStringProperty(AbstractRelationship.Key.uuid);

    // Don't index non-structr relationship
    if (uuid == null) {

      return;
    }

    String combinedKey = rel.getStringProperty(AbstractRelationship.HiddenKey.combinedType.name());

    if (combinedKey == null) {

      AbstractNode startNode = rel.getStartNode();
      AbstractNode endNode = rel.getEndNode();

      if (startNode != null && endNode != null) {

        // add a special combinedType key, consisting of the relationship combinedType, the
        // combinedType of the start node and the combinedType of the end node
        String tripleKey =
            EntityContext.createCombinedRelationshipType(
                startNode.getType(), rel.getType(), endNode.getType());

        rel.setProperty(
            AbstractRelationship.HiddenKey.combinedType.name(), Search.clean(tripleKey));
        indexProperty(rel, AbstractRelationship.HiddenKey.combinedType.name());

      } else {

        logger.log(
            Level.WARNING, "Unable to create combined type key, startNode or endNode was null!");
      }
    }

    for (String key : rel.getPropertyKeys()) {

      indexProperty(rel, key);
    }
  }