code: func (qd *QueryDsl) MarshalJSON() ([]byte, error) {
  	q := qd.QueryEmbed
  	hasQuery := false
  	if q.Qs != nil || len(q.Terms) > 0 || q.MatchAll != nil || q.MultiMatch != nil {
  		hasQuery = true
  	}
  	// If a query has a
  	if qd.FilterVal != nil && hasQuery {
  		queryB, err := json.Marshal(q)
  		if err != nil {
  			return queryB, err
  		}
  		filterB, err := json.Marshal(qd.FilterVal)
  		if err != nil {
  			return filterB, err
  		}
  		return []byte(fmt.Sprintf(`{"filtered":{"query":%s,"filter":%s}}`, queryB, filterB)), nil
  	}
  	return json.Marshal(q)
  }
docs: // MarshalJSON provides custom marshalling to support the query dsl which is a conditional
  // json format, not always the same parent/children