change the index in query image