import { Controller, Get, Param, Query } from '@nestjs/common'; import { EsLibService } from './es-lib.service'; import { EsSearchDto } from './es-search.dto'; @Controller('api/es') export class EsLibController { constructor(private readonly esLibService: EsLibService) {} // @Get('/test') // test() { // return { ret: 'ok' }; // } // @Get('/search/:esIndex') // async search(@Param('esIndex') esIndex: string,@Query() query:EsSearchDto) { // // console.log(param) // return await this.esLibService.search(esIndex,query,{rangeTime:'@timestamp',title:'title',content:'cont'}); // } }