11json . aggregations do
2- json . language @results [ 'aggregations' ] [ 'languages ' ] [ 'buckets' ] do |x |
2+ json . source @results [ 'aggregations' ] [ 'source ' ] [ 'buckets' ] do |x |
33 json . name x [ 'key' ]
44 json . count x [ 'doc_count' ]
55 end
66
7- if @results [ 'aggregations' ] [ 'collections' ]
8- json . collection @results [ 'aggregations' ] [ 'collections' ] [ 'buckets' ] do |x |
9- json . name x [ 'key' ]
10- json . count x [ 'doc_count' ]
11- end
7+ json . content_format @results [ 'aggregations' ] [ 'content_format' ] [ 'buckets' ] do |x |
8+ json . name x [ 'key' ]
9+ json . count x [ 'doc_count' ]
1210 end
1311
1412 json . content_type @results [ 'aggregations' ] [ 'content_type' ] [ 'buckets' ] do |x |
1513 json . name x [ 'key' ]
1614 json . count x [ 'doc_count' ]
1715 end
1816
17+ if @results [ 'aggregations' ] [ 'collections' ]
18+ json . collection @results [ 'aggregations' ] [ 'collections' ] [ 'buckets' ] do |x |
19+ json . name x [ 'key' ]
20+ json . count x [ 'doc_count' ]
21+ end
22+ end
23+
1924 json . contributor @results [ 'aggregations' ] [ 'contributors' ] [ 'contributor_names' ] [ 'buckets' ] do |x |
2025 json . name x [ 'key' ]
2126 json . count x [ 'doc_count' ]
@@ -26,7 +31,7 @@ json.aggregations do
2631 json . count x [ 'doc_count' ]
2732 end
2833
29- json . content_format @results [ 'aggregations' ] [ 'content_format ' ] [ 'buckets' ] do |x |
34+ json . language @results [ 'aggregations' ] [ 'languages ' ] [ 'buckets' ] do |x |
3035 json . name x [ 'key' ]
3136 json . count x [ 'doc_count' ]
3237 end
@@ -35,9 +40,4 @@ json.aggregations do
3540 json . name x [ 'key' ]
3641 json . count x [ 'doc_count' ]
3742 end
38-
39- json . source @results [ 'aggregations' ] [ 'source' ] [ 'buckets' ] do |x |
40- json . name x [ 'key' ]
41- json . count x [ 'doc_count' ]
42- end
4343end
0 commit comments