1. The document introduces an approach to enable query-adaptive ranking of images returned from image search based on hash codes. 2. It achieves this by first learning offline bitwise weights of hash codes for predefined semantic concept classes, and formulating the weight learning as a quadratic programming problem. 3. Query-adaptive weights are then computed online by evaluating the proximity between a query and semantic concept classes. This allows ranking images by a finer-grained weighted Hamming distance rather than the original Hamming distance.