MCPcopy Create free account
hub / github.com/olivere/elastic / FieldWithBoost

Method FieldWithBoost

search_queries_query_string.go:77–81  ·  view source on GitHub ↗

FieldWithBoost adds a field to run the query string against with a specific boost.

(field string, boost float64)

Source from the content-addressed store, hash-verified

75
76// FieldWithBoost adds a field to run the query string against with a specific boost.
77func (q *QueryStringQuery) FieldWithBoost(field string, boost float64) *QueryStringQuery {
78 q.fields = append(q.fields, field)
79 q.fieldBoosts[field] = &boost
80 return q
81}
82
83// TieBreaker is used when more than one field is used with the query string,
84// and combined queries are using dismax.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected