public void indexRelationshipUsingBatchIndexer(BatchInserterIndexProvider indexProvider,
EntityMetadata entityMetadata, long relationshipId, Map<String, Object> relationshipProperties,
boolean relationshipAutoIndexingEnabled)
{
BatchInserterIndex relationshipIndex = null;
if (!relationshipAutoIndexingEnabled && entityMetadata.isIndexable())
{
relationshipIndex = indexProvider.relationshipIndex(entityMetadata.getIndexName(),
MapUtil.stringMap("type", "exact"));
}
else
{
relationshipIndex = indexProvider.relationshipIndex("relationship_auto_index",
MapUtil.stringMap("type", "exact"));
}
if (relationshipIndex != null)
relationshipIndex.add(relationshipId, relationshipProperties);
}