Skip to content

Commit

Permalink
Merge branch 'main' into crowd-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
themarolt committed Aug 18, 2023
2 parents e7dfe51 + d5ef314 commit 6913aef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,16 @@ export class OpenSearchService extends LoggerBase {
})

if (result.body.errors === true) {
this.log.error({ errorItems: result.body.items }, 'Failed to bulk index documents!')
const errorItems = result.body.items
.filter((i) => i.index !== undefined && i.index.error !== undefined)
.map((i) => {
return {
error: i.index.error,
itemId: i.index._id,
}
})

this.log.error({ errorItems }, 'Failed to bulk index documents!')
throw new Error(`Failed to bulk index documents in index ${index}!`)
}
} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ export class OrganizationSyncService extends LoggerBase {
p.int_employees = data.employees
p.int_founded = data.founded
p.string_geoLocation = data.geoLocation
p.string_location = data.location
p.string_headline = data.headline
p.keyword_importHash = data.importHash
p.string_industry = data.industry
Expand Down
3 changes: 3 additions & 0 deletions services/libs/opensearch/src/models/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export class OrganizationsOpensearch extends OpensearchModelBase {
geoLocation: {
type: OpensearchFieldType.STRING,
},
location: {
type: OpensearchFieldType.STRING,
},
headline: {
type: OpensearchFieldType.STRING,
},
Expand Down

0 comments on commit 6913aef

Please sign in to comment.