Are you using postgress?  I'm not familiar with the ilike statement.  I'm using MySql in production which is case insensitive by default.  ilike is not a mysql function.  It would be better to force everything lower I think so it's db agnostic.

lower(name) like ?, partial_name.downcase

above is pseudo-code