-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy_to_param.go
More file actions
34 lines (29 loc) · 1.03 KB
/
copy_to_param.go
File metadata and controls
34 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package picker
// WithCopyTo is a Field mapping with a CopyTo param
//
// The copy_to parameter allows you to copy the values of multiple fields into
// a group field, which can then be queried as a single field.
//
// https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html
type WithCopyTo interface {
CopyTo() string
SetCopyTo(v string)
}
// CopyToParam is a Field mixin for CopyTo
//
// The copy_to parameter allows you to copy the values of multiple fields into
// a group field, which can then be queried as a single field.
//
// https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html
type CopyToParam struct {
CopyToValue string `bson:"copy_to,omitempty" json:"copy_to,omitempty"`
}
// CopyTo parameter allows you to copy the values of multiple fields into a group
// field, which can then be queried as a single field.
func (ctp CopyToParam) CopyTo() string {
return ctp.CopyToValue
}
// SetCopyTo sets CopyToParam.Value to v
func (ctp *CopyToParam) SetCopyTo(v string) {
ctp.CopyToValue = v
}