API generation
This commit is contained in:
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', typedKeys: 'typed_keys', keepOnCompletion: 'keep_on_completion', batchedReduceSize: 'batched_reduce_size', requestCache: 'request_cache', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', seqNoPrimaryTerm: 'seq_no_primary_term', maxConcurrentShardRequests: 'max_concurrent_shard_requests' }
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', typedKeys: 'typed_keys', keepOnCompletion: 'keep_on_completion', batchedReduceSize: 'batched_reduce_size', requestCache: 'request_cache', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', seqNoPrimaryTerm: 'seq_no_primary_term', maxConcurrentShardRequests: 'max_concurrent_shard_requests' }
|
||||
|
||||
function AsyncSearchApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
|
||||
@ -1,158 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildAsyncSearchSubmit (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'wait_for_completion_timeout',
|
||||
'keep_on_completion',
|
||||
'keep_alive',
|
||||
'batched_reduce_size',
|
||||
'request_cache',
|
||||
'analyzer',
|
||||
'analyze_wildcard',
|
||||
'default_operator',
|
||||
'df',
|
||||
'explain',
|
||||
'stored_fields',
|
||||
'docvalue_fields',
|
||||
'from',
|
||||
'ignore_unavailable',
|
||||
'ignore_throttled',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'lenient',
|
||||
'preference',
|
||||
'q',
|
||||
'routing',
|
||||
'search_type',
|
||||
'size',
|
||||
'sort',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'terminate_after',
|
||||
'stats',
|
||||
'suggest_field',
|
||||
'suggest_mode',
|
||||
'suggest_size',
|
||||
'suggest_text',
|
||||
'timeout',
|
||||
'track_scores',
|
||||
'track_total_hits',
|
||||
'allow_partial_search_results',
|
||||
'typed_keys',
|
||||
'version',
|
||||
'seq_no_primary_term',
|
||||
'max_concurrent_shard_requests'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
waitForCompletionTimeout: 'wait_for_completion_timeout',
|
||||
keepOnCompletion: 'keep_on_completion',
|
||||
keepAlive: 'keep_alive',
|
||||
batchedReduceSize: 'batched_reduce_size',
|
||||
requestCache: 'request_cache',
|
||||
analyzeWildcard: 'analyze_wildcard',
|
||||
defaultOperator: 'default_operator',
|
||||
storedFields: 'stored_fields',
|
||||
docvalueFields: 'docvalue_fields',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
ignoreThrottled: 'ignore_throttled',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
searchType: 'search_type',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
terminateAfter: 'terminate_after',
|
||||
suggestField: 'suggest_field',
|
||||
suggestMode: 'suggest_mode',
|
||||
suggestSize: 'suggest_size',
|
||||
suggestText: 'suggest_text',
|
||||
trackScores: 'track_scores',
|
||||
trackTotalHits: 'track_total_hits',
|
||||
allowPartialSearchResults: 'allow_partial_search_results',
|
||||
typedKeys: 'typed_keys',
|
||||
seqNoPrimaryTerm: 'seq_no_primary_term',
|
||||
maxConcurrentShardRequests: 'max_concurrent_shard_requests'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a async_search.submit request
|
||||
* Executes a search request asynchronously.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
|
||||
*/
|
||||
return function asyncSearchSubmit (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_async_search'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_async_search'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildAsyncSearchSubmit
|
||||
@ -23,36 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_includes', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'wait_for_active_shards',
|
||||
'refresh',
|
||||
'routing',
|
||||
'timeout',
|
||||
'type',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'pipeline',
|
||||
'require_alias',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
requireAlias: 'require_alias',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
=======
|
||||
function bulkApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -60,7 +33,6 @@ function bulkApi (params, options, callback) {
|
||||
if (params['body'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'full_id', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'node_id', 'actions', 'parent_task', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from', 'size']
|
||||
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'full_id', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'node_id', 'actions', 'parent_task', 'size', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from']
|
||||
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', fullId: 'full_id', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', nodeId: 'node_id', parentTask: 'parent_task', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs' }
|
||||
|
||||
function CatApi (transport, ConfigurationError) {
|
||||
|
||||
@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildCatNodes (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'bytes',
|
||||
'format',
|
||||
'full_id',
|
||||
'local',
|
||||
'master_timeout',
|
||||
'h',
|
||||
'help',
|
||||
's',
|
||||
'time',
|
||||
'v',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
fullId: 'full_id',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a cat.nodes request
|
||||
* Returns basic statistics about performance of cluster nodes.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
|
||||
*/
|
||||
return function catNodes (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'nodes'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildCatNodes
|
||||
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildCatThreadPool (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'format',
|
||||
'size',
|
||||
'local',
|
||||
'master_timeout',
|
||||
'h',
|
||||
'help',
|
||||
's',
|
||||
'v',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a cat.thread_pool request
|
||||
* Returns cluster-wide thread pool statistics per node.
|
||||
By default the active, queue and rejected statistics are returned for all thread pools.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
|
||||
*/
|
||||
return function catThreadPool (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((thread_pool_patterns || threadPoolPatterns) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'thread_pool'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildCatThreadPool
|
||||
@ -44,58 +44,7 @@ function closePointInTimeApi (params, options, callback) {
|
||||
querystring
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Perform a close_point_in_time request
|
||||
* Close a point in time
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time.html
|
||||
*/
|
||||
return function closePointInTime (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_pit'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
=======
|
||||
return this.transport.request(request, options, callback)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
module.exports = closePointInTimeApi
|
||||
|
||||
@ -29,11 +29,20 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'i
|
||||
function countApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_count'
|
||||
} else {
|
||||
@ -41,76 +50,12 @@ function countApi (params, options, callback) {
|
||||
path = '/' + '_count'
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Perform a count request
|
||||
* Returns number of documents matching a query.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
|
||||
*/
|
||||
return function count (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_count'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_count'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
=======
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
|
||||
@ -23,130 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'analyzer',
|
||||
'analyze_wildcard',
|
||||
'default_operator',
|
||||
'df',
|
||||
'from',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'conflicts',
|
||||
'expand_wildcards',
|
||||
'lenient',
|
||||
'preference',
|
||||
'q',
|
||||
'routing',
|
||||
'scroll',
|
||||
'search_type',
|
||||
'search_timeout',
|
||||
'size',
|
||||
'max_docs',
|
||||
'sort',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'terminate_after',
|
||||
'stats',
|
||||
'version',
|
||||
'request_cache',
|
||||
'refresh',
|
||||
'timeout',
|
||||
'wait_for_active_shards',
|
||||
'scroll_size',
|
||||
'wait_for_completion',
|
||||
'requests_per_second',
|
||||
'slices',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
analyzeWildcard: 'analyze_wildcard',
|
||||
defaultOperator: 'default_operator',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
searchType: 'search_type',
|
||||
searchTimeout: 'search_timeout',
|
||||
maxDocs: 'max_docs',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
terminateAfter: 'terminate_after',
|
||||
requestCache: 'request_cache',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
scrollSize: 'scroll_size',
|
||||
waitForCompletion: 'wait_for_completion',
|
||||
requestsPerSecond: 'requests_per_second',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a delete_by_query request
|
||||
* Deletes documents matching the provided query.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
|
||||
*/
|
||||
return function deleteByQuery (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
|
||||
}
|
||||
=======
|
||||
function deleteByQueryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -160,13 +39,23 @@ function deleteByQueryApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -23,89 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'stored_fields',
|
||||
'preference',
|
||||
'realtime',
|
||||
'refresh',
|
||||
'routing',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'version',
|
||||
'version_type',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
storedFields: 'stored_fields',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
versionType: 'version_type',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a exists request
|
||||
* Returns information about whether a document exists in an index.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||
*/
|
||||
return function exists (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
=======
|
||||
function existsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -119,13 +39,17 @@ function existsApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -23,34 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'preference',
|
||||
'realtime',
|
||||
'refresh',
|
||||
'routing',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'version',
|
||||
'version_type',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
versionType: 'version_type',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
=======
|
||||
function existsSourceApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -62,7 +37,6 @@ function existsSourceApi (params, options, callback) {
|
||||
if (params['index'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
|
||||
@ -23,92 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'analyze_wildcard',
|
||||
'analyzer',
|
||||
'default_operator',
|
||||
'df',
|
||||
'stored_fields',
|
||||
'lenient',
|
||||
'preference',
|
||||
'q',
|
||||
'routing',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
analyzeWildcard: 'analyze_wildcard',
|
||||
defaultOperator: 'default_operator',
|
||||
storedFields: 'stored_fields',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a explain request
|
||||
* Returns information about why a specific matches (or doesn't match) a query.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
|
||||
*/
|
||||
return function explain (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
=======
|
||||
function explainApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -122,13 +39,17 @@ function explainApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -23,89 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'stored_fields',
|
||||
'preference',
|
||||
'realtime',
|
||||
'refresh',
|
||||
'routing',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'version',
|
||||
'version_type',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
storedFields: 'stored_fields',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
versionType: 'version_type',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a get request
|
||||
* Returns a document.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||
*/
|
||||
return function get (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
=======
|
||||
function getApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -119,13 +39,17 @@ function getApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -23,87 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'preference',
|
||||
'realtime',
|
||||
'refresh',
|
||||
'routing',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'version',
|
||||
'version_type',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
versionType: 'version_type',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a get_source request
|
||||
* Returns the source of a document.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||
*/
|
||||
return function getSource (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
=======
|
||||
function getSourceApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -117,13 +39,17 @@ function getSourceApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -1,105 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildGraphExplore (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'routing',
|
||||
'timeout'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a graph.explore request
|
||||
* Explore extracted and summarized information about the documents and terms in an index.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
|
||||
*/
|
||||
return function graphExplore (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildGraphExplore
|
||||
@ -40,12 +40,23 @@ GraphApi.prototype.explore = function graphExploreApi (params, options, callback
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -39,73 +39,19 @@ function indexApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Perform a index request
|
||||
* Creates or updates a document in an index.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
||||
*/
|
||||
return function _index (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type)
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc'
|
||||
}
|
||||
=======
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null && (id) != null) {
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type)
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc'
|
||||
|
||||
@ -1,105 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesCreate (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'wait_for_active_shards',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.create request
|
||||
* Creates an index with optional settings and mappings.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
|
||||
*/
|
||||
return function indicesCreate (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesCreate
|
||||
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesFlushSynced (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.flush_synced request
|
||||
* Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html
|
||||
*/
|
||||
return function indicesFlushSynced (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesFlushSynced
|
||||
@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesGet (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'local',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'flat_settings',
|
||||
'include_defaults',
|
||||
'master_timeout',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
flatSettings: 'flat_settings',
|
||||
includeDefaults: 'include_defaults',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.get request
|
||||
* Returns information about one or more indices.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
|
||||
*/
|
||||
return function indicesGet (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesGet
|
||||
@ -1,120 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesGetFieldMapping (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'include_defaults',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'local',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
includeDefaults: 'include_defaults',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.get_field_mapping request
|
||||
* Returns mapping for one or more fields.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
|
||||
*/
|
||||
return function indicesGetFieldMapping (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['fields'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: fields')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, fields, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else if ((index) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else if ((type) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesGetFieldMapping
|
||||
@ -1,114 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesGetMapping (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'master_timeout',
|
||||
'local',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.get_mapping request
|
||||
* Returns mappings for one or more indices.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
||||
*/
|
||||
return function indicesGetMapping (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
} else if ((type) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesGetMapping
|
||||
@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesGetTemplate (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'flat_settings',
|
||||
'master_timeout',
|
||||
'local',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
flatSettings: 'flat_settings',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.get_template request
|
||||
* Returns an index template.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
||||
*/
|
||||
return function indicesGetTemplate (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_template'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesGetTemplate
|
||||
@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesGetUpgrade (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.get_upgrade request
|
||||
* The _upgrade API is no longer useful and will be removed.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
|
||||
*/
|
||||
return function indicesGetUpgrade (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_upgrade'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesGetUpgrade
|
||||
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'index', 'fielddata', 'fields', 'query', 'request', 'wait_for_active_shards', 'local', 'flat_settings', 'include_defaults', 'force', 'wait_if_ongoing', 'flush', 'max_num_segments', 'only_expunge_deletes', 'create', 'cause', 'write_index_only', 'preserve_existing', 'order', 'detailed', 'active_only', 'dry_run', 'verbose', 'status', 'completion_fields', 'fielddata_fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments', 'forbid_closed_indices', 'wait_for_completion', 'only_ancient_segments', 'explain', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', waitIfOngoing: 'wait_if_ongoing', maxNumSegments: 'max_num_segments', onlyExpungeDeletes: 'only_expunge_deletes', writeIndexOnly: 'write_index_only', preserveExisting: 'preserve_existing', activeOnly: 'active_only', dryRun: 'dry_run', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments', forbidClosedIndices: 'forbid_closed_indices', waitForCompletion: 'wait_for_completion', onlyAncientSegments: 'only_ancient_segments', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', allShards: 'all_shards' }
|
||||
const acceptedQuerystring = ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'index', 'fielddata', 'fields', 'query', 'request', 'wait_for_active_shards', 'include_type_name', 'local', 'flat_settings', 'include_defaults', 'force', 'wait_if_ongoing', 'flush', 'max_num_segments', 'only_expunge_deletes', 'create', 'cause', 'write_index_only', 'preserve_existing', 'order', 'detailed', 'active_only', 'dry_run', 'verbose', 'status', 'copy_settings', 'completion_fields', 'fielddata_fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments', 'forbid_closed_indices', 'wait_for_completion', 'only_ancient_segments', 'explain', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards', includeTypeName: 'include_type_name', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', waitIfOngoing: 'wait_if_ongoing', maxNumSegments: 'max_num_segments', onlyExpungeDeletes: 'only_expunge_deletes', writeIndexOnly: 'write_index_only', preserveExisting: 'preserve_existing', activeOnly: 'active_only', dryRun: 'dry_run', copySettings: 'copy_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments', forbidClosedIndices: 'forbid_closed_indices', waitForCompletion: 'wait_for_completion', onlyAncientSegments: 'only_ancient_segments', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', allShards: 'all_shards' }
|
||||
|
||||
function IndicesApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -510,6 +510,27 @@ IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IndicesApi.prototype.flushSynced = function indicesFlushSyncedApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -604,13 +625,19 @@ IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (param
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, fields, index, ...querystring } = params
|
||||
var { method, body, fields, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null && (fields) != null) {
|
||||
if ((index) != null && (type) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else if ((index) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else if ((type) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
@ -656,13 +683,19 @@ IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi (par
|
||||
IndicesApi.prototype.getMapping = function indicesGetMappingApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
} else if ((type) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping'
|
||||
@ -744,8 +777,13 @@ IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi (params, options
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_upgrade'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -862,21 +900,40 @@ IndicesApi.prototype.putMapping = function indicesPutMappingApi (params, options
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings'
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
} else if ((type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_mappings' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mappings'
|
||||
} else {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -1314,8 +1371,13 @@ IndicesApi.prototype.upgrade = function indicesUpgradeApi (params, options, call
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_upgrade'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -1560,6 +1622,7 @@ Object.defineProperties(IndicesApi.prototype, {
|
||||
exists_index_template: { get () { return this.existsIndexTemplate } },
|
||||
exists_template: { get () { return this.existsTemplate } },
|
||||
exists_type: { get () { return this.existsType } },
|
||||
flush_synced: { get () { return this.flushSynced } },
|
||||
get_alias: { get () { return this.getAlias } },
|
||||
get_field_mapping: { get () { return this.getFieldMapping } },
|
||||
get_index_template: { get () { return this.getIndexTemplate } },
|
||||
|
||||
@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesPutMapping (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'write_index_only',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
masterTimeout: 'master_timeout',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
writeIndexOnly: 'write_index_only',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.put_mapping request
|
||||
* Updates the index mappings.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
|
||||
*/
|
||||
return function indicesPutMapping (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings'
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
} else if ((type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_mappings' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mappings'
|
||||
} else {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesPutMapping
|
||||
@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesPutTemplate (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'order',
|
||||
'create',
|
||||
'master_timeout',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.put_template request
|
||||
* Creates or updates an index template.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
||||
*/
|
||||
return function indicesPutTemplate (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesPutTemplate
|
||||
@ -1,119 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesRollover (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'timeout',
|
||||
'dry_run',
|
||||
'master_timeout',
|
||||
'wait_for_active_shards',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
dryRun: 'dry_run',
|
||||
masterTimeout: 'master_timeout',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.rollover request
|
||||
* Updates an alias to point to a new index when the existing index
|
||||
is considered to be too large or too old.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
|
||||
*/
|
||||
return function indicesRollover (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['alias'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: alias')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['new_index'] != null || params['newIndex'] != null) && (params['alias'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: alias')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, alias, newIndex, new_index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((alias) != null && (new_index || newIndex) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(alias) + '/' + '_rollover' + '/' + encodeURIComponent(new_index || newIndex)
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(alias) + '/' + '_rollover'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesRollover
|
||||
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesShrink (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'copy_settings',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'wait_for_active_shards',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
copySettings: 'copy_settings',
|
||||
masterTimeout: 'master_timeout',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.shrink request
|
||||
* Allow to shrink an existing index into a new index with fewer primary shards.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
|
||||
*/
|
||||
return function indicesShrink (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['target'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: target')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['target'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, target, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesShrink
|
||||
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesSplit (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'copy_settings',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'wait_for_active_shards',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
copySettings: 'copy_settings',
|
||||
masterTimeout: 'master_timeout',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.split request
|
||||
* Allows you to split an existing index into a new index with more primary shards.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
|
||||
*/
|
||||
return function indicesSplit (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['target'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: target')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['target'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, target, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesSplit
|
||||
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesUpgrade (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'ignore_unavailable',
|
||||
'wait_for_completion',
|
||||
'only_ancient_segments',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
waitForCompletion: 'wait_for_completion',
|
||||
onlyAncientSegments: 'only_ancient_segments',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a indices.upgrade request
|
||||
* The _upgrade API is no longer useful and will be removed.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
|
||||
*/
|
||||
return function indicesUpgrade (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_upgrade'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesUpgrade
|
||||
@ -23,33 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'stored_fields',
|
||||
'preference',
|
||||
'realtime',
|
||||
'refresh',
|
||||
'routing',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
storedFields: 'stored_fields',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
=======
|
||||
function mgetApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -57,70 +33,28 @@ function mgetApi (params, options, callback) {
|
||||
if (params['body'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
<<<<<<< HEAD
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mget'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_mget'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
=======
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mget'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_mget'
|
||||
}
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -35,67 +35,26 @@ function msearchApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
<<<<<<< HEAD
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_msearch'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_msearch'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
bulkBody: body,
|
||||
querystring
|
||||
}
|
||||
=======
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_msearch'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_msearch'
|
||||
}
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -35,67 +35,26 @@ function msearchTemplateApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
<<<<<<< HEAD
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_msearch' + '/' + 'template'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_msearch' + '/' + 'template'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
bulkBody: body,
|
||||
querystring
|
||||
}
|
||||
=======
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_msearch' + '/' + 'template'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_msearch' + '/' + 'template'
|
||||
}
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -29,11 +29,20 @@ const snakeCase = { termStatistics: 'term_statistics', fieldStatistics: 'field_s
|
||||
function mtermvectorsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mtermvectors'
|
||||
} else {
|
||||
@ -41,76 +50,12 @@ function mtermvectorsApi (params, options, callback) {
|
||||
path = '/' + '_mtermvectors'
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Perform a mtermvectors request
|
||||
* Returns multiple termvectors in one request.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
|
||||
*/
|
||||
return function mtermvectors (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mtermvectors'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_mtermvectors'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
=======
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildNodesHotThreads (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'interval',
|
||||
'snapshots',
|
||||
'threads',
|
||||
'ignore_idle_threads',
|
||||
'type',
|
||||
'timeout',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
ignoreIdleThreads: 'ignore_idle_threads',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a nodes.hot_threads request
|
||||
* Returns information about hot threads on each node in the cluster.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
|
||||
*/
|
||||
return function nodesHotThreads (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, nodeId, node_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + 'hot_threads'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildNodesHotThreads
|
||||
@ -41,6 +41,15 @@ NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, ca
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + 'hot_threads'
|
||||
|
||||
@ -41,67 +41,12 @@ function openPointInTimeApi (params, options, callback) {
|
||||
path = '/' + '_pit'
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Perform a open_point_in_time request
|
||||
* Open a point in time that can be used in subsequent searches
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time.html
|
||||
*/
|
||||
return function openPointInTime (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_pit'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_pit'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
=======
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
|
||||
@ -22,167 +22,27 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
<<<<<<< HEAD
|
||||
function buildSearch (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'analyzer',
|
||||
'analyze_wildcard',
|
||||
'ccs_minimize_roundtrips',
|
||||
'default_operator',
|
||||
'df',
|
||||
'explain',
|
||||
'stored_fields',
|
||||
'docvalue_fields',
|
||||
'from',
|
||||
'ignore_unavailable',
|
||||
'ignore_throttled',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'lenient',
|
||||
'preference',
|
||||
'q',
|
||||
'routing',
|
||||
'scroll',
|
||||
'search_type',
|
||||
'size',
|
||||
'sort',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'terminate_after',
|
||||
'stats',
|
||||
'suggest_field',
|
||||
'suggest_mode',
|
||||
'suggest_size',
|
||||
'suggest_text',
|
||||
'timeout',
|
||||
'track_scores',
|
||||
'track_total_hits',
|
||||
'allow_partial_search_results',
|
||||
'typed_keys',
|
||||
'version',
|
||||
'seq_no_primary_term',
|
||||
'request_cache',
|
||||
'batched_reduce_size',
|
||||
'max_concurrent_shard_requests',
|
||||
'pre_filter_shard_size',
|
||||
'rest_total_hits_as_int',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
analyzeWildcard: 'analyze_wildcard',
|
||||
ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips',
|
||||
defaultOperator: 'default_operator',
|
||||
storedFields: 'stored_fields',
|
||||
docvalueFields: 'docvalue_fields',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
ignoreThrottled: 'ignore_throttled',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
searchType: 'search_type',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
terminateAfter: 'terminate_after',
|
||||
suggestField: 'suggest_field',
|
||||
suggestMode: 'suggest_mode',
|
||||
suggestSize: 'suggest_size',
|
||||
suggestText: 'suggest_text',
|
||||
trackScores: 'track_scores',
|
||||
trackTotalHits: 'track_total_hits',
|
||||
allowPartialSearchResults: 'allow_partial_search_results',
|
||||
typedKeys: 'typed_keys',
|
||||
seqNoPrimaryTerm: 'seq_no_primary_term',
|
||||
requestCache: 'request_cache',
|
||||
batchedReduceSize: 'batched_reduce_size',
|
||||
maxConcurrentShardRequests: 'max_concurrent_shard_requests',
|
||||
preFilterShardSize: 'pre_filter_shard_size',
|
||||
restTotalHitsAsInt: 'rest_total_hits_as_int',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a search request
|
||||
* Returns results matching a query.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
|
||||
*/
|
||||
return function search (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_search'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_search'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
=======
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function searchApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_search'
|
||||
} else {
|
||||
@ -196,7 +56,6 @@ function searchApi (params, options, callback) {
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
|
||||
@ -35,67 +35,26 @@ function searchTemplateApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
<<<<<<< HEAD
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_search' + '/' + 'template'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_search' + '/' + 'template'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
=======
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_search' + '/' + 'template'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_search' + '/' + 'template'
|
||||
}
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildSearchableSnapshotsClearCache (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'index'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a searchable_snapshots.clear_cache request
|
||||
* Clear the cache of searchable snapshots.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html
|
||||
*/
|
||||
return function searchableSnapshotsClearCache (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildSearchableSnapshotsClearCache
|
||||
@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildSearchableSnapshotsMount (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'master_timeout',
|
||||
'wait_for_completion'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
masterTimeout: 'master_timeout',
|
||||
waitForCompletion: 'wait_for_completion'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a searchable_snapshots.mount request
|
||||
* Mount a snapshot as a searchable index.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html
|
||||
*/
|
||||
return function searchableSnapshotsMount (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_mount'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildSearchableSnapshotsMount
|
||||
@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildSearchableSnapshotsRepositoryStats (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a searchable_snapshots.repository_stats request
|
||||
* DEPRECATED: This API is replaced by the Repositories Metering API.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html
|
||||
*/
|
||||
return function searchableSnapshotsRepositoryStats (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_stats'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildSearchableSnapshotsRepositoryStats
|
||||
@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildSearchableSnapshotsStats (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a searchable_snapshots.stats request
|
||||
* Retrieve various statistics about searchable snapshots.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html
|
||||
*/
|
||||
return function searchableSnapshotsStats (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'stats'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_searchable_snapshots' + '/' + 'stats'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildSearchableSnapshotsStats
|
||||
@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildSnapshotDelete (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'master_timeout',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a snapshot.delete request
|
||||
* Deletes a snapshot.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
||||
*/
|
||||
return function snapshotDelete (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildSnapshotDelete
|
||||
@ -35,64 +35,23 @@ function termvectorsApi (params, options, callback) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, id, ...querystring } = params
|
||||
var { method, body, index, id, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
<<<<<<< HEAD
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, id, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'
|
||||
} else if ((index) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_termvectors' + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_termvectors'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_termvectors'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
=======
|
||||
var path = ''
|
||||
if ((index) != null && (id) != null) {
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'
|
||||
} else if ((index) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_termvectors' + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_termvectors'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_termvectors'
|
||||
}
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -23,41 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_includes', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'wait_for_active_shards',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'lang',
|
||||
'refresh',
|
||||
'retry_on_conflict',
|
||||
'routing',
|
||||
'timeout',
|
||||
'if_seq_no',
|
||||
'if_primary_term',
|
||||
'require_alias',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
retryOnConflict: 'retry_on_conflict',
|
||||
ifSeqNo: 'if_seq_no',
|
||||
ifPrimaryTerm: 'if_primary_term',
|
||||
requireAlias: 'require_alias',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
=======
|
||||
function updateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -73,7 +41,6 @@ function updateApi (params, options, callback) {
|
||||
if (params['body'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
|
||||
@ -23,74 +23,9 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
<<<<<<< HEAD
|
||||
const acceptedQuerystring = [
|
||||
'analyzer',
|
||||
'analyze_wildcard',
|
||||
'default_operator',
|
||||
'df',
|
||||
'from',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'conflicts',
|
||||
'expand_wildcards',
|
||||
'lenient',
|
||||
'pipeline',
|
||||
'preference',
|
||||
'q',
|
||||
'routing',
|
||||
'scroll',
|
||||
'search_type',
|
||||
'search_timeout',
|
||||
'size',
|
||||
'max_docs',
|
||||
'sort',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_includes',
|
||||
'terminate_after',
|
||||
'stats',
|
||||
'version',
|
||||
'version_type',
|
||||
'request_cache',
|
||||
'refresh',
|
||||
'timeout',
|
||||
'wait_for_active_shards',
|
||||
'scroll_size',
|
||||
'wait_for_completion',
|
||||
'requests_per_second',
|
||||
'slices',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
'source',
|
||||
'filter_path'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
analyzeWildcard: 'analyze_wildcard',
|
||||
defaultOperator: 'default_operator',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
searchType: 'search_type',
|
||||
searchTimeout: 'search_timeout',
|
||||
maxDocs: 'max_docs',
|
||||
_sourceExcludes: '_source_excludes',
|
||||
_sourceIncludes: '_source_includes',
|
||||
terminateAfter: 'terminate_after',
|
||||
versionType: 'version_type',
|
||||
requestCache: 'request_cache',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
scrollSize: 'scroll_size',
|
||||
waitForCompletion: 'wait_for_completion',
|
||||
requestsPerSecond: 'requests_per_second',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
=======
|
||||
function updateByQueryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -98,66 +33,32 @@ function updateByQueryApi (params, options, callback) {
|
||||
if (params['index'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_update_by_query'
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_update_by_query'
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_update_by_query'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
=======
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
|
||||
650
api/index.js
650
api/index.js
@ -191,655 +191,6 @@ ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
||||
ESAPI.prototype.closePointInTime = closePointInTimeApi
|
||||
ESAPI.prototype.openPointInTime = openPointInTimeApi
|
||||
|
||||
<<<<<<< HEAD
|
||||
const apis = {
|
||||
async_search: {
|
||||
delete: lazyLoad('async_search.delete', opts),
|
||||
get: lazyLoad('async_search.get', opts),
|
||||
submit: lazyLoad('async_search.submit', opts)
|
||||
},
|
||||
asyncSearch: {
|
||||
delete: lazyLoad('async_search.delete', opts),
|
||||
get: lazyLoad('async_search.get', opts),
|
||||
submit: lazyLoad('async_search.submit', opts)
|
||||
},
|
||||
autoscaling: {
|
||||
delete_autoscaling_policy: lazyLoad('autoscaling.delete_autoscaling_policy', opts),
|
||||
deleteAutoscalingPolicy: lazyLoad('autoscaling.delete_autoscaling_policy', opts),
|
||||
get_autoscaling_decision: lazyLoad('autoscaling.get_autoscaling_decision', opts),
|
||||
getAutoscalingDecision: lazyLoad('autoscaling.get_autoscaling_decision', opts),
|
||||
get_autoscaling_policy: lazyLoad('autoscaling.get_autoscaling_policy', opts),
|
||||
getAutoscalingPolicy: lazyLoad('autoscaling.get_autoscaling_policy', opts),
|
||||
put_autoscaling_policy: lazyLoad('autoscaling.put_autoscaling_policy', opts),
|
||||
putAutoscalingPolicy: lazyLoad('autoscaling.put_autoscaling_policy', opts)
|
||||
},
|
||||
bulk: lazyLoad('bulk', opts),
|
||||
cat: {
|
||||
aliases: lazyLoad('cat.aliases', opts),
|
||||
allocation: lazyLoad('cat.allocation', opts),
|
||||
count: lazyLoad('cat.count', opts),
|
||||
fielddata: lazyLoad('cat.fielddata', opts),
|
||||
health: lazyLoad('cat.health', opts),
|
||||
help: lazyLoad('cat.help', opts),
|
||||
indices: lazyLoad('cat.indices', opts),
|
||||
master: lazyLoad('cat.master', opts),
|
||||
ml_data_frame_analytics: lazyLoad('cat.ml_data_frame_analytics', opts),
|
||||
mlDataFrameAnalytics: lazyLoad('cat.ml_data_frame_analytics', opts),
|
||||
ml_datafeeds: lazyLoad('cat.ml_datafeeds', opts),
|
||||
mlDatafeeds: lazyLoad('cat.ml_datafeeds', opts),
|
||||
ml_jobs: lazyLoad('cat.ml_jobs', opts),
|
||||
mlJobs: lazyLoad('cat.ml_jobs', opts),
|
||||
ml_trained_models: lazyLoad('cat.ml_trained_models', opts),
|
||||
mlTrainedModels: lazyLoad('cat.ml_trained_models', opts),
|
||||
nodeattrs: lazyLoad('cat.nodeattrs', opts),
|
||||
nodes: lazyLoad('cat.nodes', opts),
|
||||
pending_tasks: lazyLoad('cat.pending_tasks', opts),
|
||||
pendingTasks: lazyLoad('cat.pending_tasks', opts),
|
||||
plugins: lazyLoad('cat.plugins', opts),
|
||||
recovery: lazyLoad('cat.recovery', opts),
|
||||
repositories: lazyLoad('cat.repositories', opts),
|
||||
segments: lazyLoad('cat.segments', opts),
|
||||
shards: lazyLoad('cat.shards', opts),
|
||||
snapshots: lazyLoad('cat.snapshots', opts),
|
||||
tasks: lazyLoad('cat.tasks', opts),
|
||||
templates: lazyLoad('cat.templates', opts),
|
||||
thread_pool: lazyLoad('cat.thread_pool', opts),
|
||||
threadPool: lazyLoad('cat.thread_pool', opts),
|
||||
transforms: lazyLoad('cat.transforms', opts)
|
||||
},
|
||||
ccr: {
|
||||
delete_auto_follow_pattern: lazyLoad('ccr.delete_auto_follow_pattern', opts),
|
||||
deleteAutoFollowPattern: lazyLoad('ccr.delete_auto_follow_pattern', opts),
|
||||
follow: lazyLoad('ccr.follow', opts),
|
||||
follow_info: lazyLoad('ccr.follow_info', opts),
|
||||
followInfo: lazyLoad('ccr.follow_info', opts),
|
||||
follow_stats: lazyLoad('ccr.follow_stats', opts),
|
||||
followStats: lazyLoad('ccr.follow_stats', opts),
|
||||
forget_follower: lazyLoad('ccr.forget_follower', opts),
|
||||
forgetFollower: lazyLoad('ccr.forget_follower', opts),
|
||||
get_auto_follow_pattern: lazyLoad('ccr.get_auto_follow_pattern', opts),
|
||||
getAutoFollowPattern: lazyLoad('ccr.get_auto_follow_pattern', opts),
|
||||
pause_auto_follow_pattern: lazyLoad('ccr.pause_auto_follow_pattern', opts),
|
||||
pauseAutoFollowPattern: lazyLoad('ccr.pause_auto_follow_pattern', opts),
|
||||
pause_follow: lazyLoad('ccr.pause_follow', opts),
|
||||
pauseFollow: lazyLoad('ccr.pause_follow', opts),
|
||||
put_auto_follow_pattern: lazyLoad('ccr.put_auto_follow_pattern', opts),
|
||||
putAutoFollowPattern: lazyLoad('ccr.put_auto_follow_pattern', opts),
|
||||
resume_auto_follow_pattern: lazyLoad('ccr.resume_auto_follow_pattern', opts),
|
||||
resumeAutoFollowPattern: lazyLoad('ccr.resume_auto_follow_pattern', opts),
|
||||
resume_follow: lazyLoad('ccr.resume_follow', opts),
|
||||
resumeFollow: lazyLoad('ccr.resume_follow', opts),
|
||||
stats: lazyLoad('ccr.stats', opts),
|
||||
unfollow: lazyLoad('ccr.unfollow', opts)
|
||||
},
|
||||
clear_scroll: lazyLoad('clear_scroll', opts),
|
||||
clearScroll: lazyLoad('clear_scroll', opts),
|
||||
close_point_in_time: lazyLoad('close_point_in_time', opts),
|
||||
closePointInTime: lazyLoad('close_point_in_time', opts),
|
||||
cluster: {
|
||||
allocation_explain: lazyLoad('cluster.allocation_explain', opts),
|
||||
allocationExplain: lazyLoad('cluster.allocation_explain', opts),
|
||||
delete_component_template: lazyLoad('cluster.delete_component_template', opts),
|
||||
deleteComponentTemplate: lazyLoad('cluster.delete_component_template', opts),
|
||||
delete_voting_config_exclusions: lazyLoad('cluster.delete_voting_config_exclusions', opts),
|
||||
deleteVotingConfigExclusions: lazyLoad('cluster.delete_voting_config_exclusions', opts),
|
||||
exists_component_template: lazyLoad('cluster.exists_component_template', opts),
|
||||
existsComponentTemplate: lazyLoad('cluster.exists_component_template', opts),
|
||||
get_component_template: lazyLoad('cluster.get_component_template', opts),
|
||||
getComponentTemplate: lazyLoad('cluster.get_component_template', opts),
|
||||
get_settings: lazyLoad('cluster.get_settings', opts),
|
||||
getSettings: lazyLoad('cluster.get_settings', opts),
|
||||
health: lazyLoad('cluster.health', opts),
|
||||
pending_tasks: lazyLoad('cluster.pending_tasks', opts),
|
||||
pendingTasks: lazyLoad('cluster.pending_tasks', opts),
|
||||
post_voting_config_exclusions: lazyLoad('cluster.post_voting_config_exclusions', opts),
|
||||
postVotingConfigExclusions: lazyLoad('cluster.post_voting_config_exclusions', opts),
|
||||
put_component_template: lazyLoad('cluster.put_component_template', opts),
|
||||
putComponentTemplate: lazyLoad('cluster.put_component_template', opts),
|
||||
put_settings: lazyLoad('cluster.put_settings', opts),
|
||||
putSettings: lazyLoad('cluster.put_settings', opts),
|
||||
remote_info: lazyLoad('cluster.remote_info', opts),
|
||||
remoteInfo: lazyLoad('cluster.remote_info', opts),
|
||||
reroute: lazyLoad('cluster.reroute', opts),
|
||||
state: lazyLoad('cluster.state', opts),
|
||||
stats: lazyLoad('cluster.stats', opts)
|
||||
},
|
||||
count: lazyLoad('count', opts),
|
||||
create: lazyLoad('create', opts),
|
||||
dangling_indices: {
|
||||
delete_dangling_index: lazyLoad('dangling_indices.delete_dangling_index', opts),
|
||||
deleteDanglingIndex: lazyLoad('dangling_indices.delete_dangling_index', opts),
|
||||
import_dangling_index: lazyLoad('dangling_indices.import_dangling_index', opts),
|
||||
importDanglingIndex: lazyLoad('dangling_indices.import_dangling_index', opts),
|
||||
list_dangling_indices: lazyLoad('dangling_indices.list_dangling_indices', opts),
|
||||
listDanglingIndices: lazyLoad('dangling_indices.list_dangling_indices', opts)
|
||||
},
|
||||
danglingIndices: {
|
||||
delete_dangling_index: lazyLoad('dangling_indices.delete_dangling_index', opts),
|
||||
deleteDanglingIndex: lazyLoad('dangling_indices.delete_dangling_index', opts),
|
||||
import_dangling_index: lazyLoad('dangling_indices.import_dangling_index', opts),
|
||||
importDanglingIndex: lazyLoad('dangling_indices.import_dangling_index', opts),
|
||||
list_dangling_indices: lazyLoad('dangling_indices.list_dangling_indices', opts),
|
||||
listDanglingIndices: lazyLoad('dangling_indices.list_dangling_indices', opts)
|
||||
},
|
||||
delete: lazyLoad('delete', opts),
|
||||
delete_by_query: lazyLoad('delete_by_query', opts),
|
||||
deleteByQuery: lazyLoad('delete_by_query', opts),
|
||||
delete_by_query_rethrottle: lazyLoad('delete_by_query_rethrottle', opts),
|
||||
deleteByQueryRethrottle: lazyLoad('delete_by_query_rethrottle', opts),
|
||||
delete_script: lazyLoad('delete_script', opts),
|
||||
deleteScript: lazyLoad('delete_script', opts),
|
||||
enrich: {
|
||||
delete_policy: lazyLoad('enrich.delete_policy', opts),
|
||||
deletePolicy: lazyLoad('enrich.delete_policy', opts),
|
||||
execute_policy: lazyLoad('enrich.execute_policy', opts),
|
||||
executePolicy: lazyLoad('enrich.execute_policy', opts),
|
||||
get_policy: lazyLoad('enrich.get_policy', opts),
|
||||
getPolicy: lazyLoad('enrich.get_policy', opts),
|
||||
put_policy: lazyLoad('enrich.put_policy', opts),
|
||||
putPolicy: lazyLoad('enrich.put_policy', opts),
|
||||
stats: lazyLoad('enrich.stats', opts)
|
||||
},
|
||||
eql: {
|
||||
delete: lazyLoad('eql.delete', opts),
|
||||
get: lazyLoad('eql.get', opts),
|
||||
search: lazyLoad('eql.search', opts)
|
||||
},
|
||||
exists: lazyLoad('exists', opts),
|
||||
exists_source: lazyLoad('exists_source', opts),
|
||||
existsSource: lazyLoad('exists_source', opts),
|
||||
explain: lazyLoad('explain', opts),
|
||||
field_caps: lazyLoad('field_caps', opts),
|
||||
fieldCaps: lazyLoad('field_caps', opts),
|
||||
get: lazyLoad('get', opts),
|
||||
get_script: lazyLoad('get_script', opts),
|
||||
getScript: lazyLoad('get_script', opts),
|
||||
get_script_context: lazyLoad('get_script_context', opts),
|
||||
getScriptContext: lazyLoad('get_script_context', opts),
|
||||
get_script_languages: lazyLoad('get_script_languages', opts),
|
||||
getScriptLanguages: lazyLoad('get_script_languages', opts),
|
||||
get_source: lazyLoad('get_source', opts),
|
||||
getSource: lazyLoad('get_source', opts),
|
||||
graph: {
|
||||
explore: lazyLoad('graph.explore', opts)
|
||||
},
|
||||
ilm: {
|
||||
delete_lifecycle: lazyLoad('ilm.delete_lifecycle', opts),
|
||||
deleteLifecycle: lazyLoad('ilm.delete_lifecycle', opts),
|
||||
explain_lifecycle: lazyLoad('ilm.explain_lifecycle', opts),
|
||||
explainLifecycle: lazyLoad('ilm.explain_lifecycle', opts),
|
||||
get_lifecycle: lazyLoad('ilm.get_lifecycle', opts),
|
||||
getLifecycle: lazyLoad('ilm.get_lifecycle', opts),
|
||||
get_status: lazyLoad('ilm.get_status', opts),
|
||||
getStatus: lazyLoad('ilm.get_status', opts),
|
||||
move_to_step: lazyLoad('ilm.move_to_step', opts),
|
||||
moveToStep: lazyLoad('ilm.move_to_step', opts),
|
||||
put_lifecycle: lazyLoad('ilm.put_lifecycle', opts),
|
||||
putLifecycle: lazyLoad('ilm.put_lifecycle', opts),
|
||||
remove_policy: lazyLoad('ilm.remove_policy', opts),
|
||||
removePolicy: lazyLoad('ilm.remove_policy', opts),
|
||||
retry: lazyLoad('ilm.retry', opts),
|
||||
start: lazyLoad('ilm.start', opts),
|
||||
stop: lazyLoad('ilm.stop', opts)
|
||||
},
|
||||
index: lazyLoad('index', opts),
|
||||
indices: {
|
||||
add_block: lazyLoad('indices.add_block', opts),
|
||||
addBlock: lazyLoad('indices.add_block', opts),
|
||||
analyze: lazyLoad('indices.analyze', opts),
|
||||
clear_cache: lazyLoad('indices.clear_cache', opts),
|
||||
clearCache: lazyLoad('indices.clear_cache', opts),
|
||||
clone: lazyLoad('indices.clone', opts),
|
||||
close: lazyLoad('indices.close', opts),
|
||||
create: lazyLoad('indices.create', opts),
|
||||
create_data_stream: lazyLoad('indices.create_data_stream', opts),
|
||||
createDataStream: lazyLoad('indices.create_data_stream', opts),
|
||||
data_streams_stats: lazyLoad('indices.data_streams_stats', opts),
|
||||
dataStreamsStats: lazyLoad('indices.data_streams_stats', opts),
|
||||
delete: lazyLoad('indices.delete', opts),
|
||||
delete_alias: lazyLoad('indices.delete_alias', opts),
|
||||
deleteAlias: lazyLoad('indices.delete_alias', opts),
|
||||
delete_data_stream: lazyLoad('indices.delete_data_stream', opts),
|
||||
deleteDataStream: lazyLoad('indices.delete_data_stream', opts),
|
||||
delete_index_template: lazyLoad('indices.delete_index_template', opts),
|
||||
deleteIndexTemplate: lazyLoad('indices.delete_index_template', opts),
|
||||
delete_template: lazyLoad('indices.delete_template', opts),
|
||||
deleteTemplate: lazyLoad('indices.delete_template', opts),
|
||||
exists: lazyLoad('indices.exists', opts),
|
||||
exists_alias: lazyLoad('indices.exists_alias', opts),
|
||||
existsAlias: lazyLoad('indices.exists_alias', opts),
|
||||
exists_index_template: lazyLoad('indices.exists_index_template', opts),
|
||||
existsIndexTemplate: lazyLoad('indices.exists_index_template', opts),
|
||||
exists_template: lazyLoad('indices.exists_template', opts),
|
||||
existsTemplate: lazyLoad('indices.exists_template', opts),
|
||||
exists_type: lazyLoad('indices.exists_type', opts),
|
||||
existsType: lazyLoad('indices.exists_type', opts),
|
||||
flush: lazyLoad('indices.flush', opts),
|
||||
flush_synced: lazyLoad('indices.flush_synced', opts),
|
||||
flushSynced: lazyLoad('indices.flush_synced', opts),
|
||||
forcemerge: lazyLoad('indices.forcemerge', opts),
|
||||
freeze: lazyLoad('indices.freeze', opts),
|
||||
get: lazyLoad('indices.get', opts),
|
||||
get_alias: lazyLoad('indices.get_alias', opts),
|
||||
getAlias: lazyLoad('indices.get_alias', opts),
|
||||
get_data_stream: lazyLoad('indices.get_data_stream', opts),
|
||||
getDataStream: lazyLoad('indices.get_data_stream', opts),
|
||||
get_field_mapping: lazyLoad('indices.get_field_mapping', opts),
|
||||
getFieldMapping: lazyLoad('indices.get_field_mapping', opts),
|
||||
get_index_template: lazyLoad('indices.get_index_template', opts),
|
||||
getIndexTemplate: lazyLoad('indices.get_index_template', opts),
|
||||
get_mapping: lazyLoad('indices.get_mapping', opts),
|
||||
getMapping: lazyLoad('indices.get_mapping', opts),
|
||||
get_settings: lazyLoad('indices.get_settings', opts),
|
||||
getSettings: lazyLoad('indices.get_settings', opts),
|
||||
get_template: lazyLoad('indices.get_template', opts),
|
||||
getTemplate: lazyLoad('indices.get_template', opts),
|
||||
get_upgrade: lazyLoad('indices.get_upgrade', opts),
|
||||
getUpgrade: lazyLoad('indices.get_upgrade', opts),
|
||||
open: lazyLoad('indices.open', opts),
|
||||
put_alias: lazyLoad('indices.put_alias', opts),
|
||||
putAlias: lazyLoad('indices.put_alias', opts),
|
||||
put_index_template: lazyLoad('indices.put_index_template', opts),
|
||||
putIndexTemplate: lazyLoad('indices.put_index_template', opts),
|
||||
put_mapping: lazyLoad('indices.put_mapping', opts),
|
||||
putMapping: lazyLoad('indices.put_mapping', opts),
|
||||
put_settings: lazyLoad('indices.put_settings', opts),
|
||||
putSettings: lazyLoad('indices.put_settings', opts),
|
||||
put_template: lazyLoad('indices.put_template', opts),
|
||||
putTemplate: lazyLoad('indices.put_template', opts),
|
||||
recovery: lazyLoad('indices.recovery', opts),
|
||||
refresh: lazyLoad('indices.refresh', opts),
|
||||
reload_search_analyzers: lazyLoad('indices.reload_search_analyzers', opts),
|
||||
reloadSearchAnalyzers: lazyLoad('indices.reload_search_analyzers', opts),
|
||||
resolve_index: lazyLoad('indices.resolve_index', opts),
|
||||
resolveIndex: lazyLoad('indices.resolve_index', opts),
|
||||
rollover: lazyLoad('indices.rollover', opts),
|
||||
segments: lazyLoad('indices.segments', opts),
|
||||
shard_stores: lazyLoad('indices.shard_stores', opts),
|
||||
shardStores: lazyLoad('indices.shard_stores', opts),
|
||||
shrink: lazyLoad('indices.shrink', opts),
|
||||
simulate_index_template: lazyLoad('indices.simulate_index_template', opts),
|
||||
simulateIndexTemplate: lazyLoad('indices.simulate_index_template', opts),
|
||||
simulate_template: lazyLoad('indices.simulate_template', opts),
|
||||
simulateTemplate: lazyLoad('indices.simulate_template', opts),
|
||||
split: lazyLoad('indices.split', opts),
|
||||
stats: lazyLoad('indices.stats', opts),
|
||||
unfreeze: lazyLoad('indices.unfreeze', opts),
|
||||
update_aliases: lazyLoad('indices.update_aliases', opts),
|
||||
updateAliases: lazyLoad('indices.update_aliases', opts),
|
||||
upgrade: lazyLoad('indices.upgrade', opts),
|
||||
validate_query: lazyLoad('indices.validate_query', opts),
|
||||
validateQuery: lazyLoad('indices.validate_query', opts)
|
||||
},
|
||||
info: lazyLoad('info', opts),
|
||||
ingest: {
|
||||
delete_pipeline: lazyLoad('ingest.delete_pipeline', opts),
|
||||
deletePipeline: lazyLoad('ingest.delete_pipeline', opts),
|
||||
get_pipeline: lazyLoad('ingest.get_pipeline', opts),
|
||||
getPipeline: lazyLoad('ingest.get_pipeline', opts),
|
||||
processor_grok: lazyLoad('ingest.processor_grok', opts),
|
||||
processorGrok: lazyLoad('ingest.processor_grok', opts),
|
||||
put_pipeline: lazyLoad('ingest.put_pipeline', opts),
|
||||
putPipeline: lazyLoad('ingest.put_pipeline', opts),
|
||||
simulate: lazyLoad('ingest.simulate', opts)
|
||||
},
|
||||
license: {
|
||||
delete: lazyLoad('license.delete', opts),
|
||||
get: lazyLoad('license.get', opts),
|
||||
get_basic_status: lazyLoad('license.get_basic_status', opts),
|
||||
getBasicStatus: lazyLoad('license.get_basic_status', opts),
|
||||
get_trial_status: lazyLoad('license.get_trial_status', opts),
|
||||
getTrialStatus: lazyLoad('license.get_trial_status', opts),
|
||||
post: lazyLoad('license.post', opts),
|
||||
post_start_basic: lazyLoad('license.post_start_basic', opts),
|
||||
postStartBasic: lazyLoad('license.post_start_basic', opts),
|
||||
post_start_trial: lazyLoad('license.post_start_trial', opts),
|
||||
postStartTrial: lazyLoad('license.post_start_trial', opts)
|
||||
},
|
||||
mget: lazyLoad('mget', opts),
|
||||
migration: {
|
||||
deprecations: lazyLoad('migration.deprecations', opts)
|
||||
},
|
||||
ml: {
|
||||
close_job: lazyLoad('ml.close_job', opts),
|
||||
closeJob: lazyLoad('ml.close_job', opts),
|
||||
delete_calendar: lazyLoad('ml.delete_calendar', opts),
|
||||
deleteCalendar: lazyLoad('ml.delete_calendar', opts),
|
||||
delete_calendar_event: lazyLoad('ml.delete_calendar_event', opts),
|
||||
deleteCalendarEvent: lazyLoad('ml.delete_calendar_event', opts),
|
||||
delete_calendar_job: lazyLoad('ml.delete_calendar_job', opts),
|
||||
deleteCalendarJob: lazyLoad('ml.delete_calendar_job', opts),
|
||||
delete_data_frame_analytics: lazyLoad('ml.delete_data_frame_analytics', opts),
|
||||
deleteDataFrameAnalytics: lazyLoad('ml.delete_data_frame_analytics', opts),
|
||||
delete_datafeed: lazyLoad('ml.delete_datafeed', opts),
|
||||
deleteDatafeed: lazyLoad('ml.delete_datafeed', opts),
|
||||
delete_expired_data: lazyLoad('ml.delete_expired_data', opts),
|
||||
deleteExpiredData: lazyLoad('ml.delete_expired_data', opts),
|
||||
delete_filter: lazyLoad('ml.delete_filter', opts),
|
||||
deleteFilter: lazyLoad('ml.delete_filter', opts),
|
||||
delete_forecast: lazyLoad('ml.delete_forecast', opts),
|
||||
deleteForecast: lazyLoad('ml.delete_forecast', opts),
|
||||
delete_job: lazyLoad('ml.delete_job', opts),
|
||||
deleteJob: lazyLoad('ml.delete_job', opts),
|
||||
delete_model_snapshot: lazyLoad('ml.delete_model_snapshot', opts),
|
||||
deleteModelSnapshot: lazyLoad('ml.delete_model_snapshot', opts),
|
||||
delete_trained_model: lazyLoad('ml.delete_trained_model', opts),
|
||||
deleteTrainedModel: lazyLoad('ml.delete_trained_model', opts),
|
||||
estimate_model_memory: lazyLoad('ml.estimate_model_memory', opts),
|
||||
estimateModelMemory: lazyLoad('ml.estimate_model_memory', opts),
|
||||
evaluate_data_frame: lazyLoad('ml.evaluate_data_frame', opts),
|
||||
evaluateDataFrame: lazyLoad('ml.evaluate_data_frame', opts),
|
||||
explain_data_frame_analytics: lazyLoad('ml.explain_data_frame_analytics', opts),
|
||||
explainDataFrameAnalytics: lazyLoad('ml.explain_data_frame_analytics', opts),
|
||||
find_file_structure: lazyLoad('ml.find_file_structure', opts),
|
||||
findFileStructure: lazyLoad('ml.find_file_structure', opts),
|
||||
flush_job: lazyLoad('ml.flush_job', opts),
|
||||
flushJob: lazyLoad('ml.flush_job', opts),
|
||||
forecast: lazyLoad('ml.forecast', opts),
|
||||
get_buckets: lazyLoad('ml.get_buckets', opts),
|
||||
getBuckets: lazyLoad('ml.get_buckets', opts),
|
||||
get_calendar_events: lazyLoad('ml.get_calendar_events', opts),
|
||||
getCalendarEvents: lazyLoad('ml.get_calendar_events', opts),
|
||||
get_calendars: lazyLoad('ml.get_calendars', opts),
|
||||
getCalendars: lazyLoad('ml.get_calendars', opts),
|
||||
get_categories: lazyLoad('ml.get_categories', opts),
|
||||
getCategories: lazyLoad('ml.get_categories', opts),
|
||||
get_data_frame_analytics: lazyLoad('ml.get_data_frame_analytics', opts),
|
||||
getDataFrameAnalytics: lazyLoad('ml.get_data_frame_analytics', opts),
|
||||
get_data_frame_analytics_stats: lazyLoad('ml.get_data_frame_analytics_stats', opts),
|
||||
getDataFrameAnalyticsStats: lazyLoad('ml.get_data_frame_analytics_stats', opts),
|
||||
get_datafeed_stats: lazyLoad('ml.get_datafeed_stats', opts),
|
||||
getDatafeedStats: lazyLoad('ml.get_datafeed_stats', opts),
|
||||
get_datafeeds: lazyLoad('ml.get_datafeeds', opts),
|
||||
getDatafeeds: lazyLoad('ml.get_datafeeds', opts),
|
||||
get_filters: lazyLoad('ml.get_filters', opts),
|
||||
getFilters: lazyLoad('ml.get_filters', opts),
|
||||
get_influencers: lazyLoad('ml.get_influencers', opts),
|
||||
getInfluencers: lazyLoad('ml.get_influencers', opts),
|
||||
get_job_stats: lazyLoad('ml.get_job_stats', opts),
|
||||
getJobStats: lazyLoad('ml.get_job_stats', opts),
|
||||
get_jobs: lazyLoad('ml.get_jobs', opts),
|
||||
getJobs: lazyLoad('ml.get_jobs', opts),
|
||||
get_model_snapshots: lazyLoad('ml.get_model_snapshots', opts),
|
||||
getModelSnapshots: lazyLoad('ml.get_model_snapshots', opts),
|
||||
get_overall_buckets: lazyLoad('ml.get_overall_buckets', opts),
|
||||
getOverallBuckets: lazyLoad('ml.get_overall_buckets', opts),
|
||||
get_records: lazyLoad('ml.get_records', opts),
|
||||
getRecords: lazyLoad('ml.get_records', opts),
|
||||
get_trained_models: lazyLoad('ml.get_trained_models', opts),
|
||||
getTrainedModels: lazyLoad('ml.get_trained_models', opts),
|
||||
get_trained_models_stats: lazyLoad('ml.get_trained_models_stats', opts),
|
||||
getTrainedModelsStats: lazyLoad('ml.get_trained_models_stats', opts),
|
||||
info: lazyLoad('ml.info', opts),
|
||||
open_job: lazyLoad('ml.open_job', opts),
|
||||
openJob: lazyLoad('ml.open_job', opts),
|
||||
post_calendar_events: lazyLoad('ml.post_calendar_events', opts),
|
||||
postCalendarEvents: lazyLoad('ml.post_calendar_events', opts),
|
||||
post_data: lazyLoad('ml.post_data', opts),
|
||||
postData: lazyLoad('ml.post_data', opts),
|
||||
preview_datafeed: lazyLoad('ml.preview_datafeed', opts),
|
||||
previewDatafeed: lazyLoad('ml.preview_datafeed', opts),
|
||||
put_calendar: lazyLoad('ml.put_calendar', opts),
|
||||
putCalendar: lazyLoad('ml.put_calendar', opts),
|
||||
put_calendar_job: lazyLoad('ml.put_calendar_job', opts),
|
||||
putCalendarJob: lazyLoad('ml.put_calendar_job', opts),
|
||||
put_data_frame_analytics: lazyLoad('ml.put_data_frame_analytics', opts),
|
||||
putDataFrameAnalytics: lazyLoad('ml.put_data_frame_analytics', opts),
|
||||
put_datafeed: lazyLoad('ml.put_datafeed', opts),
|
||||
putDatafeed: lazyLoad('ml.put_datafeed', opts),
|
||||
put_filter: lazyLoad('ml.put_filter', opts),
|
||||
putFilter: lazyLoad('ml.put_filter', opts),
|
||||
put_job: lazyLoad('ml.put_job', opts),
|
||||
putJob: lazyLoad('ml.put_job', opts),
|
||||
put_trained_model: lazyLoad('ml.put_trained_model', opts),
|
||||
putTrainedModel: lazyLoad('ml.put_trained_model', opts),
|
||||
revert_model_snapshot: lazyLoad('ml.revert_model_snapshot', opts),
|
||||
revertModelSnapshot: lazyLoad('ml.revert_model_snapshot', opts),
|
||||
set_upgrade_mode: lazyLoad('ml.set_upgrade_mode', opts),
|
||||
setUpgradeMode: lazyLoad('ml.set_upgrade_mode', opts),
|
||||
start_data_frame_analytics: lazyLoad('ml.start_data_frame_analytics', opts),
|
||||
startDataFrameAnalytics: lazyLoad('ml.start_data_frame_analytics', opts),
|
||||
start_datafeed: lazyLoad('ml.start_datafeed', opts),
|
||||
startDatafeed: lazyLoad('ml.start_datafeed', opts),
|
||||
stop_data_frame_analytics: lazyLoad('ml.stop_data_frame_analytics', opts),
|
||||
stopDataFrameAnalytics: lazyLoad('ml.stop_data_frame_analytics', opts),
|
||||
stop_datafeed: lazyLoad('ml.stop_datafeed', opts),
|
||||
stopDatafeed: lazyLoad('ml.stop_datafeed', opts),
|
||||
update_data_frame_analytics: lazyLoad('ml.update_data_frame_analytics', opts),
|
||||
updateDataFrameAnalytics: lazyLoad('ml.update_data_frame_analytics', opts),
|
||||
update_datafeed: lazyLoad('ml.update_datafeed', opts),
|
||||
updateDatafeed: lazyLoad('ml.update_datafeed', opts),
|
||||
update_filter: lazyLoad('ml.update_filter', opts),
|
||||
updateFilter: lazyLoad('ml.update_filter', opts),
|
||||
update_job: lazyLoad('ml.update_job', opts),
|
||||
updateJob: lazyLoad('ml.update_job', opts),
|
||||
update_model_snapshot: lazyLoad('ml.update_model_snapshot', opts),
|
||||
updateModelSnapshot: lazyLoad('ml.update_model_snapshot', opts),
|
||||
validate: lazyLoad('ml.validate', opts),
|
||||
validate_detector: lazyLoad('ml.validate_detector', opts),
|
||||
validateDetector: lazyLoad('ml.validate_detector', opts)
|
||||
},
|
||||
monitoring: {
|
||||
bulk: lazyLoad('monitoring.bulk', opts)
|
||||
},
|
||||
msearch: lazyLoad('msearch', opts),
|
||||
msearch_template: lazyLoad('msearch_template', opts),
|
||||
msearchTemplate: lazyLoad('msearch_template', opts),
|
||||
mtermvectors: lazyLoad('mtermvectors', opts),
|
||||
nodes: {
|
||||
hot_threads: lazyLoad('nodes.hot_threads', opts),
|
||||
hotThreads: lazyLoad('nodes.hot_threads', opts),
|
||||
info: lazyLoad('nodes.info', opts),
|
||||
reload_secure_settings: lazyLoad('nodes.reload_secure_settings', opts),
|
||||
reloadSecureSettings: lazyLoad('nodes.reload_secure_settings', opts),
|
||||
stats: lazyLoad('nodes.stats', opts),
|
||||
usage: lazyLoad('nodes.usage', opts)
|
||||
},
|
||||
open_point_in_time: lazyLoad('open_point_in_time', opts),
|
||||
openPointInTime: lazyLoad('open_point_in_time', opts),
|
||||
ping: lazyLoad('ping', opts),
|
||||
put_script: lazyLoad('put_script', opts),
|
||||
putScript: lazyLoad('put_script', opts),
|
||||
rank_eval: lazyLoad('rank_eval', opts),
|
||||
rankEval: lazyLoad('rank_eval', opts),
|
||||
reindex: lazyLoad('reindex', opts),
|
||||
reindex_rethrottle: lazyLoad('reindex_rethrottle', opts),
|
||||
reindexRethrottle: lazyLoad('reindex_rethrottle', opts),
|
||||
render_search_template: lazyLoad('render_search_template', opts),
|
||||
renderSearchTemplate: lazyLoad('render_search_template', opts),
|
||||
rollup: {
|
||||
delete_job: lazyLoad('rollup.delete_job', opts),
|
||||
deleteJob: lazyLoad('rollup.delete_job', opts),
|
||||
get_jobs: lazyLoad('rollup.get_jobs', opts),
|
||||
getJobs: lazyLoad('rollup.get_jobs', opts),
|
||||
get_rollup_caps: lazyLoad('rollup.get_rollup_caps', opts),
|
||||
getRollupCaps: lazyLoad('rollup.get_rollup_caps', opts),
|
||||
get_rollup_index_caps: lazyLoad('rollup.get_rollup_index_caps', opts),
|
||||
getRollupIndexCaps: lazyLoad('rollup.get_rollup_index_caps', opts),
|
||||
put_job: lazyLoad('rollup.put_job', opts),
|
||||
putJob: lazyLoad('rollup.put_job', opts),
|
||||
rollup_search: lazyLoad('rollup.rollup_search', opts),
|
||||
rollupSearch: lazyLoad('rollup.rollup_search', opts),
|
||||
start_job: lazyLoad('rollup.start_job', opts),
|
||||
startJob: lazyLoad('rollup.start_job', opts),
|
||||
stop_job: lazyLoad('rollup.stop_job', opts),
|
||||
stopJob: lazyLoad('rollup.stop_job', opts)
|
||||
},
|
||||
scripts_painless_execute: lazyLoad('scripts_painless_execute', opts),
|
||||
scriptsPainlessExecute: lazyLoad('scripts_painless_execute', opts),
|
||||
scroll: lazyLoad('scroll', opts),
|
||||
search: lazyLoad('search', opts),
|
||||
search_shards: lazyLoad('search_shards', opts),
|
||||
searchShards: lazyLoad('search_shards', opts),
|
||||
search_template: lazyLoad('search_template', opts),
|
||||
searchTemplate: lazyLoad('search_template', opts),
|
||||
searchable_snapshots: {
|
||||
clear_cache: lazyLoad('searchable_snapshots.clear_cache', opts),
|
||||
clearCache: lazyLoad('searchable_snapshots.clear_cache', opts),
|
||||
mount: lazyLoad('searchable_snapshots.mount', opts),
|
||||
repository_stats: lazyLoad('searchable_snapshots.repository_stats', opts),
|
||||
repositoryStats: lazyLoad('searchable_snapshots.repository_stats', opts),
|
||||
stats: lazyLoad('searchable_snapshots.stats', opts)
|
||||
},
|
||||
searchableSnapshots: {
|
||||
clear_cache: lazyLoad('searchable_snapshots.clear_cache', opts),
|
||||
clearCache: lazyLoad('searchable_snapshots.clear_cache', opts),
|
||||
mount: lazyLoad('searchable_snapshots.mount', opts),
|
||||
repository_stats: lazyLoad('searchable_snapshots.repository_stats', opts),
|
||||
repositoryStats: lazyLoad('searchable_snapshots.repository_stats', opts),
|
||||
stats: lazyLoad('searchable_snapshots.stats', opts)
|
||||
},
|
||||
security: {
|
||||
authenticate: lazyLoad('security.authenticate', opts),
|
||||
change_password: lazyLoad('security.change_password', opts),
|
||||
changePassword: lazyLoad('security.change_password', opts),
|
||||
clear_cached_privileges: lazyLoad('security.clear_cached_privileges', opts),
|
||||
clearCachedPrivileges: lazyLoad('security.clear_cached_privileges', opts),
|
||||
clear_cached_realms: lazyLoad('security.clear_cached_realms', opts),
|
||||
clearCachedRealms: lazyLoad('security.clear_cached_realms', opts),
|
||||
clear_cached_roles: lazyLoad('security.clear_cached_roles', opts),
|
||||
clearCachedRoles: lazyLoad('security.clear_cached_roles', opts),
|
||||
create_api_key: lazyLoad('security.create_api_key', opts),
|
||||
createApiKey: lazyLoad('security.create_api_key', opts),
|
||||
delete_privileges: lazyLoad('security.delete_privileges', opts),
|
||||
deletePrivileges: lazyLoad('security.delete_privileges', opts),
|
||||
delete_role: lazyLoad('security.delete_role', opts),
|
||||
deleteRole: lazyLoad('security.delete_role', opts),
|
||||
delete_role_mapping: lazyLoad('security.delete_role_mapping', opts),
|
||||
deleteRoleMapping: lazyLoad('security.delete_role_mapping', opts),
|
||||
delete_user: lazyLoad('security.delete_user', opts),
|
||||
deleteUser: lazyLoad('security.delete_user', opts),
|
||||
disable_user: lazyLoad('security.disable_user', opts),
|
||||
disableUser: lazyLoad('security.disable_user', opts),
|
||||
enable_user: lazyLoad('security.enable_user', opts),
|
||||
enableUser: lazyLoad('security.enable_user', opts),
|
||||
get_api_key: lazyLoad('security.get_api_key', opts),
|
||||
getApiKey: lazyLoad('security.get_api_key', opts),
|
||||
get_builtin_privileges: lazyLoad('security.get_builtin_privileges', opts),
|
||||
getBuiltinPrivileges: lazyLoad('security.get_builtin_privileges', opts),
|
||||
get_privileges: lazyLoad('security.get_privileges', opts),
|
||||
getPrivileges: lazyLoad('security.get_privileges', opts),
|
||||
get_role: lazyLoad('security.get_role', opts),
|
||||
getRole: lazyLoad('security.get_role', opts),
|
||||
get_role_mapping: lazyLoad('security.get_role_mapping', opts),
|
||||
getRoleMapping: lazyLoad('security.get_role_mapping', opts),
|
||||
get_token: lazyLoad('security.get_token', opts),
|
||||
getToken: lazyLoad('security.get_token', opts),
|
||||
get_user: lazyLoad('security.get_user', opts),
|
||||
getUser: lazyLoad('security.get_user', opts),
|
||||
get_user_privileges: lazyLoad('security.get_user_privileges', opts),
|
||||
getUserPrivileges: lazyLoad('security.get_user_privileges', opts),
|
||||
has_privileges: lazyLoad('security.has_privileges', opts),
|
||||
hasPrivileges: lazyLoad('security.has_privileges', opts),
|
||||
invalidate_api_key: lazyLoad('security.invalidate_api_key', opts),
|
||||
invalidateApiKey: lazyLoad('security.invalidate_api_key', opts),
|
||||
invalidate_token: lazyLoad('security.invalidate_token', opts),
|
||||
invalidateToken: lazyLoad('security.invalidate_token', opts),
|
||||
put_privileges: lazyLoad('security.put_privileges', opts),
|
||||
putPrivileges: lazyLoad('security.put_privileges', opts),
|
||||
put_role: lazyLoad('security.put_role', opts),
|
||||
putRole: lazyLoad('security.put_role', opts),
|
||||
put_role_mapping: lazyLoad('security.put_role_mapping', opts),
|
||||
putRoleMapping: lazyLoad('security.put_role_mapping', opts),
|
||||
put_user: lazyLoad('security.put_user', opts),
|
||||
putUser: lazyLoad('security.put_user', opts)
|
||||
},
|
||||
slm: {
|
||||
delete_lifecycle: lazyLoad('slm.delete_lifecycle', opts),
|
||||
deleteLifecycle: lazyLoad('slm.delete_lifecycle', opts),
|
||||
execute_lifecycle: lazyLoad('slm.execute_lifecycle', opts),
|
||||
executeLifecycle: lazyLoad('slm.execute_lifecycle', opts),
|
||||
execute_retention: lazyLoad('slm.execute_retention', opts),
|
||||
executeRetention: lazyLoad('slm.execute_retention', opts),
|
||||
get_lifecycle: lazyLoad('slm.get_lifecycle', opts),
|
||||
getLifecycle: lazyLoad('slm.get_lifecycle', opts),
|
||||
get_stats: lazyLoad('slm.get_stats', opts),
|
||||
getStats: lazyLoad('slm.get_stats', opts),
|
||||
get_status: lazyLoad('slm.get_status', opts),
|
||||
getStatus: lazyLoad('slm.get_status', opts),
|
||||
put_lifecycle: lazyLoad('slm.put_lifecycle', opts),
|
||||
putLifecycle: lazyLoad('slm.put_lifecycle', opts),
|
||||
start: lazyLoad('slm.start', opts),
|
||||
stop: lazyLoad('slm.stop', opts)
|
||||
},
|
||||
snapshot: {
|
||||
cleanup_repository: lazyLoad('snapshot.cleanup_repository', opts),
|
||||
cleanupRepository: lazyLoad('snapshot.cleanup_repository', opts),
|
||||
create: lazyLoad('snapshot.create', opts),
|
||||
create_repository: lazyLoad('snapshot.create_repository', opts),
|
||||
createRepository: lazyLoad('snapshot.create_repository', opts),
|
||||
delete: lazyLoad('snapshot.delete', opts),
|
||||
delete_repository: lazyLoad('snapshot.delete_repository', opts),
|
||||
deleteRepository: lazyLoad('snapshot.delete_repository', opts),
|
||||
get: lazyLoad('snapshot.get', opts),
|
||||
get_repository: lazyLoad('snapshot.get_repository', opts),
|
||||
getRepository: lazyLoad('snapshot.get_repository', opts),
|
||||
restore: lazyLoad('snapshot.restore', opts),
|
||||
status: lazyLoad('snapshot.status', opts),
|
||||
verify_repository: lazyLoad('snapshot.verify_repository', opts),
|
||||
verifyRepository: lazyLoad('snapshot.verify_repository', opts)
|
||||
},
|
||||
sql: {
|
||||
clear_cursor: lazyLoad('sql.clear_cursor', opts),
|
||||
clearCursor: lazyLoad('sql.clear_cursor', opts),
|
||||
query: lazyLoad('sql.query', opts),
|
||||
translate: lazyLoad('sql.translate', opts)
|
||||
},
|
||||
ssl: {
|
||||
certificates: lazyLoad('ssl.certificates', opts)
|
||||
},
|
||||
tasks: {
|
||||
cancel: lazyLoad('tasks.cancel', opts),
|
||||
get: lazyLoad('tasks.get', opts),
|
||||
list: lazyLoad('tasks.list', opts)
|
||||
},
|
||||
termvectors: lazyLoad('termvectors', opts),
|
||||
transform: {
|
||||
delete_transform: lazyLoad('transform.delete_transform', opts),
|
||||
deleteTransform: lazyLoad('transform.delete_transform', opts),
|
||||
get_transform: lazyLoad('transform.get_transform', opts),
|
||||
getTransform: lazyLoad('transform.get_transform', opts),
|
||||
get_transform_stats: lazyLoad('transform.get_transform_stats', opts),
|
||||
getTransformStats: lazyLoad('transform.get_transform_stats', opts),
|
||||
preview_transform: lazyLoad('transform.preview_transform', opts),
|
||||
previewTransform: lazyLoad('transform.preview_transform', opts),
|
||||
put_transform: lazyLoad('transform.put_transform', opts),
|
||||
putTransform: lazyLoad('transform.put_transform', opts),
|
||||
start_transform: lazyLoad('transform.start_transform', opts),
|
||||
startTransform: lazyLoad('transform.start_transform', opts),
|
||||
stop_transform: lazyLoad('transform.stop_transform', opts),
|
||||
stopTransform: lazyLoad('transform.stop_transform', opts),
|
||||
update_transform: lazyLoad('transform.update_transform', opts),
|
||||
updateTransform: lazyLoad('transform.update_transform', opts)
|
||||
},
|
||||
update: lazyLoad('update', opts),
|
||||
update_by_query: lazyLoad('update_by_query', opts),
|
||||
updateByQuery: lazyLoad('update_by_query', opts),
|
||||
update_by_query_rethrottle: lazyLoad('update_by_query_rethrottle', opts),
|
||||
updateByQueryRethrottle: lazyLoad('update_by_query_rethrottle', opts),
|
||||
watcher: {
|
||||
ack_watch: lazyLoad('watcher.ack_watch', opts),
|
||||
ackWatch: lazyLoad('watcher.ack_watch', opts),
|
||||
activate_watch: lazyLoad('watcher.activate_watch', opts),
|
||||
activateWatch: lazyLoad('watcher.activate_watch', opts),
|
||||
deactivate_watch: lazyLoad('watcher.deactivate_watch', opts),
|
||||
deactivateWatch: lazyLoad('watcher.deactivate_watch', opts),
|
||||
delete_watch: lazyLoad('watcher.delete_watch', opts),
|
||||
deleteWatch: lazyLoad('watcher.delete_watch', opts),
|
||||
execute_watch: lazyLoad('watcher.execute_watch', opts),
|
||||
executeWatch: lazyLoad('watcher.execute_watch', opts),
|
||||
get_watch: lazyLoad('watcher.get_watch', opts),
|
||||
getWatch: lazyLoad('watcher.get_watch', opts),
|
||||
put_watch: lazyLoad('watcher.put_watch', opts),
|
||||
putWatch: lazyLoad('watcher.put_watch', opts),
|
||||
start: lazyLoad('watcher.start', opts),
|
||||
stats: lazyLoad('watcher.stats', opts),
|
||||
stop: lazyLoad('watcher.stop', opts)
|
||||
},
|
||||
xpack: {
|
||||
info: lazyLoad('xpack.info', opts),
|
||||
usage: lazyLoad('xpack.usage', opts)
|
||||
=======
|
||||
Object.defineProperties(ESAPI.prototype, {
|
||||
cat: {
|
||||
get () {
|
||||
@ -847,7 +198,6 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
this[kCat] = new CatApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kCat]
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
},
|
||||
clear_scroll: { get () { return this.clearScroll } },
|
||||
|
||||
810
api/requestParams.d.ts
vendored
810
api/requestParams.d.ts
vendored
@ -41,8 +41,6 @@ export interface AsyncSearchGet extends Generic {
|
||||
|
||||
export interface AsyncSearchSubmit<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
wait_for_completion_timeout?: string;
|
||||
keep_on_completion?: boolean;
|
||||
keep_alive?: string;
|
||||
@ -78,7 +76,7 @@ export interface AsyncSearchSubmit<T = RequestBody> extends Generic {
|
||||
suggest_text?: string;
|
||||
timeout?: string;
|
||||
track_scores?: boolean;
|
||||
track_total_hits?: boolean | number;
|
||||
track_total_hits?: boolean;
|
||||
allow_partial_search_results?: boolean;
|
||||
typed_keys?: boolean;
|
||||
version?: boolean;
|
||||
@ -833,18 +831,9 @@ export interface GetSource extends Generic {
|
||||
version_type?: 'internal' | 'external' | 'external_gte' | 'force';
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
export interface Index<T = RequestBody> extends Generic {
|
||||
id?: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
wait_for_active_shards?: string;
|
||||
op_type?: 'index' | 'create';
|
||||
refresh?: 'wait_for' | boolean;
|
||||
=======
|
||||
export interface GraphExplore<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
type?: string | string[];
|
||||
routing?: string;
|
||||
timeout?: string;
|
||||
body?: T;
|
||||
@ -894,6 +883,7 @@ export interface IlmStop extends Generic {
|
||||
export interface Index<T = RequestBody> extends Generic {
|
||||
id?: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
wait_for_active_shards?: string;
|
||||
op_type?: 'index' | 'create';
|
||||
refresh?: 'wait_for' | boolean;
|
||||
@ -1440,776 +1430,6 @@ export interface Mget<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
export interface Msearch<T = RequestNDBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
max_concurrent_searches?: number;
|
||||
typed_keys?: boolean;
|
||||
pre_filter_shard_size?: number;
|
||||
max_concurrent_shard_requests?: number;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
ccs_minimize_roundtrips?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface MsearchTemplate<T = RequestNDBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
typed_keys?: boolean;
|
||||
max_concurrent_searches?: number;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
ccs_minimize_roundtrips?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface Mtermvectors<T = RequestBody> extends Generic {
|
||||
index?: string;
|
||||
type?: string;
|
||||
ids?: string | string[];
|
||||
term_statistics?: boolean;
|
||||
field_statistics?: boolean;
|
||||
fields?: string | string[];
|
||||
offsets?: boolean;
|
||||
positions?: boolean;
|
||||
payloads?: boolean;
|
||||
preference?: string;
|
||||
routing?: string;
|
||||
realtime?: boolean;
|
||||
version?: number;
|
||||
version_type?: 'internal' | 'external' | 'external_gte' | 'force';
|
||||
body?: T;
|
||||
=======
|
||||
export interface MigrationDeprecations extends Generic {
|
||||
index?: string;
|
||||
}
|
||||
|
||||
export interface MlCloseJob<T = RequestBody> extends Generic {
|
||||
job_id: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
force?: boolean;
|
||||
timeout?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface MlDeleteCalendar extends Generic {
|
||||
calendar_id: string;
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
}
|
||||
|
||||
export interface MlDeleteCalendarEvent extends Generic {
|
||||
calendar_id: string;
|
||||
event_id: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteCalendarJob extends Generic {
|
||||
calendar_id: string;
|
||||
job_id: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteDataFrameAnalytics extends Generic {
|
||||
id: string;
|
||||
force?: boolean;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteDatafeed extends Generic {
|
||||
datafeed_id: string;
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
export interface MlDeleteExpiredData<T = RequestBody> extends Generic {
|
||||
job_id?: string;
|
||||
requests_per_second?: number;
|
||||
timeout?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface MlDeleteFilter extends Generic {
|
||||
filter_id: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteForecast extends Generic {
|
||||
job_id: string;
|
||||
forecast_id?: string;
|
||||
allow_no_forecasts?: boolean;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteJob extends Generic {
|
||||
job_id: string;
|
||||
force?: boolean;
|
||||
wait_for_completion?: boolean;
|
||||
}
|
||||
|
||||
export interface MlDeleteModelSnapshot extends Generic {
|
||||
job_id: string;
|
||||
snapshot_id: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteTrainedModel extends Generic {
|
||||
model_id: string;
|
||||
}
|
||||
|
||||
export interface MlEstimateModelMemory<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
export interface RankEval<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface Reindex<T = RequestBody> extends Generic {
|
||||
refresh?: boolean;
|
||||
timeout?: string;
|
||||
wait_for_active_shards?: string;
|
||||
wait_for_completion?: boolean;
|
||||
requests_per_second?: number;
|
||||
scroll?: string;
|
||||
slices?: number|string;
|
||||
max_docs?: number;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface ReindexRethrottle extends Generic {
|
||||
task_id: string;
|
||||
requests_per_second: number;
|
||||
}
|
||||
|
||||
export interface RenderSearchTemplate<T = RequestBody> extends Generic {
|
||||
id?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface ScriptsPainlessExecute<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface Scroll<T = RequestBody> extends Generic {
|
||||
scroll_id?: string;
|
||||
scroll?: string;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface Search<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
ccs_minimize_roundtrips?: boolean;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
df?: string;
|
||||
explain?: boolean;
|
||||
stored_fields?: string | string[];
|
||||
docvalue_fields?: string | string[];
|
||||
from?: number;
|
||||
ignore_unavailable?: boolean;
|
||||
ignore_throttled?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
lenient?: boolean;
|
||||
preference?: string;
|
||||
q?: string;
|
||||
routing?: string | string[];
|
||||
scroll?: string;
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
size?: number;
|
||||
sort?: string | string[];
|
||||
_source?: string | string[];
|
||||
_source_excludes?: string | string[];
|
||||
_source_includes?: string | string[];
|
||||
terminate_after?: number;
|
||||
stats?: string | string[];
|
||||
suggest_field?: string;
|
||||
suggest_mode?: 'missing' | 'popular' | 'always';
|
||||
suggest_size?: number;
|
||||
suggest_text?: string;
|
||||
timeout?: string;
|
||||
track_scores?: boolean;
|
||||
track_total_hits?: boolean;
|
||||
allow_partial_search_results?: boolean;
|
||||
typed_keys?: boolean;
|
||||
version?: boolean;
|
||||
seq_no_primary_term?: boolean;
|
||||
request_cache?: boolean;
|
||||
batched_reduce_size?: number;
|
||||
max_concurrent_shard_requests?: number;
|
||||
pre_filter_shard_size?: number;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface SearchShards extends Generic {
|
||||
index?: string | string[];
|
||||
preference?: string;
|
||||
routing?: string;
|
||||
local?: boolean;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface SearchTemplate<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
ignore_throttled?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
preference?: string;
|
||||
routing?: string | string[];
|
||||
scroll?: string;
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
explain?: boolean;
|
||||
profile?: boolean;
|
||||
typed_keys?: boolean;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
ccs_minimize_roundtrips?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SnapshotCleanupRepository extends Generic {
|
||||
repository: string;
|
||||
master_timeout?: string;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface SnapshotCreate<T = RequestBody> extends Generic {
|
||||
repository: string;
|
||||
snapshot: string;
|
||||
master_timeout?: string;
|
||||
wait_for_completion?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface SnapshotCreateRepository<T = RequestBody> extends Generic {
|
||||
repository: string;
|
||||
master_timeout?: string;
|
||||
timeout?: string;
|
||||
verify?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SnapshotDelete extends Generic {
|
||||
repository: string;
|
||||
snapshot: string;
|
||||
master_timeout?: string;
|
||||
}
|
||||
|
||||
export interface SnapshotDeleteRepository extends Generic {
|
||||
repository: string | string[];
|
||||
master_timeout?: string;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface SnapshotGet extends Generic {
|
||||
repository: string;
|
||||
snapshot: string | string[];
|
||||
master_timeout?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
export interface SnapshotGetRepository extends Generic {
|
||||
repository?: string | string[];
|
||||
master_timeout?: string;
|
||||
local?: boolean;
|
||||
}
|
||||
|
||||
export interface SnapshotRestore<T = RequestBody> extends Generic {
|
||||
repository: string;
|
||||
snapshot: string;
|
||||
master_timeout?: string;
|
||||
wait_for_completion?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface SnapshotStatus extends Generic {
|
||||
repository?: string;
|
||||
snapshot?: string | string[];
|
||||
master_timeout?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
}
|
||||
|
||||
export interface SnapshotVerifyRepository extends Generic {
|
||||
repository: string;
|
||||
master_timeout?: string;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface TasksCancel extends Generic {
|
||||
task_id?: string;
|
||||
nodes?: string | string[];
|
||||
actions?: string | string[];
|
||||
parent_task_id?: string;
|
||||
wait_for_completion?: boolean;
|
||||
}
|
||||
|
||||
export interface TasksGet extends Generic {
|
||||
task_id: string;
|
||||
wait_for_completion?: boolean;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface TasksList extends Generic {
|
||||
nodes?: string | string[];
|
||||
actions?: string | string[];
|
||||
detailed?: boolean;
|
||||
parent_task_id?: string;
|
||||
wait_for_completion?: boolean;
|
||||
group_by?: 'nodes' | 'parents' | 'none';
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface Termvectors<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
id?: string;
|
||||
type?: string;
|
||||
term_statistics?: boolean;
|
||||
field_statistics?: boolean;
|
||||
fields?: string | string[];
|
||||
offsets?: boolean;
|
||||
positions?: boolean;
|
||||
payloads?: boolean;
|
||||
preference?: string;
|
||||
routing?: string;
|
||||
realtime?: boolean;
|
||||
version?: number;
|
||||
version_type?: 'internal' | 'external' | 'external_gte' | 'force';
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface Update<T = RequestBody> extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
wait_for_active_shards?: string;
|
||||
_source?: string | string[];
|
||||
_source_excludes?: string | string[];
|
||||
_source_includes?: string | string[];
|
||||
lang?: string;
|
||||
refresh?: 'wait_for' | boolean;
|
||||
retry_on_conflict?: number;
|
||||
routing?: string;
|
||||
timeout?: string;
|
||||
if_seq_no?: number;
|
||||
if_primary_term?: number;
|
||||
require_alias?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface UpdateByQuery<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
type?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
df?: string;
|
||||
from?: number;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
conflicts?: 'abort' | 'proceed';
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
lenient?: boolean;
|
||||
pipeline?: string;
|
||||
preference?: string;
|
||||
q?: string;
|
||||
routing?: string | string[];
|
||||
scroll?: string;
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
search_timeout?: string;
|
||||
size?: number;
|
||||
max_docs?: number;
|
||||
sort?: string | string[];
|
||||
_source?: string | string[];
|
||||
_source_excludes?: string | string[];
|
||||
_source_includes?: string | string[];
|
||||
terminate_after?: number;
|
||||
stats?: string | string[];
|
||||
version?: boolean;
|
||||
version_type?: boolean;
|
||||
request_cache?: boolean;
|
||||
refresh?: boolean;
|
||||
timeout?: string;
|
||||
wait_for_active_shards?: string;
|
||||
scroll_size?: number;
|
||||
wait_for_completion?: boolean;
|
||||
requests_per_second?: number;
|
||||
slices?: number|string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface UpdateByQueryRethrottle extends Generic {
|
||||
task_id: string;
|
||||
requests_per_second: number;
|
||||
}
|
||||
|
||||
export interface AsyncSearchDelete extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AsyncSearchGet extends Generic {
|
||||
id: string;
|
||||
wait_for_completion_timeout?: string;
|
||||
keep_alive?: string;
|
||||
typed_keys?: boolean;
|
||||
}
|
||||
|
||||
export interface AsyncSearchSubmit<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
wait_for_completion_timeout?: string;
|
||||
keep_on_completion?: boolean;
|
||||
keep_alive?: string;
|
||||
batched_reduce_size?: number;
|
||||
request_cache?: boolean;
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
df?: string;
|
||||
explain?: boolean;
|
||||
stored_fields?: string | string[];
|
||||
docvalue_fields?: string | string[];
|
||||
from?: number;
|
||||
ignore_unavailable?: boolean;
|
||||
ignore_throttled?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
lenient?: boolean;
|
||||
preference?: string;
|
||||
q?: string;
|
||||
routing?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
size?: number;
|
||||
sort?: string | string[];
|
||||
_source?: string | string[];
|
||||
_source_excludes?: string | string[];
|
||||
_source_includes?: string | string[];
|
||||
terminate_after?: number;
|
||||
stats?: string | string[];
|
||||
suggest_field?: string;
|
||||
suggest_mode?: 'missing' | 'popular' | 'always';
|
||||
suggest_size?: number;
|
||||
suggest_text?: string;
|
||||
timeout?: string;
|
||||
track_scores?: boolean;
|
||||
track_total_hits?: boolean;
|
||||
allow_partial_search_results?: boolean;
|
||||
typed_keys?: boolean;
|
||||
version?: boolean;
|
||||
seq_no_primary_term?: boolean;
|
||||
max_concurrent_shard_requests?: number;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface AutoscalingDeleteAutoscalingPolicy extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AutoscalingGetAutoscalingDecision extends Generic {
|
||||
}
|
||||
|
||||
export interface AutoscalingGetAutoscalingPolicy extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AutoscalingPutAutoscalingPolicy<T = RequestBody> extends Generic {
|
||||
name: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface CatMlDataFrameAnalytics extends Generic {
|
||||
id?: string;
|
||||
allow_no_match?: boolean;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatMlDatafeeds extends Generic {
|
||||
datafeed_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_datafeeds?: boolean;
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatMlJobs extends Generic {
|
||||
job_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatMlTrainedModels extends Generic {
|
||||
model_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
from?: number;
|
||||
size?: number;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatTransforms extends Generic {
|
||||
transform_id?: string;
|
||||
from?: number;
|
||||
size?: number;
|
||||
allow_no_match?: boolean;
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CcrDeleteAutoFollowPattern extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface CcrFollow<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
wait_for_active_shards?: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface CcrFollowInfo extends Generic {
|
||||
index: string | string[];
|
||||
}
|
||||
|
||||
export interface CcrFollowStats extends Generic {
|
||||
index: string | string[];
|
||||
}
|
||||
|
||||
export interface CcrForgetFollower<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface CcrGetAutoFollowPattern extends Generic {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface CcrPauseAutoFollowPattern extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface CcrPauseFollow extends Generic {
|
||||
index: string;
|
||||
}
|
||||
|
||||
export interface CcrPutAutoFollowPattern<T = RequestBody> extends Generic {
|
||||
name: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface CcrResumeAutoFollowPattern extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface CcrResumeFollow<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface CcrStats extends Generic {
|
||||
}
|
||||
|
||||
export interface CcrUnfollow extends Generic {
|
||||
index: string;
|
||||
}
|
||||
|
||||
export interface ClosePointInTime<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface EnrichDeletePolicy extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface EnrichExecutePolicy extends Generic {
|
||||
name: string;
|
||||
wait_for_completion?: boolean;
|
||||
}
|
||||
|
||||
export interface EnrichGetPolicy extends Generic {
|
||||
name?: string | string[];
|
||||
}
|
||||
|
||||
export interface EnrichPutPolicy<T = RequestBody> extends Generic {
|
||||
name: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface EnrichStats extends Generic {
|
||||
}
|
||||
|
||||
export interface EqlDelete extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface EqlGet extends Generic {
|
||||
id: string;
|
||||
wait_for_completion_timeout?: string;
|
||||
keep_alive?: string;
|
||||
}
|
||||
|
||||
export interface EqlSearch<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
wait_for_completion_timeout?: string;
|
||||
keep_on_completion?: boolean;
|
||||
keep_alive?: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface GraphExplore<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
type?: string | string[];
|
||||
routing?: string;
|
||||
timeout?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface IlmDeleteLifecycle extends Generic {
|
||||
policy: string;
|
||||
}
|
||||
|
||||
export interface IlmExplainLifecycle extends Generic {
|
||||
index: string;
|
||||
only_managed?: boolean;
|
||||
only_errors?: boolean;
|
||||
}
|
||||
|
||||
export interface IlmGetLifecycle extends Generic {
|
||||
policy?: string;
|
||||
}
|
||||
|
||||
export interface IlmGetStatus extends Generic {
|
||||
}
|
||||
|
||||
export interface IlmMoveToStep<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface IlmPutLifecycle<T = RequestBody> extends Generic {
|
||||
policy: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface IlmRemovePolicy extends Generic {
|
||||
index: string;
|
||||
}
|
||||
|
||||
export interface IlmRetry extends Generic {
|
||||
index: string;
|
||||
}
|
||||
|
||||
export interface IlmStart extends Generic {
|
||||
}
|
||||
|
||||
export interface IlmStop extends Generic {
|
||||
}
|
||||
|
||||
export interface IndicesCreateDataStream extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IndicesDataStreamsStats extends Generic {
|
||||
name?: string | string[];
|
||||
}
|
||||
|
||||
export interface IndicesDeleteDataStream extends Generic {
|
||||
name: string | string[];
|
||||
}
|
||||
|
||||
export interface IndicesFreeze extends Generic {
|
||||
index: string;
|
||||
timeout?: string;
|
||||
master_timeout?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
wait_for_active_shards?: string;
|
||||
}
|
||||
|
||||
export interface IndicesGetDataStream extends Generic {
|
||||
name?: string | string[];
|
||||
}
|
||||
|
||||
export interface IndicesReloadSearchAnalyzers extends Generic {
|
||||
index: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesUnfreeze extends Generic {
|
||||
index: string;
|
||||
timeout?: string;
|
||||
master_timeout?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
wait_for_active_shards?: string;
|
||||
}
|
||||
|
||||
export interface LicenseDelete extends Generic {
|
||||
}
|
||||
|
||||
export interface LicenseGet extends Generic {
|
||||
local?: boolean;
|
||||
accept_enterprise?: boolean;
|
||||
}
|
||||
|
||||
export interface LicenseGetBasicStatus extends Generic {
|
||||
}
|
||||
|
||||
export interface LicenseGetTrialStatus extends Generic {
|
||||
}
|
||||
|
||||
export interface LicensePost<T = RequestBody> extends Generic {
|
||||
acknowledge?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface LicensePostStartBasic extends Generic {
|
||||
acknowledge?: boolean;
|
||||
}
|
||||
|
||||
export interface LicensePostStartTrial extends Generic {
|
||||
type?: string;
|
||||
acknowledge?: boolean;
|
||||
}
|
||||
|
||||
export interface MigrationDeprecations extends Generic {
|
||||
index?: string;
|
||||
}
|
||||
@ -2285,8 +1505,6 @@ export interface MlEstimateModelMemory<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> a064f0f3... Improve child performances (#1314)
|
||||
export interface MlEvaluateDataFrame<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
@ -2638,6 +1856,7 @@ export interface MonitoringBulk<T = RequestNDBody> extends Generic {
|
||||
|
||||
export interface Msearch<T = RequestNDBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
max_concurrent_searches?: number;
|
||||
typed_keys?: boolean;
|
||||
@ -2650,6 +1869,7 @@ export interface Msearch<T = RequestNDBody> extends Generic {
|
||||
|
||||
export interface MsearchTemplate<T = RequestNDBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
typed_keys?: boolean;
|
||||
max_concurrent_searches?: number;
|
||||
@ -2660,6 +1880,7 @@ export interface MsearchTemplate<T = RequestNDBody> extends Generic {
|
||||
|
||||
export interface Mtermvectors<T = RequestBody> extends Generic {
|
||||
index?: string;
|
||||
type?: string;
|
||||
ids?: string | string[];
|
||||
term_statistics?: boolean;
|
||||
field_statistics?: boolean;
|
||||
@ -2671,7 +1892,7 @@ export interface Mtermvectors<T = RequestBody> extends Generic {
|
||||
routing?: string;
|
||||
realtime?: boolean;
|
||||
version?: number;
|
||||
version_type?: 'internal' | 'external' | 'external_gte';
|
||||
version_type?: 'internal' | 'external' | 'external_gte' | 'force';
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -2821,8 +2042,7 @@ export interface Scroll<T = RequestBody> extends Generic {
|
||||
|
||||
export interface Search<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
type?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
ccs_minimize_roundtrips?: boolean;
|
||||
@ -2855,7 +2075,7 @@ export interface Search<T = RequestBody> extends Generic {
|
||||
suggest_text?: string;
|
||||
timeout?: string;
|
||||
track_scores?: boolean;
|
||||
track_total_hits?: boolean | number;
|
||||
track_total_hits?: boolean;
|
||||
allow_partial_search_results?: boolean;
|
||||
typed_keys?: boolean;
|
||||
version?: boolean;
|
||||
@ -2880,6 +2100,7 @@ export interface SearchShards extends Generic {
|
||||
|
||||
export interface SearchTemplate<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
ignore_throttled?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
@ -3104,7 +2325,7 @@ export interface SnapshotCreateRepository<T = RequestBody> extends Generic {
|
||||
|
||||
export interface SnapshotDelete extends Generic {
|
||||
repository: string;
|
||||
snapshot: string | string[];
|
||||
snapshot: string;
|
||||
master_timeout?: string;
|
||||
}
|
||||
|
||||
@ -3192,6 +2413,7 @@ export interface TasksList extends Generic {
|
||||
export interface Termvectors<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
id?: string;
|
||||
type?: string;
|
||||
term_statistics?: boolean;
|
||||
field_statistics?: boolean;
|
||||
fields?: string | string[];
|
||||
@ -3202,7 +2424,7 @@ export interface Termvectors<T = RequestBody> extends Generic {
|
||||
routing?: string;
|
||||
realtime?: boolean;
|
||||
version?: number;
|
||||
version_type?: 'internal' | 'external' | 'external_gte';
|
||||
version_type?: 'internal' | 'external' | 'external_gte' | 'force';
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -3259,8 +2481,6 @@ export interface Update<T = RequestBody> extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
wait_for_active_shards?: string;
|
||||
_source?: string | string[];
|
||||
_source_excludes?: string | string[];
|
||||
@ -3278,8 +2498,7 @@ export interface Update<T = RequestBody> extends Generic {
|
||||
|
||||
export interface UpdateByQuery<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
type?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
@ -3297,6 +2516,7 @@ export interface UpdateByQuery<T = RequestBody> extends Generic {
|
||||
scroll?: string;
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
search_timeout?: string;
|
||||
size?: number;
|
||||
max_docs?: number;
|
||||
sort?: string | string[];
|
||||
_source?: string | string[];
|
||||
|
||||
Reference in New Issue
Block a user