1
0
Fork 0

Make Account searchable

This commit is contained in:
Alex Kotov 2020-01-04 09:52:58 +05:00
parent 5cf851dc39
commit 967198ab25
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,16 @@
# frozen_string_literal: true
class Account < ApplicationRecord
include Searchable
settings index: { number_of_shards: 1 } do
mapping dynamic: false do
indexes :nickname, analyzer: 'english'
indexes :public_name, analyzer: 'russian'
indexes :biography, analyzer: 'russian'
end
end
################
# Associations #
################