blob: e5cc2f25aa20daf60d2af4e07a418e99fc366957 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require 'singleton'
class ChangeRepository < BaseRepository
include Singleton
client ElasticsearchClient.default
index_name "change-#{Rails.env}"
klass Change
mapping do
indexes :package, type: 'keyword'
indexes :category, type: 'keyword'
indexes :change_type, type: 'keyword'
indexes :version, type: 'keyword'
indexes :arches, type: 'keyword'
indexes :commit, type: 'object'
indexes :created_at, type: 'date'
indexes :updated_at, type: 'date'
end
end
|