Merge remote-tracking branch 'origin/master'
| | |
| | | "\"sort\":[{\"_score\":{\"order\":\"desc\"}},{\"picDate\":{\"order\":\"desc\"}}]," + |
| | | "\"_source\":{\"includes\":[],\"excludes\":[\"*.feature\"]}" + |
| | | "}" |
| | | //logger.Debug("findEsData.param:",prama) |
| | | logger.Debug("findEsData.param:",prama) |
| | | //数据解析 |
| | | tokenRes := esutil.GetEsDataReq(url, prama, true) |
| | | //fmt.Println(tokenRes) |
| | |
| | | // @Tags es |
| | | // @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"返回错误信息", success:false}" |
| | | // @Router /data/api-v/es/tagList [POST] |
| | | // @Router /data/api-v/es/taskList [POST] |
| | | func (sc *EsSearchController) PostEsTaskList(c *gin.Context) { |
| | | localConf, err2 := cache.GetServerInfo() |
| | | if err2 !=nil || localConf.AlarmIp == "" || localConf.ServerId == "" { |
| | |
| | | } |
| | | |
| | | type esindexlist struct { |
| | | VideoPersons index `mapstructure:"videopersons"` |
| | | DbTables index `mapstructure:"dbtables"` |
| | | Dbtablepersons index `mapstructure:"dbtablepersons"` |
| | | Personaction index `mapstructure:"personaction"` |
| | | AiOcean index `mapstructure:"aiOcean"` |
| | | } |
| | | type index struct { |
| | |
| | | viper.AddConfigPath("/opt/vasystem/config/") |
| | | err = viper.ReadInConfig() |
| | | if err != nil { |
| | | log.Fatal("error on parsing configuration file") |
| | | log.Fatal("error on parsing configuration file",err) |
| | | } |
| | | viper.UnmarshalKey("es", EsInfo) |
| | | viper.UnmarshalKey("server", Server) |