es.service.ts 591 B

12345678910111213141516171819202122
  1. // import { Client } from "@elastic/elasticsearch";
  2. import { Config, Init, Provide } from '@midwayjs/core';
  3. @Provide()
  4. export class ESService {
  5. // @Config('elasticsearch')
  6. // esConfig: object;
  7. // /**es连接实例 */
  8. // esClient: Client;
  9. // @Init()
  10. // async initClient() {
  11. // const esClient = new Client(this.esConfig);
  12. // this.esClient = esClient;
  13. // }
  14. // /**
  15. // * 1.索引(es中的表)建立:根据编写的文件生成
  16. // * 2.初始化数据,通过接口触发
  17. // * 3.对指定表进行的数据修改做同步
  18. // */
  19. // async initIndex() {
  20. // }
  21. }