Created
August 29, 2014 19:19
-
-
Save otobrglez/e2ba9cf1e61febd17546 to your computer and use it in GitHub Desktop.
ElasticSearch - Mapping / Settings example
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 FilmSearch | |
extend ActiveSupport::Concern | |
included do | |
include Elasticsearch::Model | |
include Elasticsearch::Model::Callbacks | |
mapping do | |
indexes "title", type: 'string', analyzer: 'snowball' | |
indexes "signing.starts_at", type: 'date', format: 'basic_date' | |
end | |
settings do | |
#TODO: Add analysers and other settings here. | |
end | |
end | |
end | |
class Film | |
include FilmSearch | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment