fix lint
This commit is contained in:
@@ -6,10 +6,10 @@ const index = {
|
||||
analysis: {
|
||||
analyzer: {
|
||||
ngram: {
|
||||
tokenizer: 'ngram'
|
||||
}
|
||||
}
|
||||
}
|
||||
tokenizer: 'ngram',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
mappings: {
|
||||
properties: {
|
||||
@@ -25,9 +25,9 @@ const index = {
|
||||
userHost: {
|
||||
type: 'keyword',
|
||||
index: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// Init ElasticSearch connection
|
||||
@@ -35,9 +35,9 @@ const client = config.elasticsearch ? new elasticsearch.Client({
|
||||
node: `${config.elasticsearch.ssl ? 'https://' : 'http://'}${config.elasticsearch.host}:${config.elasticsearch.port}`,
|
||||
auth: (config.elasticsearch.user && config.elasticsearch.pass) ? {
|
||||
username: config.elasticsearch.user,
|
||||
password: config.elasticsearch.pass
|
||||
password: config.elasticsearch.pass,
|
||||
} : undefined,
|
||||
pingTimeout: 30000
|
||||
pingTimeout: 30000,
|
||||
}) : null;
|
||||
|
||||
if (client) {
|
||||
@@ -47,7 +47,7 @@ if (client) {
|
||||
if (!exist.body) {
|
||||
client.indices.create({
|
||||
index: config.elasticsearch.index || 'misskey_note',
|
||||
body: index
|
||||
body: index,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user