query clause might be an array (range) so stringify appropriately when counting term frequency