Documentation ¶
Overview ¶
Returns multiple termvectors in one request.
Index ¶
- Variables
- type Mtermvectors
- func (r Mtermvectors) Do(providedCtx context.Context) (*Response, error)
- func (r *Mtermvectors) Docs(docs ...types.MTermVectorsOperation) *Mtermvectors
- func (r *Mtermvectors) FieldStatistics(fieldstatistics bool) *Mtermvectors
- func (r *Mtermvectors) Fields(fields ...string) *Mtermvectors
- func (r *Mtermvectors) Header(key, value string) *Mtermvectors
- func (r *Mtermvectors) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Mtermvectors) Ids(ids ...string) *Mtermvectors
- func (r *Mtermvectors) Index(index string) *Mtermvectors
- func (r *Mtermvectors) Offsets(offsets bool) *Mtermvectors
- func (r *Mtermvectors) Payloads(payloads bool) *Mtermvectors
- func (r Mtermvectors) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Mtermvectors) Positions(positions bool) *Mtermvectors
- func (r *Mtermvectors) Preference(preference string) *Mtermvectors
- func (r *Mtermvectors) Raw(raw io.Reader) *Mtermvectors
- func (r *Mtermvectors) Realtime(realtime bool) *Mtermvectors
- func (r *Mtermvectors) Request(req *Request) *Mtermvectors
- func (r *Mtermvectors) Routing(routing string) *Mtermvectors
- func (r *Mtermvectors) TermStatistics(termstatistics bool) *Mtermvectors
- func (r *Mtermvectors) Version(versionnumber string) *Mtermvectors
- func (r *Mtermvectors) VersionType(versiontype versiontype.VersionType) *Mtermvectors
- type NewMtermvectors
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type Mtermvectors ¶
type Mtermvectors struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Mtermvectors
Returns multiple termvectors in one request.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html
func (Mtermvectors) Do ¶
func (r Mtermvectors) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a mtermvectors.Response
func (*Mtermvectors) Docs ¶ added in v8.9.0
func (r *Mtermvectors) Docs(docs ...types.MTermVectorsOperation) *Mtermvectors
Docs Array of existing or artificial documents. API name: docs
func (*Mtermvectors) FieldStatistics ¶
func (r *Mtermvectors) FieldStatistics(fieldstatistics bool) *Mtermvectors
FieldStatistics If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. API name: field_statistics
func (*Mtermvectors) Fields ¶
func (r *Mtermvectors) Fields(fields ...string) *Mtermvectors
Fields Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. API name: fields
func (*Mtermvectors) Header ¶
func (r *Mtermvectors) Header(key, value string) *Mtermvectors
Header set a key, value pair in the Mtermvectors headers map.
func (*Mtermvectors) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Mtermvectors) Ids ¶
func (r *Mtermvectors) Ids(ids ...string) *Mtermvectors
Ids Simplified syntax to specify documents by their ID if they're in the same index. API name: ids
func (*Mtermvectors) Index ¶
func (r *Mtermvectors) Index(index string) *Mtermvectors
Index Name of the index that contains the documents. API Name: index
func (*Mtermvectors) Offsets ¶
func (r *Mtermvectors) Offsets(offsets bool) *Mtermvectors
Offsets If `true`, the response includes term offsets. API name: offsets
func (*Mtermvectors) Payloads ¶
func (r *Mtermvectors) Payloads(payloads bool) *Mtermvectors
Payloads If `true`, the response includes term payloads. API name: payloads
func (Mtermvectors) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Mtermvectors) Positions ¶
func (r *Mtermvectors) Positions(positions bool) *Mtermvectors
Positions If `true`, the response includes term positions. API name: positions
func (*Mtermvectors) Preference ¶
func (r *Mtermvectors) Preference(preference string) *Mtermvectors
Preference Specifies the node or shard the operation should be performed on. Random by default. API name: preference
func (*Mtermvectors) Raw ¶
func (r *Mtermvectors) Raw(raw io.Reader) *Mtermvectors
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*Mtermvectors) Realtime ¶
func (r *Mtermvectors) Realtime(realtime bool) *Mtermvectors
Realtime If true, the request is real-time as opposed to near-real-time. API name: realtime
func (*Mtermvectors) Request ¶
func (r *Mtermvectors) Request(req *Request) *Mtermvectors
Request allows to set the request property with the appropriate payload.
func (*Mtermvectors) Routing ¶
func (r *Mtermvectors) Routing(routing string) *Mtermvectors
Routing Custom value used to route operations to a specific shard. API name: routing
func (*Mtermvectors) TermStatistics ¶
func (r *Mtermvectors) TermStatistics(termstatistics bool) *Mtermvectors
TermStatistics If true, the response includes term frequency and document frequency. API name: term_statistics
func (*Mtermvectors) Version ¶
func (r *Mtermvectors) Version(versionnumber string) *Mtermvectors
Version If `true`, returns the document version as part of a hit. API name: version
func (*Mtermvectors) VersionType ¶
func (r *Mtermvectors) VersionType(versiontype versiontype.VersionType) *Mtermvectors
VersionType Specific version type. API name: version_type
type NewMtermvectors ¶
type NewMtermvectors func() *Mtermvectors
NewMtermvectors type alias for index.
func NewMtermvectorsFunc ¶
func NewMtermvectorsFunc(tp elastictransport.Interface) NewMtermvectors
NewMtermvectorsFunc returns a new instance of Mtermvectors with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // Docs Array of existing or artificial documents. Docs []types.MTermVectorsOperation `json:"docs,omitempty"` // Ids Simplified syntax to specify documents by their ID if they're in the same // index. Ids []string `json:"ids,omitempty"` }
Request holds the request body struct for the package mtermvectors
type Response ¶ added in v8.7.0
type Response struct {
Docs []types.TermVectorsResult `json:"docs"`
}
Response holds the response body struct for the package mtermvectors