Documentation ¶
Overview ¶
Forces any buffered data to be processed by the job. The flush jobs API is only applicable when sending data for analysis using the post data API. Depending on the content of the buffer, then it might additionally calculate new results. Both flush and close operations are similar, however the flush is more efficient if you are expecting to send more data for analysis. When flushing, the job remains open and is available to continue analyzing data. A close operation additionally prunes and persists the model state to disk and the job must be opened again before analyzing further data.
Index ¶
- Variables
- type FlushJob
- func (r *FlushJob) AdvanceTime(datetime types.DateTime) *FlushJob
- func (r *FlushJob) CalcInterim(calcinterim bool) *FlushJob
- func (r FlushJob) Do(providedCtx context.Context) (*Response, error)
- func (r *FlushJob) End(datetime types.DateTime) *FlushJob
- func (r *FlushJob) ErrorTrace(errortrace bool) *FlushJob
- func (r *FlushJob) FilterPath(filterpaths ...string) *FlushJob
- func (r *FlushJob) Header(key, value string) *FlushJob
- func (r *FlushJob) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *FlushJob) Human(human bool) *FlushJob
- func (r FlushJob) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *FlushJob) Pretty(pretty bool) *FlushJob
- func (r *FlushJob) Raw(raw io.Reader) *FlushJob
- func (r *FlushJob) Request(req *Request) *FlushJob
- func (r *FlushJob) SkipTime(datetime types.DateTime) *FlushJob
- func (r *FlushJob) Start(datetime types.DateTime) *FlushJob
- type NewFlushJob
- 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 FlushJob ¶
type FlushJob struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *FlushJob
Forces any buffered data to be processed by the job. The flush jobs API is only applicable when sending data for analysis using the post data API. Depending on the content of the buffer, then it might additionally calculate new results. Both flush and close operations are similar, however the flush is more efficient if you are expecting to send more data for analysis. When flushing, the job remains open and is available to continue analyzing data. A close operation additionally prunes and persists the model state to disk and the job must be opened again before analyzing further data.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
func (*FlushJob) AdvanceTime ¶
AdvanceTime Refer to the description for the `advance_time` query parameter. API name: advance_time
func (*FlushJob) CalcInterim ¶
CalcInterim Refer to the description for the `calc_interim` query parameter. API name: calc_interim
func (FlushJob) Do ¶
Do runs the request through the transport, handle the response and returns a flushjob.Response
func (*FlushJob) ErrorTrace ¶ added in v8.14.0
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*FlushJob) FilterPath ¶ added in v8.14.0
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*FlushJob) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*FlushJob) Human ¶ added in v8.14.0
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (FlushJob) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*FlushJob) Pretty ¶ added in v8.14.0
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*FlushJob) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
type NewFlushJob ¶
NewFlushJob type alias for index.
func NewFlushJobFunc ¶
func NewFlushJobFunc(tp elastictransport.Interface) NewFlushJob
NewFlushJobFunc returns a new instance of FlushJob 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 { // AdvanceTime Refer to the description for the `advance_time` query parameter. AdvanceTime types.DateTime `json:"advance_time,omitempty"` // CalcInterim Refer to the description for the `calc_interim` query parameter. CalcInterim *bool `json:"calc_interim,omitempty"` // End Refer to the description for the `end` query parameter. End types.DateTime `json:"end,omitempty"` // SkipTime Refer to the description for the `skip_time` query parameter. SkipTime types.DateTime `json:"skip_time,omitempty"` // Start Refer to the description for the `start` query parameter. Start types.DateTime `json:"start,omitempty"` }
Request holds the request body struct for the package flushjob
func (*Request) FromJSON ¶ added in v8.5.0
FromJSON allows to load an arbitrary json into the request structure
func (*Request) UnmarshalJSON ¶ added in v8.12.1
type Response ¶ added in v8.7.0
type Response struct { Flushed bool `json:"flushed"` // LastFinalizedBucketEnd Provides the timestamp (in milliseconds since the epoch) of the end of // the last bucket that was processed. LastFinalizedBucketEnd *int `json:"last_finalized_bucket_end,omitempty"` }
Response holds the response body struct for the package flushjob