Last active
February 1, 2020 07:05
-
-
Save kopylovvlad/13536e1d288b6d0cac6418f471f7fba3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Article < ActiveRecord::Base | |
include Elasticsearch::Model | |
include Elasticsearch::Model::Callbacks | |
include ElasticMyAnalyzer | |
include EsHelper | |
settings ES_SETTING do | |
mappings dynamic: 'true' do | |
indexes :title, type: 'string', analyzer: 'my_analyzer' # or type: 'text' for version 6.1 | |
indexes :description, type: 'string', analyzer: 'my_analyzer' # or type: 'text' for version 6.1 | |
indexes :searching, type: 'boolean' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment