Indexing on Ids referred as elements