Maintain an index for keys