Optimize paths lookup in index