mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
originator facets
This commit is contained in:
parent
f709c399be
commit
cb877d510e
3 changed files with 13 additions and 0 deletions
|
@ -15,6 +15,7 @@ class Paper < ActiveRecord::Base
|
|||
indexes :content, type: :string
|
||||
indexes :resolution, type: :string
|
||||
indexes :paper_type, type: :string, index: :not_analyzed
|
||||
indexes :originator, type: :string, index: :not_analyzed
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -62,6 +63,12 @@ class Paper < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
aggregation :originators do
|
||||
terms do
|
||||
field 'originator'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
puts @search_definition.to_hash
|
||||
__elasticsearch__.search(@search_definition)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue