models.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package main
  2. type QueryObject struct {
  3. Query *BoolObject `json:"query,omitempty"`
  4. Source []string `json:"_source"`
  5. Size int `json:"size"`
  6. }
  7. type QueryObject1 struct {
  8. Query *BoolObject1 `json:"query,omitempty"`
  9. Source []string `json:"_source"`
  10. Size int `json:"size"`
  11. }
  12. type BoolObject struct {
  13. Bool *MMSMObject `json:"bool,omitempty"`
  14. }
  15. type BoolObject1 struct {
  16. Bool *MMSObject `json:"bool,omitempty"`
  17. }
  18. type MMSMObject struct {
  19. Must []interface{} `json:"must,omitempty"`
  20. MustNot []interface{} `json:"must_not,omitempty"`
  21. Should []interface{} `json:"should,omitempty"`
  22. MinSdMatch string `json:"minimum_should_match,omitempty"`
  23. }
  24. type MMSObject struct {
  25. Must []interface{} `json:"must,omitempty"`
  26. MustNot []interface{} `json:"must_not,omitempty"`
  27. Should []interface{} `json:"should,omitempty"`
  28. }
  29. type ShouldObject struct {
  30. MultiMatch *MultiMatch `json:"multi_match,omitempty"`
  31. }
  32. type MultiMatch struct {
  33. Query string `json:"query,omitempty"`
  34. Type string `json:"type,omitempty"`
  35. Fields []string `json:"fields,omitempty"`
  36. }