| 1 | # OpenSearch::Client is an unofficial client for OpenSearch. | ||||||||||||||||||||
| 2 | # It is derived from Search::Elasticsearch version 7.714 | ||||||||||||||||||||
| 3 | # License details from the original work are contained in the | ||||||||||||||||||||
| 4 | # NOTICE file distributed with this work. | ||||||||||||||||||||
| 5 | # | ||||||||||||||||||||
| 6 | #----------------------------------------------------------------------- | ||||||||||||||||||||
| 7 | # OpenSearch::Client | ||||||||||||||||||||
| 8 | #----------------------------------------------------------------------- | ||||||||||||||||||||
| 9 | # Copyright 2026 Mark Dootson | ||||||||||||||||||||
| 10 | # | ||||||||||||||||||||
| 11 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||||||||||||||||||||
| 12 | # you may not use this file except in compliance with the License. | ||||||||||||||||||||
| 13 | # You may obtain a copy of the License at | ||||||||||||||||||||
| 14 | # | ||||||||||||||||||||
| 15 | # http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||||||||
| 16 | # | ||||||||||||||||||||
| 17 | # Unless required by applicable law or agreed to in writing, software | ||||||||||||||||||||
| 18 | # distributed under the License is distributed on an "AS IS" BASIS, | ||||||||||||||||||||
| 19 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||||||||||||||||
| 20 | # See the License for the specific language governing permissions and | ||||||||||||||||||||
| 21 | # limitations under the License. | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | package OpenSearch::Client::Core::3_0::Direct; | ||||||||||||||||||||
| 24 | 56 | $OpenSearch::Client::Core::3_0::Direct::VERSION = '3.007006'; | |||||||||||||||||||
| 25 | 56 | ▶ | use Moo; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 26 | 56 | with 'OpenSearch::Client::Core::3_0::Role::API'; | |||||||||||||||||||
| 27 | 56 | with 'OpenSearch::Client::Role::Client::Direct'; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 56 | ▶ | use OpenSearch::Client::Util qw(parse_params is_compat); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 30 | 56 | ▶ | use namespace::clean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 0 | ▶ | sub _namespace {__PACKAGE__} | ||||||||||||||||||
|
Subroutine
_namespace: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 56 | has 'asynchronous_search' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 36 | 56 | has 'cat' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 37 | 56 | has 'cluster' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 38 | 56 | has 'dangling_indices' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 39 | 56 | has 'flow_framework' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 40 | 56 | has 'geospatial' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 41 | 56 | has 'indices' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 42 | 56 | has 'ingest' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 43 | 56 | has 'ingestion' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 44 | 56 | has 'insights' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 45 | 56 | has 'ism' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 46 | 56 | has 'knn' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 47 | 56 | has 'list' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 48 | 56 | has 'ltr' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 49 | 56 | has 'ml' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 50 | 56 | has 'neural' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 51 | 56 | has 'nodes' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 52 | 56 | has 'notifications' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 53 | 56 | has 'observability' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 54 | 56 | has 'ppl' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 55 | 56 | has 'query' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 56 | 56 | has 'remote_store' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 57 | 56 | has 'replication' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 58 | 56 | has 'rollups' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 59 | 56 | has 'search_pipeline' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 60 | 56 | has 'search_relevance' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 61 | 56 | has 'security' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 62 | 56 | has 'security_analytics' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 63 | 56 | has 'sm' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 64 | 56 | has 'snapshot' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 65 | 56 | has 'sql' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 66 | 56 | has 'tasks' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 67 | 56 | has 'transforms' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 68 | 56 | has 'ubi' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 69 | 56 | has 'wlm' => ( is => 'lazy', init_arg => undef ); | |||||||||||||||||||
| 70 | 56 | has 'bulk_helper_class' => ( is => 'rw' ); | |||||||||||||||||||
| 71 | 56 | has 'scroll_helper_class' => ( is => 'rw' ); | |||||||||||||||||||
| 72 | 56 | has '_bulk_class' => ( is => 'lazy' ); | |||||||||||||||||||
| 73 | 56 | has '_scroll_class' => ( is => 'lazy' ); | |||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | #=================================== | ||||||||||||||||||||
| 76 | sub _build__bulk_class { | ||||||||||||||||||||
| 77 | #=================================== | ||||||||||||||||||||
| 78 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
_build__bulk_class: not called CC=2 SCAR=17.9
| |||||||||||||||||||||
| 79 | 0 | ▶ | my $bulk_class = $self->bulk_helper_class | ||||||||||||||||||
|
Condition0%0/2
$self->bulk_helper_class || 'Core::' . $self->api_version . '::Helper::Bulk'
MC/DC0%0/1
$self->bulk_helper_class || 'Core::' . $self->api_version . '::Helper::Bulk'
$self->bulk_helper_class
Truth table0%0/2
A
A= $self->bulk_helper_class
| |||||||||||||||||||||
| 80 | || 'Core::' . $self->api_version . '::Helper::Bulk'; | ||||||||||||||||||||
| 81 | 0 | $self->_build_helper( 'bulk', $bulk_class ); | |||||||||||||||||||
| 82 | } | ||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | #=================================== | ||||||||||||||||||||
| 85 | sub _build__scroll_class { | ||||||||||||||||||||
| 86 | #=================================== | ||||||||||||||||||||
| 87 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
_build__scroll_class: not called CC=2 SCAR=17.9
| |||||||||||||||||||||
| 88 | 0 | ▶ | my $scroll_class = $self->scroll_helper_class | ||||||||||||||||||
|
Condition0%0/2
$self->scroll_helper_class || 'Core::' . $self->api_version . '::Helper::Scroll'
MC/DC0%0/1
$self->scroll_helper_class || 'Core::' . $self->api_version . '::Helper::Scroll'
$self->scroll_helper_class
Truth table0%0/2
A
A= $self->scroll_helper_class
| |||||||||||||||||||||
| 89 | || 'Core::' . $self->api_version . '::Helper::Scroll'; | ||||||||||||||||||||
| 90 | 0 | $self->_build_helper( 'scroll', $scroll_class ); | |||||||||||||||||||
| 91 | } | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | #=================================== | ||||||||||||||||||||
| 94 | sub bulk_helper { | ||||||||||||||||||||
| 95 | #=================================== | ||||||||||||||||||||
| 96 | 0 | ▶ | my ( $self, $params ) = parse_params(@_); | ||||||||||||||||||
|
Subroutine
bulk_helper: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 97 | 0 | ▶ | $params->{os} ||= $self; | ||||||||||||||||||
|
Condition0%0/3
$params->{"os"} ||= $self
MC/DC0%0/2
$params->{"os"} ||= $self
$params->{"os"}
$self
Truth table0%0/3
A ||= B
A= $params->{"os"}B= $self
| |||||||||||||||||||||
| 98 | 0 | $self->_bulk_class->new($params); | |||||||||||||||||||
| 99 | } | ||||||||||||||||||||
| 100 | |||||||||||||||||||||
| 101 | #=================================== | ||||||||||||||||||||
| 102 | sub scroll_helper { | ||||||||||||||||||||
| 103 | #=================================== | ||||||||||||||||||||
| 104 | 0 | ▶ | my ( $self, $params ) = parse_params(@_); | ||||||||||||||||||
|
Subroutine
scroll_helper: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 105 | 0 | ▶ | $params->{os} ||= $self; | ||||||||||||||||||
|
Condition0%0/3
$params->{"os"} ||= $self
MC/DC0%0/2
$params->{"os"} ||= $self
$params->{"os"}
$self
Truth table0%0/3
A ||= B
A= $params->{"os"}B= $self
| |||||||||||||||||||||
| 106 | 0 | $self->_scroll_class->new($params); | |||||||||||||||||||
| 107 | } | ||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | 0 | ▶ | sub _build_asynchronous_search { shift->_build_namespace('AsyncSearch') } | ||||||||||||||||||
|
Subroutine
_build_asynchronous_search: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 111 | 0 | ▶ | sub _build_cat { shift->_build_namespace('Cat') } | ||||||||||||||||||
|
Subroutine
_build_cat: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 112 | 0 | ▶ | sub _build_cluster { shift->_build_namespace('Cluster') } | ||||||||||||||||||
|
Subroutine
_build_cluster: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 113 | 0 | ▶ | sub _build_dangling_indices { shift->_build_namespace('DanglingIndices') } | ||||||||||||||||||
|
Subroutine
_build_dangling_indices: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 114 | 0 | ▶ | sub _build_flow_framework { shift->_build_namespace('FlowFramework') } | ||||||||||||||||||
|
Subroutine
_build_flow_framework: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 115 | 0 | ▶ | sub _build_geospatial { shift->_build_namespace('GeoSpatial') } | ||||||||||||||||||
|
Subroutine
_build_geospatial: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 116 | 0 | ▶ | sub _build_indices { shift->_build_namespace('Indices') } | ||||||||||||||||||
|
Subroutine
_build_indices: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 117 | 0 | ▶ | sub _build_ingest { shift->_build_namespace('Ingest') } | ||||||||||||||||||
|
Subroutine
_build_ingest: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 118 | 0 | ▶ | sub _build_ingestion { shift->_build_namespace('Ingestion') } | ||||||||||||||||||
|
Subroutine
_build_ingestion: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 119 | 0 | ▶ | sub _build_insights { shift->_build_namespace('Insights') } | ||||||||||||||||||
|
Subroutine
_build_insights: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 120 | 0 | ▶ | sub _build_ism { shift->_build_namespace('ISM') } | ||||||||||||||||||
|
Subroutine
_build_ism: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 121 | 0 | ▶ | sub _build_knn { shift->_build_namespace('KNN') } | ||||||||||||||||||
|
Subroutine
_build_knn: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 122 | 0 | ▶ | sub _build_list { shift->_build_namespace('List') } | ||||||||||||||||||
|
Subroutine
_build_list: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 123 | 0 | ▶ | sub _build_ltr { shift->_build_namespace('LTR') } | ||||||||||||||||||
|
Subroutine
_build_ltr: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 124 | 0 | ▶ | sub _build_ml { shift->_build_namespace('ML') } | ||||||||||||||||||
|
Subroutine
_build_ml: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 125 | 0 | ▶ | sub _build_neural { shift->_build_namespace('Neural') } | ||||||||||||||||||
|
Subroutine
_build_neural: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 126 | 0 | ▶ | sub _build_nodes { shift->_build_namespace('Nodes') } | ||||||||||||||||||
|
Subroutine
_build_nodes: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 127 | 0 | ▶ | sub _build_notifications { shift->_build_namespace('Notifications') } | ||||||||||||||||||
|
Subroutine
_build_notifications: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 128 | 0 | ▶ | sub _build_observability { shift->_build_namespace('Observability') } | ||||||||||||||||||
|
Subroutine
_build_observability: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 129 | 0 | ▶ | sub _build_ppl { shift->_build_namespace('PPL') } | ||||||||||||||||||
|
Subroutine
_build_ppl: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 130 | 0 | ▶ | sub _build_query { shift->_build_namespace('Query') } | ||||||||||||||||||
|
Subroutine
_build_query: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 131 | 0 | ▶ | sub _build_remote_store { shift->_build_namespace('RemoteStore') } | ||||||||||||||||||
|
Subroutine
_build_remote_store: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 132 | 0 | ▶ | sub _build_replication { shift->_build_namespace('Replication') } | ||||||||||||||||||
|
Subroutine
_build_replication: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 133 | 0 | ▶ | sub _build_rollups { shift->_build_namespace('Rollups') } | ||||||||||||||||||
|
Subroutine
_build_rollups: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 134 | 0 | ▶ | sub _build_search_pipeline { shift->_build_namespace('SearchPipeline') } | ||||||||||||||||||
|
Subroutine
_build_search_pipeline: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 135 | 0 | ▶ | sub _build_search_relevance { shift->_build_namespace('SearchRelevance') } | ||||||||||||||||||
|
Subroutine
_build_search_relevance: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 136 | 0 | ▶ | sub _build_security { shift->_build_namespace('Security') } | ||||||||||||||||||
|
Subroutine
_build_security: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 137 | 0 | ▶ | sub _build_security_analytics { shift->_build_namespace('SecurityAnalytics') } | ||||||||||||||||||
|
Subroutine
_build_security_analytics: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 138 | 0 | ▶ | sub _build_sm { shift->_build_namespace('SnapshotManagement') } | ||||||||||||||||||
|
Subroutine
_build_sm: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 139 | 0 | ▶ | sub _build_snapshot { shift->_build_namespace('Snapshot') } | ||||||||||||||||||
|
Subroutine
_build_snapshot: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 140 | 0 | ▶ | sub _build_sql { shift->_build_namespace('SQL') } | ||||||||||||||||||
|
Subroutine
_build_sql: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 141 | 0 | ▶ | sub _build_tasks { shift->_build_namespace('Tasks') } | ||||||||||||||||||
|
Subroutine
_build_tasks: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 142 | 0 | ▶ | sub _build_transforms { shift->_build_namespace('Transforms') } | ||||||||||||||||||
|
Subroutine
_build_transforms: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 143 | 0 | ▶ | sub _build_ubi { shift->_build_namespace('UBI') } | ||||||||||||||||||
|
Subroutine
_build_ubi: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 144 | 0 | ▶ | sub _build_wlm { shift->_build_namespace('WLM') } | ||||||||||||||||||
|
Subroutine
_build_wlm: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 145 | |||||||||||||||||||||
| 146 | 56 | __PACKAGE__->_install_api('_core'); | |||||||||||||||||||
| 147 | |||||||||||||||||||||
| 148 | 56 | 1; | |||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | __END__ | ||||||||||||||||||||