NAME
Search::Elasticsearch::Plugin::XPack::5_0::ML - Plugin providing ML API for Search::Elasticsearch 5.x
VERSION
version 6.00
SYNOPSIS
use Search::Elasticsearch();
my $es = Search::Elasticsearch->new(
nodes => \@nodes,
plugins => ['XPack']
);
my $response = $es->xpack->ml->start_datafeed(...)
DESCRIPTION
This class extends the Search::Elasticsearch client with an ml
namespace, to support the Machine Learning APIs. In other words, it can be used as follows:
use Search::Elasticsearch();
my $es = Search::Elasticsearch->new(
nodes => \@nodes,
plugins => ['XPack']
);
my $response = $es->xpack->ml->start_datafeed(...);
The full documentation for the ML feature is available here: https://www.elastic.co/guide/en/x-pack/6.0/xpack-ml.html
DATAFEED METHODS
put_datafeed()
$response = $es->xpack->ml->put_datafeed(
datafeed_id => $id # required
body => {...} # required
)
The put_datafeed()
method enables you to instantiate a datafeed.
See the put_datafeed docs for more information.
Query string parameters: error_trace
, human
delete_datafeed()
$response = $es->xpack->ml->delete_datafeed(
datafeed_id => $id # required
)
The delete_datafeed()
method enables you to delete a datafeed.
See the delete_datafeed docs for more information.
Query string parameters: error_trace
, force
, human
start_datafeed()
$response = $es->xpack->ml->start_datafeed(
datafeed_id => $id # required
)
The start_datafeed()
method enables you to start a datafeed.
See the start_datafeed docs for more information.
Query string parameters: end
, error_trace
, human
, start
, timeout
stop_datafeed()
$response = $es->xpack->ml->stop_datafeed(
datafeed_id => $id # required
)
The stop_datafeed()
method enables you to stop a datafeed.
See the stop_datafeed docs for more information.
Query string parameters: error_trace
, force
, human
, timeout
get_datafeeds()
$response = $es->xpack->ml->get_datafeeds(
datafeed_id => $id # optional
)
The get_datafeeds()
method enables you to retrieve configuration information for datafeeds.
See the get_datafeeds docs for more information.
Query string parameters: error_trace
, human
get_datafeed_stats()
$response = $es->xpack->ml->get_datafeed_stats(
datafeed_id => $id # optional
)
The get_datafeed_stats()
method enables you to retrieve configuration information for datafeeds.
See the get_datafeed_stats docs for more information.
Query string parameters: error_trace
, human
preview_datafeed()
$response = $es->xpack->ml->preview_datafeed(
datafeed_id => $id # required
)
The preview_datafeed()
method enables you to preview a datafeed.
See the preview_datafeed docs for more information.
Query string parameters: error_trace
, human
update_datafeed()
$response = $es->xpack->ml->update_datafeed(
datafeed_id => $id # required
body => {...} # required
)
The update_datafeed()
method enables you to update certain properties of a datafeed.
See the update_datafeed docs for more information.
Query string parameters: error_trace
, human
JOB METHODS
put_job()
$response = $es->xpack->ml->put_job(
job_id => $id # required
body => {...} # required
)
The put_job()
method enables you to instantiate a job.
See the put_job docs for more information.
Query string parameters: error_trace
, human
delete_job()
$response = $es->xpack->ml->delete_job(
job_id => $id # required
)
The delete_job()
method enables you to delete a job.
See the delete_job docs for more information.
Query string parameters: error_trace
, force
, human
open_job()
$response = $es->xpack->ml->open_job(
job_id => $id # required
)
The open_job()
method enables you to open a closed job.
See the open_job docs for more information.
Query string parameters: error_trace
, human
close_job()
$response = $es->xpack->ml->close_job(
job_id => $id # required
)
The close_job()
method enables you to close an open job.
See the close_job docs for more information.
Query string parameters: error_trace
, force
, human
, timeout
get_jobs()
$response = $es->xpack->ml->get_jobs(
job_id => $id # optional
)
The get_jobs()
method enables you to retrieve configuration information for jobs.
See the get_jobs docs for more information.
Query string parameters: error_trace
, human
get_job_stats()
$response = $es->xpack->ml->get_jobs_stats(
job_id => $id # optional
)
The get_jobs_stats()
method enables you to retrieve usage information for jobs.
See the get_job_statss docs for more information.
Query string parameters: error_trace
, human
flush_job()
$response = $es->xpack->ml->flush_job(
job_id => $id # required
)
The flush_job()
method forces any buffered data to be processed by the job.
See the flush_job docs for more information.
Query string parameters: advance_time
, calc_interm
, end
, error_trace
, human
, skip_time
, start
post_data()
$response = $es->xpack->ml->post_data(
job_id => $id # required
body => [data] # required
)
The post_data()
method enables you to send data to an anomaly detection job for analysis.
See the post_data docs for more information.
Query string parameters: error_trace
, human
, reset_end
, reset_start
update_job()
$response = $es->xpack->ml->update_job(
job_id => $id # required
body => {...} # required
)
The update_job()
method enables you to update certain properties of a job.
See the update_job docs for more information.
Query string parameters: error_trace
, human
MODEL SNAPSHOT METHODS
delete_model_snapshot()
$response = $es->xpack->ml->delete_model_snapshot(
snapshot_id => $id # required
)
The delete_model_snapshot()
method enables you to delete an existing model snapshot.
See the delete_model_snapshot docs for more information.
Query string parameters: error_trace
, human
get_model_snapshots()
$response = $es->xpack->ml->get_model_snapshots(
job_id => $job_id, # required
snapshot_id => $snapshot_id # optional
)
The get_model_snapshots()
method enables you to retrieve information about model snapshots.
See the get_model_snapshots docs for more information.
Query string parameters: desc
, end
, error_trace
, from
, human
, size
, sort
, start
revert_model_snapshot()
$response = $es->xpack->ml->revert_model_snapshot(
job_id => $job_id, # required
snapshot_id => $snapshot_id # required
)
The revert_model_snapshots()
method enables you to revert to a specific snapshot.
See the revert_model_snapshot docs for more information.
Query string parameters: delete_intervening_results
, error_trace
, human
update_model_snapshot()
$response = $es->xpack->ml->update_model_snapshot(
job_id => $job_id, # required
snapshot_id => $snapshot_id # required
)
The update_model_snapshots()
method enables you to update certain properties of a snapshot.
See the update_model_snapshot docs for more information.
Query string parameters: error_trace
, human
RESULT METHODS
get_buckets()
$response = $es->xpack->ml->get_buckets(
job_id => $job_id, # required
timestamp => $timestamp # optional
)
The get_buckets()
method enables you to retrieve job results for one or more buckets.
See the get_buckets docs for more information.
Query string parameters: anomaly_score
, desc
, end
, error_trace
, exclude_interim
, expand
, from
, human
, size
, sort
, start
get_categories()
$response = $es->xpack->ml->get_categories(
job_id => $job_id, # required
category_id => $category_id # optional
)
The get_categories()
method enables you to retrieve job results for one or more categories.
See the get_categories docs for more information.
Query string parameters: error_trace
, from
, human
, size
get_influencers()
$response = $es->xpack->ml->get_influencers(
job_id => $job_id, # required
)
The get_influencers()
method enables you to retrieve job results for one or more influencers.
See the get_influencers docs for more information.
Query string parameters: desc
, end
, error_trace
, exclude_interim
, expand
, from
, human
, influencer_score
, size
, sort
, start
get_records()
$response = $es->xpack->ml->get_records(
job_id => $job_id, # required
)
The get_records()
method enables you to retrieve anomaly records for a job.
See the get_records docs for more information.
Query string parameters: desc
, end
, error_trace
, exclude_interim
, expand
, from
, human
, record_score
, size
, sort
, start
AUTHOR
Clinton Gormley <drtech@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2017 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004