gds-api-adapters 101.2.0 → 102.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gds_api/search.rb +0 -115
- data/lib/gds_api/test_helpers/search.rb +0 -75
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -3
- data/test/fixtures/old_policies_for_dwp.json +0 -413
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12f8298cb5b22b10a5cdb92cd43044fdc7b76daf9c2ac64ace1b8c8f15a2215d
|
|
4
|
+
data.tar.gz: a797f23bebe850d94c226ee00db646c00075291f224f2042f4dfcb6679c48a97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 898fd725125d6c4c1ed9196d746f782e36de578357ebdfbce6106b20451b5916b86650e1d6b6c1c1bb6770ab042876788041156ac5aa207feda0549751758237
|
|
7
|
+
data.tar.gz: 907d5b70d48a8cd3649487bece12a61cce9883951e9b8053a9c9145c24aa7f22f54a1bc27a08881fd65f464851e7aa0d758205f40d78b9e90985406c3aa4f010
|
data/lib/gds_api/search.rb
CHANGED
|
@@ -4,65 +4,6 @@ require "rack/utils"
|
|
|
4
4
|
module GdsApi
|
|
5
5
|
# @api documented
|
|
6
6
|
class Search < Base
|
|
7
|
-
# @api documented
|
|
8
|
-
class V1 < SimpleDelegator
|
|
9
|
-
def add_document(type, id, document)
|
|
10
|
-
post_json(
|
|
11
|
-
documents_url,
|
|
12
|
-
document.merge(
|
|
13
|
-
_type: type,
|
|
14
|
-
_id: id,
|
|
15
|
-
),
|
|
16
|
-
)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def delete_document(type, id)
|
|
20
|
-
delete_json(
|
|
21
|
-
"#{documents_url}/#{id}",
|
|
22
|
-
nil,
|
|
23
|
-
_type: type,
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# @api documented
|
|
29
|
-
class V2 < SimpleDelegator
|
|
30
|
-
class InvalidIndex < StandardError; end
|
|
31
|
-
|
|
32
|
-
def add_document(id, document, index_name)
|
|
33
|
-
raise(InvalidIndex, index_name) unless index_name == "metasearch"
|
|
34
|
-
|
|
35
|
-
post_json(
|
|
36
|
-
"#{base_url}/v2/metasearch/documents",
|
|
37
|
-
document.merge(
|
|
38
|
-
_id: id,
|
|
39
|
-
),
|
|
40
|
-
)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def delete_document(id, index_name)
|
|
44
|
-
raise(InvalidIndex, index_name) unless index_name == "metasearch"
|
|
45
|
-
|
|
46
|
-
delete_json("#{base_url}/v2/metasearch/documents/#{id}")
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
DEFAULT_API_VERSION = "V1".freeze
|
|
51
|
-
API_VERSIONS = {
|
|
52
|
-
"V1" => GdsApi::Search::V1,
|
|
53
|
-
"V2" => GdsApi::Search::V2,
|
|
54
|
-
}.freeze
|
|
55
|
-
class UnknownAPIVersion < StandardError; end
|
|
56
|
-
|
|
57
|
-
def initialize(endpoint_url, options = {})
|
|
58
|
-
super
|
|
59
|
-
# The API version provides a simple wrapper around this base class so that we
|
|
60
|
-
# can still access the shared methods present in this class.
|
|
61
|
-
version = options.fetch(:api_version, DEFAULT_API_VERSION)
|
|
62
|
-
api_class = API_VERSIONS[version] || raise(UnknownAPIVersion)
|
|
63
|
-
@api = api_class.new(self)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
7
|
# Perform a search.
|
|
67
8
|
#
|
|
68
9
|
# @param args [Hash] A valid search query. See search-api documentation for options.
|
|
@@ -111,64 +52,8 @@ module GdsApi
|
|
|
111
52
|
end
|
|
112
53
|
end
|
|
113
54
|
|
|
114
|
-
# Add a document to the search index.
|
|
115
|
-
#
|
|
116
|
-
# @param type [String] The search-api document type.
|
|
117
|
-
# @param id [String] The search-api/elasticsearch id. Typically the same as the `link` field, but this is not strictly enforced.
|
|
118
|
-
# @param document [Hash] The document to add. Must match the search-api schema matching the `type` parameter and contain a `link` field.
|
|
119
|
-
# @param index_name (V2 only) Name of the index to be deleted from on
|
|
120
|
-
# GOV.UK - we only allow deletion from metasearch
|
|
121
|
-
# @return [GdsApi::Response] A status code of 202 indicates the document has been successfully queued.
|
|
122
|
-
#
|
|
123
|
-
# @see https://github.com/alphagov/search-api/blob/master/docs/documents.md
|
|
124
|
-
def add_document(*args)
|
|
125
|
-
@api.add_document(*args)
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
# Delete a content-document from the index by base path.
|
|
129
|
-
#
|
|
130
|
-
# Content documents are pages on GOV.UK that have a base path and are
|
|
131
|
-
# returned in searches. This excludes best bets, recommended-links,
|
|
132
|
-
# and contacts, which may be deleted with `delete_document`.
|
|
133
|
-
#
|
|
134
|
-
# @param base_path Base path of the page on GOV.UK.
|
|
135
|
-
# @see https://github.com/alphagov/search-api/blob/master/docs/content-api.md
|
|
136
|
-
def delete_content(base_path)
|
|
137
|
-
request_url = "#{base_url}/content?link=#{base_path}"
|
|
138
|
-
delete_json(request_url)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Retrieve a content-document from the index.
|
|
142
|
-
#
|
|
143
|
-
# Content documents are pages on GOV.UK that have a base path and are
|
|
144
|
-
# returned in searches. This excludes best bets, recommended-links,
|
|
145
|
-
# and contacts.
|
|
146
|
-
#
|
|
147
|
-
# @param base_path [String] Base path of the page on GOV.UK.
|
|
148
|
-
# @see https://github.com/alphagov/search-api/blob/master/docs/content-api.md
|
|
149
|
-
def get_content(base_path)
|
|
150
|
-
request_url = "#{base_url}/content?link=#{base_path}"
|
|
151
|
-
get_json(request_url)
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
# Delete a non-content document from the search index.
|
|
155
|
-
#
|
|
156
|
-
# For example, best bets, recommended links, or contacts.
|
|
157
|
-
#
|
|
158
|
-
# @param type [String] The search-api document type.
|
|
159
|
-
# @param id [String] The search-api/elasticsearch id. Typically the same as the `link` field.
|
|
160
|
-
# @param index_name (V2 only) Name of the index to be deleted from on
|
|
161
|
-
# GOV.UK - we only allow deletion from metasearch
|
|
162
|
-
def delete_document(*args)
|
|
163
|
-
@api.delete_document(*args)
|
|
164
|
-
end
|
|
165
|
-
|
|
166
55
|
def base_url
|
|
167
56
|
endpoint
|
|
168
57
|
end
|
|
169
|
-
|
|
170
|
-
def documents_url
|
|
171
|
-
"#{base_url}/documents"
|
|
172
|
-
end
|
|
173
58
|
end
|
|
174
59
|
end
|
|
@@ -6,31 +6,6 @@ module GdsApi
|
|
|
6
6
|
module Search
|
|
7
7
|
SEARCH_ENDPOINT = Plek.find("search-api")
|
|
8
8
|
|
|
9
|
-
def stub_any_search_post(index: nil)
|
|
10
|
-
if index
|
|
11
|
-
stub_request(:post, %r{#{SEARCH_ENDPOINT}/#{index}/documents})
|
|
12
|
-
.to_return(status: [202, "Accepted"])
|
|
13
|
-
else
|
|
14
|
-
stub_request(:post, %r{#{SEARCH_ENDPOINT}/documents})
|
|
15
|
-
.to_return(status: [202, "Accepted"])
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def assert_search_posted_item(attributes, index: nil, **options)
|
|
20
|
-
url = if index
|
|
21
|
-
SEARCH_ENDPOINT + "/#{index}/documents"
|
|
22
|
-
else
|
|
23
|
-
"#{SEARCH_ENDPOINT}/documents"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
assert_requested(:post, url, **options) do |req|
|
|
27
|
-
data = JSON.parse(req.body)
|
|
28
|
-
attributes.to_a.all? do |key, value|
|
|
29
|
-
data[key.to_s] == value
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
9
|
def stub_any_search
|
|
35
10
|
stub_request(:get, %r{#{SEARCH_ENDPOINT}/search.json})
|
|
36
11
|
end
|
|
@@ -43,47 +18,6 @@ module GdsApi
|
|
|
43
18
|
assert_requested :get, "#{SEARCH_ENDPOINT}/search.json", **options
|
|
44
19
|
end
|
|
45
20
|
|
|
46
|
-
def stub_any_search_delete(index: nil)
|
|
47
|
-
if index
|
|
48
|
-
stub_request(:delete, %r{#{SEARCH_ENDPOINT}/#{index}/documents/.*})
|
|
49
|
-
else
|
|
50
|
-
# use search-api's default index
|
|
51
|
-
stub_request(:delete, %r{#{SEARCH_ENDPOINT}/documents/.*})
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def stub_any_search_delete_content
|
|
56
|
-
stub_request(:delete, %r{#{SEARCH_ENDPOINT}/content.*})
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def assert_search_deleted_item(id, index: nil, **options)
|
|
60
|
-
if id =~ %r{^/}
|
|
61
|
-
raise ArgumentError, "Search id must not start with a slash"
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
if index
|
|
65
|
-
assert_requested(
|
|
66
|
-
:delete,
|
|
67
|
-
%r{#{SEARCH_ENDPOINT}/#{index}/documents/#{id}},
|
|
68
|
-
**options,
|
|
69
|
-
)
|
|
70
|
-
else
|
|
71
|
-
assert_requested(
|
|
72
|
-
:delete,
|
|
73
|
-
%r{#{SEARCH_ENDPOINT}/documents/#{id}},
|
|
74
|
-
**options,
|
|
75
|
-
)
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def assert_search_deleted_content(base_path, **options)
|
|
80
|
-
assert_requested(
|
|
81
|
-
:delete,
|
|
82
|
-
%r{#{SEARCH_ENDPOINT}/content.*#{base_path}},
|
|
83
|
-
**options,
|
|
84
|
-
)
|
|
85
|
-
end
|
|
86
|
-
|
|
87
21
|
def stub_search_has_services_and_info_data_for_organisation
|
|
88
22
|
stub_request_for(search_results_found)
|
|
89
23
|
run_example_query
|
|
@@ -160,15 +94,6 @@ module GdsApi
|
|
|
160
94
|
)
|
|
161
95
|
end
|
|
162
96
|
|
|
163
|
-
def old_policies_results
|
|
164
|
-
File.read(
|
|
165
|
-
File.expand_path(
|
|
166
|
-
"../../../test/fixtures/old_policies_for_dwp.json",
|
|
167
|
-
__dir__,
|
|
168
|
-
),
|
|
169
|
-
)
|
|
170
|
-
end
|
|
171
|
-
|
|
172
97
|
def first_n_results(results, options)
|
|
173
98
|
n = options[:n]
|
|
174
99
|
results = JSON.parse(results)
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gds-api-adapters
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 102.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
@@ -378,7 +378,6 @@ files:
|
|
|
378
378
|
- test/fixtures/hello.txt
|
|
379
379
|
- test/fixtures/new_policies_for_dwp.json
|
|
380
380
|
- test/fixtures/no_services_and_info_data_found_fixture.json
|
|
381
|
-
- test/fixtures/old_policies_for_dwp.json
|
|
382
381
|
- test/fixtures/services_and_info_fixture.json
|
|
383
382
|
- test/fixtures/sub_sector_organisations.json
|
|
384
383
|
homepage: http://github.com/alphagov/gds-api-adapters
|
|
@@ -398,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
398
397
|
- !ruby/object:Gem::Version
|
|
399
398
|
version: '0'
|
|
400
399
|
requirements: []
|
|
401
|
-
rubygems_version: 4.0.
|
|
400
|
+
rubygems_version: 4.0.4
|
|
402
401
|
specification_version: 4
|
|
403
402
|
summary: Adapters to work with GDS APIs
|
|
404
403
|
test_files: []
|
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"results": [
|
|
3
|
-
{
|
|
4
|
-
"topics": [
|
|
5
|
-
{
|
|
6
|
-
"slug": "employment",
|
|
7
|
-
"link": "/government/topics/employment",
|
|
8
|
-
"title": "Employment"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"slug": "welfare",
|
|
12
|
-
"link": "/government/topics/welfare",
|
|
13
|
-
"title": "Welfare"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"title": "Employment",
|
|
17
|
-
"description": "How the government is getting Britain working and helping people break the cycle of benefit dependency.",
|
|
18
|
-
"link": "/government/policies/helping-people-to-find-and-stay-in-work",
|
|
19
|
-
"format": "policy",
|
|
20
|
-
"display_type": "Policy",
|
|
21
|
-
"organisations": [
|
|
22
|
-
{
|
|
23
|
-
"slug": "department-for-work-pensions",
|
|
24
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
25
|
-
"title": "Department for Work and Pensions",
|
|
26
|
-
"acronym": "DWP",
|
|
27
|
-
"organisation_type": "Ministerial department",
|
|
28
|
-
"organisation_state": "live"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"slug": "hm-treasury",
|
|
32
|
-
"link": "/government/organisations/hm-treasury",
|
|
33
|
-
"title": "HM Treasury",
|
|
34
|
-
"acronym": "HMT",
|
|
35
|
-
"organisation_type": "Ministerial department",
|
|
36
|
-
"organisation_state": "live"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"public_timestamp": "2015-03-26T15:06:42.000+00:00",
|
|
40
|
-
"index": "government",
|
|
41
|
-
"es_score": null,
|
|
42
|
-
"_id": "/government/policies/helping-people-to-find-and-stay-in-work",
|
|
43
|
-
"document_type": "edition"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"topics": [
|
|
47
|
-
{
|
|
48
|
-
"slug": "energy",
|
|
49
|
-
"link": "/government/topics/energy",
|
|
50
|
-
"title": "Energy"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"slug": "climate-change",
|
|
54
|
-
"link": "/government/topics/climate-change",
|
|
55
|
-
"title": "Climate change"
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"title": "Household energy",
|
|
59
|
-
"description": "How we're helping households to save on their energy bills and supporting people in fuel poverty.",
|
|
60
|
-
"link": "/government/policies/helping-households-to-cut-their-energy-bills",
|
|
61
|
-
"format": "policy",
|
|
62
|
-
"display_type": "Policy",
|
|
63
|
-
"organisations": [
|
|
64
|
-
{
|
|
65
|
-
"slug": "department-for-communities-and-local-government",
|
|
66
|
-
"link": "/government/organisations/department-for-communities-and-local-government",
|
|
67
|
-
"title": "Department for Communities and Local Government",
|
|
68
|
-
"acronym": "DCLG",
|
|
69
|
-
"organisation_type": "Ministerial department",
|
|
70
|
-
"organisation_state": "live"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"slug": "department-for-work-pensions",
|
|
74
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
75
|
-
"title": "Department for Work and Pensions",
|
|
76
|
-
"acronym": "DWP",
|
|
77
|
-
"organisation_type": "Ministerial department",
|
|
78
|
-
"organisation_state": "live"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"slug": "department-of-energy-climate-change",
|
|
82
|
-
"link": "/government/organisations/department-of-energy-climate-change",
|
|
83
|
-
"title": "Department of Energy & Climate Change",
|
|
84
|
-
"acronym": "DECC",
|
|
85
|
-
"organisation_type": "Ministerial department",
|
|
86
|
-
"organisation_state": "live"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"slug": "ofgem",
|
|
90
|
-
"link": "/government/organisations/ofgem",
|
|
91
|
-
"title": "Ofgem",
|
|
92
|
-
"organisation_state": "exempt"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"public_timestamp": "2015-03-26T11:40:02.000+00:00",
|
|
96
|
-
"index": "government",
|
|
97
|
-
"es_score": null,
|
|
98
|
-
"_id": "/government/policies/helping-households-to-cut-their-energy-bills",
|
|
99
|
-
"document_type": "edition"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"topics": [
|
|
103
|
-
{
|
|
104
|
-
"slug": "welfare",
|
|
105
|
-
"link": "/government/topics/welfare",
|
|
106
|
-
"title": "Welfare"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"slug": "community-and-society",
|
|
110
|
-
"link": "/government/topics/community-and-society",
|
|
111
|
-
"title": "Community and society"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"title": "Poverty and social justice",
|
|
115
|
-
"description": "How the government is working to help people overcome complex problems that lead to poverty, to help them change the course of their lives",
|
|
116
|
-
"link": "/government/policies/helping-to-reduce-poverty-and-improve-social-justice",
|
|
117
|
-
"format": "policy",
|
|
118
|
-
"display_type": "Policy",
|
|
119
|
-
"organisations": [
|
|
120
|
-
{
|
|
121
|
-
"slug": "department-for-education",
|
|
122
|
-
"link": "/government/organisations/department-for-education",
|
|
123
|
-
"title": "Department for Education",
|
|
124
|
-
"acronym": "DfE",
|
|
125
|
-
"organisation_type": "Ministerial department",
|
|
126
|
-
"organisation_state": "live"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"slug": "department-for-work-pensions",
|
|
130
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
131
|
-
"title": "Department for Work and Pensions",
|
|
132
|
-
"acronym": "DWP",
|
|
133
|
-
"organisation_type": "Ministerial department",
|
|
134
|
-
"organisation_state": "live"
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
"public_timestamp": "2014-10-22T16:15:41.000+01:00",
|
|
138
|
-
"index": "government",
|
|
139
|
-
"es_score": null,
|
|
140
|
-
"_id": "/government/policies/helping-to-reduce-poverty-and-improve-social-justice",
|
|
141
|
-
"document_type": "edition"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"topics": [
|
|
145
|
-
{
|
|
146
|
-
"slug": "employment",
|
|
147
|
-
"link": "/government/topics/employment",
|
|
148
|
-
"title": "Employment"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"slug": "welfare",
|
|
152
|
-
"link": "/government/topics/welfare",
|
|
153
|
-
"title": "Welfare"
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"title": "Welfare reform",
|
|
157
|
-
"description": "Making the welfare system fairer, more affordable and better able to reduce poverty, worklessness and welfare dependency.",
|
|
158
|
-
"link": "/government/policies/simplifying-the-welfare-system-and-making-sure-work-pays",
|
|
159
|
-
"format": "policy",
|
|
160
|
-
"display_type": "Policy",
|
|
161
|
-
"organisations": [
|
|
162
|
-
{
|
|
163
|
-
"slug": "department-for-work-pensions",
|
|
164
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
165
|
-
"title": "Department for Work and Pensions",
|
|
166
|
-
"acronym": "DWP",
|
|
167
|
-
"organisation_type": "Ministerial department",
|
|
168
|
-
"organisation_state": "live"
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"public_timestamp": "2014-10-22T11:30:00.000+01:00",
|
|
172
|
-
"index": "government",
|
|
173
|
-
"es_score": null,
|
|
174
|
-
"_id": "/government/policies/simplifying-the-welfare-system-and-making-sure-work-pays",
|
|
175
|
-
"document_type": "edition"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"topics": [
|
|
179
|
-
{
|
|
180
|
-
"slug": "business-and-enterprise",
|
|
181
|
-
"link": "/government/topics/business-and-enterprise",
|
|
182
|
-
"title": "Business and enterprise"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"slug": "europe",
|
|
186
|
-
"link": "/government/topics/europe",
|
|
187
|
-
"title": "Europe"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"slug": "uk-economy",
|
|
191
|
-
"link": "/government/topics/uk-economy",
|
|
192
|
-
"title": "UK economy"
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
"title": "European funds",
|
|
196
|
-
"description": "Negotiating the European Union (EU) Common Strategic Framework for 2014 to 2020.",
|
|
197
|
-
"link": "/government/policies/making-european-funding-work-better-for-the-uk-economy",
|
|
198
|
-
"format": "policy",
|
|
199
|
-
"display_type": "Policy",
|
|
200
|
-
"organisations": [
|
|
201
|
-
{
|
|
202
|
-
"slug": "department-for-business-innovation-skills",
|
|
203
|
-
"link": "/government/organisations/department-for-business-innovation-skills",
|
|
204
|
-
"title": "Department for Business, Innovation & Skills",
|
|
205
|
-
"acronym": "BIS",
|
|
206
|
-
"organisation_type": "Ministerial department",
|
|
207
|
-
"organisation_state": "live"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"slug": "department-for-communities-and-local-government",
|
|
211
|
-
"link": "/government/organisations/department-for-communities-and-local-government",
|
|
212
|
-
"title": "Department for Communities and Local Government",
|
|
213
|
-
"acronym": "DCLG",
|
|
214
|
-
"organisation_type": "Ministerial department",
|
|
215
|
-
"organisation_state": "live"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"slug": "department-for-environment-food-rural-affairs",
|
|
219
|
-
"link": "/government/organisations/department-for-environment-food-rural-affairs",
|
|
220
|
-
"title": "Department for Environment, Food & Rural Affairs",
|
|
221
|
-
"acronym": "Defra",
|
|
222
|
-
"organisation_type": "Ministerial department",
|
|
223
|
-
"organisation_state": "live"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"slug": "department-for-work-pensions",
|
|
227
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
228
|
-
"title": "Department for Work and Pensions",
|
|
229
|
-
"acronym": "DWP",
|
|
230
|
-
"organisation_type": "Ministerial department",
|
|
231
|
-
"organisation_state": "live"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"slug": "hm-treasury",
|
|
235
|
-
"link": "/government/organisations/hm-treasury",
|
|
236
|
-
"title": "HM Treasury",
|
|
237
|
-
"acronym": "HMT",
|
|
238
|
-
"organisation_type": "Ministerial department",
|
|
239
|
-
"organisation_state": "live"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"public_timestamp": "2014-07-23T14:21:36.000+01:00",
|
|
243
|
-
"index": "government",
|
|
244
|
-
"es_score": null,
|
|
245
|
-
"_id": "/government/policies/making-european-funding-work-better-for-the-uk-economy",
|
|
246
|
-
"document_type": "edition"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
"topics": [
|
|
250
|
-
{
|
|
251
|
-
"slug": "pensions-and-ageing-society",
|
|
252
|
-
"link": "/government/topics/pensions-and-ageing-society",
|
|
253
|
-
"title": "Pensions and ageing society"
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
|
-
"title": "Older people",
|
|
257
|
-
"description": "What the government is doing to help improve life for older people in an ageing society.",
|
|
258
|
-
"link": "/government/policies/improving-opportunities-for-older-people",
|
|
259
|
-
"format": "policy",
|
|
260
|
-
"display_type": "Policy",
|
|
261
|
-
"organisations": [
|
|
262
|
-
{
|
|
263
|
-
"slug": "department-for-work-pensions",
|
|
264
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
265
|
-
"title": "Department for Work and Pensions",
|
|
266
|
-
"acronym": "DWP",
|
|
267
|
-
"organisation_type": "Ministerial department",
|
|
268
|
-
"organisation_state": "live"
|
|
269
|
-
}
|
|
270
|
-
],
|
|
271
|
-
"public_timestamp": "2014-06-13T09:30:06.000+01:00",
|
|
272
|
-
"index": "government",
|
|
273
|
-
"es_score": null,
|
|
274
|
-
"_id": "/government/policies/improving-opportunities-for-older-people",
|
|
275
|
-
"document_type": "edition"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"topics": [
|
|
279
|
-
{
|
|
280
|
-
"slug": "business-and-enterprise",
|
|
281
|
-
"link": "/government/topics/business-and-enterprise",
|
|
282
|
-
"title": "Business and enterprise"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"slug": "regulation-reform",
|
|
286
|
-
"link": "/government/topics/regulation-reform",
|
|
287
|
-
"title": "Regulation reform"
|
|
288
|
-
}
|
|
289
|
-
],
|
|
290
|
-
"title": "Health and safety reform",
|
|
291
|
-
"description": "How the government is improving the health and safety system, making sure it is taken seriously and reducing the burden on business.",
|
|
292
|
-
"link": "/government/policies/improving-the-health-and-safety-system",
|
|
293
|
-
"format": "policy",
|
|
294
|
-
"display_type": "Policy",
|
|
295
|
-
"organisations": [
|
|
296
|
-
{
|
|
297
|
-
"slug": "department-for-work-pensions",
|
|
298
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
299
|
-
"title": "Department for Work and Pensions",
|
|
300
|
-
"acronym": "DWP",
|
|
301
|
-
"organisation_type": "Ministerial department",
|
|
302
|
-
"organisation_state": "live"
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
"public_timestamp": "2014-01-02T14:31:58.000+00:00",
|
|
306
|
-
"index": "government",
|
|
307
|
-
"es_score": null,
|
|
308
|
-
"_id": "/government/policies/improving-the-health-and-safety-system",
|
|
309
|
-
"document_type": "edition"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"topics": [
|
|
313
|
-
{
|
|
314
|
-
"slug": "pensions-and-ageing-society",
|
|
315
|
-
"link": "/government/topics/pensions-and-ageing-society",
|
|
316
|
-
"title": "Pensions and ageing society"
|
|
317
|
-
}
|
|
318
|
-
],
|
|
319
|
-
"title": "State Pension age",
|
|
320
|
-
"description": "How the government is making sure the State Pension is affordable in the long term and fair between generations.",
|
|
321
|
-
"link": "/government/policies/reviewing-the-state-pension-age",
|
|
322
|
-
"format": "policy",
|
|
323
|
-
"display_type": "Policy",
|
|
324
|
-
"organisations": [
|
|
325
|
-
{
|
|
326
|
-
"slug": "department-for-work-pensions",
|
|
327
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
328
|
-
"title": "Department for Work and Pensions",
|
|
329
|
-
"acronym": "DWP",
|
|
330
|
-
"organisation_type": "Ministerial department",
|
|
331
|
-
"organisation_state": "live"
|
|
332
|
-
}
|
|
333
|
-
],
|
|
334
|
-
"public_timestamp": "2013-12-05T14:19:47.000+00:00",
|
|
335
|
-
"index": "government",
|
|
336
|
-
"es_score": null,
|
|
337
|
-
"_id": "/government/policies/reviewing-the-state-pension-age",
|
|
338
|
-
"document_type": "edition"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"topics": [
|
|
342
|
-
{
|
|
343
|
-
"slug": "pensions-and-ageing-society",
|
|
344
|
-
"link": "/government/topics/pensions-and-ageing-society",
|
|
345
|
-
"title": "Pensions and ageing society"
|
|
346
|
-
}
|
|
347
|
-
],
|
|
348
|
-
"title": "State Pension simplification",
|
|
349
|
-
"description": "How the government is making the State Pension simpler and fairer so it’s a good starting point for planning and saving for retirement.",
|
|
350
|
-
"link": "/government/policies/making-the-state-pension-simpler-and-fairer",
|
|
351
|
-
"format": "policy",
|
|
352
|
-
"display_type": "Policy",
|
|
353
|
-
"organisations": [
|
|
354
|
-
{
|
|
355
|
-
"slug": "department-for-work-pensions",
|
|
356
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
357
|
-
"title": "Department for Work and Pensions",
|
|
358
|
-
"acronym": "DWP",
|
|
359
|
-
"organisation_type": "Ministerial department",
|
|
360
|
-
"organisation_state": "live"
|
|
361
|
-
}
|
|
362
|
-
],
|
|
363
|
-
"public_timestamp": "2013-08-08T09:30:52.000+01:00",
|
|
364
|
-
"index": "government",
|
|
365
|
-
"es_score": null,
|
|
366
|
-
"_id": "/government/policies/making-the-state-pension-simpler-and-fairer",
|
|
367
|
-
"document_type": "edition"
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
"topics": [
|
|
371
|
-
{
|
|
372
|
-
"slug": "children-and-young-people",
|
|
373
|
-
"link": "/government/topics/children-and-young-people",
|
|
374
|
-
"title": "Children and young people"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"slug": "welfare",
|
|
378
|
-
"link": "/government/topics/welfare",
|
|
379
|
-
"title": "Welfare"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"slug": "community-and-society",
|
|
383
|
-
"link": "/government/topics/community-and-society",
|
|
384
|
-
"title": "Community and society"
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
|
-
"title": "Child maintenance reform",
|
|
388
|
-
"description": "Increasing the number of children who benefit from effective maintenance arrangements and improving collaboration between separated parents.",
|
|
389
|
-
"link": "/government/policies/improving-the-child-maintenance-system",
|
|
390
|
-
"format": "policy",
|
|
391
|
-
"display_type": "Policy",
|
|
392
|
-
"organisations": [
|
|
393
|
-
{
|
|
394
|
-
"slug": "department-for-work-pensions",
|
|
395
|
-
"link": "/government/organisations/department-for-work-pensions",
|
|
396
|
-
"title": "Department for Work and Pensions",
|
|
397
|
-
"acronym": "DWP",
|
|
398
|
-
"organisation_type": "Ministerial department",
|
|
399
|
-
"organisation_state": "live"
|
|
400
|
-
}
|
|
401
|
-
],
|
|
402
|
-
"public_timestamp": "2013-08-08T09:28:12.000+01:00",
|
|
403
|
-
"index": "government",
|
|
404
|
-
"es_score": null,
|
|
405
|
-
"_id": "/government/policies/improving-the-child-maintenance-system",
|
|
406
|
-
"document_type": "edition"
|
|
407
|
-
}
|
|
408
|
-
],
|
|
409
|
-
"total": 11,
|
|
410
|
-
"start": 0,
|
|
411
|
-
"facets": {},
|
|
412
|
-
"suggested_queries": []
|
|
413
|
-
}
|