upsert.go 400 B

1234567891011121314151617
  1. package model
  2. // UpsertParams .
  3. type UpsertParams struct {
  4. Business string `form:"business" validate:"required"`
  5. DataStr string `form:"data" validate:"required"`
  6. Insert bool `form:"insert" default:"false"`
  7. UpsertBody []UpsertBody
  8. }
  9. // UpsertBody job的bulk优化参考这个模板 .
  10. type UpsertBody struct {
  11. IndexName string
  12. IndexType string
  13. IndexID string
  14. Doc MapData
  15. }