Adaptive query shifting for content-based image retrieval