Search not working for referenced(lookup) field

When we enter a search text in the referenced field instead of clicking on the lookup icon,it is throwing a SQL query exception.Search pop-up or search fields has 4 fields:- 3 string fields and one checkbox.We are getting an exception that search text can only be compared with string fields.When we remove the checkbox fields from the search fields,search is working fine,else it is throwing an exception.But we are facing this issue only in production which has Rockway Point Release 5 version.This is working fine with the checkbox in our full copy sandbox which has Rockway Point Release 2. Any thoughts on why this is happening?