importing rails 4 compatible searchable code from latest sunspot/sunspot-rails