CMS-2336 Implement query parser