Query dependent ranking using K-nearest neighbor | Synapse