Revamp how citation-based query is handled