GARCIA: Powering Representations of Long-tail Query with Multi–granularity Contrastive Learning