Created
April 8, 2013 08:47
-
-
Save jumski/5335264 to your computer and use it in GitHub Desktop.
tire mappings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CopyIndexes | |
extend ActiveSupport::Concern | |
included do | |
include Tire::Model::Search | |
include Tire::Model::Callbacks | |
mapping do | |
indexes :condition, type: 'string' | |
indexes :edition do | |
indexes :year_of_publication, type: 'integer' | |
indexes :cover_type, type: 'string' | |
indexes :created_at, type: 'date' | |
indexes :updated_at, type: 'date' | |
indexes :publishing_house_name, type: 'string' | |
indexes :circulation, type: 'string' | |
indexes :weight, type: 'string' | |
indexes :ean, type: 'string' | |
indexes :size, type: 'string' | |
indexes :number_of_pages, type: 'string' | |
indexes :tomes do | |
indexes :isbn, type: 'string' | |
end | |
indexes :book do | |
indexes :title, type: 'string' | |
indexes :author_name, type: 'string' | |
indexes :category do | |
indexes :name, type: 'string' | |
indexes :path_text, type: 'string' | |
indexes :leaf_node, type: 'boolean' | |
indexes :soft_removed_at, type: 'date' | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment