Add indexes on edges.