Skip to content

Commit

Permalink
Make requests to next-elasticsearch-v7.gslb.ft.com
Browse files Browse the repository at this point in the history
  • Loading branch information
andygout committed Feb 19, 2021
1 parent a87196a commit e8e0b62
Show file tree
Hide file tree
Showing 23 changed files with 429 additions and 428 deletions.
2 changes: 1 addition & 1 deletion lib/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function count (options = {}, timeout = 3000) {
const params = Object.assign({}, DEFAULTS, options);
const body = JSON.stringify(params);

return signedFetch('https://next-elasticsearch.nlb.ft.com/content/item/_count', {
return signedFetch('https://next-elasticsearch-v7.gslb.ft.com/content/_count', {
body,
agent,
timeout,
Expand Down
2 changes: 1 addition & 1 deletion lib/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function get (uuid, options = {}, timeout = 3000) {
const params = Object.assign({}, DEFAULTS, options);
const qs = stringifyOptions(params);

return signedFetch(`https://next-elasticsearch.nlb.ft.com/content/item/${uuid}/_source?${qs}`, {
return signedFetch(`https://next-elasticsearch-v7.gslb.ft.com/content/_doc/${uuid}/_source?${qs}`, {
agent,
timeout,
method: 'GET'
Expand Down
2 changes: 1 addition & 1 deletion lib/mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const agent = require('./helpers/https-agent');
const handleResponse = require('./helpers/handle-response');

function mapping (timeout = 3000) {
return signedFetch('https://next-elasticsearch.nlb.ft.com/content/_mapping', {
return signedFetch('https://next-elasticsearch-v7.gslb.ft.com/content/_mapping', {
agent,
timeout,
method: 'GET'
Expand Down
5 changes: 2 additions & 3 deletions lib/mget.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ const handleResponse = require('./helpers/handle-response');
const extractSource = require('./helpers/extract-source');

const DEFAULTS = {
ids: [],
_source: true
ids: []
};

function handleData (data) {
Expand All @@ -20,7 +19,7 @@ function mget (options = {}, timeout = 3000, dataHandler = handleData) {
const params = Object.assign({}, DEFAULTS, options);
const body = JSON.stringify(params);

return signedFetch('https://next-elasticsearch.nlb.ft.com/content/item/_mget', {
return signedFetch('https://next-elasticsearch-v7.gslb.ft.com/content/_mget', {
body,
agent,
timeout,
Expand Down
6 changes: 3 additions & 3 deletions lib/msearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const DEFAULTS = {
function handleData ({ responses }) {
return responses.map((data) => {
return {
total: data.hits.total,
total: data.hits.total.value,
hits: data.hits.hits.map(extractSource)
};
});
Expand All @@ -29,9 +29,9 @@ function search (queries = [], timeout = 3000, dataHandler = handleData) {
return accumulator;
}, []);

const body = lines.map(JSON.stringify).join('\n')
const body = lines.map(JSON.stringify).join('\n');

return signedFetch('https://next-elasticsearch.nlb.ft.com/content/item/_msearch', {
return signedFetch('https://next-elasticsearch-v7.gslb.ft.com/content/_msearch', {
body,
agent,
timeout,
Expand Down
4 changes: 2 additions & 2 deletions lib/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function handleData (data) {
const results = hits.map(extractSource);

// the total is handy so tack that on
results.total = total;
results.total = total.value;

// return the array of content
return results;
Expand All @@ -29,7 +29,7 @@ function search (options = {}, timeout = 3000, dataHandler = handleData) {
const params = Object.assign({}, DEFAULTS, options);
const body = JSON.stringify(params);

return signedFetch('https://next-elasticsearch.nlb.ft.com/content/item/_search', {
return signedFetch('https://next-elasticsearch-v7.gslb.ft.com/content/_search', {
body,
agent,
timeout,
Expand Down
77 changes: 37 additions & 40 deletions secret-squirrel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,43 @@ module.exports = {
strings: {
deny: [],
denyOverrides: [
'cce58e8e-158c-11e7-80f4-13e067d5072c', // README.md
'0615fc8c-1558-11e7-80f4-13e067d5072c', // README.md
'dbb0bdae-1f0c-11e4-b0cb-b2227cce2b54', // README.md
'ff03ad34-4367-11e7-8519-9f94ee97d996', // test/fixtures/
'2665a6bc-e383-3540-8c71-334aabc60c4d', // test/fixtures/
'51649457-e3e7-3751-bf70-5f3d282bc9e4', // test/fixtures/
'423f0857-e5b5-3256-a8b8-857e2378f433', // test/fixtures/
'2c563220-391b-3ecd-bb41-d54ac542c872', // test/fixtures/
'3cd493ab-5648-3166-addc-69e9591c9843', // test/fixtures/
'1ddb5be2-a098-38e0-b510-e37bf4f494b1', // test/fixtures/
'10445659-5133-3551-b27a-371f7ae449b5', // test/fixtures/
'21715af3-3c85-3134-9fb8-8e688a0f8985', // test/fixtures/
'a845f747-276b-3435-aa0e-98c436676246', // test/fixtures/
'9b40e89c-e87b-3d4f-b72c-2cf7511d2146', // test/fixtures/
'b2708390-ac5c-3592-9ab2-b0d09c40398d', // test/fixtures/
'852939c8-859c-361e-8514-f82f6c041580', // test/fixtures/
'9151841f-0686-3531-9486-f89ade98a65d', // test/fixtures/
'ce93225f-bb29-3a4f-936a-f852dfe740da', // test/fixtures/
'1b4b842d-8bae-3b78-9c50-5a7a0d60e2ef', // test/fixtures/
'73cc33b5-d0cb-3815-8347-bc49e1ddbd5c', // test/fixtures/
'81fbe64c-155d-3e74-bb40-c6fe829f4d7e', // test/fixtures/
'af1f01be-1564-11e7-b0c1-37e417ee6c76', // test/fixtures/
'ff1f01be-1564-11e7-b0c1-37e417ee6c76', // test/fixtures/
'ff3d0c6e-153d-11e7-b0c1-37e417ee6c76', // test/fixtures/
'ff90a2d8-148f-11e7-80f4-13e067d5072c', // test/fixtures/
'ff032668-155f-11e7-80f4-13e067d5072c', // test/fixtures/
'803d0c6e-153d-11e7-b0c1-37e417ee6c76', // test/fixtures/
'2690a2d8-148f-11e7-80f4-13e067d5072c', // test/fixtures/
'6b032668-155f-11e7-80f4-13e067d5072c', // test/fixtures/
'64e70fac-155e-11e7-b0c1-37e417ee6c76', // test/fixtures/
'2331a33d-c5db-3a50-a549-8746f3067f0f', // test/fixtures/
'c3f81a26-155f-11e7-80f4-13e067d5072c', // test/fixtures/
'88f5d2a6-155a-11e7-b0c1-37e417ee6c76', // test/fixtures/
'aa8fbace-14c6-11e7-80f4-13e067d5072c', // test/fixtures/
'201cf2f0-153c-11e7-b0c1-37e417ee6c76', // test/fixtures/
'30364c64-f150-11dc-a91a-0000779fd2ac', // test/fixtures/
'f3ab96be-b72e-11e7-8c12-5661783e5589', // test/fixtures/
'ab0cf1fa-4fbe-11e7-a1f2-db19572361bb', // test/fixtures/
'3ace6a68-efa9-11d9-bd3b-00000e2511c8', // test/fixtures/
'73cc33b5-d0cb-3815-8347-bg24c232324c' // test/spec/
'cce58e8e-158c-11e7-80f4-13e067d5072c', // README.md:10|43|54|59|103
'0615fc8c-1558-11e7-80f4-13e067d5072c', // README.md:60|104
'dbb0bdae-1f0c-11e4-b0cb-b2227cce2b54', // README.md:75|90
'26b07d2a-3715-11e3-9603-00144feab7de', // test/fixtures/concept-found.json:20
'80871faa-d16f-4c9f-b310-df42104dcecc', // test/fixtures/concept-found.json:33|38|40|41, test/spec/concept-spec.js:16
'f90747af-9632-4bd3-9082-1454e58dd86f', // test/fixtures/concept-found.json:50|54|56|57
'5216ff2e-a6ed-42b2-a613-109fc6491ba2', // test/fixtures/concept-found.json:66|70
'c47f4dfc-6879-4e95-accf-ca8cbe6a1f69', // test/fixtures/concept-found.json:82|86
'5f93fe95-f487-4aba-abce-39e7d783047d', // test/fixtures/concept-found.json:98|102
'97133bf5-c958-4c69-9e0e-44874679cedc', // test/fixtures/concept-found.json:114|118
'f95dd6f8-9ab9-407f-b8b3-9239815216b5', // test/fixtures/concept-found.json:130|134
'9d13b836-df76-4445-b599-10ae378680f0', // test/fixtures/concept-found.json:146|150
'6bade25b-56b3-4409-8d32-c131666d9acb', // test/fixtures/concept-found.json:162|166
'a579350c-61ce-4c00-97ca-ddaa2e0cacf6', // test/fixtures/concept-found.json:179|183|185|186
'01dcc40b-8099-35f2-adbf-637c9b7b160b', // test/fixtures/concept-found.json:195|199|201|202
'0236bde5-98d7-3dd6-8819-e0bc25124595', // test/fixtures/concept-found.json:211|215|217|218
'67fb70ae-b970-4bd1-92ea-761618ae8cb7', // test/fixtures/concept-found.json:227|231
'af1f01be-1564-11e7-b0c1-37e417ee6c76', // test/fixtures/get-found.json:2|5, test/fixtures/search-with-results.json:20|23|26
'ff1f01be-1564-11e7-b0c1-37e417ee6c76', // test/fixtures/mget-no-results.json:6|12|18|24
'9ef3a1c5-328c-460d-9261-33ea991cae62', // test/fixtures/mget-with-results.json:6|12|15
'02ecd3cc-40ee-4712-ae9a-d9b41427d6e9', // test/fixtures/mget-with-results.json:21|27|30
'f5c8f565-3463-4a18-b64b-24075d83ad57', // test/fixtures/mget-with-results.json:36|42|45
'e1a526ba-f1c8-45df-88f1-9aa32fa4af3e', // test/fixtures/mget-with-results.json:51|57|60
'30364c64-f150-11dc-a91a-0000779fd2ac', // test/fixtures/msearch-with-results.json:23
'f3ab96be-b72e-11e7-8c12-5661783e5589', // test/fixtures/msearch-with-results.json:32
'ab0cf1fa-4fbe-11e7-a1f2-db19572361bb', // test/fixtures/msearch-with-results.json:61
'3ace6a68-efa9-11d9-bd3b-00000e2511c8', // test/fixtures/msearch-with-results.json:70
'803d0c6e-153d-11e7-b0c1-37e417ee6c76', // test/fixtures/search-with-results.json:35|38|41
'2690a2d8-148f-11e7-80f4-13e067d5072c', // test/fixtures/search-with-results.json:50|53|56
'6b032668-155f-11e7-80f4-13e067d5072c', // test/fixtures/search-with-results.json:65|68|71
'64e70fac-155e-11e7-b0c1-37e417ee6c76', // test/fixtures/search-with-results.json:80|83|86
'2331a33d-c5db-3a50-a549-8746f3067f0f', // test/fixtures/search-with-results.json:95|98|101
'c3f81a26-155f-11e7-80f4-13e067d5072c', // test/fixtures/search-with-results.json:110|113|116
'88f5d2a6-155a-11e7-b0c1-37e417ee6c76', // test/fixtures/search-with-results.json:125|128|131
'aa8fbace-14c6-11e7-80f4-13e067d5072c', // test/fixtures/search-with-results.json:140|143|146
'201cf2f0-153c-11e7-b0c1-37e417ee6c76', // test/fixtures/search-with-results.json:155|158|161
'73cc33b5-d0cb-3815-8347-bg24c232324c' // test/spec/concept-spec.js:51
]
}
};
Loading

0 comments on commit e8e0b62

Please sign in to comment.