« Elasticsearch/Client/8_0/Direct/QueryRuleset.pm
↑ Summary
Elasticsearch/Client/8_0/Direct/SQL.pm »
| 1 | # Licensed to Elasticsearch B.V. under one or more contributor | ||
| 2 | # license agreements. See the NOTICE file distributed with | ||
| 3 | # this work for additional information regarding copyright | ||
| 4 | # ownership. Elasticsearch B.V. licenses this file to you under | ||
| 5 | # the Apache License, Version 2.0 (the "License"); you may | ||
| 6 | # not use this file except in compliance with the License. | ||
| 7 | # You may obtain a copy of the License at | ||
| 8 | # | ||
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | # | ||
| 11 | # Unless required by applicable law or agreed to in writing, | ||
| 12 | # software distributed under the License is distributed on an | ||
| 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 14 | # KIND, either express or implied. See the License for the | ||
| 15 | # specific language governing permissions and limitations | ||
| 16 | # under the License. | ||
| 17 | |||
| 18 | package Search::Elasticsearch::Client::8_0::Direct::Rollup; | ||
| 19 | $Search::Elasticsearch::Client::8_0::Direct::Rollup::VERSION = '8.12'; | ||
| 20 | use Moo; | ||
| 21 | with 'Search::Elasticsearch::Client::8_0::Role::API'; | ||
| 22 | with 'Search::Elasticsearch::Role::Client::Direct'; | ||
| 23 | use namespace::clean; | ||
| 24 | |||
| 25 | __PACKAGE__->_install_api('rollup'); | ||
| 26 | |||
| 27 | 1; | ||
| 28 | |||
| 29 | =pod | ||
| 30 | |||
| 31 | =encoding UTF-8 | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | Search::Elasticsearch::Client::8_0::Direct::Rollup - Plugin providing Rollups for Search::Elasticsearch 8.x | ||
| 36 | |||
| 37 | =head1 VERSION | ||
| 38 | |||
| 39 | version 8.12 | ||
| 40 | |||
| 41 | =head1 SYNOPSIS | ||
| 42 | |||
| 43 | my $response = $es->rollup->search( body => {...} ) | ||
| 44 | |||
| 45 | =head2 DESCRIPTION | ||
| 46 | |||
| 47 | This class extends the L<Search::Elasticsearch> client with a C<rollup> | ||
| 48 | namespace, to support the | ||
| 49 | L<Rollup APIs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-apis.html>. | ||
| 50 | |||
| 51 | The full documentation for the Rollups feature is available here: | ||
| 52 | L<https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html> | ||
| 53 | |||
| 54 | =head1 GENERAL METHODS | ||
| 55 | |||
| 56 | =head2 C<search()> | ||
| 57 | |||
| 58 | $response = $es->rollup->search( | ||
| 59 | index => $index | \@indices, # optional | ||
| 60 | body => {...} # optional | ||
| 61 | ) | ||
| 62 | |||
| 63 | The C<search()> method executes a normal search but can join the results from ordinary indices with | ||
| 64 | those from rolled up indices. | ||
| 65 | |||
| 66 | Query string parameters: | ||
| 67 | C<error_trace>, | ||
| 68 | C<filter_path>, | ||
| 69 | C<human>, | ||
| 70 | C<typed_keys> | ||
| 71 | |||
| 72 | See the L<rollup search docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html> | ||
| 73 | for more information. | ||
| 74 | |||
| 75 | =head1 JOB METHODS | ||
| 76 | |||
| 77 | =head2 C<put_job()> | ||
| 78 | |||
| 79 | $response = $es->rollup->put_job( | ||
| 80 | id => $id, # required | ||
| 81 | body => {...} # optional | ||
| 82 | ) | ||
| 83 | |||
| 84 | The C<put_job()> method creates a rollup job which will rollup matching indices to a rolled up index | ||
| 85 | in the background. | ||
| 86 | |||
| 87 | Query string parameters: | ||
| 88 | C<error_trace>, | ||
| 89 | C<filter_path>, | ||
| 90 | C<human> | ||
| 91 | |||
| 92 | See the L<rollup create job docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html> | ||
| 93 | for more information. | ||
| 94 | |||
| 95 | =head2 C<delete_job()> | ||
| 96 | |||
| 97 | $response = $es->rollup->delete_job( | ||
| 98 | id => $id, # required | ||
| 99 | ) | ||
| 100 | |||
| 101 | The C<delete_job()> method deletes a rollup job by ID. | ||
| 102 | |||
| 103 | Query string parameters: | ||
| 104 | C<error_trace>, | ||
| 105 | C<filter_path>, | ||
| 106 | C<human> | ||
| 107 | |||
| 108 | See the L<rollup delete job docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html> | ||
| 109 | for more information. | ||
| 110 | |||
| 111 | =head2 C<get_jobs()> | ||
| 112 | |||
| 113 | $response = $es->rollup->get_jobs( | ||
| 114 | id => $id, # optional | ||
| 115 | ) | ||
| 116 | |||
| 117 | The C<get_job()> method retrieves a rollup job by ID, or all jobs if not specified. | ||
| 118 | |||
| 119 | Query string parameters: | ||
| 120 | C<error_trace>, | ||
| 121 | C<filter_path>, | ||
| 122 | C<human> | ||
| 123 | |||
| 124 | See the L<rollup get jobs docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html> | ||
| 125 | for more information. | ||
| 126 | |||
| 127 | =head2 C<start_job()> | ||
| 128 | |||
| 129 | $response = $es->rollup->start_job( | ||
| 130 | id => $id, # required | ||
| 131 | ) | ||
| 132 | |||
| 133 | The C<start_job()> method starts the specified rollup job. | ||
| 134 | |||
| 135 | Query string parameters: | ||
| 136 | C<error_trace>, | ||
| 137 | C<filter_path>, | ||
| 138 | C<human> | ||
| 139 | |||
| 140 | See the L<rollup start job docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html> | ||
| 141 | for more information. | ||
| 142 | |||
| 143 | =head2 C<stop_job()> | ||
| 144 | |||
| 145 | $response = $es->rollup->stop_job( | ||
| 146 | id => $id, # required | ||
| 147 | ) | ||
| 148 | |||
| 149 | The C<stop_job()> method stops the specified rollup job. | ||
| 150 | |||
| 151 | Query string parameters: | ||
| 152 | C<error_trace>, | ||
| 153 | C<filter_path>, | ||
| 154 | C<human> | ||
| 155 | |||
| 156 | See the L<rollup stop job docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html> | ||
| 157 | for more information. | ||
| 158 | |||
| 159 | =head1 DATA METHODS | ||
| 160 | |||
| 161 | =head2 C<get_rollup_caps()> | ||
| 162 | |||
| 163 | $response = $es->rollup->get_rollup_caps( | ||
| 164 | id => $index # optional | ||
| 165 | ) | ||
| 166 | |||
| 167 | The C<get_rollup_caps()> method returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. | ||
| 168 | |||
| 169 | Query string parameters: | ||
| 170 | C<error_trace>, | ||
| 171 | C<filter_path>, | ||
| 172 | C<human> | ||
| 173 | |||
| 174 | See the L<get rollup caps docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html> | ||
| 175 | for more information. | ||
| 176 | |||
| 177 | =head2 C<get_rollup_index_caps()> | ||
| 178 | |||
| 179 | $response = $es->rollup->get_rollup_index_caps( | ||
| 180 | id => $index # optional | ||
| 181 | ) | ||
| 182 | |||
| 183 | The C<get_rollup_index_caps()> method returns the rollup capabilities of all jobs inside of a rollup index. | ||
| 184 | |||
| 185 | Query string parameters: | ||
| 186 | C<error_trace>, | ||
| 187 | C<filter_path>, | ||
| 188 | C<human> | ||
| 189 | |||
| 190 | See the L<get rollup index caps docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html> | ||
| 191 | for more information. | ||
| 192 | |||
| 193 | =head1 AUTHOR | ||
| 194 | |||
| 195 | Enrico Zimuel <enrico.zimuel@elastic.co> | ||
| 196 | |||
| 197 | =head1 COPYRIGHT AND LICENSE | ||
| 198 | |||
| 199 | This software is Copyright (c) 2024 by Elasticsearch BV. | ||
| 200 | |||
| 201 | This is free software, licensed under: | ||
| 202 | |||
| 203 | The Apache License, Version 2.0, January 2004 | ||
| 204 | |||
| 205 | =cut | ||
| 206 | |||
| 207 | __END__ |