// BSONPutTextField put a text field
BSONPutTextField put a text field
// BSONPutTextField put a text field
func BSONPutTextField(m bson.M, val []string) {
	if len(val) == 0 {
		return
	}
	var qs string
	cs := make([]string, 0, len(val))
	for _, c := range val {
		cs = append(cs, Quote(c))
	}
	qs = strings.Join(cs, " ")
	m["$text"] = bson.M{
		"$search": qs,
	}
}
func BSONPutTextField ( m bson . M , val [ ] string ) { if len ( val ) == 0 { return } var qs string cs := make ( [ ] string , 0 , len ( val ) ) for _ , c := range val { cs = append ( cs , Quote ( c ) ) } qs = strings . Join ( cs , " " ) m [ " " ] = bson . M { " " : qs , } }
BSONPutTextField put a text field
BSONPutTextField put a text field
// skip if is missing // re-arrange with quoted // build search