controllers/EsController.go
@@ -3,6 +3,7 @@ import ( "andriodServer/esutil" "encoding/json" "fmt" "github.com/gin-gonic/gin" "io" "strings" @@ -23,6 +24,9 @@ return } videoUrl := getVideoUrlById(id) if videoUrl != "" { videoUrl = "http://"+videoUrl } c.JSON(200, map[string]interface{}{ "success": true, @@ -51,8 +55,9 @@ "videoUrl" ] }` body, err := esutil.EsReq("POST", EsUrl, []byte(jsonDSL)) body, err := esutil.EsReq("POST", EsUrl+"ai_ocean/_search", []byte(jsonDSL)) if err != nil { fmt.Println("err:", err) return "" } jsonStr := string(body)