Its not quite easily graspable to sort your search results by Ratings if you have separate
Ratings table and there is an intermediate table called
Similar. Example Model schema is below for reference.
If you need the shipping address to be set any how, and want to skip the validations as set in the spree’s address model, you can do it easily
class Address < Spree::Base
belongs_to :country, class_name: "Spree::Country"
belongs_to :state, class_name: "Spree::State"
has_many :shipments, inverse_of: :address
validates :firstname, :lastname, :address1, :city, :country, presence: true
validates :zipcode, presence: true, if: :require_zipcode?
validates :phone, presence: true, if: :require_phone?
validate :state_validate, :postal_code_validate
And you are done