Index id generation and lookup working and matching both ways