@@ -11,25 +11,21 @@ const topResources = {
11
11
type : config . get ( 'ES.ACHIEVEMENT_PROVIDER_TYPE' ) ,
12
12
enrich : {
13
13
policyName : config . get ( 'ES.ENRICHMENT.achievementprovider.enrichPolicyName' ) ,
14
- enrichFields : [ 'id' , 'achievementsProviderId' , 'name' , 'uri' , 'certifierId' , 'certifiedDate' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
14
+ matchField : 'id' ,
15
+ enrichFields : [ 'id' , 'name' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
15
16
}
16
17
} ,
17
18
attribute : {
18
19
index : config . get ( 'ES.ATTRIBUTE_INDEX' ) ,
19
20
type : config . get ( 'ES.ATTRIBUTE_TYPE' ) ,
20
21
enrich : {
21
22
policyName : config . get ( 'ES.ENRICHMENT.attribute.enrichPolicyName' ) ,
22
- enrichFields : [ 'id' , 'name' , 'attributeGroupId' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
23
+ matchField : 'id' ,
24
+ enrichFields : [ 'id' , 'name' , 'attributeGroupId' , 'created' , 'updated' , 'createdBy' , 'updatedBy' , 'attributegroup' ]
23
25
} ,
24
26
ingest : {
25
27
pipeline : {
26
- id : config . get ( 'ES.ENRICHMENT.attributegroup.pipelineId' ) ,
27
- processors : [ {
28
- policyName : config . get ( 'ES.ENRICHMENT.attributegroup.enrichPolicyName' ) ,
29
- field : 'attributegroupId' ,
30
- targetField : 'attributegroup' ,
31
- isArray : false
32
- } ]
28
+ id : config . get ( 'ES.ENRICHMENT.attributegroup.pipelineId' )
33
29
}
34
30
}
35
31
} ,
@@ -38,7 +34,14 @@ const topResources = {
38
34
type : config . get ( 'ES.ATTRIBUTE_GROUP_TYPE' ) ,
39
35
enrich : {
40
36
policyName : config . get ( 'ES.ENRICHMENT.attributegroup.enrichPolicyName' ) ,
41
- enrichFields : [ 'id' , 'organizationId' , 'name' ]
37
+ matchField : 'id' ,
38
+ enrichFields : [ 'id' , 'name' , 'organizationId' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
39
+ } ,
40
+ pipeline : {
41
+ id : config . get ( 'ES.ENRICHMENT.attributegroup.pipelineId' ) ,
42
+ field : 'attributeGroupId' ,
43
+ targetField : 'attributegroup' ,
44
+ maxMatches : '1'
42
45
}
43
46
} ,
44
47
organization : {
@@ -50,6 +53,7 @@ const topResources = {
50
53
type : config . get ( 'ES.ROLE_TYPE' ) ,
51
54
enrich : {
52
55
policyName : config . get ( 'ES.ENRICHMENT.role.enrichPolicyName' ) ,
56
+ matchField : 'id' ,
53
57
enrichFields : [ 'id' , 'name' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
54
58
}
55
59
} ,
@@ -58,17 +62,12 @@ const topResources = {
58
62
type : config . get ( 'ES.SKILL_TYPE' ) ,
59
63
enrich : {
60
64
policyName : config . get ( 'ES.ENRICHMENT.skill.enrichPolicyName' ) ,
61
- enrichFields : [ 'id' , 'skillProviderId' , 'name' , 'externalId' , 'uri' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
65
+ matchField : 'id' ,
66
+ enrichFields : [ 'id' , 'skillProviderId' , 'name' , 'externalId' , 'uri' , 'created' , 'updated' , 'createdBy' , 'updatedBy' , 'skillprovider' ]
62
67
} ,
63
68
ingest : {
64
69
pipeline : {
65
- id : config . get ( 'ES.ENRICHMENT.skillprovider.pipelineId' ) ,
66
- processors : [ {
67
- policyName : config . get ( 'ES.ENRICHMENT.skillprovider.enrichPolicyName' ) ,
68
- field : 'skillProviderId' ,
69
- targetField : 'skillprovider' ,
70
- isArray : false
71
- } ]
70
+ id : config . get ( 'ES.ENRICHMENT.skillprovider.pipelineId' )
72
71
}
73
72
}
74
73
} ,
@@ -77,40 +76,56 @@ const topResources = {
77
76
type : config . get ( 'ES.SKILL_PROVIDER_TYPE' ) ,
78
77
enrich : {
79
78
policyName : config . get ( 'ES.ENRICHMENT.skillprovider.enrichPolicyName' ) ,
80
- enrichFields : [ 'id' , 'name' ]
79
+ matchField : 'id' ,
80
+ enrichFields : [ 'id' , 'name' , 'created' , 'updated' , 'createdBy' , 'updatedBy' ]
81
+ } ,
82
+ pipeline : {
83
+ id : config . get ( 'ES.ENRICHMENT.skillprovider.pipelineId' ) ,
84
+ field : 'skillProviderId' ,
85
+ targetField : 'skillprovider' ,
86
+ maxMatches : '1'
81
87
}
82
88
} ,
83
89
user : {
84
90
index : config . get ( 'ES.USER_INDEX' ) ,
85
91
type : config . get ( 'ES.USER_TYPE' ) ,
86
92
ingest : {
87
93
pipeline : {
88
- id : config . get ( 'ES.ENRICHMENT.user.pipelineId' ) ,
89
- processors : [ {
90
- policyName : config . get ( 'ES.ENRICHMENT.achievementprovider.enrichPolicyName' ) ,
91
- field : 'achievementsProviderId' ,
92
- targetField : config . get ( 'ES.USER_ACHIEVEMENT_PROPERTY_NAME' ) ,
93
- isArray : true
94
+ id : config . get ( 'ES.ENRICHMENT.user.pipelineId' )
95
+ }
96
+ } ,
97
+ pipeline : {
98
+ id : config . get ( 'ES.ENRICHMENT.user.pipelineId' ) ,
99
+ processors : [
100
+ {
101
+ referenceField : config . get ( 'ES.ENRICHMENT.achievement.userField' ) ,
102
+ enrichPolicyName : config . get ( 'ES.ENRICHMENT.achievementprovider.enrichPolicyName' ) ,
103
+ field : '_ingest._value.achievementsProviderId' ,
104
+ targetField : '_ingest._value.achievementprovider' ,
105
+ maxMatches : '1'
94
106
} ,
95
107
{
96
- policyName : config . get ( 'ES.ENRICHMENT.attribute.enrichPolicyName' ) ,
97
- field : 'attributeId' ,
98
- targetField : config . get ( 'ES.USER_ATTRIBUTE_PROPERTY_NAME' ) ,
99
- isArray : true
108
+ referenceField : config . get ( 'ES.ENRICHMENT.userattribute.userField' ) ,
109
+ enrichPolicyName : config . get ( 'ES.ENRICHMENT.attribute.enrichPolicyName' ) ,
110
+ field : '_ingest._value.attributeId' ,
111
+ targetField : '_ingest._value.attribute' ,
112
+ maxMatches : '1'
100
113
} ,
101
114
{
102
- policyName : config . get ( 'ES.ENRICHMENT.role.enrichPolicyName' ) ,
103
- field : 'roleId' ,
104
- targetField : config . get ( 'ES.USER_ROLE_PROPERTY_NAME' ) ,
105
- isArray : true
115
+ referenceField : config . get ( 'ES.ENRICHMENT.userrole.userField' ) ,
116
+ enrichPolicyName : config . get ( 'ES.ENRICHMENT.role.enrichPolicyName' ) ,
117
+ field : '_ingest._value.roleId' ,
118
+ targetField : '_ingest._value.role' ,
119
+ maxMatches : '1'
106
120
} ,
107
121
{
108
- policyName : config . get ( 'ES.ENRICHMENT.skill.enrichPolicyName' ) ,
109
- field : 'skillId' ,
110
- targetField : config . get ( 'ES.USER_SKILL_PROPERTY_NAME' ) ,
111
- isArray : true
112
- } ]
113
- }
122
+ referenceField : config . get ( 'ES.ENRICHMENT.userskill.userField' ) ,
123
+ enrichPolicyName : config . get ( 'ES.ENRICHMENT.skill.enrichPolicyName' ) ,
124
+ field : '_ingest._value.skillId' ,
125
+ targetField : '_ingest._value.skill' ,
126
+ maxMatches : '1'
127
+ }
128
+ ]
114
129
}
115
130
}
116
131
}
@@ -148,7 +163,12 @@ const organizationResources = {
148
163
organizationskillprovider : {
149
164
propertyName : config . get ( 'ES.ORGANIZATION_SKILLPROVIDER_PROPERTY_NAME' ) ,
150
165
relateKey : 'skillProviderId' ,
151
- validate : payload => validProperties ( payload , [ 'organizationId' , 'skillProviderId' ] )
166
+ validate : payload => validProperties ( payload , [ 'organizationId' , 'skillProviderId' ] ) ,
167
+ enrich : {
168
+ policyName : config . get ( 'ES.ENRICHMENT.organization.enrichPolicyName' ) ,
169
+ matchField : 'id' ,
170
+ enrichFields : [ 'id' , 'name' , 'created' , 'updated' , 'createdBy' , 'updatedBy' , 'skillProviders' ]
171
+ }
152
172
}
153
173
}
154
174
0 commit comments