2023-07-28 00:11:17 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class InstancesIndex < Chewy::Index
|
2023-08-15 01:46:16 +10:00
|
|
|
settings index: index_preset(refresh_interval: '30s')
|
2023-07-28 00:11:17 +10:00
|
|
|
|
|
|
|
index_scope ::Instance.searchable
|
|
|
|
|
|
|
|
root date_detection: false do
|
|
|
|
field :domain, type: 'text', index_prefixes: { min_chars: 1 }
|
|
|
|
field :accounts_count, type: 'long'
|
|
|
|
end
|
|
|
|
end
|