@@ -14,9 +14,9 @@ const client = helper.getESClient()
14
14
15
15
const initES = async ( ) => {
16
16
if ( process . argv . length === 3 && process . argv [ 2 ] === 'force' ) {
17
- logger . info ( `Delete index ${ config . ES . ES_INDEX } if any.` )
17
+ logger . info ( `Delete index ${ config . ES . MEMBER_PROFILE_ES_INDEX } if any.` )
18
18
try {
19
- await client . indices . delete ( { index : config . ES . ES_INDEX } )
19
+ await client . indices . delete ( { index : config . ES . MEMBER_PROFILE_ES_INDEX } )
20
20
} catch ( err ) {
21
21
// ignore
22
22
}
@@ -28,14 +28,14 @@ const initES = async () => {
28
28
}
29
29
}
30
30
31
- let exists = await client . indices . exists ( { index : config . ES . ES_INDEX } )
31
+ let exists = await client . indices . exists ( { index : config . ES . MEMBER_PROFILE_ES_INDEX } )
32
32
if ( exists ) {
33
- logger . info ( `The index ${ config . ES . ES_INDEX } exists.` )
33
+ logger . info ( `The index ${ config . ES . MEMBER_PROFILE_ES_INDEX } exists.` )
34
34
} else {
35
- logger . info ( `The index ${ config . ES . ES_INDEX } will be created.` )
35
+ logger . info ( `The index ${ config . ES . MEMBER_PROFILE_ES_INDEX } will be created.` )
36
36
37
37
const body = { mappings : { } }
38
- body . mappings [ config . get ( 'ES.ES_TYPE ' ) ] = {
38
+ body . mappings [ config . get ( 'ES.MEMBER_PROFILE_ES_TYPE ' ) ] = {
39
39
properties : {
40
40
handleLower : { type : 'keyword' } ,
41
41
handle : { type : 'keyword' } ,
@@ -45,7 +45,7 @@ const initES = async () => {
45
45
}
46
46
47
47
await client . indices . create ( {
48
- index : config . ES . ES_INDEX ,
48
+ index : config . ES . MEMBER_PROFILE_ES_INDEX ,
49
49
body
50
50
} )
51
51
}
0 commit comments