Implement tag querying.