func NewSuggesterCategoryIndex(name string, values ...string) *SuggesterCategoryIndex {
	q := &SuggesterCategoryIndex{
		name:   name,
		values: values,
	}
	return q
}
NewSuggesterCategoryIndex creates a new SuggesterCategoryIndex.
package elastic
type SuggesterCategoryMapping struct {
	name          string
	fieldName     string
	defaultValues []string
}
func NewSuggesterCategoryMapping(name string) *SuggesterCategoryMapping {
	return &SuggesterCategoryMapping{
		name:          name,
		defaultValues: make([]string, 0),
	}
}
func (q *SuggesterCategoryMapping) DefaultValues(values ...string) *SuggesterCategoryMapping {
	q.defaultValues = append(q.defaultValues, values...)
	return q
}
func (q *SuggesterCategoryMapping) FieldName(fieldName string) *SuggesterCategoryMapping {
	q.fieldName = fieldName
	return q
}
func (q *SuggesterCategoryMapping) Source() (interface{}, error) {
	source := make(map[string]interface{})
	x := make(map[string]interface{})
	source[q.name] = x
	x["type"] = "category"
	switch len(q.defaultValues) {
	case 0:
		x["default"] = q.defaultValues
	case 1:
		x["default"] = q.defaultValues[0]
	default:
		x["default"] = q.defaultValues
	}
	if q.fieldName != "" {
		x["path"] = q.fieldName
	}
	return source, nil
}
type SuggesterCategoryQuery struct {
	name   string
	values map[string]*int
}
func NewSuggesterCategoryQuery(name string, values ...string) *SuggesterCategoryQuery {
	q := &SuggesterCategoryQuery{
		name:   name,
		values: make(map[string]*int),
	}
	if len(values) > 0 {
		q.Values(values...)
	}
	return q
}
func (q *SuggesterCategoryQuery) Value(val string) *SuggesterCategoryQuery {
	q.values[val] = nil
	return q
}
func (q *SuggesterCategoryQuery) ValueWithBoost(val string, boost int) *SuggesterCategoryQuery {
	q.values[val] = &boost
	return q
}
func (q *SuggesterCategoryQuery) Values(values ...string) *SuggesterCategoryQuery {
	for _, val := range values {
		q.values[val] = nil
	}
	return q
}
func (q *SuggesterCategoryQuery) Source() (interface{}, error) {
	source := make(map[string]interface{})
	switch len(q.values) {
	case 0:
		source[q.name] = make([]string, 0)
	default:
		contexts := make([]interface{}, 0)
		for val, boost := range q.values {
			context := make(map[string]interface{})
			context["context"] = val
			if boost != nil {
				context["boost"] = *boost
			}
			contexts = append(contexts, context)
		}
		source[q.name] = contexts
	}
	return source, nil
}
type SuggesterCategoryIndex struct {
	name   string
	values []string
}