diff --git a/src/structures/services/structures-search.service.ts b/src/structures/services/structures-search.service.ts index 58011d63ca8089152699cc9f755deef13402bf65..f180837d4c5f8b0bbd135830e2500dce4cdaaaf4 100644 --- a/src/structures/services/structures-search.service.ts +++ b/src/structures/services/structures-search.service.ts @@ -105,7 +105,7 @@ export class StructuresSearchService { index: this.index, body: { from: 0, - size: 500, + size: 5000, query: { query_string: { analyze_wildcard: true, diff --git a/src/users/services/employer-search.service.ts b/src/users/services/employer-search.service.ts index b48dbbfc745a248e348d6fd9f554b9df2c4b33ff..787c026afd39ae4b6be0ad163b197a4cba5f93e7 100644 --- a/src/users/services/employer-search.service.ts +++ b/src/users/services/employer-search.service.ts @@ -86,7 +86,7 @@ export class EmployerSearchService { const { hits } = await this.elasticsearchService.search<Employer>({ index: this.index, from: 0, - size: 200, + size: 5000, query: { query_string: { analyze_wildcard: true, diff --git a/src/users/services/employer.service.spec.ts b/src/users/services/employer.service.spec.ts index 02f28a7a92f375d6ea936f614ccd0f8cb16a5d1a..4bf192bca3e37b388f9bc143a3245cd6f1008dcd 100644 --- a/src/users/services/employer.service.spec.ts +++ b/src/users/services/employer.service.spec.ts @@ -22,6 +22,7 @@ describe('EmployerService', () => { search: jest.fn(), dropIndex: jest.fn(), createEmployerIndex: jest.fn(), + update: jest.fn(), deleteIndex: jest.fn(), }; const mockEmployerModel = { diff --git a/src/users/services/employer.service.ts b/src/users/services/employer.service.ts index e3806bf1e672192eaeebc4714dc5d7dc7fbc7b94..416bae8f011d5f34caba9ad22991f5e93e0c871b 100644 --- a/src/users/services/employer.service.ts +++ b/src/users/services/employer.service.ts @@ -98,6 +98,7 @@ export class EmployerService { if (employer) { employer.name = newEmployer.name; employer.save(); + await this.employerSearchService.update(employer, employerId); return employer; } else { throw new HttpException('Cannot edit employer. It was not found in database.', HttpStatus.NOT_FOUND); diff --git a/src/users/services/userRegistry-search.service.ts b/src/users/services/userRegistry-search.service.ts index 267bebafa93712c58f6f6e214b53ea9d81eecc84..5873d2de3035f57c4c093a7ccae9484540356d80 100644 --- a/src/users/services/userRegistry-search.service.ts +++ b/src/users/services/userRegistry-search.service.ts @@ -84,7 +84,7 @@ export class UserRegistrySearchService { const { hits } = await this.elasticsearchService.search<UserRegistrySearchBody>({ index: this.index, from: 0, - size: 200, + size: 5000, query: { query_string: { analyze_wildcard: true,