Add domain attribute to other chewy indices

This commit is contained in:
KMY 2023-08-26 19:00:57 +09:00
parent 3affa4177d
commit 7c2abfbd10
2 changed files with 2 additions and 0 deletions

View file

@ -44,6 +44,7 @@ class PublicStatusesIndex < Chewy::Index
field(:account_id, type: 'long')
field(:text, type: 'text', analyzer: 'whitespace', value: ->(status) { status.searchable_text }) { field(:stemmed, type: 'text', analyzer: 'content') }
field(:language, type: 'keyword')
field(:domain, type: 'keyword', value: ->(status) { status.account.domain || '' })
field(:properties, type: 'keyword', value: ->(status) { status.searchable_properties })
field(:created_at, type: 'date')
end