// WithDefaultField sets the default field to be used by Riak the search query
//
// See https://wiki.apache.org/solr/SolrQuerySyntax
426944
func (builder *SearchCommandBuilder) WithDefaultField(defaultField string) *SearchCommandBuilder {
	builder.protobuf.Df = []byte(defaultField)
	return builder
}
1362490
func (s *HashAlgorithmOptions) SetDefaultValue(v string) *HashAlgorithmOptions {
	s.DefaultValue = &v
	return s
}
454509
func WithDefaultFileHandler(handler filesource.FileHandler) Option {
	return func(options *Options) {
		options.FileHandler = handler
	}
}
283362
func (builder *SearchCommandBuilder) WithDefaultOperation(op string) *SearchCommandBuilder {
	builder.protobuf.Op = []byte(op)
	return builder
}
322591
func AddressWithDefaults(addr string) (*URI, error) {
	if addr == "" {
		return defaultURI(), nil
	}
	return NewURIFromAddress(addr)
}
834160
func (cb *ConfigBackend) GetWithDefault(key string, defaultValue string) (string, error) {
	sort, recursive := true, false
	resp, err := cb.etcdlib.Get(key, sort, recursive)
	if err != nil {
		etcdErr, ok := err.(*etcdlib.EtcdError)
		if ok && etcdErr.ErrorCode == 100 {
			return defaultValue, nil
		}
		return "", err
	}
	return resp.Node.Value, nil
}
1268823
func (builder *SearchCommandBuilder) WithReturnFields(fields ...string) *SearchCommandBuilder {
	builder.protobuf.Fl = make([][]byte, len(fields))
	for i, f := range fields {
		builder.protobuf.Fl[i] = []byte(f)
	}
	return builder
}
637335
func (cs *ChoiceState) WithDefault(defaultState TransitionState) *ChoiceState {
	cs.Default = defaultState
	return cs
}
410107
func WithField(key string, value interface{}) LogEntry {
	return &logEntry{log.WithField(key, value)}
}
729306
func (c *Context) QueryIntWithDefault(key string, defaultValue int) (int, error) {
	data := c.Query(key)
	if len(data) > 0 {
		return strconv.Atoi(c.Query(key))
	}
	return defaultValue, nil
}
33165
func (logger *Logger) WithField(key string, value interface{}) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithField(key, value)
}
491042
func WithDefaults(info Info) Info {
	if info.Bindir == "" {
		info.Bindir = "/usr/local/bin"
	}
	if info.Platform == "" {
		info.Platform = "linux"
	}
	if info.Description == "" {
		info.Description = "no description given"
	}
	info.Version = strings.TrimPrefix(info.Version, "v")
	return info
}
588415
func GetAllDefault(org string) []db.Topic {
	session := db.Conn.Session.Copy()
	defer session.Close()

	result := []db.Topic{}

	db.Conn.Get(session, db.TopicCollection, utils.M{
		"org":              org,
		"user":             db.BLANK,
		"channels.default": false,
	}).All(&result)

	return result
}
436283
func (s *Session) GetStringDefault(key string, defaultValue string) string {
	if v := s.GetString(key); v != "" {
		return v
	}

	return defaultValue
}
1294216
func (s Session) GetDefault(key string, value interface{}, defaultValue interface{}) interface{} {
	v, e := s.GetInto(key, value, false)
	if e != nil {
		v = defaultValue
	}
	return v
}
1402
func (s *IntArrayOptions) SetDefaultValue(v int64) *IntArrayOptions {
	s.DefaultValue = &v
	return s
}
766704
func applyDefaultOptions(o FieldOptions) FieldOptions {
	if o.Type == "" {
		return FieldOptions{
			Type:      DefaultFieldType,
			CacheType: DefaultCacheType,
			CacheSize: DefaultCacheSize,
		}
	}
	return o
}