Modified to allow not string fields to be queried.