Compare commits
69 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21a84654f6 | |||
| bb0ff22fd2 | |||
| 9897ba8831 | |||
| c922661fda | |||
| 597dd28340 | |||
| cc0dc10c64 | |||
| 9c5394ecdb | |||
| 96a103b305 | |||
| 3e9ae8b29c | |||
| 064807c5a9 | |||
| 72b67fe4d7 | |||
| 6f2767628c | |||
| 96137788db | |||
| 8136846a78 | |||
| 62e9805311 | |||
| 907f9d085c | |||
| 0c1fb22631 | |||
| 132072b8ab | |||
| 99ada00747 | |||
| b1458e3511 | |||
| 9dacd9d9ee | |||
| d6577b7fa1 | |||
| ddb72d6e50 | |||
| 9bb2d237e4 | |||
| 4099532617 | |||
| 37544399ce | |||
| 12e88d6f87 | |||
| dbfeb5d1a9 | |||
| 84a837ce11 | |||
| dc009dc3a5 | |||
| d4f4b47d7e | |||
| cfd4e70fb9 | |||
| 68f8b7bb5f | |||
| 777e438482 | |||
| 29beb44bf5 | |||
| ef3126b361 | |||
| 6cc2b21ce2 | |||
| 02c656c364 | |||
| 77fcca871f | |||
| ca0b33a2b0 | |||
| 74c37e5b2d | |||
| 0e47cb88eb | |||
| f97208214e | |||
| 6f4a8bbe6a | |||
| c0264393a1 | |||
| 92bcf46ab4 | |||
| af544e8a55 | |||
| fbf804869f | |||
| f3422a6f43 | |||
| f2c43a843b | |||
| 1f6c68df9c | |||
| c7675708de | |||
| e897d8f050 | |||
| 4537308c38 | |||
| 3a1bb9377a | |||
| e185a0b08c | |||
| 9b111ee664 | |||
| 367f16c0ba | |||
| 1d61cba014 | |||
| 358474bca8 | |||
| c0027b3958 | |||
| 68c4dd29fb | |||
| a3e3d57247 | |||
| c3966cacab | |||
| 048933f106 | |||
| 91935905b6 | |||
| 0f5ac8127c | |||
| 99e1dc3b39 | |||
| e98cab1a34 |
@ -1,20 +1,20 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDSjCCAjKgAwIBAgIVAJQLm8V2LcaCTHUcoIfO+KL63nG3MA0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XA3gfrJWsHURkyNmiHOFAbYHqi
|
||||
xA6i249G2GTEjc1+le/M2N2CcDKAmurW6vSGK4upXQbPd6KmnhHREX74zkWjnOa+
|
||||
+tibbSSOCT4Tmja2DbBxAPuivU9IB1g/hIUmbYQqKffQrBJA0658tz6w63a/Q7xN
|
||||
pCvvbSgiMZ6qcVIcJkBT2IooYie+ax45pQECHthgIUcQAzfmIfqlU0Qfl8rDgAmn
|
||||
0c1o6HQjKGU2aVGgSRuaaiHaSZjbPIZVS51sOoI=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpgIBAAKCAQEA2Mmo5D7xrVDhOTNTqMEHwZFla1o6NfiyMc4AnkR6dGM7S7XV
|
||||
SdLJNsaEq7drmacXD3qXcjrHi04xSXsdQ9sgkQBJ4iKnBYn+Bu9pw4odi5W4aVHv
|
||||
/vzE68o/GU5BU8yPnjJm0IuRRTGh/pMLn5nbf+f8PGGsztfEscSVJczKs3zVK4TP
|
||||
L771XcYG6FOz1oZNvMGRwjB0KL6Jh5s3JYUaRTdBTJLQPfLxx3kYx9fT+6zYYn0n
|
||||
e4Wc6B9x9ePB1QCqD4Kp2er1tjtmHwFjj+rpanMrM6+e6fH0vQdsEnZVlu51R1NS
|
||||
binGA+uwsWwUttwXhhYAo+LYja5sTvEuWH/ObwIDAQABAoIBAQC8QDGnMnmPdWJ+
|
||||
13FYY3cmwel+FXXjFDk5QpgK15A2rUz6a8XxO1d7d1wR+U84uH4v9Na6XQyWjaoD
|
||||
EyPQnuJiyAtgkZLUHoY244PGR5NsePEQlBSCKmGeF5w/j1LvP/2e9EmP4wKdQYJY
|
||||
nLxFNcgEBCFnFbKIU5n8fKa/klybCrwlBokenyBro02tqH4LL7h1YMRRrl97fv1V
|
||||
e/y/0WcMN+KnMglfz6haimBRV2yamCCHHmBImC+wzOgT/quqlxPfI+a3ScHxuA65
|
||||
3QyCavaqlPh+T3l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kYhmGrGYCTUMUIwOIQYa4Evis4W+LHmCIDG03l7gLHfdIBe9VMO
|
||||
pDZum8f6ng0MM49s8/rXODNYKw8kFyUhnfChqMi/2yggb1uUIfKlJJIchkgYjE13
|
||||
zuC+fjo029Pq1jeMIdxugLf/7I/8NiW1Yj9aCXevUXG1qzHFEuKAinBXYOZO/vWS
|
||||
LaEqOhwrzNynwgGpYAr7Rfgv4AflltYIIav4PZT03P7fbyAAf8s=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEogIBAAKCAQEAymC0zopFRDYjf6mLqTrKF3e1WGJ68snwgv3SuBQtmqM5G6ox
|
||||
cwXbzxgGrKHOMhIh+QhnlzICbjo5NZmqnrZnSLMNNI+KByb4mLJxl88cUubMIQ+7
|
||||
KXFuFJOFeLQFM623071v9llv8mAi3uaYVW9nIc9Iy/lmG+GwZnX7P7ekbT/UarKZ
|
||||
WAJlad4GepbdmDbbxJPYM9E1ZNw7jtU6riApX0WFI7ssEusQ0r8SfCZfdRHw1jPE
|
||||
FPvRfmALYr++MZdlNz9MMDKjbzMX/f92pN5U0BrIDuC+nMGyqVSzDM8Ulbp2c/7I
|
||||
Jdfcct6hx89UK9jIyf9nNie72oVC+DT0ZIyQpQIDAQABAoIBADAh7f7NjgnaInlD
|
||||
ds8KB3SraPsbeQhzlPtiqRJU4j/MIFH/GYG03AGWQkget67a9y+GmzSvlTpoKKEh
|
||||
6h2TXl9BDpv4o6ht0WRn1HJ5tM/Wyqf2WNpTew3zxCPgFPikkXsPrChYPzLTQJfp
|
||||
GkP/mfTFmxfAOlPZSp4j41zVLYs53eDkAegFPVfKSr1XNNJ3QODLPcIBfxBYsiC9
|
||||
oU+jRW8xYuj31cEl5k5UqrChJ1rm3mt6cguqXKbISuoSvi13gXI6DccqhuLAU+Kr
|
||||
ib2XYrRP+pWocZo/pM9WUVoNGtFxfY88sAQtvG6gDKo2AURtFyq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ViCmomNTRuL+GF1NyKWdWJ+xVwcYd5MRZdvKimyyPfeGzWTUg14i42
|
||||
KtEEWgZmkukqMz8BIeCYq6sENeIpIQQgqv3PjU+Bi5r1S4Y7wsFPNRakkD4aaB6r
|
||||
1rCppWcwZMeoxwEUoO2aswKBgBdDIIdWJi3EpAY5SyWrkEZ0UMdiZC4p7nE33ddB
|
||||
IJ5CtdU9BXFcc652ZYjX/58FaCABvZ2F8LhDu92SwOusGfmNIxIjWL1dO2jywA1c
|
||||
8wmZKd7P/M7nbdMz45fMzs9+d1zwbWfK53C8+R4AC1BuwQF0zHc3BHTgVRLelUjt
|
||||
O8thAoGAdO2gHIqEsZzTgbvLbsh52eVbumjfNGnrnEv1fjb+o+/wAol8dymcmzbL
|
||||
bZCRzoyA0qwU9kdPFgX46H6so6o1tUM2GQtVFoT6kDnPv7EkLQK0C4cDh6OOHxDU
|
||||
NPvr/9fHhQd9EDWDvS1JnVMAdKDO6ELp3SoKGGmCXR2QplnqWAk=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
@ -22,7 +22,7 @@ services:
|
||||
- elasticsearch-oss
|
||||
|
||||
elasticsearch-oss:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTICSEARCH_VERSION:-6.6.2}
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-beta1}
|
||||
volumes:
|
||||
- esvol:/tmp
|
||||
networks:
|
||||
@ -58,7 +58,7 @@ services:
|
||||
command: ["npm", "run", "test:integration"]
|
||||
|
||||
elasticsearch-platinum:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-6.6.2}
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-beta1}
|
||||
ports:
|
||||
- "9200:9200"
|
||||
networks:
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
ARG NODE_JS_VERSION=10
|
||||
FROM node:${NODE_JS_VERSION}-alpine
|
||||
|
||||
RUN apk --no-cache add git
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
@ -1,67 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Shared cleanup routines between different steps
|
||||
#
|
||||
# Please source .ci/functions/imports.sh as a whole not just this file
|
||||
#
|
||||
# Version 1.0.0
|
||||
# - Initial version after refactor
|
||||
|
||||
function cleanup_volume {
|
||||
if [[ "$(docker volume ls -q -f name=$1)" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing volume $1\033[0m"
|
||||
(docker volume rm "$1") || true
|
||||
fi
|
||||
}
|
||||
function container_running {
|
||||
if [[ "$(docker ps -q -f name=$1)" ]]; then
|
||||
return 0;
|
||||
else return 1;
|
||||
fi
|
||||
}
|
||||
function cleanup_node {
|
||||
if container_running "$1"; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing container $1\033[0m"
|
||||
(docker container rm --force --volumes "$1") || true
|
||||
fi
|
||||
if [[ -n "$1" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing volume $1-${suffix}-data\033[0m"
|
||||
cleanup_volume "$1-${suffix}-data"
|
||||
fi
|
||||
}
|
||||
function cleanup_network {
|
||||
if [[ "$(docker network ls -q -f name=$1)" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing network $1\033[0m"
|
||||
(docker network rm "$1") || true
|
||||
fi
|
||||
}
|
||||
|
||||
function cleanup_trap {
|
||||
status=$?
|
||||
set +x
|
||||
if [[ "$DETACH" != "true" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m clean the network if not detached (start and exit)\033[0m"
|
||||
cleanup_all_in_network "$1"
|
||||
fi
|
||||
# status is 0 or SIGINT
|
||||
if [[ "$status" == "0" || "$status" == "130" ]]; then
|
||||
echo -e "\n\033[32;1mSUCCESS run-tests\033[0m"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\n\033[31;1mFAILURE during run-tests\033[0m"
|
||||
exit ${status}
|
||||
fi
|
||||
};
|
||||
function cleanup_all_in_network {
|
||||
|
||||
if [[ -z "$(docker network ls -q -f name="^$1\$")" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m $1 is already deleted\033[0m"
|
||||
return 0
|
||||
fi
|
||||
containers=$(docker network inspect -f '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' $1)
|
||||
while read -r container; do
|
||||
cleanup_node "$container"
|
||||
done <<< "$containers"
|
||||
cleanup_network $1
|
||||
echo -e "\033[32;1mSUCCESS:\033[0m Cleaned up and exiting\033[0m"
|
||||
};
|
||||
@ -1,60 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Sets up all the common variables and imports relevant functions
|
||||
#
|
||||
# Version 1.0.1
|
||||
# - Initial version after refactor
|
||||
# - Validate STACK_VERSION asap
|
||||
|
||||
function require_stack_version() {
|
||||
if [[ -z $STACK_VERSION ]]; then
|
||||
echo -e "\033[31;1mERROR:\033[0m Required environment variable [STACK_VERSION] not set\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
require_stack_version
|
||||
|
||||
if [[ -z $es_node_name ]]; then
|
||||
# only set these once
|
||||
set -euo pipefail
|
||||
export TEST_SUITE=${TEST_SUITE-oss}
|
||||
export RUNSCRIPTS=${RUNSCRIPTS-}
|
||||
export DETACH=${DETACH-false}
|
||||
export CLEANUP=${CLEANUP-false}
|
||||
|
||||
export es_node_name=instance
|
||||
export elastic_password=changeme
|
||||
export elasticsearch_image=elasticsearch
|
||||
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
|
||||
if [[ $TEST_SUITE != "xpack" ]]; then
|
||||
export elasticsearch_image=elasticsearch-${TEST_SUITE}
|
||||
export elasticsearch_url=http://${es_node_name}:9200
|
||||
fi
|
||||
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
|
||||
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"
|
||||
|
||||
export suffix=rest-test
|
||||
export moniker=$(echo "$elasticsearch_container" | tr -C "[:alnum:]" '-')
|
||||
export network_name=${moniker}${suffix}
|
||||
|
||||
export ssl_cert="${script_path}/certs/testnode.crt"
|
||||
export ssl_key="${script_path}/certs/testnode.key"
|
||||
export ssl_ca="${script_path}/certs/ca.crt"
|
||||
|
||||
fi
|
||||
|
||||
export script_path=$(dirname $(realpath -s $0))
|
||||
source $script_path/functions/cleanup.sh
|
||||
source $script_path/functions/wait-for-container.sh
|
||||
trap "cleanup_trap ${network_name}" EXIT
|
||||
|
||||
|
||||
if [[ "$CLEANUP" == "true" ]]; then
|
||||
cleanup_all_in_network $network_name
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m Creating network $network_name if it does not exist already \033[0m"
|
||||
docker network inspect "$network_name" > /dev/null 2>&1 || docker network create "$network_name"
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Exposes a routine scripts can call to wait for a container if that container set up a health command
|
||||
#
|
||||
# Please source .ci/functions/imports.sh as a whole not just this file
|
||||
#
|
||||
# Version 1.0.1
|
||||
# - Initial version after refactor
|
||||
# - Make sure wait_for_contiainer is silent
|
||||
|
||||
function wait_for_container {
|
||||
set +x
|
||||
until ! container_running "$1" || (container_running "$1" && [[ "$(docker inspect -f "{{.State.Health.Status}}" ${1})" != "starting" ]]); do
|
||||
echo ""
|
||||
docker inspect -f "{{range .State.Health.Log}}{{.Output}}{{end}}" ${1}
|
||||
echo -e "\033[34;1mINFO:\033[0m waiting for node $1 to be up\033[0m"
|
||||
sleep 2;
|
||||
done;
|
||||
|
||||
# Always show logs if the container is running, this is very useful both on CI as well as while developing
|
||||
if container_running $1; then
|
||||
docker logs $1
|
||||
fi
|
||||
|
||||
if ! container_running $1 || [[ "$(docker inspect -f "{{.State.Health.Status}}" ${1})" != "healthy" ]]; then
|
||||
cleanup_all_in_network $2
|
||||
echo
|
||||
echo -e "\033[31;1mERROR:\033[0m Failed to start $1 in detached mode beyond health checks\033[0m"
|
||||
echo -e "\033[31;1mERROR:\033[0m dumped the docker log before shutting the node down\033[0m"
|
||||
return 1
|
||||
else
|
||||
echo
|
||||
echo -e "\033[32;1mSUCCESS:\033[0m Detached and healthy: ${1} on docker network: ${network_name}\033[0m"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
---
|
||||
|
||||
##### GLOBAL METADATA
|
||||
|
||||
@ -42,15 +42,11 @@
|
||||
- axis:
|
||||
type: yaml
|
||||
filename: .ci/test-matrix.yml
|
||||
name: STACK_VERSION
|
||||
name: ELASTICSEARCH_VERSION
|
||||
- axis:
|
||||
type: yaml
|
||||
filename: .ci/test-matrix.yml
|
||||
name: NODE_JS_VERSION
|
||||
- axis:
|
||||
type: yaml
|
||||
filename: .ci/test-matrix.yml
|
||||
name: TEST_SUITE
|
||||
yaml-strategy:
|
||||
exclude-key: exclude
|
||||
filename: .ci/test-matrix.yml
|
||||
@ -69,6 +65,3 @@
|
||||
publishers:
|
||||
- email:
|
||||
recipients: infra-root+build@elastic.co
|
||||
# - junit:
|
||||
# results: "*-junit.xml"
|
||||
# allow-empty-results: true
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source /usr/local/bin/bash_standard_lib.sh
|
||||
|
||||
DOCKER_IMAGES="node:14-alpine
|
||||
node:12-alpine
|
||||
node:10-alpine
|
||||
node:8-alpine
|
||||
"
|
||||
|
||||
for di in ${DOCKER_IMAGES}
|
||||
do
|
||||
(retry 2 docker pull "${di}") || echo "Error pulling ${di} Docker image, we continue"
|
||||
done
|
||||
|
||||
@ -1,175 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Launch one or more Elasticsearch nodes via the Docker image,
|
||||
# to form a cluster suitable for running the REST API tests.
|
||||
#
|
||||
# Export the ELASTICSEARCH_VERSION variable, eg. 'elasticsearch:8.0.0-SNAPSHOT'.
|
||||
|
||||
if [[ -z "$ELASTICSEARCH_VERSION" ]]; then
|
||||
echo -e "\033[31;1mERROR:\033[0m Required environment variable [ELASTICSEARCH_VERSION] not set\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
moniker=$(echo "$ELASTICSEARCH_VERSION" | tr -C "[:alnum:]" '-')
|
||||
suffix=rest-test
|
||||
|
||||
NODE_NAME=${NODE_NAME-${moniker}node1}
|
||||
MASTER_NODE_NAME=${MASTER_NODE_NAME-${NODE_NAME}}
|
||||
CLUSTER_NAME=${CLUSTER_NAME-${moniker}${suffix}}
|
||||
HTTP_PORT=${HTTP_PORT-9200}
|
||||
|
||||
ELASTIC_PASSWORD=${ELASTIC_PASSWORD-changeme}
|
||||
SSL_CERT=${SSL_CERT-"$PWD/certs/testnode.crt"}
|
||||
SSL_KEY=${SSL_KEY-"$PWD/certs/testnode.key"}
|
||||
SSL_CA=${SSL_CA-"$PWD/certs/ca.crt"}
|
||||
|
||||
DETACH=${DETACH-false}
|
||||
CLEANUP=${CLEANUP-false}
|
||||
|
||||
volume_name=${NODE_NAME}-${suffix}-data
|
||||
network_default=${moniker}${suffix}
|
||||
NETWORK_NAME=${NETWORK_NAME-"$network_default"}
|
||||
|
||||
set +x
|
||||
|
||||
function cleanup_volume {
|
||||
if [[ "$(docker volume ls -q -f name=$1)" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing volume $1\033[0m"
|
||||
(docker volume rm "$1") || true
|
||||
fi
|
||||
}
|
||||
function cleanup_node {
|
||||
if [[ "$(docker ps -q -f name=$1)" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing container $1\033[0m"
|
||||
(docker container rm --force --volumes "$1") || true
|
||||
cleanup_volume "$1-${suffix}-data"
|
||||
fi
|
||||
}
|
||||
function cleanup_network {
|
||||
if [[ "$(docker network ls -q -f name=$1)" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m Removing network $1\033[0m"
|
||||
(docker network rm "$1") || true
|
||||
fi
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
if [[ "$DETACH" != "true" ]] || [[ "$1" == "1" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m clean the node and volume on startup (1) OR on exit if not detached\033[0m"
|
||||
cleanup_node "$NODE_NAME"
|
||||
fi
|
||||
if [[ "$DETACH" != "true" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m clean the network if not detached (start and exit)\033[0m"
|
||||
cleanup_network "$NETWORK_NAME"
|
||||
fi
|
||||
};
|
||||
trap "cleanup 0" EXIT
|
||||
|
||||
if [[ "$CLEANUP" == "true" ]]; then
|
||||
trap - EXIT
|
||||
if [[ -z "$(docker network ls -q -f name=${NETWORK_NAME})" ]]; then
|
||||
echo -e "\033[34;1mINFO:\033[0m $NETWORK_NAME is already deleted\033[0m"
|
||||
exit 0
|
||||
fi
|
||||
containers=$(docker network inspect -f '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' ${NETWORK_NAME})
|
||||
while read -r container; do
|
||||
cleanup_node "$container"
|
||||
done <<< "$containers"
|
||||
cleanup_network "$NETWORK_NAME"
|
||||
echo -e "\033[32;1mSUCCESS:\033[0m Cleaned up and exiting\033[0m"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m Making sure previous run leftover infrastructure is removed \033[0m"
|
||||
cleanup 1
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m Creating network $NETWORK_NAME if it does not exist already \033[0m"
|
||||
docker network inspect "$NETWORK_NAME" > /dev/null 2>&1 || docker network create "$NETWORK_NAME"
|
||||
|
||||
environment=($(cat <<-END
|
||||
--env node.name=$NODE_NAME
|
||||
--env cluster.name=$CLUSTER_NAME
|
||||
--env cluster.routing.allocation.disk.threshold_enabled=false
|
||||
--env bootstrap.memory_lock=true
|
||||
--env node.attr.testattr=test
|
||||
--env path.repo=/tmp
|
||||
--env repositories.url.allowed_urls=http://snapshot.test*
|
||||
END
|
||||
))
|
||||
|
||||
volumes=($(cat <<-END
|
||||
--volume $volume_name:/usr/share/elasticsearch/data
|
||||
END
|
||||
))
|
||||
|
||||
if [[ "$ELASTICSEARCH_VERSION" != *oss* ]]; then
|
||||
environment+=($(cat <<-END
|
||||
--env ELASTIC_PASSWORD=$ELASTIC_PASSWORD
|
||||
--env xpack.license.self_generated.type=trial
|
||||
--env xpack.security.enabled=true
|
||||
--env xpack.security.http.ssl.enabled=true
|
||||
--env xpack.security.http.ssl.verification_mode=certificate
|
||||
--env xpack.security.http.ssl.key=certs/testnode.key
|
||||
--env xpack.security.http.ssl.certificate=certs/testnode.crt
|
||||
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
|
||||
--env xpack.security.transport.ssl.enabled=true
|
||||
--env xpack.security.transport.ssl.key=certs/testnode.key
|
||||
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
|
||||
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
|
||||
END
|
||||
))
|
||||
volumes+=($(cat <<-END
|
||||
--volume $SSL_CERT:/usr/share/elasticsearch/config/certs/testnode.crt
|
||||
--volume $SSL_KEY:/usr/share/elasticsearch/config/certs/testnode.key
|
||||
--volume $SSL_CA:/usr/share/elasticsearch/config/certs/ca.crt
|
||||
END
|
||||
))
|
||||
fi
|
||||
|
||||
url="http://$NODE_NAME"
|
||||
if [[ "$ELASTICSEARCH_VERSION" != *oss* ]]; then
|
||||
url="https://elastic:$ELASTIC_PASSWORD@$NODE_NAME"
|
||||
fi
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m Starting container $NODE_NAME \033[0m"
|
||||
set -x
|
||||
docker run \
|
||||
--name "$NODE_NAME" \
|
||||
--network "$NETWORK_NAME" \
|
||||
--env ES_JAVA_OPTS=-"Xms1g -Xmx1g" \
|
||||
"${environment[@]}" \
|
||||
"${volumes[@]}" \
|
||||
--publish "$HTTP_PORT":9200 \
|
||||
--ulimit nofile=65536:65536 \
|
||||
--ulimit memlock=-1:-1 \
|
||||
--detach="$DETACH" \
|
||||
--health-cmd="curl --silent --insecure --fail $url:9200/_cluster/health || exit 1" \
|
||||
--health-interval=2s \
|
||||
--health-retries=20 \
|
||||
--health-timeout=2s \
|
||||
--rm \
|
||||
docker.elastic.co/elasticsearch/"$ELASTICSEARCH_VERSION";
|
||||
set +x
|
||||
|
||||
if [[ "$DETACH" == "true" ]]; then
|
||||
until [[ "$(docker inspect -f "{{.State.Health.Status}}" ${NODE_NAME})" != "starting" ]]; do
|
||||
sleep 2;
|
||||
echo ""
|
||||
echo -e "\033[34;1mINFO:\033[0m waiting for node $NODE_NAME to be up\033[0m"
|
||||
done;
|
||||
# Always show the node getting started logs, this is very useful both on CI as well as while developing
|
||||
docker logs "$NODE_NAME"
|
||||
if [[ "$(docker inspect -f "{{.State.Health.Status}}" ${NODE_NAME})" != "healthy" ]]; then
|
||||
cleanup 1
|
||||
echo
|
||||
echo -e "\033[31;1mERROR:\033[0m Failed to start ${ELASTICSEARCH_VERSION} in detached mode beyond health checks\033[0m"
|
||||
echo -e "\033[31;1mERROR:\033[0m dumped the docker log before shutting the node down\033[0m"
|
||||
exit 1
|
||||
else
|
||||
echo
|
||||
echo -e "\033[32;1mSUCCESS:\033[0m Detached and healthy: ${NODE_NAME} on docker network: ${NETWORK_NAME}\033[0m"
|
||||
echo -e "\033[32;1mSUCCESS:\033[0m Running on: ${url/$NODE_NAME/localhost}:${HTTP_PORT}\033[0m"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
@ -8,47 +8,102 @@
|
||||
#
|
||||
# - $ELASTICSEARCH_VERSION
|
||||
# - $NODE_JS_VERSION
|
||||
# - $TEST_SUITE
|
||||
#
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
ELASTICSEARCH_VERSION=${STACK_VERSION}
|
||||
set +x
|
||||
export VAULT_TOKEN=$(vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
|
||||
export CODECOV_TOKEN=$(vault read -field=token secret/clients-ci/elasticsearch-js/codecov)
|
||||
unset VAULT_ROLE_ID VAULT_SECRET_ID VAULT_TOKEN
|
||||
set -x
|
||||
|
||||
function cleanup {
|
||||
docker container rm --force --volumes elasticsearch-oss > /dev/null 2>&1 || true
|
||||
docker container rm --force --volumes elasticsearch-platinum > /dev/null 2>&1 || true
|
||||
docker container rm --force --volumes elasticsearch-js-oss > /dev/null 2>&1 || true
|
||||
docker container rm --force --volumes elasticsearch-js-platinum > /dev/null 2>&1 || true
|
||||
docker network rm esnet-oss > /dev/null
|
||||
docker network rm esnet-platinum > /dev/null
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
# create network and volume
|
||||
docker network create esnet-oss
|
||||
docker network create esnet-platinum
|
||||
|
||||
# create client image
|
||||
docker build \
|
||||
--file .ci/Dockerfile \
|
||||
--tag elastic/elasticsearch-js \
|
||||
--build-arg NODE_JS_VERSION=${NODE_JS_VERSION} \
|
||||
.
|
||||
|
||||
NODE_NAME="es1"
|
||||
# run elasticsearch oss
|
||||
docker run \
|
||||
--rm \
|
||||
--env "node.attr.testattr=test" \
|
||||
--env "path.repo=/tmp" \
|
||||
--env "repositories.url.allowed_urls=http://snapshot.*" \
|
||||
--env "discovery.type=single-node" \
|
||||
--network=esnet-oss \
|
||||
--name=elasticsearch-oss \
|
||||
--detach \
|
||||
docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTICSEARCH_VERSION}
|
||||
|
||||
# run elasticsearch platinum
|
||||
repo=$(pwd)
|
||||
testnodecrt="/.ci/certs/testnode.crt"
|
||||
testnodekey="/.ci/certs/testnode.key"
|
||||
cacrt="/.ci/certs/ca.crt"
|
||||
|
||||
elasticsearch_image="elasticsearch"
|
||||
elasticsearch_url="https://elastic:changeme@${NODE_NAME}:9200"
|
||||
if [[ $TEST_SUITE != "xpack" ]]; then
|
||||
elasticsearch_image="elasticsearch-oss"
|
||||
elasticsearch_url="http://${NODE_NAME}:9200"
|
||||
fi
|
||||
|
||||
ELASTICSEARCH_VERSION="${elasticsearch_image}:${ELASTICSEARCH_VERSION}" \
|
||||
NODE_NAME="${NODE_NAME}" \
|
||||
NETWORK_NAME="esnet" \
|
||||
DETACH=true \
|
||||
SSL_CERT="${repo}${testnodecrt}" \
|
||||
SSL_KEY="${repo}${testnodekey}" \
|
||||
SSL_CA="${repo}${cacrt}" \
|
||||
bash .ci/run-elasticsearch.sh
|
||||
|
||||
docker run \
|
||||
--network=esnet \
|
||||
--env "TEST_ES_SERVER=${elasticsearch_url}" \
|
||||
--rm \
|
||||
--env "node.attr.testattr=test" \
|
||||
--env "path.repo=/tmp" \
|
||||
--env "repositories.url.allowed_urls=http://snapshot.*" \
|
||||
--env "discovery.type=single-node" \
|
||||
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
|
||||
--env "ELASTIC_PASSWORD=changeme" \
|
||||
--env "xpack.security.enabled=true" \
|
||||
--env "xpack.license.self_generated.type=trial" \
|
||||
--env "xpack.security.http.ssl.enabled=true" \
|
||||
--env "xpack.security.http.ssl.verification_mode=certificate" \
|
||||
--env "xpack.security.http.ssl.key=certs/testnode.key" \
|
||||
--env "xpack.security.http.ssl.certificate=certs/testnode.crt" \
|
||||
--env "xpack.security.http.ssl.certificate_authorities=certs/ca.crt" \
|
||||
--env "xpack.security.transport.ssl.enabled=true" \
|
||||
--env "xpack.security.transport.ssl.key=certs/testnode.key" \
|
||||
--env "xpack.security.transport.ssl.certificate=certs/testnode.crt" \
|
||||
--env "xpack.security.transport.ssl.certificate_authorities=certs/ca.crt" \
|
||||
--volume "$repo$testnodecrt:/usr/share/elasticsearch/config/certs/testnode.crt" \
|
||||
--volume "$repo$testnodekey:/usr/share/elasticsearch/config/certs/testnode.key" \
|
||||
--volume "$repo$cacrt:/usr/share/elasticsearch/config/certs/ca.crt" \
|
||||
--network=esnet-platinum \
|
||||
--name=elasticsearch-platinum \
|
||||
--detach \
|
||||
docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
|
||||
|
||||
# run the client unit and oss integration test
|
||||
docker run \
|
||||
--network=esnet-oss \
|
||||
--env "TEST_ES_SERVER=http://elasticsearch-oss:9200" \
|
||||
--env "CODECOV_TOKEN" \
|
||||
--volume $repo:/usr/src/app \
|
||||
--volume /usr/src/app/node_modules \
|
||||
--name elasticsearch-js \
|
||||
--name elasticsearch-js-oss \
|
||||
--rm \
|
||||
elastic/elasticsearch-js \
|
||||
npm run ci
|
||||
|
||||
# run the client platinium integration test
|
||||
docker run \
|
||||
--network=esnet-platinum \
|
||||
--env "TEST_ES_SERVER=https://elastic:changeme@elasticsearch-platinum:9200" \
|
||||
--volume $repo:/usr/src/app \
|
||||
--volume /usr/src/app/node_modules \
|
||||
--name elasticsearch-js-platinum \
|
||||
--rm \
|
||||
elastic/elasticsearch-js \
|
||||
npm run test:integration
|
||||
|
||||
@ -1,15 +1,10 @@
|
||||
---
|
||||
STACK_VERSION:
|
||||
- 6.8.4
|
||||
ELASTICSEARCH_VERSION:
|
||||
- 7.0.0
|
||||
|
||||
NODE_JS_VERSION:
|
||||
- 14
|
||||
- 12
|
||||
- 10
|
||||
- 8
|
||||
|
||||
TEST_SUITE:
|
||||
- oss
|
||||
- xpack
|
||||
|
||||
exclude: ~
|
||||
|
||||
@ -3,7 +3,7 @@ comment: off
|
||||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: "95...100"
|
||||
range: "90...100"
|
||||
|
||||
status:
|
||||
project: yes
|
||||
16
.github/workflows/backport.yml
vendored
16
.github/workflows/backport.yml
vendored
@ -1,16 +0,0 @@
|
||||
name: Backport
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
runs-on: ubuntu-latest
|
||||
name: Backport
|
||||
steps:
|
||||
- name: Backport
|
||||
uses: tibdex/backport@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
120
.github/workflows/nodejs.yml
vendored
120
.github/workflows/nodejs.yml
vendored
@ -1,120 +0,0 @@
|
||||
name: Node CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 14.x]
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
npm run lint
|
||||
|
||||
- name: Unit test
|
||||
run: |
|
||||
npm run test:unit
|
||||
|
||||
- name: Behavior test
|
||||
run: |
|
||||
npm run test:behavior
|
||||
|
||||
- name: Type Definitions
|
||||
run: |
|
||||
npm run test:types
|
||||
|
||||
test-node-v8:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x]
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
npm run test:unit -- --node-arg=--harmony-async-iteration
|
||||
|
||||
code-coverage:
|
||||
name: Code coverage
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Code coverage
|
||||
run: |
|
||||
npm run test:coverage
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
file: ./coverage.lcov
|
||||
fail_ci_if_error: true
|
||||
|
||||
license:
|
||||
name: License check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: License checker
|
||||
run: |
|
||||
npm run license-checker
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@ -50,6 +50,8 @@ package-lock.json
|
||||
# elasticsearch repo or binary files
|
||||
elasticsearch*
|
||||
|
||||
test/benchmarks/macro/fixtures/*
|
||||
# Generated typings, we don't commit them
|
||||
# because we should copy them in the main .d.ts file
|
||||
api/generated.d.ts
|
||||
|
||||
*-junit.xml
|
||||
test/benchmarks/macro/fixtures/*
|
||||
|
||||
21
.travis.yml
Normal file
21
.travis.yml
Normal file
@ -0,0 +1,21 @@
|
||||
dist: trusty
|
||||
|
||||
sudo: required
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "12"
|
||||
- "10"
|
||||
- "8"
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
||||
script:
|
||||
- npm run license-checker && npm run test
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: always
|
||||
2
LICENSE
2
LICENSE
@ -187,7 +187,7 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2020 Elastic and contributors
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
274
README.md
274
README.md
@ -1,24 +1,23 @@
|
||||
<img align="right" width="auto" height="auto" src="https://www.elastic.co/static-res/images/elastic-logo-200.png">
|
||||
|
||||
# Elasticsearch Node.js client
|
||||
# @elastic/elasticsearch
|
||||
|
||||
[](http://standardjs.com/) [](https://clients-ci.elastic.co/view/Javascript/job/elastic+elasticsearch-js+master/) [](https://codecov.io/gh/elastic/elasticsearch-js) [](https://www.npmjs.com/package/@elastic/elasticsearch)
|
||||
[](http://standardjs.com/) [](https://clients-ci.elastic.co/job/elastic+elasticsearch-js+master/) [](https://codecov.io/gh/elastic/elasticsearch-js) [](https://www.npmjs.com/package/@elastic/elasticsearch)
|
||||
|
||||
---
|
||||
|
||||
**Note:** In the past months we have worked on the new Elasticsearch Node.js client, and if you want you can already try it by following the instructions below, while if you're going to use the legacy one or report an issue, please check out [elastic/elasticsearch-js-legacy](https://github.com/elastic/elasticsearch-js-legacy).
|
||||
|
||||
---
|
||||
|
||||
The official Node.js client for Elasticsearch.
|
||||
|
||||
---
|
||||
|
||||
**Note:** In the past months we have worked on the new Elasticsearch Node.js client and you can use it by following the instructions below. If you're going to use the legacy one or report an issue, however, please check out [elastic/elasticsearch-js-legacy](https://github.com/elastic/elasticsearch-js-legacy).
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
- One-to-one mapping with REST API.
|
||||
- Generalized, pluggable architecture.
|
||||
- Configurable, automatic discovery of cluster nodes.
|
||||
- Persistent, Keep-Alive connections.
|
||||
- Load balancing across all available nodes.
|
||||
- Child client support.
|
||||
- Load balancing (with pluggable selection strategy) across all available nodes.
|
||||
- TypeScript support out of the box.
|
||||
|
||||
## Install
|
||||
@ -30,140 +29,19 @@ npm install @elastic/elasticsearch
|
||||
|
||||
The minimum supported version of Node.js is `v8`.
|
||||
|
||||
The library is compatible with all Elasticsearch versions since 5.x, and you should use the same major version of the Elasticsearch instance that you are using.
|
||||
|
||||
| Elasticsearch Version | Client Version |
|
||||
| --------------------- |----------------|
|
||||
| `master` | `master` |
|
||||
| `7.x` | `7.x` |
|
||||
| `6.x` | `6.x` |
|
||||
| `5.x` | `5.x` |
|
||||
|
||||
To install a specific major of the client, run the following command:
|
||||
The library is compatible with all Elasticsearch versions since 5.x, but you should use the same major version of the Elasticsearch instance that you are using.
|
||||
```
|
||||
npm install @elastic/elasticsearch@<major>
|
||||
# Elasticsearch 7.x
|
||||
@elastic/elasticsearch@7
|
||||
|
||||
# Elasticsearch 6.x
|
||||
@elastic/elasticsearch@6
|
||||
|
||||
# Elasticsearch 5.x
|
||||
@elastic/elasticsearch@5
|
||||
```
|
||||
|
||||
#### Browser
|
||||
|
||||
WARNING: There is no official support for the browser environment. It exposes your Elasticsearch instance to everyone, which could lead to security issues.
|
||||
We recommend that you write a lightweight proxy that uses this client instead.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Introduction](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/introduction.html)
|
||||
- [Usage](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-usage.html)
|
||||
- [Client configuration](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-configuration.html)
|
||||
- [API reference](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html)
|
||||
- [Breaking changes coming from the old client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/breaking-changes.html)
|
||||
- [Authentication](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html)
|
||||
- [Observability](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html)
|
||||
- [Creating a child client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/child-client.html)
|
||||
- [Extend the client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/extend-client.html)
|
||||
- [Typescript support](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/typescript.html)
|
||||
- [Examples](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/examples.html)
|
||||
|
||||
## Quick start
|
||||
|
||||
First of all, require the client and initialize it:
|
||||
```js
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({ node: 'http://localhost:9200' })
|
||||
```
|
||||
|
||||
You can use both the callback-style API and the promise-style API, both behave the same way.
|
||||
```js
|
||||
// promise API
|
||||
const result = await client.search({
|
||||
index: 'my-index',
|
||||
body: {
|
||||
query: {
|
||||
match: { hello: 'world' }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// callback API
|
||||
client.search({
|
||||
index: 'my-index',
|
||||
body: {
|
||||
query: {
|
||||
match: { hello: 'world' }
|
||||
}
|
||||
}
|
||||
}, (err, result) => {
|
||||
if (err) console.log(err)
|
||||
})
|
||||
```
|
||||
The returned value of **every** API call is formed as follows:
|
||||
```ts
|
||||
{
|
||||
body: object | boolean
|
||||
statusCode: number
|
||||
headers: object
|
||||
warnings: [string]
|
||||
meta: object
|
||||
}
|
||||
```
|
||||
|
||||
Let's see a complete example!
|
||||
```js
|
||||
'use strict'
|
||||
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({ node: 'http://localhost:9200' })
|
||||
|
||||
async function run () {
|
||||
// Let's start by indexing some data
|
||||
await client.index({
|
||||
index: 'game-of-thrones',
|
||||
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
|
||||
body: {
|
||||
character: 'Ned Stark',
|
||||
quote: 'Winter is coming.'
|
||||
}
|
||||
})
|
||||
|
||||
await client.index({
|
||||
index: 'game-of-thrones',
|
||||
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
|
||||
body: {
|
||||
character: 'Daenerys Targaryen',
|
||||
quote: 'I am the blood of the dragon.'
|
||||
}
|
||||
})
|
||||
|
||||
await client.index({
|
||||
index: 'game-of-thrones',
|
||||
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
|
||||
body: {
|
||||
character: 'Tyrion Lannister',
|
||||
quote: 'A mind needs books like a sword needs a whetstone.'
|
||||
}
|
||||
})
|
||||
|
||||
// here we are forcing an index refresh, otherwise we will not
|
||||
// get any result in the consequent search
|
||||
await client.indices.refresh({ index: 'game-of-thrones' })
|
||||
|
||||
// Let's search!
|
||||
const { body } = await client.search({
|
||||
index: 'game-of-thrones',
|
||||
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
|
||||
body: {
|
||||
query: {
|
||||
match: { quote: 'winter' }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
console.log(body.hits.hits)
|
||||
}
|
||||
|
||||
run().catch(console.log)
|
||||
```
|
||||
|
||||
## Install multiple versions
|
||||
#### Install multiple versions
|
||||
If you are using multiple versions of Elasticsearch, you need to use multiple versions of the client. In the past, install multiple versions of the same package was not possible, but with `npm v6.9`, you can do that via aliasing.
|
||||
|
||||
The command you must run to install different version of the client is:
|
||||
@ -182,7 +60,7 @@ And your `package.json` will look like the following:
|
||||
"es7": "npm:@elastic/elasticsearch@^7.0.0"
|
||||
}
|
||||
```
|
||||
You will require the packages from your code by using the alias you have defined.
|
||||
And finally, you will require the packages from your code by using the alias you have defined.
|
||||
```js
|
||||
const { Client: Client6 } = require('es6')
|
||||
const { Client: Client7 } = require('es7')
|
||||
@ -199,6 +77,118 @@ Finally, if you want to install the client for the next version of Elasticsearch
|
||||
npm install esmaster@github:elastic/elasticsearch-js
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
You can find the full documentation in our [docs](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html) website.
|
||||
|
||||
```js
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({ node: 'http://localhost:9200' })
|
||||
|
||||
// promise API
|
||||
const result = await client.search({
|
||||
index: 'my-index',
|
||||
body: { foo: 'bar' }
|
||||
})
|
||||
|
||||
// callback API
|
||||
client.search({
|
||||
index: 'my-index',
|
||||
body: { foo: 'bar' }
|
||||
}, (err, result) => {
|
||||
if (err) console.log(err)
|
||||
})
|
||||
```
|
||||
The returned value of **every** API call is formed as follows:
|
||||
```ts
|
||||
{
|
||||
body: object | boolean
|
||||
statusCode: number
|
||||
headers: object
|
||||
warnings: [string]
|
||||
meta: object
|
||||
}
|
||||
```
|
||||
### Client options
|
||||
|
||||
The client is designed to be easily configured as you see fit for your needs, following you can see all the possible options that you can use to configure it.
|
||||
|
||||
```ts
|
||||
{
|
||||
// the Elasticsearch endpoint to use
|
||||
node: string | string[];
|
||||
// alias of above
|
||||
nodes: string | string[];
|
||||
// custom connection class
|
||||
Connection: typeof Connection;
|
||||
// custom connection pool class
|
||||
ConnectionPool: typeof ConnectionPool;
|
||||
// custom transport class
|
||||
Transport: typeof Transport;
|
||||
// custom serializer class
|
||||
Serializer: typeof Serializer;
|
||||
// max number of retries for each request
|
||||
maxRetries: number;
|
||||
// max request timeout for each request
|
||||
requestTimeout: number;
|
||||
// max ping timeout for each request
|
||||
pingTimeout: number;
|
||||
// perform a sniff operation every `n` milliseconds
|
||||
sniffInterval: number;
|
||||
// perform a sniff once the client is started
|
||||
sniffOnStart: boolean;
|
||||
// custom sniff endpoint, defaults `_nodes/_all/http`
|
||||
sniffEndpoint: string;
|
||||
// perform a sniff on connection fault
|
||||
sniffOnConnectionFault: boolean;
|
||||
// configurethe node resurrection strategy, default `ping`
|
||||
resurrectStrategy: 'ping' | 'optimistic' | 'none';
|
||||
// adds `accept-encoding` header to every request
|
||||
suggestCompression: boolean;
|
||||
// enable gzip request body compression
|
||||
compression: 'gzip';
|
||||
// ssl configuraton
|
||||
ssl: http.SecureContextOptions;
|
||||
// http agent options
|
||||
agent: http.AgentOptions;
|
||||
// filters which node not to use for a request
|
||||
nodeFilter: nodeFilterFn;
|
||||
// custom selection strategy, defaults `round-robin`
|
||||
nodeSelector: nodeSelectorFn | string;
|
||||
// function to generate the request id for every request
|
||||
generateRequestId: generateRequestIdFn;
|
||||
// name to identify the client instance in the events
|
||||
name: string;
|
||||
}
|
||||
```
|
||||
|
||||
### Request specific options
|
||||
If needed you can pass request specific options in a second object:
|
||||
```js
|
||||
// promise API
|
||||
const result = await client.search({
|
||||
index: 'my-index',
|
||||
body: { foo: 'bar' }
|
||||
}, {
|
||||
ignore: [404],
|
||||
maxRetries: 3
|
||||
})
|
||||
```
|
||||
The supported *request specific options* are:
|
||||
```ts
|
||||
{
|
||||
ignore: [number], // default `null`
|
||||
requestTimeout: number, // client default
|
||||
maxRetries: number, // default `5`
|
||||
asStream: boolean, // default `false`
|
||||
compression: string, // default `false`
|
||||
headers: object, // default `null`
|
||||
querystring: object // default `null`,
|
||||
context: object // default `null`,
|
||||
id: any // default incr. integer
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This software is licensed under the [Apache 2 license](./LICENSE).
|
||||
|
||||
@ -35,7 +35,6 @@ function buildBulk (opts) {
|
||||
* @param {string} routing - Specific routing value
|
||||
* @param {time} timeout - Explicit operation timeout
|
||||
* @param {string} type - Default document type for items which don't provide one
|
||||
* @param {list} fields - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request
|
||||
* @param {list} _source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
|
||||
* @param {list} _source_excludes - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
|
||||
* @param {list} _source_includes - Default list of fields to extract and return from the _source field, can be overridden on each sub-request
|
||||
@ -49,7 +48,6 @@ function buildBulk (opts) {
|
||||
'routing',
|
||||
'timeout',
|
||||
'type',
|
||||
'fields',
|
||||
'_source',
|
||||
'_source_excludes',
|
||||
'_source_exclude',
|
||||
|
||||
@ -51,6 +51,12 @@ function buildCcrFollowStats (opts) {
|
||||
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}`)
|
||||
|
||||
@ -86,10 +86,6 @@ function buildCreate (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
@ -116,7 +112,11 @@ function buildCreate (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_create' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -89,24 +89,11 @@ function buildDelete (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: type, index')
|
||||
return handleError(err, callback)
|
||||
} else 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}`)
|
||||
@ -128,7 +115,11 @@ function buildDelete (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -97,10 +97,6 @@ function buildExists (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a body')
|
||||
return handleError(err, callback)
|
||||
@ -127,7 +123,11 @@ function buildExists (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -30,7 +30,7 @@ function buildExistsSource (opts) {
|
||||
*
|
||||
* @param {string} id - The document ID
|
||||
* @param {string} index - The name of the index
|
||||
* @param {string} type - The type of the document; use `_all` to fetch the first document matching the ID across all types
|
||||
* @param {string} type - The type of the document; deprecated and optional starting with 7.0
|
||||
* @param {string} parent - The ID of the parent document
|
||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode
|
||||
@ -94,10 +94,6 @@ function buildExistsSource (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a body')
|
||||
return handleError(err, callback)
|
||||
@ -133,7 +129,11 @@ function buildExistsSource (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -103,10 +103,6 @@ function buildExplain (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
@ -129,7 +125,11 @@ function buildExplain (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -33,7 +33,6 @@ function buildFieldCaps (opts) {
|
||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
* @param {object} body - Field json objects containing an array of field names
|
||||
*/
|
||||
|
||||
const acceptedQuerystring = [
|
||||
@ -68,6 +67,12 @@ function buildFieldCaps (opts) {
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a 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}`)
|
||||
@ -99,7 +104,7 @@ function buildFieldCaps (opts) {
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
body: '',
|
||||
querystring
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +58,8 @@ function buildGet (opts) {
|
||||
'_source_exclude',
|
||||
'_source_includes',
|
||||
'_source_include',
|
||||
'_source_exclude',
|
||||
'_source_include',
|
||||
'version',
|
||||
'version_type',
|
||||
'pretty',
|
||||
@ -99,10 +101,6 @@ function buildGet (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a body')
|
||||
return handleError(err, callback)
|
||||
@ -129,7 +127,11 @@ function buildGet (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -30,7 +30,7 @@ function buildGetSource (opts) {
|
||||
*
|
||||
* @param {string} id - The document ID
|
||||
* @param {string} index - The name of the index
|
||||
* @param {string} type - The type of the document; use `_all` to fetch the first document matching the ID across all types
|
||||
* @param {string} type - The type of the document; deprecated and optional starting with 7.0
|
||||
* @param {string} parent - The ID of the parent document
|
||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode
|
||||
@ -94,10 +94,6 @@ function buildGetSource (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a body')
|
||||
return handleError(err, callback)
|
||||
@ -124,7 +120,11 @@ function buildGetSource (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackGraphExplore (opts) {
|
||||
function buildGraphExplore (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.graph.explore](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html) request
|
||||
* Perform a [graph.explore](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html) request
|
||||
*
|
||||
* @param {list} index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {list} type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
@ -44,7 +44,7 @@ function buildXpackGraphExplore (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackGraphExplore (params, options, callback) {
|
||||
return function graphExplore (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -84,9 +84,9 @@ function buildXpackGraphExplore (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_xpack' + '/' + 'graph' + '/' + '_explore'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_xpack' + '/' + 'graph' + '/' + '_explore'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -102,4 +102,4 @@ function buildXpackGraphExplore (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackGraphExplore
|
||||
module.exports = buildGraphExplore
|
||||
@ -29,11 +29,10 @@ function buildIlmExplainLifecycle (opts) {
|
||||
* Perform a [ilm.explain_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html) request
|
||||
*
|
||||
* @param {string} index - The name of the index to explain
|
||||
* @param {boolean} human - Return data such as dates in a human readable format
|
||||
*/
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'human'
|
||||
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
@ -91,24 +91,11 @@ function buildIndex (opts) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['type'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: type')
|
||||
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['id'] != null && (params['type'] == null || params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: type, index')
|
||||
return handleError(err, callback)
|
||||
} else 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}`)
|
||||
@ -132,8 +119,12 @@ function buildIndex (opts) {
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
} else if ((index) != null && (id) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type)
|
||||
} else {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc'
|
||||
}
|
||||
|
||||
// build request object
|
||||
|
||||
@ -29,7 +29,6 @@ function buildIndicesClearCache (opts) {
|
||||
* Perform a [indices.clear_cache](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html) request
|
||||
*
|
||||
* @param {list} index - A comma-separated list of index name to limit the operation
|
||||
* @param {boolean} field_data - Clear field data. This is deprecated. Prefer `fielddata`.
|
||||
* @param {boolean} fielddata - Clear field data
|
||||
* @param {list} fields - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
|
||||
* @param {boolean} query - Clear query caches
|
||||
@ -37,12 +36,10 @@ function buildIndicesClearCache (opts) {
|
||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
* @param {list} index - A comma-separated list of index name to limit the operation
|
||||
* @param {boolean} request_cache - Clear request cache
|
||||
* @param {boolean} request - Clear request cache
|
||||
*/
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'field_data',
|
||||
'fielddata',
|
||||
'fields',
|
||||
'query',
|
||||
@ -50,7 +47,6 @@ function buildIndicesClearCache (opts) {
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'index',
|
||||
'request_cache',
|
||||
'request',
|
||||
'pretty',
|
||||
'human',
|
||||
@ -60,11 +56,9 @@ function buildIndicesClearCache (opts) {
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
fieldData: 'field_data',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
requestCache: 'request_cache',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
@ -98,7 +92,7 @@ function buildIndicesClearCache (opts) {
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
if (method == null) {
|
||||
method = body == null ? 'GET' : 'POST'
|
||||
method = 'POST'
|
||||
}
|
||||
|
||||
var ignore = options.ignore
|
||||
|
||||
@ -33,7 +33,6 @@ function buildIndicesCreate (opts) {
|
||||
* @param {string} wait_for_active_shards - Set the number of active shards to wait for before the operation returns.
|
||||
* @param {time} timeout - Explicit operation timeout
|
||||
* @param {time} master_timeout - Specify timeout for connection to master
|
||||
* @param {boolean} update_all_types - Whether to update the mapping for all fields with the same name across all types or not
|
||||
* @param {object} body - The configuration for the index (`settings` and `mappings`)
|
||||
*/
|
||||
|
||||
@ -42,7 +41,6 @@ function buildIndicesCreate (opts) {
|
||||
'wait_for_active_shards',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'update_all_types',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -54,7 +52,6 @@ function buildIndicesCreate (opts) {
|
||||
includeTypeName: 'include_type_name',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
masterTimeout: 'master_timeout',
|
||||
updateAllTypes: 'update_all_types',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ function buildIndicesGet (opts) {
|
||||
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request
|
||||
*
|
||||
* @param {list} index - A comma-separated list of index names
|
||||
* @param {boolean} include_type_name - Whether to add the type name to the response (default: true)
|
||||
* @param {boolean} include_type_name - Whether to add the type name to the response (default: false)
|
||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
||||
* @param {boolean} ignore_unavailable - Ignore unavailable indexes (default: false)
|
||||
* @param {boolean} allow_no_indices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
||||
|
||||
@ -30,7 +30,7 @@ function buildIndicesGetMapping (opts) {
|
||||
*
|
||||
* @param {list} index - A comma-separated list of index names
|
||||
* @param {list} type - A comma-separated list of document types
|
||||
* @param {boolean} include_type_name - Whether to add the type name to the response.
|
||||
* @param {boolean} include_type_name - Whether to add the type name to the response (default: false)
|
||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
|
||||
@ -36,7 +36,6 @@ function buildIndicesPutMapping (opts) {
|
||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
* @param {boolean} update_all_types - Whether to update the mapping for all fields with the same name across all types or not
|
||||
* @param {object} body - The mapping definition
|
||||
*/
|
||||
|
||||
@ -47,7 +46,6 @@ function buildIndicesPutMapping (opts) {
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'update_all_types',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -61,7 +59,6 @@ function buildIndicesPutMapping (opts) {
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
updateAllTypes: 'update_all_types',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteExpiredData (opts) {
|
||||
function buildLicenseDelete (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_expired_data](undefined) request
|
||||
* Perform a [license.delete](https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html) request
|
||||
*
|
||||
*/
|
||||
|
||||
@ -38,7 +38,7 @@ function buildXpackMlDeleteExpiredData (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteExpiredData (params, options, callback) {
|
||||
return function licenseDelete (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -77,7 +77,7 @@ function buildXpackMlDeleteExpiredData (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + '_delete_expired_data'
|
||||
path = '/' + '_license'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -92,4 +92,4 @@ function buildXpackMlDeleteExpiredData (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteExpiredData
|
||||
module.exports = buildLicenseDelete
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicenseGet (opts) {
|
||||
function buildLicenseGet (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/get-license.html) request
|
||||
* Perform a [license.get](https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html) request
|
||||
*
|
||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackLicenseGet (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicenseGet (params, options, callback) {
|
||||
return function licenseGet (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -78,7 +78,7 @@ function buildXpackLicenseGet (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license'
|
||||
path = '/' + '_license'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -93,4 +93,4 @@ function buildXpackLicenseGet (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicenseGet
|
||||
module.exports = buildLicenseGet
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicenseGetBasicStatus (opts) {
|
||||
function buildLicenseGetBasicStatus (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.get_basic_status](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/get-trial-status.html) request
|
||||
* Perform a [license.get_basic_status](https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html) request
|
||||
*
|
||||
*/
|
||||
|
||||
@ -38,7 +38,7 @@ function buildXpackLicenseGetBasicStatus (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicenseGetBasicStatus (params, options, callback) {
|
||||
return function licenseGetBasicStatus (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -77,7 +77,7 @@ function buildXpackLicenseGetBasicStatus (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license' + '/' + 'basic_status'
|
||||
path = '/' + '_license' + '/' + 'basic_status'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -92,4 +92,4 @@ function buildXpackLicenseGetBasicStatus (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicenseGetBasicStatus
|
||||
module.exports = buildLicenseGetBasicStatus
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicenseGetTrialStatus (opts) {
|
||||
function buildLicenseGetTrialStatus (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.get_trial_status](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/get-basic-status.html) request
|
||||
* Perform a [license.get_trial_status](https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html) request
|
||||
*
|
||||
*/
|
||||
|
||||
@ -38,7 +38,7 @@ function buildXpackLicenseGetTrialStatus (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicenseGetTrialStatus (params, options, callback) {
|
||||
return function licenseGetTrialStatus (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -77,7 +77,7 @@ function buildXpackLicenseGetTrialStatus (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license' + '/' + 'trial_status'
|
||||
path = '/' + '_license' + '/' + 'trial_status'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -92,4 +92,4 @@ function buildXpackLicenseGetTrialStatus (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicenseGetTrialStatus
|
||||
module.exports = buildLicenseGetTrialStatus
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicensePost (opts) {
|
||||
function buildLicensePost (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.post](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/update-license.html) request
|
||||
* Perform a [license.post](https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html) request
|
||||
*
|
||||
* @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false)
|
||||
* @param {object} body - licenses to be installed
|
||||
@ -40,7 +40,7 @@ function buildXpackLicensePost (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicensePost (params, options, callback) {
|
||||
return function licensePost (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -73,7 +73,7 @@ function buildXpackLicensePost (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license'
|
||||
path = '/' + '_license'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -88,4 +88,4 @@ function buildXpackLicensePost (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicensePost
|
||||
module.exports = buildLicensePost
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicensePostStartBasic (opts) {
|
||||
function buildLicensePostStartBasic (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.post_start_basic](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/start-basic.html) request
|
||||
* Perform a [license.post_start_basic](https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html) request
|
||||
*
|
||||
* @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false)
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackLicensePostStartBasic (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicensePostStartBasic (params, options, callback) {
|
||||
return function licensePostStartBasic (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -78,7 +78,7 @@ function buildXpackLicensePostStartBasic (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license' + '/' + 'start_basic'
|
||||
path = '/' + '_license' + '/' + 'start_basic'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -93,4 +93,4 @@ function buildXpackLicensePostStartBasic (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicensePostStartBasic
|
||||
module.exports = buildLicensePostStartBasic
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicensePostStartTrial (opts) {
|
||||
function buildLicensePostStartTrial (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.post_start_trial](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/start-trial.html) request
|
||||
* Perform a [license.post_start_trial](https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html) request
|
||||
*
|
||||
* @param {string} type - The type of trial license to generate (default: "trial")
|
||||
* @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false)
|
||||
@ -41,7 +41,7 @@ function buildXpackLicensePostStartTrial (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicensePostStartTrial (params, options, callback) {
|
||||
return function licensePostStartTrial (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -80,7 +80,7 @@ function buildXpackLicensePostStartTrial (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license' + '/' + 'start_trial'
|
||||
path = '/' + '_license' + '/' + 'start_trial'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -95,4 +95,4 @@ function buildXpackLicensePostStartTrial (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicensePostStartTrial
|
||||
module.exports = buildLicensePostStartTrial
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMigrationDeprecations (opts) {
|
||||
function buildMigrationDeprecations (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.migration.deprecations](http://www.elastic.co/guide/en/elasticsearch/reference/6.7/migration-api-deprecation.html) request
|
||||
* Perform a [migration.deprecations](http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html) request
|
||||
*
|
||||
* @param {string} index - Index pattern
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackMigrationDeprecations (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMigrationDeprecations (params, options, callback) {
|
||||
return function migrationDeprecations (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -79,9 +79,9 @@ function buildXpackMigrationDeprecations (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_xpack' + '/' + 'migration' + '/' + 'deprecations'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations'
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'migration' + '/' + 'deprecations'
|
||||
path = '/' + '_migration' + '/' + 'deprecations'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -97,4 +97,4 @@ function buildXpackMigrationDeprecations (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMigrationDeprecations
|
||||
module.exports = buildMigrationDeprecations
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlCloseJob (opts) {
|
||||
function buildMlCloseJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.close_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html) request
|
||||
* Perform a [ml.close_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The name of the job to close
|
||||
* @param {boolean} allow_no_jobs - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
||||
@ -46,7 +46,7 @@ function buildXpackMlCloseJob (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlCloseJob (params, options, callback) {
|
||||
return function mlCloseJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -85,7 +85,7 @@ function buildXpackMlCloseJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_close'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_close'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -100,4 +100,4 @@ function buildXpackMlCloseJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlCloseJob
|
||||
module.exports = buildMlCloseJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteCalendar (opts) {
|
||||
function buildMlDeleteCalendar (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_calendar](undefined) request
|
||||
* Perform a [ml.delete_calendar](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to delete
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackMlDeleteCalendar (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteCalendar (params, options, callback) {
|
||||
return function mlDeleteCalendar (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -82,7 +82,7 @@ function buildXpackMlDeleteCalendar (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -97,4 +97,4 @@ function buildXpackMlDeleteCalendar (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteCalendar
|
||||
module.exports = buildMlDeleteCalendar
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteCalendarEvent (opts) {
|
||||
function buildMlDeleteCalendarEvent (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_calendar_event](undefined) request
|
||||
* Perform a [ml.delete_calendar_event](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to modify
|
||||
* @param {string} event_id - The ID of the event to remove from the calendar
|
||||
@ -40,7 +40,7 @@ function buildXpackMlDeleteCalendarEvent (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteCalendarEvent (params, options, callback) {
|
||||
return function mlDeleteCalendarEvent (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -93,7 +93,7 @@ function buildXpackMlDeleteCalendarEvent (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events' + '/' + encodeURIComponent(event_id || eventId)
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events' + '/' + encodeURIComponent(event_id || eventId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -108,4 +108,4 @@ function buildXpackMlDeleteCalendarEvent (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteCalendarEvent
|
||||
module.exports = buildMlDeleteCalendarEvent
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteCalendarJob (opts) {
|
||||
function buildMlDeleteCalendarJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_calendar_job](undefined) request
|
||||
* Perform a [ml.delete_calendar_job](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to modify
|
||||
* @param {string} job_id - The ID of the job to remove from the calendar
|
||||
@ -40,7 +40,7 @@ function buildXpackMlDeleteCalendarJob (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteCalendarJob (params, options, callback) {
|
||||
return function mlDeleteCalendarJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -93,7 +93,7 @@ function buildXpackMlDeleteCalendarJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId)
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -108,4 +108,4 @@ function buildXpackMlDeleteCalendarJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteCalendarJob
|
||||
module.exports = buildMlDeleteCalendarJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteDatafeed (opts) {
|
||||
function buildMlDeleteDatafeed (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html) request
|
||||
* Perform a [ml.delete_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeed to delete
|
||||
* @param {boolean} force - True if the datafeed should be forcefully deleted
|
||||
@ -40,7 +40,7 @@ function buildXpackMlDeleteDatafeed (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteDatafeed (params, options, callback) {
|
||||
return function mlDeleteDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlDeleteDatafeed (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlDeleteDatafeed (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteDatafeed
|
||||
module.exports = buildMlDeleteDatafeed
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackLicenseDelete (opts) {
|
||||
function buildMlDeleteExpiredData (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.license.delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/delete-license.html) request
|
||||
* Perform a [ml.delete_expired_data](undefined) request
|
||||
*
|
||||
*/
|
||||
|
||||
@ -38,7 +38,7 @@ function buildXpackLicenseDelete (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackLicenseDelete (params, options, callback) {
|
||||
return function mlDeleteExpiredData (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -77,7 +77,7 @@ function buildXpackLicenseDelete (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'license'
|
||||
path = '/' + '_ml' + '/' + '_delete_expired_data'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -92,4 +92,4 @@ function buildXpackLicenseDelete (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackLicenseDelete
|
||||
module.exports = buildMlDeleteExpiredData
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteFilter (opts) {
|
||||
function buildMlDeleteFilter (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_filter](undefined) request
|
||||
* Perform a [ml.delete_filter](undefined) request
|
||||
*
|
||||
* @param {string} filter_id - The ID of the filter to delete
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackMlDeleteFilter (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteFilter (params, options, callback) {
|
||||
return function mlDeleteFilter (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -82,7 +82,7 @@ function buildXpackMlDeleteFilter (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
|
||||
path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -97,4 +97,4 @@ function buildXpackMlDeleteFilter (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteFilter
|
||||
module.exports = buildMlDeleteFilter
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteForecast (opts) {
|
||||
function buildMlDeleteForecast (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_forecast](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html) request
|
||||
* Perform a [ml.delete_forecast](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job from which to delete forecasts
|
||||
* @param {string} forecast_id - The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all`
|
||||
@ -44,7 +44,7 @@ function buildXpackMlDeleteForecast (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteForecast (params, options, callback) {
|
||||
return function mlDeleteForecast (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -94,9 +94,9 @@ function buildXpackMlDeleteForecast (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((job_id || jobId) != null && (forecast_id || forecastId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast' + '/' + encodeURIComponent(forecast_id || forecastId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast' + '/' + encodeURIComponent(forecast_id || forecastId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -112,4 +112,4 @@ function buildXpackMlDeleteForecast (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteForecast
|
||||
module.exports = buildMlDeleteForecast
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteJob (opts) {
|
||||
function buildMlDeleteJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html) request
|
||||
* Perform a [ml.delete_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to delete
|
||||
* @param {boolean} force - True if the job should be forcefully deleted
|
||||
@ -42,7 +42,7 @@ function buildXpackMlDeleteJob (opts) {
|
||||
waitForCompletion: 'wait_for_completion'
|
||||
}
|
||||
|
||||
return function xpackMlDeleteJob (params, options, callback) {
|
||||
return function mlDeleteJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -85,7 +85,7 @@ function buildXpackMlDeleteJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -100,4 +100,4 @@ function buildXpackMlDeleteJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteJob
|
||||
module.exports = buildMlDeleteJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlDeleteModelSnapshot (opts) {
|
||||
function buildMlDeleteModelSnapshot (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.delete_model_snapshot](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html) request
|
||||
* Perform a [ml.delete_model_snapshot](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to fetch
|
||||
* @param {string} snapshot_id - The ID of the snapshot to delete
|
||||
@ -40,7 +40,7 @@ function buildXpackMlDeleteModelSnapshot (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlDeleteModelSnapshot (params, options, callback) {
|
||||
return function mlDeleteModelSnapshot (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -93,7 +93,7 @@ function buildXpackMlDeleteModelSnapshot (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -108,4 +108,4 @@ function buildXpackMlDeleteModelSnapshot (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlDeleteModelSnapshot
|
||||
module.exports = buildMlDeleteModelSnapshot
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlFindFileStructure (opts) {
|
||||
function buildMlFindFileStructure (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.find_file_structure](http://www.elastic.co/guide/en/elasticsearch/reference/6.7/ml-find-file-structure.html) request
|
||||
* Perform a [ml.find_file_structure](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html) request
|
||||
*
|
||||
* @param {int} lines_to_sample - How many lines of the file should be included in the analysis
|
||||
* @param {time} timeout - Timeout after which the analysis will be aborted
|
||||
@ -71,7 +71,7 @@ function buildXpackMlFindFileStructure (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlFindFileStructure (params, options, callback) {
|
||||
return function mlFindFileStructure (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -110,7 +110,7 @@ function buildXpackMlFindFileStructure (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'find_file_structure'
|
||||
path = '/' + '_ml' + '/' + 'find_file_structure'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -125,4 +125,4 @@ function buildXpackMlFindFileStructure (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlFindFileStructure
|
||||
module.exports = buildMlFindFileStructure
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlFlushJob (opts) {
|
||||
function buildMlFlushJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.flush_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html) request
|
||||
* Perform a [ml.flush_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The name of the job to flush
|
||||
* @param {boolean} calc_interim - Calculates interim results for the most recent bucket or all buckets within the latency period
|
||||
@ -51,7 +51,7 @@ function buildXpackMlFlushJob (opts) {
|
||||
skipTime: 'skip_time'
|
||||
}
|
||||
|
||||
return function xpackMlFlushJob (params, options, callback) {
|
||||
return function mlFlushJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -90,7 +90,7 @@ function buildXpackMlFlushJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_flush'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_flush'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -105,4 +105,4 @@ function buildXpackMlFlushJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlFlushJob
|
||||
module.exports = buildMlFlushJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlForecast (opts) {
|
||||
function buildMlForecast (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.forecast](undefined) request
|
||||
* Perform a [ml.forecast](undefined) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to forecast for
|
||||
* @param {time} duration - The duration of the forecast
|
||||
@ -42,7 +42,7 @@ function buildXpackMlForecast (opts) {
|
||||
expiresIn: 'expires_in'
|
||||
}
|
||||
|
||||
return function xpackMlForecast (params, options, callback) {
|
||||
return function mlForecast (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -85,7 +85,7 @@ function buildXpackMlForecast (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -100,4 +100,4 @@ function buildXpackMlForecast (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlForecast
|
||||
module.exports = buildMlForecast
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetBuckets (opts) {
|
||||
function buildMlGetBuckets (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_buckets](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html) request
|
||||
* Perform a [ml.get_buckets](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html) request
|
||||
*
|
||||
* @param {string} job_id - ID of the job to get bucket results from
|
||||
* @param {string} timestamp - The timestamp of the desired single bucket result
|
||||
@ -60,7 +60,7 @@ function buildXpackMlGetBuckets (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetBuckets (params, options, callback) {
|
||||
return function mlGetBuckets (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -106,9 +106,9 @@ function buildXpackMlGetBuckets (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((job_id || jobId) != null && (timestamp) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets' + '/' + encodeURIComponent(timestamp)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets' + '/' + encodeURIComponent(timestamp)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -124,4 +124,4 @@ function buildXpackMlGetBuckets (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetBuckets
|
||||
module.exports = buildMlGetBuckets
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetCalendarEvents (opts) {
|
||||
function buildMlGetCalendarEvents (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_calendar_events](undefined) request
|
||||
* Perform a [ml.get_calendar_events](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar containing the events
|
||||
* @param {string} job_id - Get events for the job. When this option is used calendar_id must be '_all'
|
||||
@ -49,7 +49,7 @@ function buildXpackMlGetCalendarEvents (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetCalendarEvents (params, options, callback) {
|
||||
return function mlGetCalendarEvents (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -92,7 +92,7 @@ function buildXpackMlGetCalendarEvents (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events'
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -107,4 +107,4 @@ function buildXpackMlGetCalendarEvents (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetCalendarEvents
|
||||
module.exports = buildMlGetCalendarEvents
|
||||
@ -22,15 +22,16 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetCalendars (opts) {
|
||||
function buildMlGetCalendars (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_calendars](undefined) request
|
||||
* Perform a [ml.get_calendars](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to fetch
|
||||
* @param {int} from - skips a number of calendars
|
||||
* @param {int} size - specifies a max number of calendars to get
|
||||
* @param {object} body - The from and size parameters optionally sent in the body
|
||||
*/
|
||||
|
||||
const acceptedQuerystring = [
|
||||
@ -42,7 +43,7 @@ function buildXpackMlGetCalendars (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetCalendars (params, options, callback) {
|
||||
return function mlGetCalendars (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -54,12 +55,6 @@ function buildXpackMlGetCalendars (opts) {
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params.body != null) {
|
||||
const err = new ConfigurationError('This API does not require a 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}`)
|
||||
@ -82,16 +77,16 @@ function buildXpackMlGetCalendars (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((calendar_id || calendarId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars'
|
||||
path = '/' + '_ml' + '/' + 'calendars'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: '',
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
@ -100,4 +95,4 @@ function buildXpackMlGetCalendars (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetCalendars
|
||||
module.exports = buildMlGetCalendars
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetCategories (opts) {
|
||||
function buildMlGetCategories (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_categories](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html) request
|
||||
* Perform a [ml.get_categories](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html) request
|
||||
*
|
||||
* @param {string} job_id - The name of the job
|
||||
* @param {long} category_id - The identifier of the category definition of interest
|
||||
@ -44,7 +44,7 @@ function buildXpackMlGetCategories (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetCategories (params, options, callback) {
|
||||
return function mlGetCategories (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -84,9 +84,9 @@ function buildXpackMlGetCategories (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((job_id || jobId) != null && (category_id || categoryId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories' + '/' + encodeURIComponent(category_id || categoryId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories' + '/' + encodeURIComponent(category_id || categoryId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -102,4 +102,4 @@ function buildXpackMlGetCategories (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetCategories
|
||||
module.exports = buildMlGetCategories
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetDatafeedStats (opts) {
|
||||
function buildMlGetDatafeedStats (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_datafeed_stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html) request
|
||||
* Perform a [ml.get_datafeed_stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeeds stats to fetch
|
||||
* @param {boolean} allow_no_datafeeds - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
||||
@ -40,7 +40,7 @@ function buildXpackMlGetDatafeedStats (opts) {
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
}
|
||||
|
||||
return function xpackMlGetDatafeedStats (params, options, callback) {
|
||||
return function mlGetDatafeedStats (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -80,9 +80,9 @@ function buildXpackMlGetDatafeedStats (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((datafeed_id || datafeedId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stats'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stats'
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + '_stats'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + '_stats'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -98,4 +98,4 @@ function buildXpackMlGetDatafeedStats (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetDatafeedStats
|
||||
module.exports = buildMlGetDatafeedStats
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetDatafeeds (opts) {
|
||||
function buildMlGetDatafeeds (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_datafeeds](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html) request
|
||||
* Perform a [ml.get_datafeeds](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeeds to fetch
|
||||
* @param {boolean} allow_no_datafeeds - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
||||
@ -40,7 +40,7 @@ function buildXpackMlGetDatafeeds (opts) {
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
}
|
||||
|
||||
return function xpackMlGetDatafeeds (params, options, callback) {
|
||||
return function mlGetDatafeeds (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -80,9 +80,9 @@ function buildXpackMlGetDatafeeds (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((datafeed_id || datafeedId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -98,4 +98,4 @@ function buildXpackMlGetDatafeeds (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetDatafeeds
|
||||
module.exports = buildMlGetDatafeeds
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetFilters (opts) {
|
||||
function buildMlGetFilters (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_filters](undefined) request
|
||||
* Perform a [ml.get_filters](undefined) request
|
||||
*
|
||||
* @param {string} filter_id - The ID of the filter to fetch
|
||||
* @param {int} from - skips a number of filters
|
||||
@ -42,7 +42,7 @@ function buildXpackMlGetFilters (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetFilters (params, options, callback) {
|
||||
return function mlGetFilters (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -82,9 +82,9 @@ function buildXpackMlGetFilters (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((filter_id || filterId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
|
||||
path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'filters'
|
||||
path = '/' + '_ml' + '/' + 'filters'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -100,4 +100,4 @@ function buildXpackMlGetFilters (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetFilters
|
||||
module.exports = buildMlGetFilters
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetInfluencers (opts) {
|
||||
function buildMlGetInfluencers (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_influencers](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html) request
|
||||
* Perform a [ml.get_influencers](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html) request
|
||||
*
|
||||
* @param {string} job_id -
|
||||
* @param {boolean} exclude_interim - Exclude interim results
|
||||
@ -57,7 +57,7 @@ function buildXpackMlGetInfluencers (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetInfluencers (params, options, callback) {
|
||||
return function mlGetInfluencers (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -96,7 +96,7 @@ function buildXpackMlGetInfluencers (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'influencers'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'influencers'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -111,4 +111,4 @@ function buildXpackMlGetInfluencers (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetInfluencers
|
||||
module.exports = buildMlGetInfluencers
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetJobStats (opts) {
|
||||
function buildMlGetJobStats (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_job_stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html) request
|
||||
* Perform a [ml.get_job_stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the jobs stats to fetch
|
||||
* @param {boolean} allow_no_jobs - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
||||
@ -40,7 +40,7 @@ function buildXpackMlGetJobStats (opts) {
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
}
|
||||
|
||||
return function xpackMlGetJobStats (params, options, callback) {
|
||||
return function mlGetJobStats (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -80,9 +80,9 @@ function buildXpackMlGetJobStats (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((job_id || jobId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_stats'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_stats'
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + '_stats'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_stats'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -98,4 +98,4 @@ function buildXpackMlGetJobStats (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetJobStats
|
||||
module.exports = buildMlGetJobStats
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetJobs (opts) {
|
||||
function buildMlGetJobs (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_jobs](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html) request
|
||||
* Perform a [ml.get_jobs](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the jobs to fetch
|
||||
* @param {boolean} allow_no_jobs - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
||||
@ -40,7 +40,7 @@ function buildXpackMlGetJobs (opts) {
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
}
|
||||
|
||||
return function xpackMlGetJobs (params, options, callback) {
|
||||
return function mlGetJobs (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -80,9 +80,9 @@ function buildXpackMlGetJobs (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((job_id || jobId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -98,4 +98,4 @@ function buildXpackMlGetJobs (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetJobs
|
||||
module.exports = buildMlGetJobs
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetModelSnapshots (opts) {
|
||||
function buildMlGetModelSnapshots (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_model_snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html) request
|
||||
* Perform a [ml.get_model_snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to fetch
|
||||
* @param {string} snapshot_id - The ID of the snapshot to fetch
|
||||
@ -52,7 +52,7 @@ function buildXpackMlGetModelSnapshots (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetModelSnapshots (params, options, callback) {
|
||||
return function mlGetModelSnapshots (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -98,9 +98,9 @@ function buildXpackMlGetModelSnapshots (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((job_id || jobId) != null && (snapshot_id || snapshotId) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId)
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -116,4 +116,4 @@ function buildXpackMlGetModelSnapshots (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetModelSnapshots
|
||||
module.exports = buildMlGetModelSnapshots
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetOverallBuckets (opts) {
|
||||
function buildMlGetOverallBuckets (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_overall_buckets](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html) request
|
||||
* Perform a [ml.get_overall_buckets](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html) request
|
||||
*
|
||||
* @param {string} job_id - The job IDs for which to calculate overall bucket results
|
||||
* @param {int} top_n - The number of top job bucket scores to be used in the overall_score calculation
|
||||
@ -57,7 +57,7 @@ function buildXpackMlGetOverallBuckets (opts) {
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
}
|
||||
|
||||
return function xpackMlGetOverallBuckets (params, options, callback) {
|
||||
return function mlGetOverallBuckets (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -96,7 +96,7 @@ function buildXpackMlGetOverallBuckets (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'overall_buckets'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'overall_buckets'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -111,4 +111,4 @@ function buildXpackMlGetOverallBuckets (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetOverallBuckets
|
||||
module.exports = buildMlGetOverallBuckets
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlGetRecords (opts) {
|
||||
function buildMlGetRecords (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.get_records](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html) request
|
||||
* Perform a [ml.get_records](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html) request
|
||||
*
|
||||
* @param {string} job_id -
|
||||
* @param {boolean} exclude_interim - Exclude interim results
|
||||
@ -57,7 +57,7 @@ function buildXpackMlGetRecords (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlGetRecords (params, options, callback) {
|
||||
return function mlGetRecords (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -96,7 +96,7 @@ function buildXpackMlGetRecords (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'records'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'records'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -111,4 +111,4 @@ function buildXpackMlGetRecords (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlGetRecords
|
||||
module.exports = buildMlGetRecords
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlInfo (opts) {
|
||||
function buildMlInfo (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.info](undefined) request
|
||||
* Perform a [ml.info](undefined) request
|
||||
*
|
||||
*/
|
||||
|
||||
@ -38,7 +38,7 @@ function buildXpackMlInfo (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlInfo (params, options, callback) {
|
||||
return function mlInfo (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -71,7 +71,7 @@ function buildXpackMlInfo (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'info'
|
||||
path = '/' + '_ml' + '/' + 'info'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -86,4 +86,4 @@ function buildXpackMlInfo (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlInfo
|
||||
module.exports = buildMlInfo
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlOpenJob (opts) {
|
||||
function buildMlOpenJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.open_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html) request
|
||||
* Perform a [ml.open_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to open
|
||||
* @param {boolean} ignore_downtime - Controls if gaps in data are treated as anomalous or as a maintenance window after a job re-start
|
||||
@ -41,7 +41,7 @@ function buildXpackMlOpenJob (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlOpenJob (params, options, callback) {
|
||||
return function mlOpenJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -84,7 +84,7 @@ function buildXpackMlOpenJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_open'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_open'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -99,4 +99,4 @@ function buildXpackMlOpenJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlOpenJob
|
||||
module.exports = buildMlOpenJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPostCalendarEvents (opts) {
|
||||
function buildMlPostCalendarEvents (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.post_calendar_events](undefined) request
|
||||
* Perform a [ml.post_calendar_events](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to modify
|
||||
* @param {object} body - A list of events
|
||||
@ -40,7 +40,7 @@ function buildXpackMlPostCalendarEvents (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPostCalendarEvents (params, options, callback) {
|
||||
return function mlPostCalendarEvents (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlPostCalendarEvents (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events'
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlPostCalendarEvents (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPostCalendarEvents
|
||||
module.exports = buildMlPostCalendarEvents
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPostData (opts) {
|
||||
function buildMlPostData (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.post_data](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html) request
|
||||
* Perform a [ml.post_data](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html) request
|
||||
*
|
||||
* @param {string} job_id - The name of the job receiving the data
|
||||
* @param {string} reset_start - Optional parameter to specify the start of the bucket resetting range
|
||||
@ -44,7 +44,7 @@ function buildXpackMlPostData (opts) {
|
||||
resetEnd: 'reset_end'
|
||||
}
|
||||
|
||||
return function xpackMlPostData (params, options, callback) {
|
||||
return function mlPostData (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -87,7 +87,7 @@ function buildXpackMlPostData (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_data'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_data'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -102,4 +102,4 @@ function buildXpackMlPostData (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPostData
|
||||
module.exports = buildMlPostData
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPreviewDatafeed (opts) {
|
||||
function buildMlPreviewDatafeed (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.preview_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html) request
|
||||
* Perform a [ml.preview_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeed to preview
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackMlPreviewDatafeed (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPreviewDatafeed (params, options, callback) {
|
||||
return function mlPreviewDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -82,7 +82,7 @@ function buildXpackMlPreviewDatafeed (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_preview'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_preview'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -97,4 +97,4 @@ function buildXpackMlPreviewDatafeed (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPreviewDatafeed
|
||||
module.exports = buildMlPreviewDatafeed
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPutCalendar (opts) {
|
||||
function buildMlPutCalendar (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.put_calendar](undefined) request
|
||||
* Perform a [ml.put_calendar](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to create
|
||||
* @param {object} body - The calendar details
|
||||
@ -40,7 +40,7 @@ function buildXpackMlPutCalendar (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPutCalendar (params, options, callback) {
|
||||
return function mlPutCalendar (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -79,7 +79,7 @@ function buildXpackMlPutCalendar (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -94,4 +94,4 @@ function buildXpackMlPutCalendar (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPutCalendar
|
||||
module.exports = buildMlPutCalendar
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPutCalendarJob (opts) {
|
||||
function buildMlPutCalendarJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.put_calendar_job](undefined) request
|
||||
* Perform a [ml.put_calendar_job](undefined) request
|
||||
*
|
||||
* @param {string} calendar_id - The ID of the calendar to modify
|
||||
* @param {string} job_id - The ID of the job to add to the calendar
|
||||
@ -40,7 +40,7 @@ function buildXpackMlPutCalendarJob (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPutCalendarJob (params, options, callback) {
|
||||
return function mlPutCalendarJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -93,7 +93,7 @@ function buildXpackMlPutCalendarJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId)
|
||||
path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -108,4 +108,4 @@ function buildXpackMlPutCalendarJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPutCalendarJob
|
||||
module.exports = buildMlPutCalendarJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPutDatafeed (opts) {
|
||||
function buildMlPutDatafeed (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.put_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html) request
|
||||
* Perform a [ml.put_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeed to create
|
||||
* @param {object} body - The datafeed config
|
||||
@ -40,7 +40,7 @@ function buildXpackMlPutDatafeed (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPutDatafeed (params, options, callback) {
|
||||
return function mlPutDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlPutDatafeed (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlPutDatafeed (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPutDatafeed
|
||||
module.exports = buildMlPutDatafeed
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPutFilter (opts) {
|
||||
function buildMlPutFilter (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.put_filter](undefined) request
|
||||
* Perform a [ml.put_filter](undefined) request
|
||||
*
|
||||
* @param {string} filter_id - The ID of the filter to create
|
||||
* @param {object} body - The filter details
|
||||
@ -40,7 +40,7 @@ function buildXpackMlPutFilter (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPutFilter (params, options, callback) {
|
||||
return function mlPutFilter (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlPutFilter (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
|
||||
path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlPutFilter (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPutFilter
|
||||
module.exports = buildMlPutFilter
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlPutJob (opts) {
|
||||
function buildMlPutJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.put_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html) request
|
||||
* Perform a [ml.put_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to create
|
||||
* @param {object} body - The job
|
||||
@ -40,7 +40,7 @@ function buildXpackMlPutJob (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlPutJob (params, options, callback) {
|
||||
return function mlPutJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlPutJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlPutJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlPutJob
|
||||
module.exports = buildMlPutJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlRevertModelSnapshot (opts) {
|
||||
function buildMlRevertModelSnapshot (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.revert_model_snapshot](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html) request
|
||||
* Perform a [ml.revert_model_snapshot](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to fetch
|
||||
* @param {string} snapshot_id - The ID of the snapshot to revert to
|
||||
@ -42,7 +42,7 @@ function buildXpackMlRevertModelSnapshot (opts) {
|
||||
deleteInterveningResults: 'delete_intervening_results'
|
||||
}
|
||||
|
||||
return function xpackMlRevertModelSnapshot (params, options, callback) {
|
||||
return function mlRevertModelSnapshot (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -91,7 +91,7 @@ function buildXpackMlRevertModelSnapshot (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_revert'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_revert'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -106,4 +106,4 @@ function buildXpackMlRevertModelSnapshot (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlRevertModelSnapshot
|
||||
module.exports = buildMlRevertModelSnapshot
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlSetUpgradeMode (opts) {
|
||||
function buildMlSetUpgradeMode (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.set_upgrade_mode](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html) request
|
||||
* Perform a [ml.set_upgrade_mode](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html) request
|
||||
*
|
||||
* @param {boolean} enabled - Whether to enable upgrade_mode ML setting or not. Defaults to false.
|
||||
* @param {time} timeout - Controls the time to wait before action times out. Defaults to 30 seconds
|
||||
@ -41,7 +41,7 @@ function buildXpackMlSetUpgradeMode (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlSetUpgradeMode (params, options, callback) {
|
||||
return function mlSetUpgradeMode (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -80,7 +80,7 @@ function buildXpackMlSetUpgradeMode (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'set_upgrade_mode'
|
||||
path = '/' + '_ml' + '/' + 'set_upgrade_mode'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -95,4 +95,4 @@ function buildXpackMlSetUpgradeMode (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlSetUpgradeMode
|
||||
module.exports = buildMlSetUpgradeMode
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlStartDatafeed (opts) {
|
||||
function buildMlStartDatafeed (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.start_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html) request
|
||||
* Perform a [ml.start_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeed to start
|
||||
* @param {string} start - The start time from where the datafeed should begin
|
||||
@ -45,7 +45,7 @@ function buildXpackMlStartDatafeed (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlStartDatafeed (params, options, callback) {
|
||||
return function mlStartDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -84,7 +84,7 @@ function buildXpackMlStartDatafeed (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_start'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_start'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -99,4 +99,4 @@ function buildXpackMlStartDatafeed (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlStartDatafeed
|
||||
module.exports = buildMlStartDatafeed
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlStopDatafeed (opts) {
|
||||
function buildMlStopDatafeed (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.stop_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html) request
|
||||
* Perform a [ml.stop_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeed to stop
|
||||
* @param {boolean} allow_no_datafeeds - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
||||
@ -45,7 +45,7 @@ function buildXpackMlStopDatafeed (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlStopDatafeed (params, options, callback) {
|
||||
return function mlStopDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -84,7 +84,7 @@ function buildXpackMlStopDatafeed (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stop'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stop'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -99,4 +99,4 @@ function buildXpackMlStopDatafeed (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlStopDatafeed
|
||||
module.exports = buildMlStopDatafeed
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlUpdateDatafeed (opts) {
|
||||
function buildMlUpdateDatafeed (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.update_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html) request
|
||||
* Perform a [ml.update_datafeed](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html) request
|
||||
*
|
||||
* @param {string} datafeed_id - The ID of the datafeed to update
|
||||
* @param {object} body - The datafeed update settings
|
||||
@ -40,7 +40,7 @@ function buildXpackMlUpdateDatafeed (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlUpdateDatafeed (params, options, callback) {
|
||||
return function mlUpdateDatafeed (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlUpdateDatafeed (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_update'
|
||||
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_update'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlUpdateDatafeed (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlUpdateDatafeed
|
||||
module.exports = buildMlUpdateDatafeed
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlUpdateFilter (opts) {
|
||||
function buildMlUpdateFilter (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.update_filter](undefined) request
|
||||
* Perform a [ml.update_filter](undefined) request
|
||||
*
|
||||
* @param {string} filter_id - The ID of the filter to update
|
||||
* @param {object} body - The filter update
|
||||
@ -40,7 +40,7 @@ function buildXpackMlUpdateFilter (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlUpdateFilter (params, options, callback) {
|
||||
return function mlUpdateFilter (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlUpdateFilter (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) + '/' + '_update'
|
||||
path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) + '/' + '_update'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlUpdateFilter (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlUpdateFilter
|
||||
module.exports = buildMlUpdateFilter
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlUpdateJob (opts) {
|
||||
function buildMlUpdateJob (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.update_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html) request
|
||||
* Perform a [ml.update_job](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to create
|
||||
* @param {object} body - The job update settings
|
||||
@ -40,7 +40,7 @@ function buildXpackMlUpdateJob (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlUpdateJob (params, options, callback) {
|
||||
return function mlUpdateJob (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,7 +83,7 @@ function buildXpackMlUpdateJob (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_update'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_update'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -98,4 +98,4 @@ function buildXpackMlUpdateJob (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlUpdateJob
|
||||
module.exports = buildMlUpdateJob
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlUpdateModelSnapshot (opts) {
|
||||
function buildMlUpdateModelSnapshot (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.update_model_snapshot](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html) request
|
||||
* Perform a [ml.update_model_snapshot](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html) request
|
||||
*
|
||||
* @param {string} job_id - The ID of the job to fetch
|
||||
* @param {string} snapshot_id - The ID of the snapshot to update
|
||||
@ -41,7 +41,7 @@ function buildXpackMlUpdateModelSnapshot (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlUpdateModelSnapshot (params, options, callback) {
|
||||
return function mlUpdateModelSnapshot (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -94,7 +94,7 @@ function buildXpackMlUpdateModelSnapshot (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_update'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_update'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -109,4 +109,4 @@ function buildXpackMlUpdateModelSnapshot (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlUpdateModelSnapshot
|
||||
module.exports = buildMlUpdateModelSnapshot
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlValidate (opts) {
|
||||
function buildMlValidate (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.validate](undefined) request
|
||||
* Perform a [ml.validate](undefined) request
|
||||
*
|
||||
* @param {object} body - The job config
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackMlValidate (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlValidate (params, options, callback) {
|
||||
return function mlValidate (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -78,7 +78,7 @@ function buildXpackMlValidate (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + '_validate'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_validate'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -93,4 +93,4 @@ function buildXpackMlValidate (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlValidate
|
||||
module.exports = buildMlValidate
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMlValidateDetector (opts) {
|
||||
function buildMlValidateDetector (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.ml.validate_detector](undefined) request
|
||||
* Perform a [ml.validate_detector](undefined) request
|
||||
*
|
||||
* @param {object} body - The detector
|
||||
*/
|
||||
@ -39,7 +39,7 @@ function buildXpackMlValidateDetector (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMlValidateDetector (params, options, callback) {
|
||||
return function mlValidateDetector (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -78,7 +78,7 @@ function buildXpackMlValidateDetector (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_xpack' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + '_validate' + '/' + 'detector'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_validate' + '/' + 'detector'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -93,4 +93,4 @@ function buildXpackMlValidateDetector (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMlValidateDetector
|
||||
module.exports = buildMlValidateDetector
|
||||
@ -22,11 +22,11 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildXpackMonitoringBulk (opts) {
|
||||
function buildMonitoringBulk (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [xpack.monitoring.bulk](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/es-monitoring.html) request
|
||||
* Perform a [monitoring.bulk](https://www.elastic.co/guide/en/elasticsearch/reference/master/es-monitoring.html) request
|
||||
*
|
||||
* @param {string} type - Default document type for items which don't provide one
|
||||
* @param {string} system_id - Identifier of the monitored system
|
||||
@ -47,7 +47,7 @@ function buildXpackMonitoringBulk (opts) {
|
||||
|
||||
}
|
||||
|
||||
return function xpackMonitoringBulk (params, options, callback) {
|
||||
return function monitoringBulk (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -87,9 +87,9 @@ function buildXpackMonitoringBulk (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((type) != null) {
|
||||
path = '/' + '_xpack' + '/' + 'monitoring' + '/' + encodeURIComponent(type) + '/' + '_bulk'
|
||||
path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'
|
||||
} else {
|
||||
path = '/' + '_xpack' + '/' + 'monitoring' + '/' + '_bulk'
|
||||
path = '/' + '_monitoring' + '/' + 'bulk'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -105,4 +105,4 @@ function buildXpackMonitoringBulk (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildXpackMonitoringBulk
|
||||
module.exports = buildMonitoringBulk
|
||||
@ -35,7 +35,8 @@ function buildMsearch (opts) {
|
||||
* @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
||||
* @param {number} pre_filter_shard_size - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
|
||||
* @param {number} max_concurrent_shard_requests - The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
|
||||
* @param {boolean} rest_total_hits_as_int - This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
|
||||
* @param {boolean} rest_total_hits_as_int - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
|
||||
* @param {boolean} ccs_minimize_roundtrips - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
|
||||
* @param {object} body - The request definitions (metadata-search request definition pairs), separated by newlines
|
||||
*/
|
||||
|
||||
@ -46,6 +47,7 @@ function buildMsearch (opts) {
|
||||
'pre_filter_shard_size',
|
||||
'max_concurrent_shard_requests',
|
||||
'rest_total_hits_as_int',
|
||||
'ccs_minimize_roundtrips',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -60,6 +62,7 @@ function buildMsearch (opts) {
|
||||
preFilterShardSize: 'pre_filter_shard_size',
|
||||
maxConcurrentShardRequests: 'max_concurrent_shard_requests',
|
||||
restTotalHitsAsInt: 'rest_total_hits_as_int',
|
||||
ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -33,7 +33,8 @@ function buildMsearchTemplate (opts) {
|
||||
* @param {enum} search_type - Search operation type
|
||||
* @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
||||
* @param {number} max_concurrent_searches - Controls the maximum number of concurrent searches the multi search api will execute
|
||||
* @param {boolean} rest_total_hits_as_int - This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
|
||||
* @param {boolean} rest_total_hits_as_int - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
|
||||
* @param {boolean} ccs_minimize_roundtrips - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
|
||||
* @param {object} body - The request definitions (metadata-search request definition pairs), separated by newlines
|
||||
*/
|
||||
|
||||
@ -42,6 +43,7 @@ function buildMsearchTemplate (opts) {
|
||||
'typed_keys',
|
||||
'max_concurrent_searches',
|
||||
'rest_total_hits_as_int',
|
||||
'ccs_minimize_roundtrips',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -54,6 +56,7 @@ function buildMsearchTemplate (opts) {
|
||||
typedKeys: 'typed_keys',
|
||||
maxConcurrentSearches: 'max_concurrent_searches',
|
||||
restTotalHitsAsInt: 'rest_total_hits_as_int',
|
||||
ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ function buildNodesReloadSecureSettings (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
/**
|
||||
* Perform a [nodes.reload_secure_settings](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/secure-settings.html#reloadable-secure-settings) request
|
||||
* Perform a [nodes.reload_secure_settings](https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings) request
|
||||
*
|
||||
* @param {list} node_id - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
|
||||
* @param {time} timeout - Explicit operation timeout
|
||||
|
||||
@ -33,6 +33,7 @@ function buildReindex (opts) {
|
||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
||||
* @param {boolean} wait_for_completion - Should the request should block until the reindex is complete.
|
||||
* @param {number} requests_per_second - The throttle to set on this request in sub-requests per second. -1 means no throttle.
|
||||
* @param {time} scroll - Control how long to keep the search context alive
|
||||
* @param {number} slices - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
|
||||
* @param {object} body - The search definition using the Query DSL and the prototype for the index request.
|
||||
*/
|
||||
@ -43,6 +44,7 @@ function buildReindex (opts) {
|
||||
'wait_for_active_shards',
|
||||
'wait_for_completion',
|
||||
'requests_per_second',
|
||||
'scroll',
|
||||
'slices',
|
||||
'pretty',
|
||||
'human',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user