es_util.go 913 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package main
  2. type QueryObject struct {
  3. Must []interface{} `json:"must,omitempty"`
  4. MustNot []interface{} `json:"must_not,omitempty"`
  5. Should []interface{} `json:"should,omitempty"`
  6. }
  7. type NesEsObject struct {
  8. Query QueryObject `json:"bool,omitempty"`
  9. }
  10. type PnameObj struct {
  11. Match ProjectName `json:"match,omitempty"`
  12. }
  13. type ProjectName struct {
  14. Pname string `json:"s_projectname,omitempty"`
  15. }
  16. type PurObj struct {
  17. Match Purchasing `json:"terms,omitempty"`
  18. }
  19. type Purchasing struct {
  20. Pur []string `json:"purchasing,omitempty"`
  21. }
  22. type BuyerObj struct {
  23. Match Buyer `json:"match,omitempty"`
  24. }
  25. type Buyer struct {
  26. Buyer string `json:"buyer,omitempty"`
  27. }
  28. type AreaObj struct {
  29. Match Area `json:"match,omitempty"`
  30. }
  31. type Area struct {
  32. Area string `json:"area,omitempty"`
  33. }
  34. type CityObj struct {
  35. Match City `json:"match,omitempty"`
  36. }
  37. type City struct {
  38. City string `json:"city,omitempty"`
  39. }