@@ -102,7 +102,8 @@ function * create (id, type, message) {
102102 index : config . get ( 'esConfig.ES_INDEX' ) ,
103103 type : type ,
104104 id,
105- body : convertPayload ( message . payload )
105+ body : convertPayload ( message . payload ) ,
106+ refresh : 'true' ,
106107 } )
107108}
108109
@@ -117,7 +118,8 @@ function * update (id, type, message) {
117118 index : config . get ( 'esConfig.ES_INDEX' ) ,
118119 type : type ,
119120 id,
120- body : { upsert : message . payload , doc : message . payload }
121+ body : { upsert : message . payload , doc : message . payload } ,
122+ refresh : 'true'
121123 } )
122124}
123125
@@ -130,7 +132,8 @@ function * remove (ids, type) {
130132 yield _ . map ( ids , ( id ) => client . delete ( {
131133 index : config . get ( 'esConfig.ES_INDEX' ) ,
132134 type : type ,
133- id
135+ id,
136+ refresh : 'true'
134137 } ) )
135138}
136139
@@ -142,7 +145,8 @@ function * createProfile (message) {
142145 const exists = yield client . exists ( {
143146 index : config . get ( 'esConfig.ES_INDEX' ) ,
144147 type : config . get ( 'esConfig.ES_PROFILE_TYPE' ) ,
145- id : message . payload . userId
148+ id : message . payload . userId ,
149+ refresh : true
146150 } ) ;
147151
148152 if ( exists ) {
0 commit comments