instances_index.rb 323 B

123456789101112
  1. # frozen_string_literal: true
  2. class InstancesIndex < Chewy::Index
  3. settings index: index_preset(refresh_interval: '30s')
  4. index_scope ::Instance.searchable
  5. root date_detection: false do
  6. field :domain, type: 'text', index_prefixes: { min_chars: 1, max_chars: 5 }
  7. field :accounts_count, type: 'long'
  8. end
  9. end