12345678910111213141516171819202122 |
- // import { Client } from "@elastic/elasticsearch";
- import { Config, Init, Provide } from '@midwayjs/core';
- @Provide()
- export class ESService {
- // @Config('elasticsearch')
- // esConfig: object;
- // /**es连接实例 */
- // esClient: Client;
- // @Init()
- // async initClient() {
- // const esClient = new Client(this.esConfig);
- // this.esClient = esClient;
- // }
- // /**
- // * 1.索引(es中的表)建立:根据编写的文件生成
- // * 2.初始化数据,通过接口触发
- // * 3.对指定表进行的数据修改做同步
- // */
- // async initIndex() {
- // }
- }
|