Constrained Dominant Sets for Retrieval