diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile
new file mode 100644
index 000000000..2bf3886dc
--- /dev/null
+++ b/.buildkite/Dockerfile
@@ -0,0 +1,16 @@
+ARG NODE_VERSION=${NODE_VERSION:-18}
+FROM node:$NODE_VERSION
+
+# Install required tools
+RUN apt-get clean -y && \
+ apt-get -qy update && \
+ apt-get -y install zip && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+WORKDIR /usr/src/app
+
+COPY package.json .
+RUN npm install
+
+COPY . .
diff --git a/.buildkite/Dockerfile-make b/.buildkite/Dockerfile-make
new file mode 100644
index 000000000..3805eb0a2
--- /dev/null
+++ b/.buildkite/Dockerfile-make
@@ -0,0 +1,30 @@
+ARG NODE_JS_VERSION=${NODE_JS_VERSION:-18}
+FROM node:${NODE_JS_VERSION}
+
+ARG BUILDER_UID=1000
+ARG BUILDER_GID=1000
+ENV BUILDER_USER elastic
+ENV BUILDER_GROUP elastic
+
+# install zip util
+RUN apt-get clean -y && \
+ apt-get update -y && \
+ apt-get install -y zip
+
+# Set user permissions and directory
+RUN (id -g ${BUILDER_GID} || groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP}) \
+ && (id -u ${BUILDER_UID} || useradd --system --shell /bin/bash -u ${BUILDER_UID} -g ${BUILDER_GID} -m elastic) \
+ && mkdir -p /usr/src/elasticsearch-js \
+ && chown -R ${BUILDER_UID}:${BUILDER_GID} /usr/src/
+
+WORKDIR /usr/src/elasticsearch-js
+
+# run remainder of commands as non-root user
+USER ${BUILDER_UID}:${BUILDER_GID}
+
+# install dependencies
+COPY package.json .
+RUN npm install
+
+# copy project files
+COPY . .
diff --git a/.buildkite/certs/ca.crt b/.buildkite/certs/ca.crt
new file mode 100755
index 000000000..71f9bfc81
--- /dev/null
+++ b/.buildkite/certs/ca.crt
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDSjCCAjKgAwIBAgIVAJQLm8V2LcaCTHUcoIfO+KL63nG3MA0GCSqGSIb3DQEB
+CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
+ZXJhdGVkIENBMB4XDTIwMDIyNjA1NTA1N1oXDTIzMDIyNTA1NTA1N1owNDEyMDAG
+A1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5lcmF0ZWQgQ0Ew
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDYyajkPvGtUOE5M1OowQfB
+kWVrWjo1+LIxzgCeRHp0YztLtdVJ0sk2xoSrt2uZpxcPepdyOseLTjFJex1D2yCR
+AEniIqcFif4G72nDih2LlbhpUe/+/MTryj8ZTkFTzI+eMmbQi5FFMaH+kwufmdt/
+5/w8YazO18SxxJUlzMqzfNUrhM8vvvVdxgboU7PWhk28wZHCMHQovomHmzclhRpF
+N0FMktA98vHHeRjH19P7rNhifSd7hZzoH3H148HVAKoPgqnZ6vW2O2YfAWOP6ulq
+cyszr57p8fS9B2wSdlWW7nVHU1JuKcYD67CxbBS23BeGFgCj4tiNrmxO8S5Yf85v
+AgMBAAGjUzBRMB0GA1UdDgQWBBSWAlip9eoPmnG4p4OFZeOUBlAbNDAfBgNVHSME
+GDAWgBSWAlip9eoPmnG4p4OFZeOUBlAbNDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
+SIb3DQEBCwUAA4IBAQA19qqrMTWl7YyId+LR/QIHDrP4jfxmrEELrAL58q5Epc1k
+XxZLzOBSXoBfBrPdv+3XklWqXrZjKWfdkux0Xmjnl4qul+srrZDLJVZG3I7IrITh
+AmQUmL9MuPiMnAcxoGZp1xpijtW8Qmd2qnambbljWfkuVaa4hcVRfrAX6TciIQ21
+bS5aeLGrPqR14h30YzDp0RMmTujEa1o6ExN0+RSTkE9m89Q6WdM69az8JW7YkWqm
+I+UCG3TcLd3TXmN1zNQkq4y2ObDK4Sxy/2p6yFPI1Fds5w/zLfBOvvPQY61vEqs8
+SCCcQIe7f6NDpIRIBlty1C9IaEHj7edyHjF6rtYb
+-----END CERTIFICATE-----
diff --git a/.buildkite/certs/ca.key b/.buildkite/certs/ca.key
new file mode 100644
index 000000000..dfc41b558
--- /dev/null
+++ b/.buildkite/certs/ca.key
@@ -0,0 +1,27 @@
+-----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+T3lXnN/Na4UWqFtzMmwgJX2x1zM5qiln46/JoDiXtagvV43L3rNs
+LhPRFeIRAoGBAPhEB7nNpEDNjIRUL6WpebWS9brKAVY7gYn7YQrKGhhCyftyaiBZ
+zYgxPaJdqYXf+DmkWlANGoYiwEs40QwkR/FZrvO4+Xh3n3dgtl59ZmieuoQvDsG+
+RYIj+TfBaqhewhZNMMl7dxz7DeyQhyRCdsvl3VqJM0RuOsIrzrhCIEItAoGBAN+K
+lgWI7swDpOEaLmu+IWMkGImh1LswXoZqIgi/ywZ7htZjPzidOIeUsMi+lrYsKojG
+uU3sBxASsf9kYXDnuUuUbGT5M/N2ipXERt7klUAA/f5sg1IKlTrabaN/HGs/uNtf
+Efa8v/h2VyTurdPCJ17TNpbOMDwX1qGM62tyt2CLAoGBAIHCnP8iWq18QeuQTO8b
+a3/Z9hHRL22w4H4MI6aOB6GSlxuTq6CJD4IVqo9IwSg17fnCy2l3z9s4IqWuZqUf
++XJOW8ELd2jdrT2qEOfGR1Z7UCVyqxXcq1vgDYx0zZh/HpalddB5dcJx/c8do2Ty
+UEE2PcHqYB9uNcvzNbLc7RtpAoGBALbuU0yePUTI6qGnajuTcQEPpeDjhRHWSFRZ
+ABcG1N8uMS66Mx9iUcNp462zgeP8iqY5caUZtMHreqxT+gWKK7F0+as7386pwElF
+QPXgO18QMMqHBIQb0vlBjJ1SRPBjSiSDTVEML1DljvTTOX7kEJHh6HdKrmBO5b54
+cqMQUo53AoGBAPVWRPUXCqlBz914xKna0ZUh2aesRBg5BvOoq9ey9c52EIU5PXL5
+0Isk8sWSsvhl3tjDPBH5WuL5piKgnCTqkVbEHmWu9s1T57Mw6NuxlPMLBWvyv4c6
+tB9brOxv0ui3qGMuBsBoDKbkNnwXyOXLyFg7O+H4l016A3mLQzJM+NGV
+-----END RSA PRIVATE KEY-----
diff --git a/.buildkite/certs/testnode.crt b/.buildkite/certs/testnode.crt
new file mode 100755
index 000000000..0a6e76430
--- /dev/null
+++ b/.buildkite/certs/testnode.crt
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDYjCCAkqgAwIBAgIVAIClHav09e9XGWJrnshywAjUHTnXMA0GCSqGSIb3DQEB
+CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
+ZXJhdGVkIENBMB4XDTIzMDMyODE3MDIzOVoXDTI2MDMyNzE3MDIzOVowEzERMA8G
+A1UEAxMIaW5zdGFuY2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
++t5/g6u2r3awCtzqp17KG0hRxzkVoJoF8DYzVh+Rv9ymxQW0C/U8dQihAjkZHaIA
+n49lSyNLkwWtmqQgPcimV4d6XuTYx2ahDixXYtjmoOSwH5dRtovKPCNKDPkUj9Vq
+NwMW0uB1VxniMKI4DnYFqBgHL9kQKhQqvas6Gx0X6ptGRCLYCtVxeFcau6nnkZJt
+urb+HNV5waOh0uTmsqnnslK3NjCQ/f030vPKxM5fOqOU5ajUHpZFJ6ZFmS32074H
+l+mZoRT/GtbnVtIg+CJXsWThF3/L4iBImv+rkY9MKX5fyMLJgmIJG68S90IQGR8c
+Z2lZYzC0J7zjMsYlODbDAgMBAAGjgYswgYgwHQYDVR0OBBYEFIDIcECn3AVHc3jk
+MpQ4r7Kc3WCsMB8GA1UdIwQYMBaAFJYCWKn16g+acbing4Vl45QGUBs0MDsGA1Ud
+EQQ0MDKCCWxvY2FsaG9zdIIIaW5zdGFuY2WHBH8AAAGHEAAAAAAAAAAAAAAAAAAA
+AAGCA2VzMTAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtX3RQ5ATpfORM
+lrnhaUPGOWkjnb3p3BrdAWUaWoh136QhaXqxKiALQQhTtTerkXOcuquy9MmAyYvS
+9fDdGvLCAO8pPCXjnzonCHerCLGdS7f/eqvSFWCdy7LPHzTAFYfVWVvbZed+83TL
+bDY63AMwIexj34vJEStMapuFwWx05fstE8qZWIbYCL87sF5H/MRhzlz3ScAhQ1N7
+tODH7zvLzSxFGGEzCIKZ0iPFKbd3Y0wE6SptDSKhOqlnC8kkNeI2GjWsqVfHKsoF
+pDFmri7IfOucuvalXJ6xiHPr9RDbuxEXs0u8mteT5nFQo7EaEGdHpg1pNGbfBOzP
+lmj/dRS9
+-----END CERTIFICATE-----
diff --git a/.buildkite/certs/testnode.key b/.buildkite/certs/testnode.key
new file mode 100755
index 000000000..a9de563c8
--- /dev/null
+++ b/.buildkite/certs/testnode.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAlfref4Ortq92sArc6qdeyhtIUcc5FaCaBfA2M1Yfkb/cpsUF
+tAv1PHUIoQI5GR2iAJ+PZUsjS5MFrZqkID3IpleHel7k2MdmoQ4sV2LY5qDksB+X
+UbaLyjwjSgz5FI/VajcDFtLgdVcZ4jCiOA52BagYBy/ZECoUKr2rOhsdF+qbRkQi
+2ArVcXhXGrup55GSbbq2/hzVecGjodLk5rKp57JStzYwkP39N9LzysTOXzqjlOWo
+1B6WRSemRZkt9tO+B5fpmaEU/xrW51bSIPgiV7Fk4Rd/y+IgSJr/q5GPTCl+X8jC
+yYJiCRuvEvdCEBkfHGdpWWMwtCe84zLGJTg2wwIDAQABAoIBAAEP7HYNNnDWdYMD
++WAtYM12X/W5s/wUP94juaBI4u4iZH2EZodlixEdZUCTXgq43WsDUhxX05s7cE+p
+H5DuSCHtoo2WHvGKAposwRDm2f3YVWQ2Xyb2ahNt69LYHHWrO+XQ60YYTa3r8Gn3
+7dFR3I016/jyn5DeEVaglvS1dfj2UG4ybR4KkMfcKd94X0rKvz3wzAhHIh+hwMtv
+sVk7V4vSnKf2mJXwIVECTolnEJEkCjWjjymgUJYKT8yN7JnAsHRcvMa6kWwIGrLp
+oQCEaJwYM6ynCRS989pLt3vA2iu5VkYhiHXJ9Ds/5b5yzhzmj+ymzKbFKrrUUrmn
++2Jp1K0CgYEAw8BchALsD/+JuoXjinA14MH7PZjIsXyhtPk+c4pk42iMNyg1J8XF
+Y/ITepLYsl2bZqQI1jOJdDqsTwIsva9r749lsmkYI3VOxhi7+qBK0sThR66C87lX
+iU2QpnZ9NloC6ort4a3MEvZ/gRQcXdBrNlNoza2p7PHAVDTnsdSrNKUCgYEAxCQV
+uo85oZyfnMufn/gcI9IeYOgiB0tO3a8cAFX2wQW1y935t6Z13ApUQc4EnCOH7ZBc
+td5kT+xGdRWnfPZ38FM1dd5MBdGE69s3q8pJDUExSgNLqaF6/5bD32qui66L3ugu
+eMjxrzqJsc2uQTPCs18SGsyRmf54DpY8HglOmUcCgYAGRDgx+a347SNJl1OrcOAo
+q80RMbzrAaRjmL8JD9se9I/YjC73cPtasbsx51WMkDaTWJj30nqJ//7YIKeyAtWf
+u6Vzyq19JRo6eTw7T7pVePwFQW7rwnks6hDBY3WqscL6IyxuVxP7X2zBgxVNY4ir
+Gox2WSLhdPPFPlRUewxoCQKBgAJvqE1u5fpZ5ame5dao0ECppXLyrymEB/C88g4X
+Az+WgJGNqkJbsO8QuccvdeMylcefmWcw4fIULzPZFwF4VjkH74wNPMh9t7buPBzI
+IGwnuSMAM3ph5RMzni8yNgTKIDaej6U0abwRcBBjS5zHtc1giusGS3CsNnWH7Cs7
+VlyVAoGBAK+prq9t9x3tC3NfCZH8/Wfs/X0T1qm11RiL5+tOhmbguWAqSSBy8OjX
+Yh8AOXrFuMGldcaTXxMeiKvI2cyybnls1MFsPoeV/fSMJbex7whdeJeTi66NOSKr
+oftUHvkHS0Vv/LicMEOufFGslb4T9aPJ7oyhoSlz9CfAutDWk/q/
+-----END RSA PRIVATE KEY-----
diff --git a/.buildkite/certs/testnode_san.crt b/.buildkite/certs/testnode_san.crt
new file mode 100644
index 000000000..8abba55b5
--- /dev/null
+++ b/.buildkite/certs/testnode_san.crt
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDVjCCAj6gAwIBAgIULh42yRefYlRRl1hvt055LrUH0HwwDQYJKoZIhvcNAQEL
+BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l
+cmF0ZWQgQ0EwHhcNMjAwMjI4MDMzNzIwWhcNMjMwMjI3MDMzNzIwWjATMREwDwYD
+VQQDEwhpbnN0YW5jZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIUP
+t267NN21z+3ukajej8eojSXwP6zHxy7CUAp+sQ7bTq2XCKxkYX3CW9ThcS4cV9mL
+ayYdWEYnbEDGYPQDo7Wk3Ih5OEXTMZb/yNEx5D4S2lGMOS5bCDdYx6GvwCMG4jNx
+aMktosaxpprAJiHh2oLgQk0hQc/a9JfMo6kJKtuhjxsxjxLwcOHhuaUD7NS0Pjop
+CJkSYcrL+nnQPQjKe4uLhAbSyiX914h4QX0CJ0e4z1ccdDX2PFWTrwaIf//vQhCR
+wP2YKdfjR0JB4oDAlu85GsIs2cFLPysM5ufuNZO4fCr8uOwloKI8zZ2HhlIfBEcY
+Gcy4g9N/9epmxMXZlGcCAwEAAaOBgDB+MB0GA1UdDgQWBBRefYm8DHHDdkTPHhS1
+HEUwTb2uiDAfBgNVHSMEGDAWgBSWAlip9eoPmnG4p4OFZeOUBlAbNDAxBgNVHREE
+KjAogglsb2NhbGhvc3SHBH8AAAGHEAAAAAAAAAAAAAAAAAAAAAGCA2VzMTAJBgNV
+HRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQC+pauqM2wJjQaHyHu+kIm59P4b/5Oj
+IH1cYCQfMB7Y2UMLxp0ew+f7o7zzE2DA52YYFDWy6J5DVWtSBPyeFGgX+RH+aA+9
+Iv4cc9QpAs6aFjncorHrzNOrWLgCHIeRAxTR0CAkeP2dUZfDBuMpRyP6rAsYzyLH
+Rb3/BfYJSI5vxgt5Ke49Y/ljDKFJTyDmAVrHQ4JWrseYE1UZ2eDkBXeiRlYE/QtB
+YsrUSqdL6zvFZyUcilxDUUabNcA+GgeGZ2lAEA90F8vwi62QwRXo3Iv1Hz+6xc43
+nFofDK9D8/qkrUD9iuhpx1974QwPhwWyjn9RZRpbZA4ngRL+szdRXR4N
+-----END CERTIFICATE-----
diff --git a/.buildkite/certs/testnode_san.key b/.buildkite/certs/testnode_san.key
new file mode 100644
index 000000000..75d19539e
--- /dev/null
+++ b/.buildkite/certs/testnode_san.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEAhQ+3brs03bXP7e6RqN6Px6iNJfA/rMfHLsJQCn6xDttOrZcI
+rGRhfcJb1OFxLhxX2YtrJh1YRidsQMZg9AOjtaTciHk4RdMxlv/I0THkPhLaUYw5
+LlsIN1jHoa/AIwbiM3FoyS2ixrGmmsAmIeHaguBCTSFBz9r0l8yjqQkq26GPGzGP
+EvBw4eG5pQPs1LQ+OikImRJhysv6edA9CMp7i4uEBtLKJf3XiHhBfQInR7jPVxx0
+NfY8VZOvBoh//+9CEJHA/Zgp1+NHQkHigMCW7zkawizZwUs/Kwzm5+41k7h8Kvy4
+7CWgojzNnYeGUh8ERxgZzLiD03/16mbExdmUZwIDAQABAoIBAEwhjulLMVc9JEfV
+PP/qv0cUOBYh3LzF3T/yq4slq7Z9YgnOJYdFM8aZgqNNjc09KEJvE5JOLeiNu9Ff
+768Nugg+2HM5MCo7SN9FYCfZLOcbMFCCM2FDcnMAV9A512vzD08xryuT8dNPZ6yZ
+DfhK2hQRrb2lrpr3gwSrcGRRu3THqvq7X1RIjpLV3teDMeP8rQPAlpj8fmP+kdVV
+5y1ihiDIo87McihG9FMavJtBDXQkUEuVw6eIeir8L/zHHD/ZwhYjNHZGWbrB88sz
+CkJkfWh/FlA63tCVdJzkmnERALLTVy9mR0Sq6sUlnFhFNO2BRdWgYLrcp9McfTJC
+e8+WsSECgYEAuwQ3nAaFL0jqYu1AREyKT/f3WUenf2UsX7dwwV2/yFtQvkzW7ji4
+uZLnfUnZBojtHf35dRo+hDgtvhZhgZNAuPPsbOl/EIMTcbChEqV/3CSTFlhLFM1d
+hfM9PoM+Bt/pyUNabjD1sWM0X7WeUhzcddshY3S4daBsNsLuOzweRRcCgYEAtiSS
+4qiiGafYsY7gOHuAlOhs/00+1uWIFEHKgoHM9vzCxDN3LCmBdynHk8ZE2TAdhw+l
+7xpu6LUxKQDfGmVZa9Epg0kQmVq9c54oQP57pJ3tR+68++insEkfnaZH8jblfq2s
+sSkFrY3pdS19edq60nuft64kswKRUUkamCXTXTECgYBdoSfiMpV9bekC7DsPtq5M
+iR3KEgi2zEViCmomNTRuL+GF1NyKWdWJ+xVwcYd5MRZdvKimyyPfeGzWTUg14i42
+KtEEWgZmkukqMz8BIeCYq6sENeIpIQQgqv3PjU+Bi5r1S4Y7wsFPNRakkD4aaB6r
+1rCppWcwZMeoxwEUoO2aswKBgBdDIIdWJi3EpAY5SyWrkEZ0UMdiZC4p7nE33ddB
+IJ5CtdU9BXFcc652ZYjX/58FaCABvZ2F8LhDu92SwOusGfmNIxIjWL1dO2jywA1c
+8wmZKd7P/M7nbdMz45fMzs9+d1zwbWfK53C8+R4AC1BuwQF0zHc3BHTgVRLelUjt
+O8thAoGAdO2gHIqEsZzTgbvLbsh52eVbumjfNGnrnEv1fjb+o+/wAol8dymcmzbL
+bZCRzoyA0qwU9kdPFgX46H6so6o1tUM2GQtVFoT6kDnPv7EkLQK0C4cDh6OOHxDU
+NPvr/9fHhQd9EDWDvS1JnVMAdKDO6ELp3SoKGGmCXR2QplnqWAk=
+-----END RSA PRIVATE KEY-----
diff --git a/.buildkite/functions/cleanup.sh b/.buildkite/functions/cleanup.sh
new file mode 100755
index 000000000..98dfe4e14
--- /dev/null
+++ b/.buildkite/functions/cleanup.sh
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+#
+# Shared cleanup routines between different steps
+#
+# Please source .buildkite/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"
+};
diff --git a/.buildkite/functions/imports.sh b/.buildkite/functions/imports.sh
new file mode 100755
index 000000000..c05f36826
--- /dev/null
+++ b/.buildkite/functions/imports.sh
@@ -0,0 +1,60 @@
+#!/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-free}
+ 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_scheme="https"
+ if [[ $TEST_SUITE != "platinum" ]]; then
+ export elasticsearch_scheme="http"
+ fi
+ export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200
+ 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"
+
diff --git a/.buildkite/functions/wait-for-container.sh b/.buildkite/functions/wait-for-container.sh
new file mode 100755
index 000000000..bbbf4ea63
--- /dev/null
+++ b/.buildkite/functions/wait-for-container.sh
@@ -0,0 +1,36 @@
+#!/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 .buildkite/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
+}
diff --git a/.buildkite/make.mjs b/.buildkite/make.mjs
new file mode 100644
index 000000000..3026b61f3
--- /dev/null
+++ b/.buildkite/make.mjs
@@ -0,0 +1,140 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* global $ argv */
+
+'use strict'
+
+import 'zx/globals'
+
+import { readFile, writeFile } from 'fs/promises'
+import assert from 'assert'
+import { join } from 'desm'
+import semver from 'semver'
+
+// xz/globals loads minimist-parsed args as a global `argv`, but it
+// interprets args like '8.10' as numbers and shortens them to '8.1'.
+// so we have to import and configure minimist ourselves.
+import minimist from 'minimist'
+const argv = minimist(process.argv.slice(2), { string: ['_', 'task'] })
+assert(typeof argv.task === 'string', 'Missing task parameter')
+
+switch (argv.task) {
+ case 'release':
+ release(argv._).catch(onError)
+ break
+ case 'bump':
+ bump(argv._).catch(onError)
+ break
+ case 'codegen':
+ codegen(argv._).catch(onError)
+ break
+ default:
+ console.log(`Unknown task: ${argv.task}`)
+ process.exit(1)
+}
+
+async function release (args) {
+ assert(args.length === 2, 'Release task expects two parameters')
+ let [version, outputFolder] = args
+
+ if (process.env.WORKFLOW === 'snapshot' && !version.endsWith('SNAPSHOT')) {
+ version = `${version}-SNAPSHOT`
+ }
+
+ await bump([version])
+
+ const packageJson = JSON.parse(await readFile(
+ join(import.meta.url, '..', 'package.json'),
+ 'utf8'
+ ))
+
+ await $`npm run build`
+ await $`npm pack`
+ await $`zip elasticsearch-js-${version}.zip elastic-elasticsearch-${packageJson.version}.tgz`
+ await $`rm elastic-elasticsearch-${packageJson.version}.tgz`
+ await $`mv ${join(import.meta.url, '..', `elasticsearch-js-${version}.zip`)} ${join(import.meta.url, '..', outputFolder, `elasticsearch-js-${version}.zip`)}`
+}
+
+async function bump (args) {
+ assert(args.length === 1, 'Bump task expects one parameter')
+ let [version] = args
+ const packageJson = JSON.parse(await readFile(
+ join(import.meta.url, '..', 'package.json'),
+ 'utf8'
+ ))
+
+ if (version.split('.').length === 2) version = `${version}.0`
+ const cleanVersion = semver.clean(version.includes('SNAPSHOT') ? version.split('-')[0] : version)
+ assert(semver.valid(cleanVersion), `${cleanVersion} is not seen as a valid semver version. raw version: ${version}`)
+ packageJson.version = cleanVersion
+ packageJson.versionCanary = `${cleanVersion}-canary.0`
+
+ await writeFile(
+ join(import.meta.url, '..', 'package.json'),
+ JSON.stringify(packageJson, null, 2),
+ 'utf8'
+ )
+
+ const pipeline = await readFile(join(import.meta.url, '..', '.buildkite', 'pipeline.yml'), 'utf8')
+ await writeFile(
+ join(import.meta.url, '..', '.buildkite', 'pipeline.yml'),
+ pipeline.replace(/STACK_VERSION: [0-9]+[0-9\.]*[0-9](?:\-SNAPSHOT)?/, `STACK_VERSION: ${cleanVersion}`),
+ 'utf8'
+ )
+}
+
+// this command can only be executed locally for now
+async function codegen (args) {
+ assert(args.length === 1, 'Codegen task expects one parameter')
+ const version = args[0].toString()
+
+ const clientGeneratorPath = join(import.meta.url, '..', '..', 'elastic-client-generator-js')
+ const isGeneratorCloned = await $`[[ -d ${clientGeneratorPath} ]]`.exitCode === 0
+ assert(isGeneratorCloned, 'You must clone the elastic-client-generator-js first')
+
+ await $`npm install --prefix ${clientGeneratorPath}`
+
+ // generate elasticsearch client. this command will take a while!
+ if (version === 'main') {
+ await $`npm run elasticsearch --prefix ${clientGeneratorPath} -- --version main`
+ } else {
+ await $`npm run elasticsearch --prefix ${clientGeneratorPath} -- --version ${version.split('.').slice(0, 2).join('.')}`
+ }
+ // clean up fixable linter issues
+ await $`npm run fix --prefix ${clientGeneratorPath}`
+
+ await $`rm -rf ${join(import.meta.url, '..', 'src', 'api')}`
+ await $`mkdir ${join(import.meta.url, '..', 'src', 'api')}`
+ await $`cp -R ${join(import.meta.url, '..', '..', 'elastic-client-generator-js', 'output')}/* ${join(import.meta.url, '..', 'src', 'api')}`
+ await $`mv ${join(import.meta.url, '..', 'src', 'api', 'reference.asciidoc')} ${join(import.meta.url, '..', 'docs', 'reference.asciidoc')}`
+ await $`npm run build`
+
+ // run docs example generation
+ if (version === 'main') {
+ await $`node ./scripts/generate-docs-examples.js`
+ } else {
+ await $`node ./scripts/generate-docs-examples.js ${version.split('.').slice(0, 2).join('.')}`
+ }
+}
+
+function onError (err) {
+ console.log(err)
+ process.exit(1)
+}
diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml
new file mode 100644
index 000000000..9d4ff24f2
--- /dev/null
+++ b/.buildkite/pipeline.yml
@@ -0,0 +1,32 @@
+---
+steps:
+ - label: ":elasticsearch: :javascript: ES JavaScript ({{ matrix.nodejs }}) Test Suite: {{ matrix.suite }}"
+ agents:
+ provider: "gcp"
+ env:
+ NODE_VERSION: "{{ matrix.nodejs }}"
+ TEST_SUITE: "{{ matrix.suite }}"
+ STACK_VERSION: 8.16.0
+ matrix:
+ setup:
+ suite:
+ - "free"
+ - "platinum"
+ nodejs:
+ - "18"
+ - "20"
+ - "22"
+ command: ./.buildkite/run-tests.sh
+ artifact_paths: "./junit-output/junit-*.xml"
+ - wait: ~
+ continue_on_failure: true
+ - label: ":junit: Test results"
+ agents:
+ provider: "gcp"
+ image: family/core-ubuntu-2204
+ plugins:
+ - junit-annotate#v2.4.1:
+ artifacts: "junit-output/junit-*.xml"
+ job-uuid-file-pattern: "junit-(.*).xml"
+ fail-build-on-error: true
+ failure-format: file
diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json
new file mode 100644
index 000000000..59c46cd87
--- /dev/null
+++ b/.buildkite/pull-requests.json
@@ -0,0 +1,19 @@
+{
+ "jobs": [
+ {
+ "enabled": true,
+ "pipeline_slug": "elasticsearch-js-integration-tests",
+ "allowed_repo_permissions": ["admin", "write"],
+ "build_on_commit": true,
+ "skip_ci_on_only_changed": [
+ "\\.md$",
+ "\\.asciidoc$",
+ "^docs\\/",
+ "^scripts\\/",
+ "^catalog-info\\.yaml$",
+ "^test\\/unit\\/",
+ "^\\.github\\/"
+ ]
+ }
+ ]
+}
diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh
new file mode 100755
index 000000000..59ed168e7
--- /dev/null
+++ b/.buildkite/run-client.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+#
+# Once called Elasticsearch should be up and running
+#
+script_path=$(dirname "$(realpath -s "$0")")
+set -euo pipefail
+repo=$(pwd)
+
+export NODE_VERSION=${NODE_VERSION:-18}
+
+echo "--- :javascript: Building Docker image"
+docker build \
+ --file "$script_path/Dockerfile" \
+ --tag elastic/elasticsearch-js \
+ --build-arg NODE_VERSION="$NODE_VERSION" \
+ .
+
+echo "--- :javascript: Running $TEST_SUITE tests"
+mkdir -p "$repo/junit-output"
+docker run \
+ --network="${network_name}" \
+ --env "TEST_ES_SERVER=${elasticsearch_url}" \
+ --env "ELASTIC_PASSWORD=${elastic_password}" \
+ --env "TEST_SUITE=${TEST_SUITE}" \
+ --env "ELASTIC_USER=elastic" \
+ --env "BUILDKITE=true" \
+ --volume "$repo/junit-output:/junit-output" \
+ --name elasticsearch-js \
+ --rm \
+ elastic/elasticsearch-js \
+ bash -c "npm run test:integration; [ -f ./$TEST_SUITE-report-junit.xml ] && mv ./$TEST_SUITE-report-junit.xml /junit-output/junit-$BUILDKITE_JOB_ID.xml || echo 'No JUnit artifact found'"
diff --git a/.buildkite/run-elasticsearch.sh b/.buildkite/run-elasticsearch.sh
new file mode 100755
index 000000000..d9e0c6fd3
--- /dev/null
+++ b/.buildkite/run-elasticsearch.sh
@@ -0,0 +1,155 @@
+#!/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 STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'.
+# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
+# Export the NUMBER_OF_NODES variable to start more than 1 node
+
+# Version 1.6.1
+# - Initial version of the run-elasticsearch.sh script
+# - Deleting the volume should not dependent on the container still running
+# - Fixed `ES_JAVA_OPTS` config
+# - Moved to STACK_VERSION and TEST_VERSION
+# - Refactored into functions and imports
+# - Support NUMBER_OF_NODES
+# - Added 5 retries on docker pull for fixing transient network errors
+# - Added flags to make local CCR configurations work
+# - Added action.destructive_requires_name=false as the default will be true in v8
+# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
+# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
+# - Use https only when TEST_SUITE is "platinum", when "free" use http
+# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
+
+script_path=$(dirname $(realpath -s $0))
+source $script_path/functions/imports.sh
+set -euo pipefail
+
+echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on separate terminals \033[0m"
+cleanup_node $es_node_name
+
+master_node_name=${es_node_name}
+cluster_name=${moniker}${suffix}
+
+# Set vm.max_map_count kernel setting to 262144
+if [ "$(sysctl vm.max_map_count)" != 'vm.max_map_count = 262144' ]; then
+ echo "vm.max_map_count may be too low. resetting."
+ sudo sysctl -w vm.max_map_count=262144
+fi
+
+declare -a volumes
+environment=($(cat <<-END
+ --env ELASTIC_PASSWORD=$elastic_password
+ --env node.name=$es_node_name
+ --env cluster.name=$cluster_name
+ --env cluster.initial_master_nodes=$master_node_name
+ --env discovery.seed_hosts=$master_node_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*
+ --env action.destructive_requires_name=false
+ --env ingest.geoip.downloader.enabled=false
+ --env cluster.deprecation_indexing.enabled=false
+END
+))
+if [[ "$TEST_SUITE" == "platinum" ]]; then
+ environment+=($(cat <<-END
+ --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.verification_mode=certificate
+ --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
+))
+else
+ environment+=($(cat <<-END
+ --env node.roles=data,data_cold,data_content,data_frozen,data_hot,data_warm,ingest,master,ml,remote_cluster_client,transform
+ --env xpack.security.enabled=false
+ --env xpack.security.http.ssl.enabled=false
+END
+))
+fi
+
+cert_validation_flags=""
+if [[ "$TEST_SUITE" == "platinum" ]]; then
+ cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1"
+fi
+
+echo "--- :elasticsearch: Environment setup"
+echo "TEST_SUITE: $TEST_SUITE"
+echo "Elasticsearch URL: $elasticsearch_url"
+echo "Elasticsearch External URL: $external_elasticsearch_url"
+
+
+echo "--- :elasticsearch: Running container"
+# Pull the container, retry on failures up to 5 times with
+# short delays between each attempt. Fixes most transient network errors.
+docker_pull_attempts=0
+until [ "$docker_pull_attempts" -ge 5 ]
+do
+ docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break
+ docker_pull_attempts=$((docker_pull_attempts+1))
+ echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..."
+ sleep 10
+done
+
+NUMBER_OF_NODES=${NUMBER_OF_NODES-1}
+http_port=9200
+for (( i=0; i<$NUMBER_OF_NODES; i++, http_port++ )); do
+ node_name=${es_node_name}$i
+ node_url=${external_elasticsearch_url/9200/${http_port}}$i
+ if [[ "$i" == "0" ]]; then node_name=$es_node_name; fi
+ environment+=($(cat <<-END
+ --env node.name=$node_name
+END
+))
+ echo "$i: $http_port $node_url "
+ volume_name=${node_name}-${suffix}-data
+ volumes+=($(cat <<-END
+ --volume $volume_name:/usr/share/elasticsearch/data${i}
+END
+))
+
+ # make sure we detach for all but the last node if DETACH=false (default) so all nodes are started
+ local_detach="true"
+ if [[ "$i" == "$((NUMBER_OF_NODES-1))" ]]; then local_detach=$DETACH; 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 -da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions" \
+ "${environment[@]}" \
+ "${volumes[@]}" \
+ --publish "$http_port":9200 \
+ --ulimit nofile=65536:65536 \
+ --ulimit memlock=-1:-1 \
+ --detach="$local_detach" \
+ --health-cmd="curl $cert_validation_flags --fail $elasticsearch_url/_cluster/health || exit 1" \
+ --health-interval=2s \
+ --health-retries=20 \
+ --health-timeout=2s \
+ --rm \
+ docker.elastic.co/elasticsearch/"$elasticsearch_container";
+
+ set +x
+ if wait_for_container "$es_node_name" "$network_name"; then
+ echo -e "\033[32;1mSUCCESS:\033[0m Running on: $node_url\033[0m"
+ fi
+done
diff --git a/.buildkite/run-tests.sh b/.buildkite/run-tests.sh
new file mode 100755
index 000000000..d9aa181af
--- /dev/null
+++ b/.buildkite/run-tests.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Script to run Elasticsearch container and Elasticsearch client integration tests on Buildkite
+#
+# Version 0.1
+#
+script_path=$(dirname "$(realpath -s "$0")")
+source "$script_path/functions/imports.sh"
+
+set -euo pipefail
+
+echo "--- :elasticsearch: Starting Elasticsearch"
+DETACH=true bash "$script_path/run-elasticsearch.sh"
+
+echo "+++ :javascript: Run Client"
+bash "$script_path/run-client.sh"
diff --git a/.ci/Dockerfile b/.ci/Dockerfile
deleted file mode 100644
index b25ea6f66..000000000
--- a/.ci/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-ARG NODE_JS_VERSION=10
-FROM node:${NODE_JS_VERSION}
-
-# Create app directory
-WORKDIR /usr/src/app
-
-# Install app dependencies
-COPY package*.json ./
-RUN npm install
-
-COPY . .
diff --git a/.ci/certs/ca.crt b/.ci/certs/ca.crt
deleted file mode 100755
index 6402874d5..000000000
--- a/.ci/certs/ca.crt
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDSTCCAjGgAwIBAgIUIwN+0zglsexRKwE1RGHvlCcmrdwwDQYJKoZIhvcNAQEL
-BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l
-cmF0ZWQgQ0EwHhcNMTkwMjEzMDcyMjQwWhcNMjIwMjEyMDcyMjQwWjA0MTIwMAYD
-VQQDEylFbGFzdGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTCC
-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANILs0JO0e7x29zeVx21qalK
-XKdX+AMlGJPH75wWO/Jq6YHtxt1wYIg762krOBXfG6JsFSOIwIv5VrzGGRGjSPt9
-OXQyXrDDiQvsBT3rpzLNdDs7KMl2tZswwv7w9ujgud0cYnS1MOpn81rfPc73DvMg
-xuhplofDx6fn3++PjVRU2FNiIVWyEoaxRjCeGPMBubKZYaYbQA6vYM4Z+ByG727B
-AyAER3t7xmvYti/EoO2hv2HQk5zgcj/Oq3AJKhnt8LH8fnfm3TnYNM1htvXqhN05
-vsvhvm2PHfnA5qLlSr/3W0aI/U/PqfsFDCgyRV097sMIaKkmavb0Ue7aQ7lgtp0C
-AwEAAaNTMFEwHQYDVR0OBBYEFDRKlCMowWR1rwxE0d1lTEQe5O71MB8GA1UdIwQY
-MBaAFDRKlCMowWR1rwxE0d1lTEQe5O71MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
-hvcNAQELBQADggEBAKbCJ95EBpeuvF70KEt6QU70k/SH1NRvM9YzKryV0D975Jvu
-HOSm9HgSTULeAUFZIa4oYyf3QUfVoI+2T/aQrfXA3gfrJWsHURkyNmiHOFAbYHqi
-xA6i249G2GTEjc1+le/M2N2CcDKAmurW6vSGK4upXQbPd6KmnhHREX74zkWjnOa+
-+tibbSSOCT4Tmja2DbBxAPuivU9IB1g/hIUmbYQqKffQrBJA0658tz6w63a/Q7xN
-pCvvbSgiMZ6qcVIcJkBT2IooYie+ax45pQECHthgIUcQAzfmIfqlU0Qfl8rDgAmn
-0c1o6HQjKGU2aVGgSRuaaiHaSZjbPIZVS51sOoI=
------END CERTIFICATE-----
diff --git a/.ci/certs/testnode.crt b/.ci/certs/testnode.crt
deleted file mode 100755
index ff3bcb37f..000000000
--- a/.ci/certs/testnode.crt
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDIjCCAgqgAwIBAgIUI4QU6jA1dYSCbdIA6oAb2TBEluowDQYJKoZIhvcNAQEL
-BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l
-cmF0ZWQgQ0EwHhcNMTkwMjEzMDcyMzEzWhcNMjIwMjEyMDcyMzEzWjATMREwDwYD
-VQQDEwhpbnN0YW5jZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJeT
-yOy6EAScZxrULKjHePciiz38grivCrhFFV+dThaRCcl3DhDzb9Eny5q5iEw3WvLQ
-Rqmf01jncNIhaocTt66VqveXaMubbE8O0LcG6e4kpFO+JtnVF8JTARTc+ux/1uD6
-hO1VG/HItM7WQrQxh4hfB2u1AX2YQtoqEtXXEC+UHWfl4QzuzXjBnKCkO/L9/6Tf
-yNFQWXxKnIiTs8Xm9sEhhSCBJPlLTQu+MX4vR2Uwj5XZmflDUr+ZTenl9qYxL6b3
-SWhh/qEl4GAj1+tS7ZZOxE0237mUh3IIFYSWSaMm8K2m/BYHkLNWL5B1dMic0lsv
-osSoYrQuCef4HQMCitsCAwEAAaNNMEswHQYDVR0OBBYEFFMg4l1GLW8lYbwASY+r
-YeWYRzIiMB8GA1UdIwQYMBaAFDRKlCMowWR1rwxE0d1lTEQe5O71MAkGA1UdEwQC
-MAAwDQYJKoZIhvcNAQELBQADggEBAEQrgh1xALpumQTzsjxFRGque/vlKTgRs5Kh
-xtgapr6wjIbdq7dagee+4yNOKzS5lGVXCgwrJlHESv9qY0uumT/33vK2uduJ7NAd
-fR2ZzyBnhMX+mkYhmGrGYCTUMUIwOIQYa4Evis4W+LHmCIDG03l7gLHfdIBe9VMO
-pDZum8f6ng0MM49s8/rXODNYKw8kFyUhnfChqMi/2yggb1uUIfKlJJIchkgYjE13
-zuC+fjo029Pq1jeMIdxugLf/7I/8NiW1Yj9aCXevUXG1qzHFEuKAinBXYOZO/vWS
-LaEqOhwrzNynwgGpYAr7Rfgv4AflltYIIav4PZT03P7fbyAAf8s=
------END CERTIFICATE-----
diff --git a/.ci/certs/testnode.key b/.ci/certs/testnode.key
deleted file mode 100755
index c35b4bc83..000000000
--- a/.ci/certs/testnode.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAl5PI7LoQBJxnGtQsqMd49yKLPfyCuK8KuEUVX51OFpEJyXcO
-EPNv0SfLmrmITDda8tBGqZ/TWOdw0iFqhxO3rpWq95doy5tsTw7Qtwbp7iSkU74m
-2dUXwlMBFNz67H/W4PqE7VUb8ci0ztZCtDGHiF8Ha7UBfZhC2ioS1dcQL5QdZ+Xh
-DO7NeMGcoKQ78v3/pN/I0VBZfEqciJOzxeb2wSGFIIEk+UtNC74xfi9HZTCPldmZ
-+UNSv5lN6eX2pjEvpvdJaGH+oSXgYCPX61Ltlk7ETTbfuZSHcggVhJZJoybwrab8
-FgeQs1YvkHV0yJzSWy+ixKhitC4J5/gdAwKK2wIDAQABAoIBAQCRFTJna/xy/WUu
-59FLR4qAOj8++JgCwACpue4oU7/vl6nffSYokWoAr2+RzG4qTX2vFi3cpA8+dGCn
-sLZvTi8tWzKGxBTZdg2oakzaMzLr74SeZ052iCGyrZJGbvF6Ny7srr1XEXSq6+os
-ZCb6pMHOhO7saBdiKMAsY8MdjTl/33AduuE6ztqv+L92xTr2g4QlbT1KvWlEgppU
-k4Gy7zdETkPBTSH/17ZwyGJoJICIAhbL4IpmOM4dPIg8nFkVPPpy6p0z4uGjtgnK
-nreZ2EKMzCafBaHn7A77gpi0OrQdl6pe0fsGqv/323YjCJPbwwl5TsoNq44DzwiX
-3M7XiVJxAoGBAOCne56vdN4uZmCgLVGT2JSUNVPOu4bfjrxWH6cslzrPT2Zhp3lO
-M4axZ3gmcervV252YEZXntXDHHCSfrECllRN1WFD63XmyQ/CkhuvZkkeRHfzL1TE
-EdqHOTqs4sRETZ7+RITFC81DZQkWWOKeyXMjyPBqd7RnThQHijB1c8Y5AoGBAKy6
-CVKBx+zz5crVD0tz4UhOmz1wRNN0CL0l+FXRuFSgbzMIvwpfiqe25crgeLHe2M2/
-TogdWbjZ2nUZQTzoRsSkQ6cKHpj+G/gWurp/UcHHXFVwgLSPF7c3KHDtiYq7Vqw0
-bvmhM03LI6+ZIPRV7hLBr7WP7UmpAiREMF7tTnmzAoGBAIkx3w3WywFQxtblmyeB
-qbd7F2IaE23XoxyjX+tBEQ4qQqwcoSE0v8TXHIBEwjceeX+NLVhn9ClJYVniLRq+
-oL3VVqVyzB4RleJZCc98e3PV1yyFx/b1Uo3pHOsXX9lKeTjKwV9v0rhFGzPEgP3M
-yOvXA8TG0FnM6OLUg/D6GX0JAoGAMuHS4TVOGeV3ahr9mHKYiN5vKNgrzka+VEod
-L9rJ/FQOrfADpyCiDen5I5ygsXU+VM3oanyK88NpcVlxOGoMft0M+OYoQVWKE7lO
-ZKYhBX6fGqQ7pfUJPXXIOgwfmni5fZ0sm+j63g3bg10OsiumKGxaQJgXhL1+3gQg
-Y7ZwibUCgYEAlZoFFvkMLjpOSaHk1z5ZZnt19X0QUIultBwkumSqMPm+Ks7+uDrx
-thGUCoz4ecr/ci4bIUY7mB+zfAbqnBOMxreJqCRbAIuRypo1IlWkTp8DywoDOfMW
-NfzjVmzJ7EJu44nGmVAi1jw4Pbseivvi1ujMCoPgaE8I1uSh144bwN8=
------END RSA PRIVATE KEY-----
diff --git a/.ci/docker-compose.yml b/.ci/docker-compose.yml
deleted file mode 100644
index fe46d5733..000000000
--- a/.ci/docker-compose.yml
+++ /dev/null
@@ -1,94 +0,0 @@
-version: '3.2'
-services:
- client-oss:
- image: docker.elastic.co/clients/elasticsearch-js:${NODE_JS_VERSION:-10}
- build:
- context: ..
- dockerfile: .ci/Dockerfile
- args:
- NODE_JS_VERSION: ${NODE_JS_VERSION:-10}
- CODECOV_TOKEN: ${CODECOV_TOKEN}
- environment:
- - "TEST_ES_SERVER=http://elasticsearch-oss:9200"
- volumes:
- - ..:/usr/src/app
- # This will mount the node_modules directory
- # to the host machine using the buildtime directory.
- - /usr/src/app/node_modules
- - esvol:/tmp
- networks:
- - esnet-oss
- depends_on:
- - elasticsearch-oss
-
- elasticsearch-oss:
- image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-beta1}
- volumes:
- - esvol:/tmp
- networks:
- - esnet-oss
- environment:
- - path.repo=/tmp
- - "repositories.url.allowed_urls=http://snapshot.*"
- - node.attr.testattr=test
- - bootstrap.memory_lock=false
- - "discovery.type=single-node"
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
-
- client-platinum:
- image: docker.elastic.co/clients/elasticsearch-js:${NODE_JS_VERSION:-10}
- build:
- context: ..
- dockerfile: .ci/Dockerfile
- args:
- NODE_JS_VERSION: ${NODE_JS_VERSION:-10}
- environment:
- - "TEST_ES_SERVER=https://elastic:changeme@elasticsearch-platinum:9200"
- volumes:
- - ..:/usr/src/app
- # This will mount the node_modules directory
- # to the host machine using the buildtime directory.
- - /usr/src/app/node_modules
- - esvol:/tmp
- networks:
- - esnet-platinum
- depends_on:
- - elasticsearch-platinum
- # there is not need to run again also the unit test
- command: ["npm", "run", "test:integration"]
-
- elasticsearch-platinum:
- image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-beta1}
- ports:
- - "9200:9200"
- networks:
- - esnet-platinum
- environment:
- - "node.attr.testattr=test"
- - "path.repo=/tmp"
- - "repositories.url.allowed_urls=http://snapshot.*"
- - "discovery.type=single-node"
- - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- - "ELASTIC_PASSWORD=changeme"
- - "xpack.security.enabled=true"
- - "xpack.license.self_generated.type=trial"
- - "xpack.security.http.ssl.enabled=true"
- - "xpack.security.http.ssl.verification_mode=certificate"
- - "xpack.security.http.ssl.key=certs/testnode.key"
- - "xpack.security.http.ssl.certificate=certs/testnode.crt"
- - "xpack.security.http.ssl.certificate_authorities=certs/ca.crt"
- - "xpack.security.transport.ssl.enabled=true"
- - "xpack.security.transport.ssl.key=certs/testnode.key"
- - "xpack.security.transport.ssl.certificate=certs/testnode.crt"
- - "xpack.security.transport.ssl.certificate_authorities=certs/ca.crt"
- volumes:
- - "./certs/testnode.crt:/usr/share/elasticsearch/config/certs/testnode.crt"
- - "./certs/testnode.key:/usr/share/elasticsearch/config/certs/testnode.key"
- - "./certs/ca.crt:/usr/share/elasticsearch/config/certs/ca.crt"
-
-networks:
- # we need two networks otherwise the two ES instances will join each other
- esnet-oss:
- esnet-platinum:
-volumes:
- esvol:
diff --git a/.ci/jobs/defaults.yml b/.ci/jobs/defaults.yml
deleted file mode 100644
index 1ccaa8b08..000000000
--- a/.ci/jobs/defaults.yml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-
-##### GLOBAL METADATA
-
-- meta:
- cluster: clients-ci
-
-##### JOB DEFAULTS
-
-- job:
- project-type: matrix
- logrotate:
- daysToKeep: 30
- numToKeep: 100
- properties:
- - github:
- url: https://github.com/elastic/elasticsearch-js/
- - inject:
- properties-content: HOME=$JENKINS_HOME
- concurrent: true
- node: flyweight
- scm:
- - git:
- name: origin
- credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
- reference-repo: /var/lib/jenkins/.git-references/elasticsearch-js.git
- branches:
- - ${branch_specifier}
- url: https://github.com/elastic/elasticsearch-js.git
- wipe-workspace: 'True'
- triggers:
- - github
- vault:
- # vault read auth/approle/role/clients-ci/role-id
- role_id: ddbd0d44-0e51-105b-177a-c8fdfd445126
- axes:
- - axis:
- type: slave
- name: label
- values:
- - linux
- - axis:
- type: yaml
- filename: .ci/test-matrix.yml
- name: ELASTICSEARCH_VERSION
- - axis:
- type: yaml
- filename: .ci/test-matrix.yml
- name: NODE_JS_VERSION
- yaml-strategy:
- exclude-key: exclude
- filename: .ci/test-matrix.yml
- wrappers:
- - ansicolor
- - timeout:
- type: absolute
- timeout: 120
- fail: true
- - timestamps
- - workspace-cleanup
- builders:
- - shell: |-
- #!/usr/local/bin/runbld
- .ci/run-tests
- publishers:
- - email:
- recipients: infra-root+build@elastic.co
diff --git a/.ci/jobs/elastic+elasticsearch-js+5.x.yml b/.ci/jobs/elastic+elasticsearch-js+5.x.yml
deleted file mode 100644
index 0b422ae31..000000000
--- a/.ci/jobs/elastic+elasticsearch-js+5.x.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- job:
- name: elastic+elasticsearch-js+5.x
- display-name: 'elastic / elasticsearch-js # 5.x'
- description: Testing the elasticsearch-js 5.x branch.
- parameters:
- - string:
- name: branch_specifier
- default: refs/heads/5.x
- description: the Git branch specifier to build (<branchName>, <tagName>,
- <commitId>, etc.)
- triggers:
- - github
- - timed: '@weekly'
diff --git a/.ci/jobs/elastic+elasticsearch-js+6.x.yml b/.ci/jobs/elastic+elasticsearch-js+6.x.yml
deleted file mode 100644
index 8f9a02c67..000000000
--- a/.ci/jobs/elastic+elasticsearch-js+6.x.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- job:
- name: elastic+elasticsearch-js+6.x
- display-name: 'elastic / elasticsearch-js # 6.x'
- description: Testing the elasticsearch-js 6.x branch.
- parameters:
- - string:
- name: branch_specifier
- default: refs/heads/6.x
- description: the Git branch specifier to build (<branchName>, <tagName>,
- <commitId>, etc.)
- triggers:
- - github
- - timed: '@weekly'
diff --git a/.ci/jobs/elastic+elasticsearch-js+7.x.yml b/.ci/jobs/elastic+elasticsearch-js+7.x.yml
deleted file mode 100644
index a25c2b5ae..000000000
--- a/.ci/jobs/elastic+elasticsearch-js+7.x.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- job:
- name: elastic+elasticsearch-js+7.x
- display-name: 'elastic / elasticsearch-js # 7.x'
- description: Testing the elasticsearch-js 7.x branch.
- parameters:
- - string:
- name: branch_specifier
- default: refs/heads/7.x
- description: the Git branch specifier to build (<branchName>, <tagName>,
- <commitId>, etc.)
- triggers:
- - github
- - timed: '@weekly'
diff --git a/.ci/jobs/elastic+elasticsearch-js+master.yml b/.ci/jobs/elastic+elasticsearch-js+master.yml
deleted file mode 100644
index 284d30f55..000000000
--- a/.ci/jobs/elastic+elasticsearch-js+master.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- job:
- name: elastic+elasticsearch-js+master
- display-name: 'elastic / elasticsearch-js # master'
- description: Testing the elasticsearch-js master branch.
- parameters:
- - string:
- name: branch_specifier
- default: refs/heads/master
- description: the Git branch specifier to build (<branchName>, <tagName>,
- <commitId>, etc.)
- triggers:
- - github
- - timed: '@daily'
diff --git a/.ci/jobs/elastic+elasticsearch-js+pull-request.yml b/.ci/jobs/elastic+elasticsearch-js+pull-request.yml
deleted file mode 100644
index 78cde9ecc..000000000
--- a/.ci/jobs/elastic+elasticsearch-js+pull-request.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- job:
- name: elastic+elasticsearch-js+pull-request
- display-name: 'elastic / elasticsearch-js # pull-request'
- description: Testing of elasticsearch-js pull requests.
- scm:
- - git:
- branches:
- - ${ghprbActualCommit}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- triggers:
- - github-pull-request:
- org-list:
- - elastic
- allow-whitelist-orgs-as-admins: true
- github-hooks: true
- status-context: clients-ci
- cancel-builds-on-update: true
- publishers: []
diff --git a/.ci/run-tests b/.ci/run-tests
deleted file mode 100755
index 3a0394a0c..000000000
--- a/.ci/run-tests
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# Runs the client tests via Docker with the expectation that the required
-# environment variables have already been exported before running this script.
-#
-# The required environment variables include:
-#
-# - $ELASTICSEARCH_VERSION
-# - $NODE_JS_VERSION
-#
-
-set -eo pipefail
-
-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} \
- .
-
-# 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"
-
-docker run \
- --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-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
-
diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml
deleted file mode 100644
index 84d69d9e0..000000000
--- a/.ci/test-matrix.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-ELASTICSEARCH_VERSION:
-- 7.0.0-beta1
-
-NODE_JS_VERSION:
-- 11
-- 10
-- 8
-- 6
-
-exclude: ~
diff --git a/.codecov.yml b/.codecov.yml
deleted file mode 100644
index eadbe3ef0..000000000
--- a/.codecov.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-comment: off
-
-coverage:
- precision: 2
- round: down
- range: "90...100"
-
- status:
- project: yes
- patch: yes
- changes: no
-
-ignore:
- - "api"
diff --git a/.dockerignore b/.dockerignore
index 54eb2a95a..a448fae9c 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -3,3 +3,6 @@ npm-debug.log
test/benchmarks
elasticsearch
.git
+lib
+junit-output
+.tap
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 0a2ad2dec..b1465f693 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -3,7 +3,7 @@
#### You have already researched for similar issues?
It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
-#### Are you sure this is an issue with @elastic/elasticsearch or are you just looking for some help?
+#### Are you sure this is an issue with `@elastic/elasticsearch` or are you just looking for some help?
Issues should only be posted in this repository after you have been able to reproduce them and confirm that they are a bug or incorrect/missing information in the [docs](https://github.com/elastic/elasticsearch-js/docs).
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
deleted file mode 100644
index 620b6a5ce..000000000
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-name: 🐛 Bug report
-about: Create a report to help us improve
----
-
-It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
-
-**Please read this entire template before posting any issue. If you ignore these instructions
-and post an issue here that does not follow the instructions, your issue might be closed,
-locked, and assigned the `not reproducible` label.**
-
-## 🐛 Bug Report
-
-A clear and concise description of what the bug is.
-
-## To Reproduce
-
-Steps to reproduce the behavior:
-
-Paste your code here:
-
-```js
-
-```
-
-## Expected behavior
-
-A clear and concise description of what you expected to happen.
-
-Paste the results here:
-
-```js
-
-```
-
-## Your Environment
-
-- *node version*: 6,8,10
-- *@elastic/elasticsearch version*: >=7.0.0
-- *os*: Mac, Windows, Linux
-- *any other relevant information*
diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml
new file mode 100644
index 000000000..d4e41efbf
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug.yaml
@@ -0,0 +1,66 @@
+---
+name: 🐛 Bug report
+description: Create a report to help us improve
+labels: ["Category: Bug"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
+
+ **Please read this entire template before posting any issue. If you ignore these instructions
+ and post an issue here that does not follow the instructions, your issue might be closed,
+ locked, and assigned the `Category: Not an issue` label.**
+
+ - type: textarea
+ id: bug-report
+ attributes:
+ label: 🐛 Bug report
+ description: A clear and concise description of what the bug is.
+ validations:
+ required: true
+
+ - type: textarea
+ id: reproduction
+ attributes:
+ label: To reproduce
+ description: Steps to reproduce the behavior
+ validations:
+ required: true
+
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected behavior
+ description: A clear and concise description of what you expected to happen.
+ validations:
+ required: true
+
+ - type: input
+ id: node-js-version
+ attributes:
+ label: Node.js version
+ placeholder: 18.x, 20.x, etc.
+ validations:
+ required: true
+
+ - type: input
+ id: client-version
+ attributes:
+ label: "@elastic/elasticsearch version"
+ placeholder: 7.17.0, 8.14.1, etc.
+ validations:
+ required: true
+
+ - type: input
+ id: os
+ attributes:
+ label: Operating system
+ placeholder: Ubuntu 22.04, macOS, etc.
+ validations:
+ required: true
+
+ - type: input
+ id: env-info
+ attributes:
+ label: Any other relevant environment information
diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md
deleted file mode 100644
index 2335d551d..000000000
--- a/.github/ISSUE_TEMPLATE/feature.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: 🚀 Feature Proposal
-about: Submit a proposal for a new feature
----
-
-It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
-
-**Please read this entire template before posting any issue. If you ignore these instructions
-and post an issue here that does not follow the instructions, your issue might be closed,
-locked, and assigned the `invalid` label.**
-
-## 🚀 Feature Proposal
-
-A clear and concise description of what the feature is.
-
-## Motivation
-
-Please outline the motivation for the proposal.
-
-## Example
-
-Please provide an example for how this feature would be used.
diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml
new file mode 100644
index 000000000..4a35cf6eb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature.yaml
@@ -0,0 +1,33 @@
+---
+name: 🚀 Feature Proposal
+description: Submit a proposal for a new feature
+labels: ["Category: Feature"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
+
+ **Please read this entire template before posting any issue. If you ignore these instructions
+ and post an issue here that does not follow the instructions, your issue might be closed,
+ locked, and assigned the `Category: Not an issue` label.**
+
+ - type: textarea
+ id: feature-proposal
+ attributes:
+ label: 🚀 Feature Proposal
+ description: A clear and concise description of what the feature is.
+ validations:
+ required: true
+
+ - type: textarea
+ id: motivation
+ attributes:
+ label: Motivation
+ description: Please outline the motivation for the proposal.
+
+ - type: textarea
+ id: example
+ attributes:
+ label: Example
+ description: Please provide an example for how this feature would be used.
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
deleted file mode 100644
index bbd7143bc..000000000
--- a/.github/ISSUE_TEMPLATE/question.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-name: 💬 Questions / Help
-about: If you have questions, please check our Gitter or Help repo
----
-
-## 💬 Questions and Help
-
-### Please note that this issue tracker is not a help forum and this issue may be closed.
-
-It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
diff --git a/.github/ISSUE_TEMPLATE/question.yaml b/.github/ISSUE_TEMPLATE/question.yaml
new file mode 100644
index 000000000..083cb7f2d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/question.yaml
@@ -0,0 +1,21 @@
+---
+name: 💬 Questions / Help
+description: If you have questions, please check our community forum or support
+labels: ["Category: Question"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ ### Please note that this issue tracker is not a help forum and this issue may be closed.
+
+ Please check our [community forum](https://discuss.elastic.co/) or [contact Elastic support](https://www.elastic.co/support) if your issue is not specifically related to the documented functionality of this client library.
+
+ It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
+
+ - type: textarea
+ id: question
+ attributes:
+ label: Question
+ description: Your question or comment
+ validations:
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/regression.md b/.github/ISSUE_TEMPLATE/regression.md
deleted file mode 100644
index 079234a36..000000000
--- a/.github/ISSUE_TEMPLATE/regression.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-name: 💥 Regression Report
-about: Report unexpected behavior that worked in previous versions
----
-
-It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
-
-**Please read this entire template before posting any issue. If you ignore these instructions
-and post an issue here that does not follow the instructions, your issue might be closed,
-locked, and assigned the `invalid` label.**
-
-## 💥 Regression Report
-
-A clear and concise description of what the regression is.
-
-## Last working version
-
-Worked up to version:
-
-Stopped working in version:
-
-## To Reproduce
-
-Steps to reproduce the behavior:
-
-Paste your code here:
-
-```js
-
-```
-
-## Expected behavior
-
-A clear and concise description of what you expected to happen.
-
-Paste the results here:
-
-```js
-
-```
-
-## Your Environment
-
-- *node version*: 6,8,10
-- *@elastic/elasticsearch version*: >=7.0.0
-- *os*: Mac, Windows, Linux
-- *any other relevant information*
diff --git a/.github/ISSUE_TEMPLATE/regression.yaml b/.github/ISSUE_TEMPLATE/regression.yaml
new file mode 100644
index 000000000..5271be332
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/regression.yaml
@@ -0,0 +1,92 @@
+---
+name: 💥 Regression Report
+description: Report unexpected behavior that worked in previous versions
+labels: ["Category: Bug"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should [search](https://github.com/elastic/elasticsearch-js/issues) at first before submitting a new one.
+
+ **Please read this entire template before posting any issue. If you ignore these instructions
+ and post an issue here that does not follow the instructions, your issue might be closed,
+ locked, and assigned the `Category: Not an issue` label.**
+
+ - type: textarea
+ id: report
+ attributes:
+ label: Regression report
+ description: A clear and concise description of what the regression is.
+ validations:
+ required: true
+
+ - type: input
+ id: last-working-version
+ attributes:
+ label: Last working version
+ description: Version of `@elastic/elasticsearch` where this last worked.
+ validations:
+ required: true
+
+ - type: textarea
+ id: to-reproduce
+ attributes:
+ label: To reproduce
+ description: |
+ Paste your code here that shows how to reproduce the behavior.
+
+ In some cases, it might be challenging to reproduce the bug in a few lines of code.
+ You can fork the following repository, which contains all the configuration needed to spin up a three nodes Elasticsearch cluster with security enabled.
+ [This repository](https://github.com/delvedor/es-reproduce-issue) also contains a preconfigured client instance that you can use to reproduce the issue.
+ validations:
+ required: true
+
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: Expected behavior
+ description: A clear and concise description of what you expected to happen.
+ validations:
+ required: true
+
+ - type: input
+ id: node-version
+ attributes:
+ label: Node.js version
+ description: What version of Node.js you are using (`node --version`).
+ validations:
+ required: true
+
+ - type: input
+ id: typescript-version
+ attributes:
+ label: TypeScript version
+ description: TypeScript version you are using, if applicable.
+
+ - type: input
+ id: elasticsearch-client-version
+ attributes:
+ label: Elasticsearch client version
+ description: What version of `@elastic/elasticsearch` and `@elastic/transport` you are using (`npm ls -a | grep '@elastic'`).
+ validations:
+ required: true
+
+ - type: input
+ id: elasticsearch-version
+ attributes:
+ label: Elasticsearch server version
+ description: What version of Elasticsearch you are using.
+ validations:
+ required: true
+
+ - type: input
+ id: operating-system
+ attributes:
+ label: Operating system
+ description: What operating system you are running.
+ placeholder: e.g. Linux, MacOS, Windows
+
+ - type: textarea
+ id: env-info
+ attributes:
+ label: Any other relevant environment information.
diff --git a/.github/ISSUE_TEMPLATE/security.md b/.github/ISSUE_TEMPLATE/security.md
deleted file mode 100644
index 0529296fc..000000000
--- a/.github/ISSUE_TEMPLATE/security.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-name: 👮 Security Issue
-about: Responsible Disclosure
----
-
-If you want to report a security issue, please take a look at [elastic/security](https://www.elastic.co/community/security).
diff --git a/.github/ISSUE_TEMPLATE/security.yaml b/.github/ISSUE_TEMPLATE/security.yaml
new file mode 100644
index 000000000..e003a1e6b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/security.yaml
@@ -0,0 +1,8 @@
+---
+name: 👮 Security Issue
+description: Responsible disclosure
+body:
+ - type: markdown
+ attributes:
+ value: |
+ If you want to report a security issue, please take a look at [elastic/security](https://www.elastic.co/community/security).
diff --git a/.github/make.sh b/.github/make.sh
new file mode 100755
index 000000000..acaef57ce
--- /dev/null
+++ b/.github/make.sh
@@ -0,0 +1,222 @@
+#!/usr/bin/env bash
+# ------------------------------------------------------- #
+#
+# Build entry script for elasticsearch-js
+#
+# Must be called: ./.github/make.sh
+#
+# Version: 1.1.0
+#
+# Targets:
+# ---------------------------
+# assemble : build client artifacts with version
+# bump : bump client internals to version
+# bumpmatrix : bump stack version in test matrix to version
+# codegen : generate endpoints
+# docsgen : generate documentation
+# examplegen : generate the doc examples
+# clean : clean workspace
+#
+# ------------------------------------------------------- #
+
+# ------------------------------------------------------- #
+# Bootstrap
+# ------------------------------------------------------- #
+script_path=$(dirname "$(realpath -s "$0")")
+repo=$(realpath "$script_path/../")
+
+# shellcheck disable=SC1090
+CMD=$1
+TASK=$1
+TASK_ARGS=()
+VERSION=$2
+STACK_VERSION=$VERSION
+set -euo pipefail
+
+product="elastic/elasticsearch-js"
+output_folder=".buildkite/output"
+codegen_folder=".buildkite/output"
+OUTPUT_DIR="$repo/${output_folder}"
+NODE_JS_VERSION=22
+WORKFLOW=${WORKFLOW-staging}
+mkdir -p "$OUTPUT_DIR"
+
+echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
+echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
+echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m"
+
+case $CMD in
+clean)
+ echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
+ rm -rf "$output_folder"
+ echo -e "\033[32;1mdone.\033[0m"
+ exit 0
+ ;;
+assemble)
+ if [ -v $VERSION ]; then
+ echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m"
+ exit 1
+ fi
+ echo -e "\033[36;1mTARGET: assemble artifact $VERSION\033[0m"
+ TASK=release
+ TASK_ARGS=("$VERSION" "$output_folder")
+ ;;
+codegen)
+ if [ -v "$VERSION" ] || [[ -z "$VERSION" ]]; then
+ # fall back to branch name or `main` if no VERSION is set
+ branch_name=$(git rev-parse --abbrev-ref HEAD)
+ if [[ "$branch_name" =~ ^[0-9]+\.[0-9]+ ]]; then
+ echo -e "\033[36;1mTARGET: codegen -> No VERSION argument found, using branch name: \`$branch_name\`\033[0m"
+ VERSION="$branch_name"
+ else
+ echo -e "\033[36;1mTARGET: codegen -> No VERSION argument found, using \`main\`\033[0m"
+ VERSION="main"
+ fi
+ fi
+ if [ "$VERSION" = 'main' ]; then
+ echo -e "\033[36;1mTARGET: codegen API $VERSION\033[0m"
+ else
+ echo -e "\033[36;1mTARGET: codegen API v$VERSION\033[0m"
+ fi
+
+ TASK=codegen
+ TASK_ARGS=("$VERSION")
+ ;;
+docsgen)
+ if [ -v $VERSION ]; then
+ echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m"
+ exit 1
+ fi
+ echo -e "\033[36;1mTARGET: generate docs for $VERSION\033[0m"
+ TASK=codegen
+ TASK_ARGS=("$VERSION" "$codegen_folder")
+ ;;
+examplesgen)
+ echo -e "\033[36;1mTARGET: generate examples\033[0m"
+ TASK=codegen
+ TASK_ARGS=("$VERSION" "$codegen_folder")
+ ;;
+bump)
+ if [ -v $VERSION ]; then
+ echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m"
+ exit 1
+ fi
+ echo -e "\033[36;1mTARGET: bump to version $VERSION\033[0m"
+ TASK=bump
+ TASK_ARGS=("$VERSION")
+ ;;
+bumpmatrix)
+ if [ -v $VERSION ]; then
+ echo -e "\033[31;1mTARGET: bumpmatrix -> missing version parameter\033[0m"
+ exit 1
+ fi
+ echo -e "\033[36;1mTARGET: bump stack in test matrix to version $VERSION\033[0m"
+ TASK=bumpmatrix
+ TASK_ARGS=("$VERSION")
+ ;;
+*)
+ echo -e "\n'$CMD' is not supported right now\n"
+ echo -e "\nUsage:"
+ echo -e "\t $0 release \$VERSION\n"
+ echo -e "\t $0 bump \$VERSION"
+ echo -e "\t $0 codegen \$VERSION"
+ exit 1
+ ;;
+esac
+
+# ------------------------------------------------------- #
+# Build Container
+# ------------------------------------------------------- #
+
+echo -e "\033[34;1mINFO: building $product container\033[0m"
+
+docker build \
+ --file .buildkite/Dockerfile-make \
+ --tag "$product" \
+ --build-arg NODE_JS_VERSION="$NODE_JS_VERSION" \
+ --build-arg "BUILDER_UID=$(id -u)" \
+ --build-arg "BUILDER_GID=$(id -g)" \
+ .
+
+# ------------------------------------------------------- #
+# Run the Container
+# ------------------------------------------------------- #
+
+echo -e "\033[34;1mINFO: running $product container\033[0m"
+
+if [[ -z "${BUILDKITE+x}" ]] && [[ -z "${CI+x}" ]] && [[ -z "${GITHUB_ACTIONS+x}" ]]; then
+ echo -e "\033[34;1mINFO: Running in local mode"
+ docker run \
+ -u "$(id -u):$(id -g)" \
+ --volume "$repo:/usr/src/elasticsearch-js" \
+ --volume /usr/src/elasticsearch-js/node_modules \
+ --volume "$(realpath "$repo/../elastic-client-generator-js"):/usr/src/elastic-client-generator-js" \
+ --env "WORKFLOW=$WORKFLOW" \
+ --name make-elasticsearch-js \
+ --rm \
+ $product \
+ /bin/bash -c "mkdir -p /usr/src/elastic-client-generator-js/output && \
+ node .buildkite/make.mjs --task $TASK ${TASK_ARGS[*]}"
+else
+ echo -e "\033[34;1mINFO: Running in CI mode"
+
+ # determine branch to clone
+ GENERATOR_BRANCH="main"
+ if [[ "$VERSION" == 8.* ]]; then
+ GENERATOR_BRANCH="8.x"
+ fi
+ echo -e "\033[34;1mINFO: Generator branch: $GENERATOR_BRANCH"
+
+ docker run \
+ --volume "$repo:/usr/src/elasticsearch-js" \
+ --volume /usr/src/elasticsearch-js/node_modules \
+ -u "$(id -u):$(id -g)" \
+ --env "WORKFLOW=$WORKFLOW" \
+ --name make-elasticsearch-js \
+ --rm \
+ $product \
+ /bin/bash -c "cd /usr/src && \
+ git clone --branch $GENERATOR_BRANCH https://$CLIENTS_GITHUB_TOKEN@github.com/elastic/elastic-client-generator-js.git && \
+ mkdir -p /usr/src/elastic-client-generator-js/output && \
+ cd /usr/src/elasticsearch-js && \
+ node .buildkite/make.mjs --task $TASK ${TASK_ARGS[*]}"
+fi
+
+# ------------------------------------------------------- #
+# Post Command tasks & checks
+# ------------------------------------------------------- #
+
+if [[ "$CMD" == "assemble" ]]; then
+ if compgen -G ".buildkite/output/*" >/dev/null; then
+ echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
+ else
+ echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
+ exit 1
+ fi
+fi
+
+if [[ "$CMD" == "bump" ]]; then
+ if [ -n "$(git status --porcelain)" ]; then
+ echo -e "\033[32;1mTARGET: successfully bumped client v$VERSION\033[0m"
+ else
+ echo -e "\033[31;1mTARGET: failed bumped client v$VERSION\033[0m"
+ exit 1
+ fi
+fi
+
+if [[ "$CMD" == "codegen" ]]; then
+ if [ -n "$(git status --porcelain)" ]; then
+ echo -e "\033[32;1mTARGET: successfully generated client v$VERSION\033[0m"
+ else
+ echo -e "\033[31;1mTARGET: failed generating client v$VERSION\033[0m"
+ exit 1
+ fi
+fi
+
+if [[ "$CMD" == "docsgen" ]]; then
+ echo "TODO"
+fi
+
+if [[ "$CMD" == "examplesgen" ]]; then
+ echo "TODO"
+fi
diff --git a/.github/stale.yml b/.github/stale.yml
index 9f6c839ea..e4c52677c 100644
--- a/.github/stale.yml
+++ b/.github/stale.yml
@@ -9,6 +9,8 @@ exemptLabels:
- "discussion"
- "feature request"
- "bug"
+ - "todo"
+ - "good first issue"
# Label to use when marking an issue as stale
staleLabel: stale
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
new file mode 100644
index 000000000..56d4f328a
--- /dev/null
+++ b/.github/workflows/backport.yml
@@ -0,0 +1,27 @@
+---
+name: Backport
+on:
+ pull_request_target:
+ types:
+ - closed
+ - labeled
+
+jobs:
+ backport:
+ name: Backport
+ runs-on: ubuntu-latest
+ # Only react to merged PRs for security reasons.
+ # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
+ if: >
+ github.event.pull_request.merged
+ && (
+ github.event.action == 'closed'
+ || (
+ github.event.action == 'labeled'
+ && contains(github.event.label.name, 'backport')
+ )
+ )
+ steps:
+ - uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
new file mode 100644
index 000000000..85f8131d3
--- /dev/null
+++ b/.github/workflows/nodejs.yml
@@ -0,0 +1,120 @@
+---
+name: Node CI
+
+on:
+ pull_request: {}
+
+jobs:
+ paths-filter:
+ name: Detect files changed
+ runs-on: ubuntu-latest
+ outputs:
+ src-only: "${{ steps.changes.outputs.src-only }}"
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+ - uses: dorny/paths-filter/@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
+ id: changes
+ with:
+ filters: |
+ src-only:
+ - '!(**/*.{md,asciidoc,txt}|*.{md,asciidoc,txt}|{docs,.buildkite,scripts}/**/*|catalog-info.yaml)'
+ - '.github/workflows/**'
+
+ test:
+ name: Test
+ runs-on: ${{ matrix.os }}
+ needs: paths-filter
+ # only run if code relevant to unit tests was changed
+ if: needs.paths-filter.outputs.src-only == 'true'
+
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [18.x, 20.x, 22.x, 23.x]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
+ 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: ECMAScript module test
+ run: |
+ npm run test:esm
+
+ license:
+ name: License check
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+
+ - name: Use Node.js
+ uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
+ with:
+ node-version: 22.x
+
+ - name: Install
+ run: |
+ npm install
+
+ - name: License checker
+ run: |
+ npm run license-checker
+
+ test-bun:
+ name: Test Bun
+ runs-on: ${{ matrix.os }}
+ needs: paths-filter
+ # only run if code relevant to unit tests was changed
+ if: needs.paths-filter.outputs.src-only == 'true'
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+
+ - name: Use Bun
+ uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
+
+ - name: Install
+ run: |
+ bun install
+
+ - name: Lint
+ run: |
+ bun run lint
+
+ - name: Unit test
+ run: |
+ bun run test:unit-bun
+
+ - name: ECMAScript module test
+ run: |
+ bun run test:esm
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
new file mode 100644
index 000000000..68bb353d7
--- /dev/null
+++ b/.github/workflows/npm-publish.yml
@@ -0,0 +1,38 @@
+name: Publish Package to npm
+on:
+ workflow_dispatch:
+ inputs:
+ branch:
+ description: "Git branch to build and publish"
+ required: true
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ id-token: write
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+ ref: ${{ github.event.inputs.branch }}
+ - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
+ with:
+ node-version: "22.x"
+ registry-url: "https://registry.npmjs.org"
+ - run: npm install -g npm
+ - run: npm install
+ - run: npm test
+ - run: npm publish --provenance --access public
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+ - run: |
+ version=$(jq -r .version package.json)
+ gh release create \
+ -n "[Changelog](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/$BRANCH_NAME/changelog-client.html)" \
+ --target "$BRANCH_NAME" \
+ -t "v$version" \
+ "v$version"
+ env:
+ BRANCH_NAME: ${{ github.event.inputs.branch }}
+ GH_TOKEN: ${{ github.token }}
diff --git a/.github/workflows/serverless-patch.sh b/.github/workflows/serverless-patch.sh
new file mode 100755
index 000000000..a38eda9ec
--- /dev/null
+++ b/.github/workflows/serverless-patch.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+set -exuo pipefail
+
+merge_commit_sha=$(jq -r '.pull_request.merge_commit_sha' "$GITHUB_EVENT_PATH")
+pull_request_id=$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH")
+pr_shortcode="elastic/elasticsearch-js#$pull_request_id"
+
+# generate patch file
+cd "$GITHUB_WORKSPACE/stack"
+git format-patch -1 --stdout "$merge_commit_sha" > /tmp/patch.diff
+
+# set committer info
+git config --global user.email "elasticmachine@users.noreply.github.com"
+git config --global user.name "Elastic Machine"
+
+# apply patch file
+cd "$GITHUB_WORKSPACE/serverless"
+git am -C1 --reject /tmp/patch.diff || git am --quit
+
+# generate PR body comment
+comment="Patch applied from $pr_shortcode"
+
+# enumerate rejected patches in PR comment
+has_rejects='false'
+for f in ./**/*.rej; do
+ has_rejects='true'
+ comment="$comment
+
+## Rejected patch \`$f\` must be resolved:
+
+\`\`\`diff
+$(cat "$f")
+\`\`\`
+"
+done
+
+# delete .rej files
+rm -fv ./**/*.rej
+
+# send data to output parameters
+echo "$comment" > /tmp/pr_body
+echo "PR_DRAFT=$has_rejects" >> "$GITHUB_OUTPUT"
diff --git a/.github/workflows/serverless-patch.yml b/.github/workflows/serverless-patch.yml
new file mode 100644
index 000000000..2f583a7cd
--- /dev/null
+++ b/.github/workflows/serverless-patch.yml
@@ -0,0 +1,53 @@
+---
+name: Apply PR changes to serverless
+on:
+ pull_request_target:
+ types:
+ - closed
+ - labeled
+
+jobs:
+ apply-patch:
+ name: Apply patch
+ runs-on: ubuntu-latest
+ # Only react to merged PRs for security reasons.
+ # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
+ if: >
+ github.event.pull_request.merged
+ && (
+ (
+ github.event.action == 'closed'
+ && contains(github.event.pull_request.labels.*.name, 'apply-to-serverless')
+ )
+ ||
+ (
+ github.event.action == 'labeled'
+ && github.event.label.name == 'apply-to-serverless'
+ )
+ )
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+ repository: elastic/elasticsearch-js
+ ref: main
+ path: stack
+ fetch-depth: 0
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+ repository: elastic/elasticsearch-serverless-js
+ ref: main
+ path: serverless
+ - name: Apply patch from stack to serverless
+ id: apply-patch
+ run: $GITHUB_WORKSPACE/stack/.github/workflows/serverless-patch.sh
+ - uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
+ with:
+ token: ${{ secrets.GH_TOKEN }}
+ path: serverless
+ title: "Apply patch from elastic/elasticsearch-js#${{ github.event.pull_request.number }}"
+ commit-message: "Apply patch from elastic/elasticsearch-js#${{ github.event.pull_request.number }}"
+ body-path: /tmp/pr_body
+ draft: "${{ steps.apply-patch.outputs.PR_DRAFT }}"
+ add-paths: ":!*.rej"
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 000000000..020c87722
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,21 @@
+---
+name: 'Close stale issues and PRs'
+on:
+ schedule:
+ - cron: '30 1 * * *'
+
+jobs:
+ stale:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8
+ with:
+ stale-issue-label: stale
+ stale-pr-label: stale
+ days-before-stale: 90
+ days-before-close: 14
+ exempt-issue-labels: 'good first issue'
+ close-issue-label: closed-stale
+ close-pr-label: closed-stale
+ stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove the `stale` label, or leave a comment, or this will be closed in 14 days.'
+ stale-pr-message: 'This pull request is stale because it has been open 90 days with no activity. Remove the `stale` label, or leave a comment, or this will be closed in 14 days.'
diff --git a/.gitignore b/.gitignore
index b726b15e7..adec49623 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,13 +45,26 @@ jspm_packages
# vim swap files
*.swp
+#Jetbrains editor folder
+.idea
+
package-lock.json
# elasticsearch repo or binary files
elasticsearch*
-# Generated typings, we don't commit them
-# because we should copy them in the main .d.ts file
-api/generated.d.ts
-
test/benchmarks/macro/fixtures/*
+
+*-junit.xml
+
+.cache
+
+test/bundlers/**/bundle.js
+test/bundlers/parcel-test/.parcel-cache
+
+lib
+junit-output
+bun.lockb
+test-results
+processinfo
+.tap
diff --git a/.npmignore b/.npmignore
index 08e9fdf23..8a921bbd6 100644
--- a/.npmignore
+++ b/.npmignore
@@ -64,6 +64,13 @@ test
scripts
# ci configuration
-.ci
.travis.yml
+.buildkite
certs
+.github
+CODE_OF_CONDUCT.md
+CONTRIBUTING.md
+
+src
+bun.lockb
+.tap
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 3eb76648b..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-dist: trusty
-
-sudo: required
-
-language: node_js
-
-node_js:
- - "10"
- - "8"
- - "6"
-
-env:
- global:
- - ELASTICSEARCH_VERSION=7.0.0-beta1
- - QUIET=true
-
-before_install:
- - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}-linux-x86_64.tar.gz
- - tar -xzf elasticsearch-${ELASTICSEARCH_VERSION}-linux-x86_64.tar.gz
- - ./elasticsearch-${ELASTICSEARCH_VERSION}/bin/elasticsearch -Enode.attr.testattr=test -Epath.repo=/tmp -Erepositories.url.allowed_urls='http://snapshot.*' &> /dev/null &
-
-install:
- - npm install
-
-script:
- - npm run ci
-
-notifications:
- email:
- on_success: never
- on_failure: always
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 000000000..56baaa2b7
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,3 @@
+303 See Other
+
+Location: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/changelog-client.html
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..c286a3152
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
+303 See Other
+
+Location: https://www.elastic.co/community/codeofconduct
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..2ac7f14dd
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,114 @@
+# Contributing to the Elasticsearch Node.js client
+
+The Elasticsearch Node.js client is open source and we love to receive contributions from our community — you!
+
+There are many ways to contribute,
+from writing tutorials or blog posts,
+improving the documentation,
+submitting bug reports and feature requests or writing code.
+
+## Repository structure
+The `main` branch is considered unstable, and it's compatible with Elasticsearch main. Unless you are patching an issue, new features should always be sent to the `main` branch, in case of a bugfix, it depends if the bug affects all the release lines.
+There is a branch for every supported release line, such as `7.x` or `6.x`. We release bugfixes as soon as possible, while minor and major releases are published at the same time of the Elastic Stack.
+
+Usually for every release line there will be a *published* version and a *next* version. Eg: the `7.x` branch contains the version published on npm, and bugfixes should be sent there, while `7.2` *(assuming that 7.1.x is released)* contains the next version, and new features should be sent there.
+
+## Code contributions
+
+If you have a bugfix or new feature that you would like to contribute,
+please find or open an issue about it first.
+Talk about what you would like to do.
+It may be that somebody is already working on it,
+or that there are particular issues that you should know about before implementing the change.
+
+Note that we strictly follow the [Elastic EOL schedule](https://www.elastic.co/support/eol).
+
+### Submitting your changes
+
+Generally, we require that you test any code you are adding or modifying.
+Once your changes are ready to submit for review:
+
+1. Test your changes
+
+ Run the test suite to make sure that nothing is broken.
+ Usually running `npm test` is enough; our CI will take care of running the integration tests. If you want to run the integration tests yourself, see [the *Testing* section](#testing) below.
+
+2. Submit a pull request
+
+ Push your local changes to your forked copy of the repository and [submit a pull request](https://help.github.com/articles/using-pull-requests).
+ In the pull request,
+ choose a title which sums up the changes that you have made,
+ and in the body provide more details about what your changes do.
+ Also mention the number of the issue where discussion has taken place,
+ eg "Closes #123".
+
+3. Sign the Contributor License Agreement
+
+ Please make sure you have signed our [Contributor License Agreement](https://www.elastic.co/contributor-agreement/).
+ We are not asking you to assign copyright to us,
+ but to give us the right to distribute your code without restriction.
+ We ask this of all contributors in order to assure our users of the origin and continuing existence of the code.
+ You only need to sign the CLA once.
+
+4. Be patient
+
+ We might not be able to review your code as fast as we would like to,
+ but we'll do our best to dedicate it the attention it deserves.
+ Your effort is much appreciated!
+
+### Code generation
+
+The entire content of the `src/api/` directory is automatically generated from [the Elasticsearch specification](https://github.com/elastic/elasticsearch-specification), as is the `docs/reference.asciidoc` file.
+This code generation is done using a separate repository that is not currently available to the public.
+
+If you find discrepancies between this client's API code and what you see when actually interacting with an Elasticsearch API, you can open a pull request here to fix it.
+For API fixes, it's likely a change will need to be made to the specification as well, to ensure your fix is not undone by the code generation process.
+We will do our best to make sure this is addressed when reviewing and merging your changes.
+
+PRs to improve the specification are also welcome!
+It is implemented in TypeScript, so JavaScript devs should be able to understand it fairly easily.
+Spec fixes are particularly helpful, as they will be reflected in ALL official Elasticsearch clients, not just this one.
+
+### Testing
+
+There are a few different test scripts.
+Usually during development you only need to run `npm test`, but if you want you can run just a part of the suite:
+
+| Script | Description |
+|---|---|
+| `npm run test:unit` | Runs the content of the `test/unit` folder. |
+| `npm run test:coverage-100` | Runs unit tests enforcing 100% coverage. |
+| `npm run test:coverage-report` | Runs unit tests and generates an `lcov` coverage report. |
+| `npm run test:coverage-ui` | Runs unit tests and generates an HTML coverage report. |
+| `npm run test:integration` | Runs the integration test runner. **Note: requires a living instance of Elasticsearch.** |
+| `npm run lint` | Run the [linter](https://github.com/standard/ts-standard). |
+| `npm run lint:fix` | Fixes linter errors. |
+| `npm run license-checker` | Checks that all dependencies have acceptable open source licenses. |
+
+| `npm test` | Runs `lint` and `test:unit`. |
+
+#### Integration test
+
+The integration tests are generated on the fly by the runner you will find inside `test/integration`.
+Once you execute it, it will fetch the [YAML REST test files](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test) from our artifacts API.
+These are used to generate the integration tests.
+
+Usually this step is executed by CI since it takes some time, but you can easily run this yourself!
+Just follow this steps:
+1. Boot a fresh Elasticsearch instance, which can be done in a Docker container by running `STACK_VERSION=8.10.0 DETACH=true .buildkite/run-elasticsearch.sh`, where `STACK_VERSION` and `DETACH` environment variables can be adjusted to your needs. A `TEST_SUITE` env var can also be set to `free` or `platinum`, and defaults to `free`.
+1. Run `npm run test:integration` to run the whole suite, or `npm run test:integration -- --bail` to stop after the first failure.
+1. Grab a coffee, it will take some time. ;)
+
+This suite is very large, and not all tests will pass.
+This is fine.
+This suite is mostly used to identify notable changes in success/fail rate over time as we make changes to the client.
+
+### Releasing
+
+If you have access to make releases, the process is as follows:
+
+1. Update the version in `package.json` according to the scale of the change. (major, minor or patch)
+1. Commit changes with message `Bumped vx.y.z` where `x.y.z` is the version in `package.json`
+1. Create a release via the GitHub UI.
+1. Wait for CI to finish running the test.
+1. Publish to npm with `npm publish` *(see [publish](https://docs.npmjs.com/cli/publish) and [dist-tag](https://docs.npmjs.com/cli/dist-tag) docs)*
diff --git a/LICENSE b/LICENSE
index d64569567..a80a3fd53 100644
--- a/LICENSE
+++ b/LICENSE
@@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright [yyyy] [name of copyright owner]
+ Copyright 2020 Elastic and contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 000000000..72d057cab
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,2 @@
+Elasticsearch JavaScript Client
+Copyright 2022 Elasticsearch B.V.
diff --git a/README.md b/README.md
index 3d9b24312..fb0d45a32 100644
--- a/README.md
+++ b/README.md
@@ -1,153 +1,173 @@
-# @elastic/elasticsearch
+# Elasticsearch Node.js client
-[](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)
+[](http://standardjs.com/) [](https://buildkite.com/elastic/elasticsearch-javascript-client-integration-tests/builds?branch=main) [](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [](https://codecov.io/gh/elastic/elasticsearch-js) [](https://www.npmjs.com/package/@elastic/elasticsearch)
----
+**[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)**
+or
+**[sign-up](https://cloud.elastic.co/registration?elektra=en-ess-sign-up-page)**
+**for a free trial of Elastic Cloud**.
-**Note:** In the past months we have worked on the new Elasticsearch Node.js client, we will announce it soon!
-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.
----
+## Installation
-The official Node.js client for Elasticsearch.
+Refer to the [Installation section](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_installation)
+of the getting started documentation.
-## Features
-- One-to-one mapping with REST API.
-- Generalized, pluggable architecture.
-- Configurable, automatic discovery of cluster nodes.
-- Persistent, Keep-Alive connections.
-- Load balancing (with pluggable selection strategy) across all available nodes.
-- TypeScript support out of the box.
+## Connecting
-## Install
-```
-npm install @elastic/elasticsearch
-```
+Refer to the [Connecting section](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_connecting)
+of the getting started documentation.
-### Compatibility
+## Compatibility
----
+The Elasticsearch client is compatible with currently maintained JS versions.
-**Warning:** currently on npm you will only find a beta release that works with Elasticsearch 7, we will add the support for Elasticsearch 5, 6, and 7 once we release the final version of this library.
+Language clients are forward compatible; meaning that clients support
+communicating with greater or equal minor versions of Elasticsearch without
+breaking. It does not mean that the client automatically supports new features
+of newer Elasticsearch versions; it is only possible after a release of a new
+client version. For example, a 8.12 client version won't automatically support
+the new features of the 8.13 version of Elasticsearch, the 8.13 client version
+is required for that. Elasticsearch language clients are only backwards
+compatible with default distributions and without guarantees made.
----
+| Elasticsearch Version | Elasticsearch-JS Branch | Supported |
+| --------------------- | ------------------------ | --------- |
+| main | main | |
+| 8.x | 8.x | 8.x |
+| 7.x | 7.x | 7.17 |
-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.
-```
-# Elasticsearch 7.x
-@elastic/elasticsearch@7
+## Usage
+
+* [Creating an index](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_creating_an_index)
+* [Indexing a document](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_indexing_documents)
+* [Getting documents](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_getting_documents)
+* [Searching documents](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_searching_documents)
+* [Updating documents](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_updating_documents)
+* [Deleting documents](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_deleting_documents)
+* [Deleting an index](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/getting-started-js.html#_deleting_an_index)
+
+### Node.js support
+
+NOTE: The minimum supported version of Node.js is `v18`.
+
+The client versioning follows the Elastic Stack versioning, this means that
+major, minor, and patch releases are done following a precise schedule that
+often does not coincide with the [Node.js release](https://nodejs.org/en/about/releases/) times.
+
+To avoid support insecure and unsupported versions of Node.js, the
+client **will drop the support of EOL versions of Node.js between minor releases**.
+Typically, as soon as a Node.js version goes into EOL, the client will continue
+to support that version for at least another minor release. If you are using the client
+with a version of Node.js that will be unsupported soon, you will see a warning
+in your logs (the client will start logging the warning with two minors in advance).
+
+Unless you are **always** using a supported version of Node.js,
+we recommend defining the client dependency in your
+`package.json` with the `~` instead of `^`. In this way, you will lock the
+dependency on the minor release and not the major. (for example, `~7.10.0` instead
+of `^7.10.0`).
+
+| Node.js Version | Node.js EOL date | End of support |
+| --------------- |------------------| ---------------------- |
+| `8.x` | `December 2019` | `7.11` (early 2021) |
+| `10.x` | `April 2021` | `7.12` (mid 2021) |
+| `12.x` | `April 2022` | `8.2` (early 2022) |
+| `14.x` | `April 2023` | `8.8` (early 2023) |
+| `16.x` | `September 2023` | `8.11` (late 2023) |
-# Elasticsearch 6.x
-@elastic/elasticsearch@6
+### Compatibility
+
+Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch.
+Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
-# Elasticsearch 5.x
-@elastic/elasticsearch@5
+| Elasticsearch Version | Client Version |
+| --------------------- |----------------|
+| `8.x` | `8.x` |
+| `7.x` | `7.x` |
+| `6.x` | `6.x` |
+| `5.x` | `5.x` |
+
+To install a specific major of the client, run the following command:
+```
+npm install @elastic/elasticsearch@
```
-## Usage
-You can find the full documentation in the [docs](https://github.com/elastic/elasticsearch-js/tree/master/docs) folder.
-```js
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+#### Browser
-// promise API
-const result = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-})
+> [!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, you can see a proxy example [here](./docs/examples/proxy).
-// callback API
-client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, (err, result) => {
- if (err) console.log(err)
-})
+## 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-connecting.html#client-usage)
+* [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)
+* [Authentication](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-connecting.html#authentication)
+* [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.html)
+* [Client helpers](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-helpers.html)
+* [Typescript support](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/typescript.html)
+* [Testing](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-testing.html)
+* [Examples](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/examples.html)
+
+## 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:
+
+```sh
+npm install @npm:@elastic/elasticsearch@
```
-The returned value of **every** API call is formed as follows:
-```ts
-{
- body: object | boolean
- statusCode: number
- headers: object
- warnings: [string]
- meta: object
-}
+
+So for example if you need to install `7.x` and `6.x`, you will run:
+
+```sh
+npm install es6@npm:@elastic/elasticsearch@6
+npm install es7@npm:@elastic/elasticsearch@7
```
-### 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;
+
+And your `package.json` will look like the following:
+
+```json
+"dependencies": {
+ "es6": "npm:@elastic/elasticsearch@^6.7.0",
+ "es7": "npm:@elastic/elasticsearch@^7.0.0"
}
```
-### Request specific options
-If needed you can pass request specific options in a second object:
+You will require the packages from your code by using the alias you have defined.
+
```js
-// promise API
-const result = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404],
- maxRetries: 3
+const { Client: Client6 } = require('es6')
+const { Client: Client7 } = require('es7')
+
+const client6 = new Client6({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const client7 = new Client7({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
})
+
+client6.info().then(console.log, console.log)
+client7.info().then(console.log, console.log)
```
-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`
-}
+
+Finally, if you want to install the client for the next version of Elasticsearch
+*(the one that lives in Elasticsearch’s main branch)*, you can use the following
+command:
+
+```sh
+npm install esmain@github:elastic/elasticsearch-js
```
## License
-This software is licensed under the [Apache 2 license](./LICENSE).
+This software is licensed under the [Apache License 2.0](./LICENSE).
diff --git a/api/api/bulk.js b/api/api/bulk.js
deleted file mode 100644
index 5322898dc..000000000
--- a/api/api/bulk.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildBulk (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html) request
- *
- * @param {string} index - Default index for items which don't provide one
- * @param {string} type - Default document type for items which don't provide one
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the bulk 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 {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
- * @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} _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
- * @param {string} pipeline - The pipeline id to preprocess incoming documents with
- * @param {object} body - The operation definition and data (action-data pairs), separated by newlines
- */
-
- const acceptedQuerystring = [
- 'wait_for_active_shards',
- 'refresh',
- 'routing',
- 'timeout',
- 'type',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'pipeline',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function bulk (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_bulk'
- } else {
- path = '/' + '_bulk'
- }
-
- // build request object
- const request = {
- method,
- path,
- bulkBody: body,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildBulk
diff --git a/api/api/cat.aliases.js b/api/api/cat.aliases.js
deleted file mode 100644
index e5738e038..000000000
--- a/api/api/cat.aliases.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatAliases (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.aliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html) request
- *
- * @param {list} name - A comma-separated list of alias names to return
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catAliases (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((name) != null) {
- path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_cat' + '/' + 'aliases'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatAliases
diff --git a/api/api/cat.allocation.js b/api/api/cat.allocation.js
deleted file mode 100644
index 561c02ddb..000000000
--- a/api/api/cat.allocation.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatAllocation (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html) request
- *
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} bytes - The unit in which to display byte values
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'bytes',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catAllocation (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, nodeId, node_id } = params
- var querystring = semicopy(params, ['method', 'body', 'nodeId', 'node_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null) {
- path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId)
- } else {
- path = '/' + '_cat' + '/' + 'allocation'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatAllocation
diff --git a/api/api/cat.count.js b/api/api/cat.count.js
deleted file mode 100644
index 2be151d71..000000000
--- a/api/api/cat.count.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatCount (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html) request
- *
- * @param {list} index - A comma-separated list of index names to limit the returned information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catCount (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_cat' + '/' + 'count'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatCount
diff --git a/api/api/cat.fielddata.js b/api/api/cat.fielddata.js
deleted file mode 100644
index 1685acd80..000000000
--- a/api/api/cat.fielddata.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatFielddata (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html) request
- *
- * @param {list} fields - A comma-separated list of fields to return the fielddata size
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} bytes - The unit in which to display byte values
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- * @param {list} fields - A comma-separated list of fields to return in the output
- */
-
- const acceptedQuerystring = [
- 'format',
- 'bytes',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'fields',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catFielddata (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, fields } = params
- var querystring = semicopy(params, ['method', 'body', 'fields'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((fields) != null) {
- path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields)
- } else {
- path = '/' + '_cat' + '/' + 'fielddata'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatFielddata
diff --git a/api/api/cat.health.js b/api/api/cat.health.js
deleted file mode 100644
index 6badc3a80..000000000
--- a/api/api/cat.health.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatHealth (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} ts - Set to false to disable timestamping
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'ts',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catHealth (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'health'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatHealth
diff --git a/api/api/cat.help.js b/api/api/cat.help.js
deleted file mode 100644
index d776803de..000000000
--- a/api/api/cat.help.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatHelp (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html) request
- *
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- */
-
- const acceptedQuerystring = [
- 'help',
- 's',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catHelp (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatHelp
diff --git a/api/api/cat.indices.js b/api/api/cat.indices.js
deleted file mode 100644
index aff657648..000000000
--- a/api/api/cat.indices.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatIndices (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html) request
- *
- * @param {list} index - A comma-separated list of index names to limit the returned information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} bytes - The unit in which to display byte values
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {enum} health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
- * @param {boolean} help - Return help information
- * @param {boolean} pri - Set to true to return stats only for primary shards
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'bytes',
- 'local',
- 'master_timeout',
- 'h',
- 'health',
- 'help',
- 'pri',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catIndices (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_cat' + '/' + 'indices'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatIndices
diff --git a/api/api/cat.master.js b/api/api/cat.master.js
deleted file mode 100644
index 08528e146..000000000
--- a/api/api/cat.master.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatMaster (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catMaster (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'master'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatMaster
diff --git a/api/api/cat.nodeattrs.js b/api/api/cat.nodeattrs.js
deleted file mode 100644
index 65a36356a..000000000
--- a/api/api/cat.nodeattrs.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatNodeattrs (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catNodeattrs (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'nodeattrs'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatNodeattrs
diff --git a/api/api/cat.nodes.js b/api/api/cat.nodes.js
deleted file mode 100644
index d539438c5..000000000
--- a/api/api/cat.nodes.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatNodes (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} full_id - Return the full node ID instead of the shortened version (default: false)
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'full_id',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- fullId: 'full_id',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catNodes (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'nodes'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatNodes
diff --git a/api/api/cat.pending_tasks.js b/api/api/cat.pending_tasks.js
deleted file mode 100644
index b13a3d306..000000000
--- a/api/api/cat.pending_tasks.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatPendingTasks (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.pending_tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catPendingTasks (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'pending_tasks'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatPendingTasks
diff --git a/api/api/cat.plugins.js b/api/api/cat.plugins.js
deleted file mode 100644
index 1f3b6cdf3..000000000
--- a/api/api/cat.plugins.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatPlugins (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catPlugins (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'plugins'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatPlugins
diff --git a/api/api/cat.recovery.js b/api/api/cat.recovery.js
deleted file mode 100644
index 7e631fab3..000000000
--- a/api/api/cat.recovery.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatRecovery (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html) request
- *
- * @param {list} index - A comma-separated list of index names to limit the returned information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} bytes - The unit in which to display byte values
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'bytes',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catRecovery (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_cat' + '/' + 'recovery'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatRecovery
diff --git a/api/api/cat.repositories.js b/api/api/cat.repositories.js
deleted file mode 100644
index 9e229bfd8..000000000
--- a/api/api/cat.repositories.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatRepositories (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.repositories](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catRepositories (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'repositories'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatRepositories
diff --git a/api/api/cat.segments.js b/api/api/cat.segments.js
deleted file mode 100644
index adc48ee61..000000000
--- a/api/api/cat.segments.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatSegments (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html) request
- *
- * @param {list} index - A comma-separated list of index names to limit the returned information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} bytes - The unit in which to display byte values
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'bytes',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catSegments (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_cat' + '/' + 'segments'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatSegments
diff --git a/api/api/cat.shards.js b/api/api/cat.shards.js
deleted file mode 100644
index 4de59a7c9..000000000
--- a/api/api/cat.shards.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatShards (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html) request
- *
- * @param {list} index - A comma-separated list of index names to limit the returned information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} bytes - The unit in which to display byte values
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'bytes',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catShards (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_cat' + '/' + 'shards'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatShards
diff --git a/api/api/cat.snapshots.js b/api/api/cat.snapshots.js
deleted file mode 100644
index 4db252fe9..000000000
--- a/api/api/cat.snapshots.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatSnapshots (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html) request
- *
- * @param {list} repository - Name of repository from which to fetch the snapshot information
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} ignore_unavailable - Set to true to ignore unavailable snapshots
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'ignore_unavailable',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catSnapshots (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository } = params
- var querystring = semicopy(params, ['method', 'body', 'repository'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((repository) != null) {
- path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
- } else {
- path = '/' + '_cat' + '/' + 'snapshots'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatSnapshots
diff --git a/api/api/cat.tasks.js b/api/api/cat.tasks.js
deleted file mode 100644
index b00e20496..000000000
--- a/api/api/cat.tasks.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatTasks (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {list} actions - A comma-separated list of actions that should be returned. Leave empty to return all.
- * @param {boolean} detailed - Return detailed task information (default: false)
- * @param {number} parent_task - Return tasks with specified parent task id. Set to -1 to return all.
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'node_id',
- 'actions',
- 'detailed',
- 'parent_task',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- nodeId: 'node_id',
- parentTask: 'parent_task',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catTasks (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cat' + '/' + 'tasks'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatTasks
diff --git a/api/api/cat.templates.js b/api/api/cat.templates.js
deleted file mode 100644
index 2f0b6beca..000000000
--- a/api/api/cat.templates.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatTemplates (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.templates](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html) request
- *
- * @param {string} name - A pattern that returned template names must match
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catTemplates (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((name) != null) {
- path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_cat' + '/' + 'templates'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatTemplates
diff --git a/api/api/cat.thread_pool.js b/api/api/cat.thread_pool.js
deleted file mode 100644
index fddeb9256..000000000
--- a/api/api/cat.thread_pool.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCatThreadPool (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cat.thread_pool](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request
- *
- * @param {list} thread_pool_patterns - A comma-separated list of regular-expressions to filter the thread pools in the output
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {enum} size - The multiplier in which to display values
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {list} h - Comma-separated list of column names to display
- * @param {boolean} help - Return help information
- * @param {list} s - Comma-separated list of column names or column aliases to sort by
- * @param {boolean} v - Verbose mode. Display column headers
- */
-
- const acceptedQuerystring = [
- 'format',
- 'size',
- 'local',
- 'master_timeout',
- 'h',
- 'help',
- 's',
- 'v',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function catThreadPool (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, threadPoolPatterns, thread_pool_patterns } = params
- var querystring = semicopy(params, ['method', 'body', 'threadPoolPatterns', 'thread_pool_patterns'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((thread_pool_patterns || threadPoolPatterns) != null) {
- path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
- } else {
- path = '/' + '_cat' + '/' + 'thread_pool'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCatThreadPool
diff --git a/api/api/ccr.delete_auto_follow_pattern.js b/api/api/ccr.delete_auto_follow_pattern.js
deleted file mode 100644
index af0f01987..000000000
--- a/api/api/ccr.delete_auto_follow_pattern.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrDeleteAutoFollowPattern (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.delete_auto_follow_pattern](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html) request
- *
- * @param {string} name - The name of the auto follow pattern.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrDeleteAutoFollowPattern (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrDeleteAutoFollowPattern
diff --git a/api/api/ccr.follow.js b/api/api/ccr.follow.js
deleted file mode 100644
index ab8d8e255..000000000
--- a/api/api/ccr.follow.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrFollow (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.follow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html) request
- *
- * @param {string} index - The name of the follower index
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before returning. Defaults to 0. 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 {object} body - The name of the leader index and other optional ccr related parameters
- */
-
- const acceptedQuerystring = [
- 'wait_for_active_shards'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards'
- }
-
- return function ccrFollow (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrFollow
diff --git a/api/api/ccr.follow_info.js b/api/api/ccr.follow_info.js
deleted file mode 100644
index 209521757..000000000
--- a/api/api/ccr.follow_info.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrFollowInfo (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.follow_info](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html) request
- *
- * @param {list} index - A comma-separated list of index patterns; use `_all` to perform the operation on all indices
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrFollowInfo (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrFollowInfo
diff --git a/api/api/ccr.follow_stats.js b/api/api/ccr.follow_stats.js
deleted file mode 100644
index 5c3806181..000000000
--- a/api/api/ccr.follow_stats.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrFollowStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.follow_stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html) request
- *
- * @param {list} index - A comma-separated list of index patterns; use `_all` to perform the operation on all indices
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrFollowStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrFollowStats
diff --git a/api/api/ccr.get_auto_follow_pattern.js b/api/api/ccr.get_auto_follow_pattern.js
deleted file mode 100644
index 83b3cbfc8..000000000
--- a/api/api/ccr.get_auto_follow_pattern.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrGetAutoFollowPattern (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.get_auto_follow_pattern](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html) request
- *
- * @param {string} name - The name of the auto follow pattern.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrGetAutoFollowPattern (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((name) != null) {
- path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_ccr' + '/' + 'auto_follow'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrGetAutoFollowPattern
diff --git a/api/api/ccr.pause_follow.js b/api/api/ccr.pause_follow.js
deleted file mode 100644
index 2862163f1..000000000
--- a/api/api/ccr.pause_follow.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrPauseFollow (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.pause_follow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html) request
- *
- * @param {string} index - The name of the follower index that should pause following its leader index.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrPauseFollow (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrPauseFollow
diff --git a/api/api/ccr.put_auto_follow_pattern.js b/api/api/ccr.put_auto_follow_pattern.js
deleted file mode 100644
index 6338da352..000000000
--- a/api/api/ccr.put_auto_follow_pattern.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrPutAutoFollowPattern (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.put_auto_follow_pattern](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html) request
- *
- * @param {string} name - The name of the auto follow pattern.
- * @param {object} body - The specification of the auto follow pattern
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrPutAutoFollowPattern (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrPutAutoFollowPattern
diff --git a/api/api/ccr.resume_follow.js b/api/api/ccr.resume_follow.js
deleted file mode 100644
index 3c857a84a..000000000
--- a/api/api/ccr.resume_follow.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrResumeFollow (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.resume_follow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html) request
- *
- * @param {string} index - The name of the follow index to resume following.
- * @param {object} body - The name of the leader index and other optional ccr related parameters
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrResumeFollow (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrResumeFollow
diff --git a/api/api/ccr.stats.js b/api/api/ccr.stats.js
deleted file mode 100644
index 81f544210..000000000
--- a/api/api/ccr.stats.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ccr' + '/' + 'stats'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrStats
diff --git a/api/api/ccr.unfollow.js b/api/api/ccr.unfollow.js
deleted file mode 100644
index 2163e6ad7..000000000
--- a/api/api/ccr.unfollow.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCcrUnfollow (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ccr.unfollow](http://www.elastic.co/guide/en/elasticsearch/reference/current) request
- *
- * @param {string} index - The name of the follower index that should be turned into a regular index.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ccrUnfollow (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCcrUnfollow
diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js
deleted file mode 100644
index 552ac23cc..000000000
--- a/api/api/clear_scroll.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClearScroll (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [clear_scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
- *
- * @param {list} scroll_id - A comma-separated list of scroll IDs to clear
- * @param {object} body - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clearScroll (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, scrollId, scroll_id } = params
- var querystring = semicopy(params, ['method', 'body', 'scrollId', 'scroll_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((scroll_id || scrollId) != null) {
- path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
- } else {
- path = '/' + '_search' + '/' + 'scroll'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClearScroll
diff --git a/api/api/cluster.allocation_explain.js b/api/api/cluster.allocation_explain.js
deleted file mode 100644
index 3ce754e73..000000000
--- a/api/api/cluster.allocation_explain.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterAllocationExplain (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.allocation_explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) request
- *
- * @param {boolean} include_yes_decisions - Return 'YES' decisions in explanation (default: false)
- * @param {boolean} include_disk_info - Return information about disk usage and shard sizes (default: false)
- * @param {object} body - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
- */
-
- const acceptedQuerystring = [
- 'include_yes_decisions',
- 'include_disk_info',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeYesDecisions: 'include_yes_decisions',
- includeDiskInfo: 'include_disk_info',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterAllocationExplain (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterAllocationExplain
diff --git a/api/api/cluster.get_settings.js b/api/api/cluster.get_settings.js
deleted file mode 100644
index 8e215e750..000000000
--- a/api/api/cluster.get_settings.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterGetSettings (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.get_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
- *
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- * @param {boolean} include_defaults - Whether to return all default clusters setting.
- */
-
- const acceptedQuerystring = [
- 'flat_settings',
- 'master_timeout',
- 'timeout',
- 'include_defaults',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- flatSettings: 'flat_settings',
- masterTimeout: 'master_timeout',
- includeDefaults: 'include_defaults',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterGetSettings (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cluster' + '/' + 'settings'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterGetSettings
diff --git a/api/api/cluster.health.js b/api/api/cluster.health.js
deleted file mode 100644
index 327cbbaba..000000000
--- a/api/api/cluster.health.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterHealth (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
- *
- * @param {list} index - Limit the information returned to a specific index
- * @param {enum} level - Specify the level of detail for returned information
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- * @param {string} wait_for_active_shards - Wait until the specified number of shards is active
- * @param {string} wait_for_nodes - Wait until the specified number of nodes is available
- * @param {enum} wait_for_events - Wait until all currently queued events with the given priority are processed
- * @param {boolean} wait_for_no_relocating_shards - Whether to wait until there are no relocating shards in the cluster
- * @param {boolean} wait_for_no_initializing_shards - Whether to wait until there are no initializing shards in the cluster
- * @param {enum} wait_for_status - Wait until cluster is in a specific state
- */
-
- const acceptedQuerystring = [
- 'level',
- 'local',
- 'master_timeout',
- 'timeout',
- 'wait_for_active_shards',
- 'wait_for_nodes',
- 'wait_for_events',
- 'wait_for_no_relocating_shards',
- 'wait_for_no_initializing_shards',
- 'wait_for_status',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- waitForActiveShards: 'wait_for_active_shards',
- waitForNodes: 'wait_for_nodes',
- waitForEvents: 'wait_for_events',
- waitForNoRelocatingShards: 'wait_for_no_relocating_shards',
- waitForNoInitializingShards: 'wait_for_no_initializing_shards',
- waitForStatus: 'wait_for_status',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterHealth (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_cluster' + '/' + 'health'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterHealth
diff --git a/api/api/cluster.pending_tasks.js b/api/api/cluster.pending_tasks.js
deleted file mode 100644
index cc132b7a7..000000000
--- a/api/api/cluster.pending_tasks.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterPendingTasks (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.pending_tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html) request
- *
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Specify timeout for connection to master
- */
-
- const acceptedQuerystring = [
- 'local',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterPendingTasks (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cluster' + '/' + 'pending_tasks'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterPendingTasks
diff --git a/api/api/cluster.put_settings.js b/api/api/cluster.put_settings.js
deleted file mode 100644
index 9064e1670..000000000
--- a/api/api/cluster.put_settings.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterPutSettings (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.put_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
- *
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- * @param {object} body - The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
- */
-
- const acceptedQuerystring = [
- 'flat_settings',
- 'master_timeout',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- flatSettings: 'flat_settings',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterPutSettings (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cluster' + '/' + 'settings'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterPutSettings
diff --git a/api/api/cluster.remote_info.js b/api/api/cluster.remote_info.js
deleted file mode 100644
index 22a2ca142..000000000
--- a/api/api/cluster.remote_info.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterRemoteInfo (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.remote_info](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html) request
- *
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterRemoteInfo (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_remote' + '/' + 'info'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterRemoteInfo
diff --git a/api/api/cluster.reroute.js b/api/api/cluster.reroute.js
deleted file mode 100644
index 5a29ea54d..000000000
--- a/api/api/cluster.reroute.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterReroute (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html) request
- *
- * @param {boolean} dry_run - Simulate the operation only and return the resulting state
- * @param {boolean} explain - Return an explanation of why the commands can or cannot be executed
- * @param {boolean} retry_failed - Retries allocation of shards that are blocked due to too many subsequent allocation failures
- * @param {list} metric - Limit the information returned to the specified metrics. Defaults to all but metadata
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- * @param {object} body - The definition of `commands` to perform (`move`, `cancel`, `allocate`)
- */
-
- const acceptedQuerystring = [
- 'dry_run',
- 'explain',
- 'retry_failed',
- 'metric',
- 'master_timeout',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- dryRun: 'dry_run',
- retryFailed: 'retry_failed',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterReroute (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_cluster' + '/' + 'reroute'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterReroute
diff --git a/api/api/cluster.state.js b/api/api/cluster.state.js
deleted file mode 100644
index 7d6b7c303..000000000
--- a/api/api/cluster.state.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterState (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {list} metric - Limit the information returned to the specified metrics
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {number} wait_for_metadata_version - Wait for the metadata version to be equal or greater than the specified metadata version
- * @param {time} wait_for_timeout - The maximum time to wait for wait_for_metadata_version before timing out
- * @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.
- */
-
- const acceptedQuerystring = [
- 'local',
- 'master_timeout',
- 'flat_settings',
- 'wait_for_metadata_version',
- 'wait_for_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- flatSettings: 'flat_settings',
- waitForMetadataVersion: 'wait_for_metadata_version',
- waitForTimeout: 'wait_for_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterState (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('This API does not require a body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['index'] != null && (params['metric'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: metric')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, metric } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'metric'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((metric) != null && (index) != null) {
- path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index)
- } else if ((metric) != null) {
- path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric)
- } else {
- path = '/' + '_cluster' + '/' + 'state'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterState
diff --git a/api/api/cluster.stats.js b/api/api/cluster.stats.js
deleted file mode 100644
index 77f634146..000000000
--- a/api/api/cluster.stats.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildClusterStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html) request
- *
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'flat_settings',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- flatSettings: 'flat_settings',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function clusterStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, nodeId, node_id } = params
- var querystring = semicopy(params, ['method', 'body', 'nodeId', 'node_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null) {
- path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)
- } else {
- path = '/' + '_cluster' + '/' + 'stats'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildClusterStats
diff --git a/api/api/count.js b/api/api/count.js
deleted file mode 100644
index ae6816fba..000000000
--- a/api/api/count.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCount (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html) request
- *
- * @param {list} index - A comma-separated list of indices to restrict the results
- * @param {list} type - A comma-separated list of types to restrict the results
- * @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * @param {boolean} ignore_throttled - Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * @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 {number} min_score - Include only documents with a specific `_score` value in the result
- * @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
- * @param {list} routing - A comma-separated list of specific routing values
- * @param {string} q - Query in the Lucene query string syntax
- * @param {string} analyzer - The analyzer to use for the query string
- * @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
- * @param {enum} default_operator - The default operator for query string query (AND or OR)
- * @param {string} df - The field to use as default where no field prefix is given in the query string
- * @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * @param {number} terminate_after - The maximum count for each shard, upon reaching which the query execution will terminate early
- * @param {object} body - A query to restrict the results specified with the Query DSL (optional)
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'min_score',
- 'preference',
- 'routing',
- 'q',
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'lenient',
- 'terminate_after',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- ignoreThrottled: 'ignore_throttled',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- minScore: 'min_score',
- analyzeWildcard: 'analyze_wildcard',
- defaultOperator: 'default_operator',
- terminateAfter: 'terminate_after',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function count (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_count'
- } else {
- path = '/' + '_count'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCount
diff --git a/api/api/create.js b/api/api/create.js
deleted file mode 100644
index 0ee306e57..000000000
--- a/api/api/create.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildCreate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
- *
- * @param {string} id - Document ID
- * @param {string} index - The name of the index
- * @param {string} type - The type of the document
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the index 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 {string} parent - ID of the parent document
- * @param {enum} refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
- * @param {string} routing - Specific routing value
- * @param {time} timeout - Explicit operation timeout
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- * @param {string} pipeline - The pipeline id to preprocess incoming documents with
- * @param {object} body - The document
- */
-
- const acceptedQuerystring = [
- 'wait_for_active_shards',
- 'parent',
- 'refresh',
- 'routing',
- 'timeout',
- 'version',
- 'version_type',
- 'pipeline',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function create (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildCreate
diff --git a/api/api/delete.js b/api/api/delete.js
deleted file mode 100644
index 35ab29398..000000000
--- a/api/api/delete.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildDelete (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html) request
- *
- * @param {string} id - The document ID
- * @param {string} index - The name of the index
- * @param {string} type - The type of the document
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the delete 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 {string} parent - ID of parent document
- * @param {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
- * @param {string} routing - Specific routing value
- * @param {time} timeout - Explicit operation timeout
- * @param {number} if_seq_no - only perform the delete operation if the last operation that has changed the document has the specified sequence number
- * @param {number} if_primary_term - only perform the delete operation if the last operation that has changed the document has the specified primary term
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- */
-
- const acceptedQuerystring = [
- 'wait_for_active_shards',
- 'parent',
- 'refresh',
- 'routing',
- 'timeout',
- 'if_seq_no',
- 'if_primary_term',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards',
- ifSeqNo: 'if_seq_no',
- ifPrimaryTerm: 'if_primary_term',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function _delete (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- 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['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildDelete
diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js
deleted file mode 100644
index 7e3aae9ea..000000000
--- a/api/api/delete_by_query.js
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildDeleteByQuery (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [delete_by_query](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.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
- * @param {string} analyzer - The analyzer to use for the query string
- * @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
- * @param {enum} default_operator - The default operator for query string query (AND or OR)
- * @param {string} df - The field to use as default where no field prefix is given in the query string
- * @param {number} from - Starting offset (default: 0)
- * @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} conflicts - What to do when the delete by query hits version conflicts?
- * @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
- * @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
- * @param {string} q - Query in the Lucene query string syntax
- * @param {list} routing - A comma-separated list of specific routing values
- * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search
- * @param {enum} search_type - Search operation type
- * @param {time} search_timeout - Explicit timeout for each search request. Defaults to no timeout.
- * @param {number} size - Number of hits to return (default: 10)
- * @param {list} sort - A comma-separated list of : pairs
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {number} terminate_after - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * @param {list} stats - Specific 'tag' of the request for logging and statistical purposes
- * @param {boolean} version - Specify whether to return document version as part of a hit
- * @param {boolean} request_cache - Specify if request cache should be used for this request or not, defaults to index level setting
- * @param {boolean} refresh - Should the effected indexes be refreshed?
- * @param {time} timeout - Time each individual bulk request should wait for shards that are unavailable.
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the delete by query 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 {number} scroll_size - Size on the scroll request powering the delete by query
- * @param {boolean} wait_for_completion - Should the request should block until the delete by query is complete.
- * @param {number} requests_per_second - The throttle for this request in sub-requests per second. -1 means no throttle.
- * @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
- */
-
- const acceptedQuerystring = [
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'from',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'conflicts',
- 'expand_wildcards',
- 'lenient',
- 'preference',
- 'q',
- 'routing',
- 'scroll',
- 'search_type',
- 'search_timeout',
- 'size',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'version',
- 'request_cache',
- 'refresh',
- 'timeout',
- 'wait_for_active_shards',
- 'scroll_size',
- 'wait_for_completion',
- 'requests_per_second',
- 'slices',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- analyzeWildcard: 'analyze_wildcard',
- defaultOperator: 'default_operator',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- searchType: 'search_type',
- searchTimeout: 'search_timeout',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- terminateAfter: 'terminate_after',
- requestCache: 'request_cache',
- waitForActiveShards: 'wait_for_active_shards',
- scrollSize: 'scroll_size',
- waitForCompletion: 'wait_for_completion',
- requestsPerSecond: 'requests_per_second',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function deleteByQuery (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildDeleteByQuery
diff --git a/api/api/delete_by_query_rethrottle.js b/api/api/delete_by_query_rethrottle.js
deleted file mode 100644
index bbeb5094a..000000000
--- a/api/api/delete_by_query_rethrottle.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildDeleteByQueryRethrottle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [delete_by_query_rethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html) request
- *
- * @param {string} task_id - The task id to rethrottle
- * @param {number} requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
- */
-
- const acceptedQuerystring = [
- 'requests_per_second',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- requestsPerSecond: 'requests_per_second',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function deleteByQueryRethrottle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['task_id'] == null && params['taskId'] == null) {
- const err = new ConfigurationError('Missing required parameter: task_id or taskId')
- return handleError(err, callback)
- }
- if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
- const err = new ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, taskId, task_id } = params
- var querystring = semicopy(params, ['method', 'body', 'taskId', 'task_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildDeleteByQueryRethrottle
diff --git a/api/api/delete_script.js b/api/api/delete_script.js
deleted file mode 100644
index 6165361bf..000000000
--- a/api/api/delete_script.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildDeleteScript (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [delete_script](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
- *
- * @param {string} id - Script ID
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function deleteScript (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_scripts' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildDeleteScript
diff --git a/api/api/exists.js b/api/api/exists.js
deleted file mode 100644
index ac6e5db8a..000000000
--- a/api/api/exists.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildExists (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
- *
- * @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 {list} stored_fields - A comma-separated list of stored fields to return in the response
- * @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
- * @param {boolean} refresh - Refresh the shard containing the document before performing the operation
- * @param {string} routing - Specific routing value
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- */
-
- const acceptedQuerystring = [
- 'stored_fields',
- 'parent',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- storedFields: 'stored_fields',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function exists (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildExists
diff --git a/api/api/exists_source.js b/api/api/exists_source.js
deleted file mode 100644
index d8111530e..000000000
--- a/api/api/exists_source.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildExistsSource (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [exists_source](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
- *
- * @param {string} id - The document ID
- * @param {string} index - The name of the index
- * @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
- * @param {boolean} refresh - Refresh the shard containing the document before performing the operation
- * @param {string} routing - Specific routing value
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- */
-
- const acceptedQuerystring = [
- 'parent',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function existsSource (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildExistsSource
diff --git a/api/api/explain.js b/api/api/explain.js
deleted file mode 100644
index f59f7a11c..000000000
--- a/api/api/explain.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildExplain (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html) request
- *
- * @param {string} id - The document ID
- * @param {string} index - The name of the index
- * @param {string} type - The type of the document
- * @param {boolean} analyze_wildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
- * @param {string} analyzer - The analyzer for the query string query
- * @param {enum} default_operator - The default operator for query string query (AND or OR)
- * @param {string} df - The default field for query string query (default: _all)
- * @param {list} stored_fields - A comma-separated list of stored fields to return in the response
- * @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * @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 {string} q - Query in the Lucene query string syntax
- * @param {string} routing - Specific routing value
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {object} body - The query definition using the Query DSL
- */
-
- const acceptedQuerystring = [
- 'analyze_wildcard',
- 'analyzer',
- 'default_operator',
- 'df',
- 'stored_fields',
- 'lenient',
- 'parent',
- 'preference',
- 'q',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- analyzeWildcard: 'analyze_wildcard',
- defaultOperator: 'default_operator',
- storedFields: 'stored_fields',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function explain (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildExplain
diff --git a/api/api/field_caps.js b/api/api/field_caps.js
deleted file mode 100644
index c8a6dec42..000000000
--- a/api/api/field_caps.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildFieldCaps (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [field_caps](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {list} fields - A comma-separated list of field names
- * @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.
- */
-
- const acceptedQuerystring = [
- 'fields',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function fieldCaps (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_field_caps'
- } else {
- path = '/' + '_field_caps'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildFieldCaps
diff --git a/api/api/get.js b/api/api/get.js
deleted file mode 100644
index ff8e8b032..000000000
--- a/api/api/get.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildGet (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
- *
- * @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 {list} stored_fields - A comma-separated list of stored fields to return in the response
- * @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
- * @param {boolean} refresh - Refresh the shard containing the document before performing the operation
- * @param {string} routing - Specific routing value
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {list} _source_exclude - A list of fields to exclude from the returned _source field
- * @param {list} _source_include - A list of fields to extract and return from the _source field
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- */
-
- const acceptedQuerystring = [
- 'stored_fields',
- 'parent',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- '_source_exclude',
- '_source_include',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- storedFields: 'stored_fields',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- _sourceExclude: '_source_exclude',
- _sourceInclude: '_source_include',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function get (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildGet
diff --git a/api/api/get_script.js b/api/api/get_script.js
deleted file mode 100644
index b6659841f..000000000
--- a/api/api/get_script.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildGetScript (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [get_script](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
- *
- * @param {string} id - Script ID
- * @param {time} master_timeout - Specify timeout for connection to master
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function getScript (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_scripts' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildGetScript
diff --git a/api/api/get_source.js b/api/api/get_source.js
deleted file mode 100644
index bcac14deb..000000000
--- a/api/api/get_source.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildGetSource (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [get_source](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
- *
- * @param {string} id - The document ID
- * @param {string} index - The name of the index
- * @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
- * @param {boolean} refresh - Refresh the shard containing the document before performing the operation
- * @param {string} routing - Specific routing value
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- */
-
- const acceptedQuerystring = [
- 'parent',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function getSource (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- 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 = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildGetSource
diff --git a/api/api/ilm.delete_lifecycle.js b/api/api/ilm.delete_lifecycle.js
deleted file mode 100644
index 7e09289af..000000000
--- a/api/api/ilm.delete_lifecycle.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmDeleteLifecycle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.delete_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html) request
- *
- * @param {string} policy - The name of the index lifecycle policy
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmDeleteLifecycle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, policy } = params
- var querystring = semicopy(params, ['method', 'body', 'policy'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmDeleteLifecycle
diff --git a/api/api/ilm.explain_lifecycle.js b/api/api/ilm.explain_lifecycle.js
deleted file mode 100644
index d9a0e2e70..000000000
--- a/api/api/ilm.explain_lifecycle.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmExplainLifecycle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = 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 = {
-
- }
-
- return function ilmExplainLifecycle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmExplainLifecycle
diff --git a/api/api/ilm.get_lifecycle.js b/api/api/ilm.get_lifecycle.js
deleted file mode 100644
index a01952fa5..000000000
--- a/api/api/ilm.get_lifecycle.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmGetLifecycle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.get_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html) request
- *
- * @param {string} policy - The name of the index lifecycle policy
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmGetLifecycle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, policy } = params
- var querystring = semicopy(params, ['method', 'body', 'policy'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((policy) != null) {
- path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
- } else {
- path = '/' + '_ilm' + '/' + 'policy'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmGetLifecycle
diff --git a/api/api/ilm.get_status.js b/api/api/ilm.get_status.js
deleted file mode 100644
index 30c135900..000000000
--- a/api/api/ilm.get_status.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmGetStatus (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.get_status](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmGetStatus (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ilm' + '/' + 'status'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmGetStatus
diff --git a/api/api/ilm.move_to_step.js b/api/api/ilm.move_to_step.js
deleted file mode 100644
index 49f82a8c5..000000000
--- a/api/api/ilm.move_to_step.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmMoveToStep (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.move_to_step](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html) request
- *
- * @param {string} index - The name of the index whose lifecycle step is to change
- * @param {object} body - The new lifecycle step to move to
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmMoveToStep (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmMoveToStep
diff --git a/api/api/ilm.put_lifecycle.js b/api/api/ilm.put_lifecycle.js
deleted file mode 100644
index 28955b0fe..000000000
--- a/api/api/ilm.put_lifecycle.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmPutLifecycle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.put_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html) request
- *
- * @param {string} policy - The name of the index lifecycle policy
- * @param {object} body - The lifecycle policy definition to register
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmPutLifecycle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, policy } = params
- var querystring = semicopy(params, ['method', 'body', 'policy'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmPutLifecycle
diff --git a/api/api/ilm.remove_policy.js b/api/api/ilm.remove_policy.js
deleted file mode 100644
index ccfbc8c81..000000000
--- a/api/api/ilm.remove_policy.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmRemovePolicy (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.remove_policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html) request
- *
- * @param {string} index - The name of the index to remove policy on
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmRemovePolicy (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmRemovePolicy
diff --git a/api/api/ilm.retry.js b/api/api/ilm.retry.js
deleted file mode 100644
index 5ea000327..000000000
--- a/api/api/ilm.retry.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmRetry (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.retry](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html) request
- *
- * @param {string} index - The name of the indices (comma-separated) whose failed lifecycle step is to be retry
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmRetry (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmRetry
diff --git a/api/api/ilm.start.js b/api/api/ilm.start.js
deleted file mode 100644
index f2461f3ef..000000000
--- a/api/api/ilm.start.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmStart (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.start](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmStart (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ilm' + '/' + 'start'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmStart
diff --git a/api/api/ilm.stop.js b/api/api/ilm.stop.js
deleted file mode 100644
index ad1607579..000000000
--- a/api/api/ilm.stop.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIlmStop (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ilm.stop](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function ilmStop (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ilm' + '/' + 'stop'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIlmStop
diff --git a/api/api/index.js b/api/api/index.js
deleted file mode 100644
index 716d8c4cf..000000000
--- a/api/api/index.js
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndex (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
- *
- * @param {string} id - Document ID
- * @param {string} index - The name of the index
- * @param {string} type - The type of the document
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the index 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 {enum} op_type - Explicit operation type
- * @param {string} parent - ID of the parent document
- * @param {enum} refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
- * @param {string} routing - Specific routing value
- * @param {time} timeout - Explicit operation timeout
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- * @param {number} if_seq_no - only perform the index operation if the last operation that has changed the document has the specified sequence number
- * @param {number} if_primary_term - only perform the index operation if the last operation that has changed the document has the specified primary term
- * @param {string} pipeline - The pipeline id to preprocess incoming documents with
- * @param {object} body - The document
- */
-
- const acceptedQuerystring = [
- 'wait_for_active_shards',
- 'op_type',
- 'parent',
- 'refresh',
- 'routing',
- 'timeout',
- 'version',
- 'version_type',
- 'if_seq_no',
- 'if_primary_term',
- 'pipeline',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards',
- opType: 'op_type',
- versionType: 'version_type',
- ifSeqNo: 'if_seq_no',
- ifPrimaryTerm: 'if_primary_term',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function _index (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['id'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null && (id) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
- } 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
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndex
diff --git a/api/api/indices.analyze.js b/api/api/indices.analyze.js
deleted file mode 100644
index 4d819f7c0..000000000
--- a/api/api/indices.analyze.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesAnalyze (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html) request
- *
- * @param {string} index - The name of the index to scope the operation
- * @param {string} index - The name of the index to scope the operation
- * @param {object} body - Define analyzer/tokenizer parameters and the text on which the analysis should be performed
- */
-
- const acceptedQuerystring = [
- 'index',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesAnalyze (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_analyze'
- } else {
- path = '/' + '_analyze'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesAnalyze
diff --git a/api/api/indices.clear_cache.js b/api/api/indices.clear_cache.js
deleted file mode 100644
index fa2739c6b..000000000
--- a/api/api/indices.clear_cache.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesClearCache (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = 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} 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
- * @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 {list} index - A comma-separated list of index name to limit the operation
- * @param {boolean} request - Clear request cache
- */
-
- const acceptedQuerystring = [
- 'fielddata',
- 'fields',
- 'query',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'index',
- 'request',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesClearCache (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear'
- } else {
- path = '/' + '_cache' + '/' + 'clear'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesClearCache
diff --git a/api/api/indices.close.js b/api/api/indices.close.js
deleted file mode 100644
index 023bc3507..000000000
--- a/api/api/indices.close.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesClose (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
- *
- * @param {list} index - A comma separated list of indices to close
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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.
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesClose (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_close'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesClose
diff --git a/api/api/indices.create.js b/api/api/indices.create.js
deleted file mode 100644
index 355a7a370..000000000
--- a/api/api/indices.create.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesCreate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html) request
- *
- * @param {string} index - The name of the index
- * @param {boolean} include_type_name - Whether a type should be expected in the body of the mappings.
- * @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 {object} body - The configuration for the index (`settings` and `mappings`)
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'wait_for_active_shards',
- 'timeout',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- waitForActiveShards: 'wait_for_active_shards',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesCreate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesCreate
diff --git a/api/api/indices.delete.js b/api/api/indices.delete.js
deleted file mode 100644
index bb46902fd..000000000
--- a/api/api/indices.delete.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesDelete (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html) request
- *
- * @param {list} index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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)
- * @param {enum} expand_wildcards - Whether wildcard expressions should get expanded to open or closed indices (default: open)
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesDelete (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesDelete
diff --git a/api/api/indices.delete_alias.js b/api/api/indices.delete_alias.js
deleted file mode 100644
index db5091854..000000000
--- a/api/api/indices.delete_alias.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesDeleteAlias (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.delete_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
- *
- * @param {list} index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
- * @param {list} name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
- * @param {time} timeout - Explicit timestamp for the document
- * @param {time} master_timeout - Specify timeout for connection to master
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesDeleteAlias (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- 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['name'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, name } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'name'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (name) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesDeleteAlias
diff --git a/api/api/indices.delete_template.js b/api/api/indices.delete_template.js
deleted file mode 100644
index 623ba6933..000000000
--- a/api/api/indices.delete_template.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesDeleteTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.delete_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
- *
- * @param {string} name - The name of the template
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesDeleteTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_template' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesDeleteTemplate
diff --git a/api/api/indices.exists.js b/api/api/indices.exists.js
deleted file mode 100644
index 85cc737a4..000000000
--- a/api/api/indices.exists.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesExists (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html) request
- *
- * @param {list} index - A comma-separated list of index names
- * @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)
- * @param {enum} expand_wildcards - Whether wildcard expressions should get expanded to open or closed indices (default: open)
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {boolean} include_defaults - Whether to return all default setting for each of the indices.
- */
-
- const acceptedQuerystring = [
- 'local',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'include_defaults',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- flatSettings: 'flat_settings',
- includeDefaults: 'include_defaults',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesExists (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesExists
diff --git a/api/api/indices.exists_alias.js b/api/api/indices.exists_alias.js
deleted file mode 100644
index d25ddb733..000000000
--- a/api/api/indices.exists_alias.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesExistsAlias (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.exists_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
- *
- * @param {list} index - A comma-separated list of index names to filter aliases
- * @param {list} name - A comma-separated list of alias names to return
- * @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} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesExistsAlias (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, name } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'name'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (name) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_alias' + '/' + encodeURIComponent(name)
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesExistsAlias
diff --git a/api/api/indices.exists_template.js b/api/api/indices.exists_template.js
deleted file mode 100644
index ea3fb9d35..000000000
--- a/api/api/indices.exists_template.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesExistsTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.exists_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
- *
- * @param {list} name - The comma separated names of the index templates
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'flat_settings',
- 'master_timeout',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- flatSettings: 'flat_settings',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesExistsTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_template' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesExistsTemplate
diff --git a/api/api/indices.exists_type.js b/api/api/indices.exists_type.js
deleted file mode 100644
index 4c2573419..000000000
--- a/api/api/indices.exists_type.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesExistsType (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.exists_type](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` to check the types across all indices
- * @param {list} type - A comma-separated list of document types to check
- * @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} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesExistsType (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['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['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesExistsType
diff --git a/api/api/indices.flush.js b/api/api/indices.flush.js
deleted file mode 100644
index 1099650fa..000000000
--- a/api/api/indices.flush.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesFlush (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string for all indices
- * @param {boolean} force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
- * @param {boolean} wait_if_ongoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
- * @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.
- */
-
- const acceptedQuerystring = [
- 'force',
- 'wait_if_ongoing',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitIfOngoing: 'wait_if_ongoing',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesFlush (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_flush'
- } else {
- path = '/' + '_flush'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesFlush
diff --git a/api/api/indices.flush_synced.js b/api/api/indices.flush_synced.js
deleted file mode 100644
index df404cee0..000000000
--- a/api/api/indices.flush_synced.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesFlushSynced (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.flush_synced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string for all indices
- * @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.
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesFlushSynced (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
- } else {
- path = '/' + '_flush' + '/' + 'synced'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesFlushSynced
diff --git a/api/api/indices.forcemerge.js b/api/api/indices.forcemerge.js
deleted file mode 100644
index 5bf900cc6..000000000
--- a/api/api/indices.forcemerge.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesForcemerge (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.forcemerge](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {boolean} flush - Specify whether the index should be flushed after performing the operation (default: true)
- * @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 {number} max_num_segments - The number of segments the index should be merged into (default: dynamic)
- * @param {boolean} only_expunge_deletes - Specify whether the operation should only expunge deleted documents
- */
-
- const acceptedQuerystring = [
- 'flush',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'max_num_segments',
- 'only_expunge_deletes',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- maxNumSegments: 'max_num_segments',
- onlyExpungeDeletes: 'only_expunge_deletes',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesForcemerge (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_forcemerge'
- } else {
- path = '/' + '_forcemerge'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesForcemerge
diff --git a/api/api/indices.freeze.js b/api/api/indices.freeze.js
deleted file mode 100644
index 944a9b00a..000000000
--- a/api/api/indices.freeze.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesFreeze (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.freeze](https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html) request
- *
- * @param {string} index - The name of the index to freeze
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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 {string} wait_for_active_shards - Sets the number of active shards to wait for before the operation returns.
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- waitForActiveShards: 'wait_for_active_shards'
- }
-
- return function indicesFreeze (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_freeze'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesFreeze
diff --git a/api/api/indices.get.js b/api/api/indices.get.js
deleted file mode 100644
index 6a4047c83..000000000
--- a/api/api/indices.get.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGet (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = 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: 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)
- * @param {enum} expand_wildcards - Whether wildcard expressions should get expanded to open or closed indices (default: open)
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {boolean} include_defaults - Whether to return all default setting for each of the indices.
- * @param {time} master_timeout - Specify timeout for connection to master
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'local',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'include_defaults',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- flatSettings: 'flat_settings',
- includeDefaults: 'include_defaults',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGet (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGet
diff --git a/api/api/indices.get_alias.js b/api/api/indices.get_alias.js
deleted file mode 100644
index fc2f508ef..000000000
--- a/api/api/indices.get_alias.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGetAlias (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.get_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
- *
- * @param {list} index - A comma-separated list of index names to filter aliases
- * @param {list} name - A comma-separated list of alias names to return
- * @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} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGetAlias (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, name } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (name) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
- } else if ((name) != null) {
- path = '/' + '_alias' + '/' + encodeURIComponent(name)
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_alias'
- } else {
- path = '/' + '_alias'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGetAlias
diff --git a/api/api/indices.get_field_mapping.js b/api/api/indices.get_field_mapping.js
deleted file mode 100644
index 78dcfcc0c..000000000
--- a/api/api/indices.get_field_mapping.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGetFieldMapping (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.get_field_mapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html) request
- *
- * @param {list} index - A comma-separated list of index names
- * @param {list} type - A comma-separated list of document types
- * @param {list} fields - A comma-separated list of fields
- * @param {boolean} include_type_name - Whether a type should be returned in the body of the mappings.
- * @param {boolean} include_defaults - Whether the default mapping values should be returned as well
- * @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} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'include_defaults',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- includeDefaults: 'include_defaults',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGetFieldMapping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['fields'] == null) {
- const err = new ConfigurationError('Missing required parameter: fields')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type, fields } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type', 'fields'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null && (fields) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
- } else if ((index) != null && (fields) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
- } else if ((type) != null && (fields) != null) {
- path = '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
- } else {
- path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGetFieldMapping
diff --git a/api/api/indices.get_mapping.js b/api/api/indices.get_mapping.js
deleted file mode 100644
index 5534a5cec..000000000
--- a/api/api/indices.get_mapping.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGetMapping (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.get_mapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html) request
- *
- * @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 (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.
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'master_timeout',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGetMapping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mapping'
- } else if ((type) != null) {
- path = '/' + '_mapping' + '/' + encodeURIComponent(type)
- } else {
- path = '/' + '_mapping'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGetMapping
diff --git a/api/api/indices.get_settings.js b/api/api/indices.get_settings.js
deleted file mode 100644
index 5af0ba622..000000000
--- a/api/api/indices.get_settings.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGetSettings (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.get_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {list} name - The name of the settings that should be included
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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} flat_settings - Return settings in flat format (default: false)
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- * @param {boolean} include_defaults - Whether to return all default setting for each of the indices.
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'local',
- 'include_defaults',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- flatSettings: 'flat_settings',
- includeDefaults: 'include_defaults',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGetSettings (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, name } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (name) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name)
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_settings'
- } else if ((name) != null) {
- path = '/' + '_settings' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_settings'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGetSettings
diff --git a/api/api/indices.get_template.js b/api/api/indices.get_template.js
deleted file mode 100644
index 315c9d9ad..000000000
--- a/api/api/indices.get_template.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGetTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.get_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
- *
- * @param {list} name - The comma separated names of the index templates
- * @param {boolean} include_type_name - Whether a type should be returned in the body of the mappings.
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'flat_settings',
- 'master_timeout',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- flatSettings: 'flat_settings',
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGetTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((name) != null) {
- path = '/' + '_template' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_template'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGetTemplate
diff --git a/api/api/indices.get_upgrade.js b/api/api/indices.get_upgrade.js
deleted file mode 100644
index c5acf2611..000000000
--- a/api/api/indices.get_upgrade.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesGetUpgrade (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.get_upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @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.
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesGetUpgrade (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
- } else {
- path = '/' + '_upgrade'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesGetUpgrade
diff --git a/api/api/indices.open.js b/api/api/indices.open.js
deleted file mode 100644
index ba585f805..000000000
--- a/api/api/indices.open.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesOpen (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
- *
- * @param {list} index - A comma separated list of indices to open
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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 {string} wait_for_active_shards - Sets the number of active shards to wait for before the operation returns.
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- waitForActiveShards: 'wait_for_active_shards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesOpen (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_open'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesOpen
diff --git a/api/api/indices.put_alias.js b/api/api/indices.put_alias.js
deleted file mode 100644
index 68710d615..000000000
--- a/api/api/indices.put_alias.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesPutAlias (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.put_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
- *
- * @param {list} index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
- * @param {string} name - The name of the alias to be created or updated
- * @param {time} timeout - Explicit timestamp for the document
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {object} body - The settings for the alias, such as `routing` or `filter`
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesPutAlias (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['name'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, name } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'name'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (name) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesPutAlias
diff --git a/api/api/indices.put_mapping.js b/api/api/indices.put_mapping.js
deleted file mode 100644
index 491ffd2db..000000000
--- a/api/api/indices.put_mapping.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesPutMapping (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.put_mapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html) request
- *
- * @param {list} index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
- * @param {string} type - The name of the document type
- * @param {boolean} include_type_name - Whether a type should be expected in the body of the mappings.
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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 - The mapping definition
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesPutMapping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'
- } else if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
- } else if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings'
- } else if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type)
- } else if ((type) != null) {
- path = '/' + '_mapping' + '/' + encodeURIComponent(type)
- } else if ((type) != null) {
- path = '/' + '_mappings' + '/' + encodeURIComponent(type)
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mappings'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_mapping'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesPutMapping
diff --git a/api/api/indices.put_settings.js b/api/api/indices.put_settings.js
deleted file mode 100644
index c12a1a47d..000000000
--- a/api/api/indices.put_settings.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesPutSettings (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.put_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {time} timeout - Explicit operation timeout
- * @param {boolean} preserve_existing - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `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.
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {object} body - The index settings to be updated
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'timeout',
- 'preserve_existing',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'flat_settings',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- preserveExisting: 'preserve_existing',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- flatSettings: 'flat_settings',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesPutSettings (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_settings'
- } else {
- path = '/' + '_settings'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesPutSettings
diff --git a/api/api/indices.put_template.js b/api/api/indices.put_template.js
deleted file mode 100644
index 2ccc9a5a6..000000000
--- a/api/api/indices.put_template.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesPutTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.put_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
- *
- * @param {string} name - The name of the template
- * @param {boolean} include_type_name - Whether a type should be returned in the body of the mappings.
- * @param {number} order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
- * @param {boolean} create - Whether the index template should only be added if new or can also replace an existing one
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {object} body - The template definition
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'order',
- 'create',
- 'timeout',
- 'master_timeout',
- 'flat_settings',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- masterTimeout: 'master_timeout',
- flatSettings: 'flat_settings',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesPutTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_template' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesPutTemplate
diff --git a/api/api/indices.recovery.js b/api/api/indices.recovery.js
deleted file mode 100644
index 226637439..000000000
--- a/api/api/indices.recovery.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesRecovery (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {boolean} detailed - Whether to display detailed information about shard recovery
- * @param {boolean} active_only - Display only those recoveries that are currently on-going
- */
-
- const acceptedQuerystring = [
- 'detailed',
- 'active_only',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- activeOnly: 'active_only',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesRecovery (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_recovery'
- } else {
- path = '/' + '_recovery'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesRecovery
diff --git a/api/api/indices.refresh.js b/api/api/indices.refresh.js
deleted file mode 100644
index e246af298..000000000
--- a/api/api/indices.refresh.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesRefresh (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @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.
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesRefresh (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_refresh'
- } else {
- path = '/' + '_refresh'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesRefresh
diff --git a/api/api/indices.rollover.js b/api/api/indices.rollover.js
deleted file mode 100644
index 73ad046be..000000000
--- a/api/api/indices.rollover.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesRollover (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.rollover](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html) request
- *
- * @param {string} alias - The name of the alias to rollover
- * @param {string} new_index - The name of the rollover index
- * @param {boolean} include_type_name - Whether a type should be included in the body of the mappings.
- * @param {time} timeout - Explicit operation timeout
- * @param {boolean} dry_run - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {string} wait_for_active_shards - Set the number of active shards to wait for on the newly created rollover index before the operation returns.
- * @param {object} body - The conditions that needs to be met for executing rollover
- */
-
- const acceptedQuerystring = [
- 'include_type_name',
- 'timeout',
- 'dry_run',
- 'master_timeout',
- 'wait_for_active_shards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- includeTypeName: 'include_type_name',
- dryRun: 'dry_run',
- masterTimeout: 'master_timeout',
- waitForActiveShards: 'wait_for_active_shards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesRollover (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['alias'] == null) {
- const err = new ConfigurationError('Missing required parameter: alias')
- return handleError(err, callback)
- }
-
- // check required url components
- if ((params['new_index'] != null || params['newIndex'] != null) && (params['alias'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: alias')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, alias, newIndex, new_index } = params
- var querystring = semicopy(params, ['method', 'body', 'alias', 'newIndex', 'new_index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((alias) != null && (new_index || newIndex) != null) {
- path = '/' + encodeURIComponent(alias) + '/' + '_rollover' + '/' + encodeURIComponent(new_index || newIndex)
- } else {
- path = '/' + encodeURIComponent(alias) + '/' + '_rollover'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesRollover
diff --git a/api/api/indices.segments.js b/api/api/indices.segments.js
deleted file mode 100644
index d571c8c65..000000000
--- a/api/api/indices.segments.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesSegments (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @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} verbose - Includes detailed memory usage by Lucene.
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'verbose',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesSegments (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_segments'
- } else {
- path = '/' + '_segments'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesSegments
diff --git a/api/api/indices.shard_stores.js b/api/api/indices.shard_stores.js
deleted file mode 100644
index f835b5975..000000000
--- a/api/api/indices.shard_stores.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesShardStores (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.shard_stores](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {list} status - A comma-separated list of statuses used to filter on shards to get store information for
- * @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.
- */
-
- const acceptedQuerystring = [
- 'status',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesShardStores (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_shard_stores'
- } else {
- path = '/' + '_shard_stores'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesShardStores
diff --git a/api/api/indices.shrink.js b/api/api/indices.shrink.js
deleted file mode 100644
index e8dcbe934..000000000
--- a/api/api/indices.shrink.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesShrink (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.shrink](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html) request
- *
- * @param {string} index - The name of the source index to shrink
- * @param {string} target - The name of the target index to shrink into
- * @param {boolean} copy_settings - whether or not to copy settings from the source index (defaults to false)
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {string} wait_for_active_shards - Set the number of active shards to wait for on the shrunken index before the operation returns.
- * @param {object} body - The configuration for the target index (`settings` and `aliases`)
- */
-
- const acceptedQuerystring = [
- 'copy_settings',
- 'timeout',
- 'master_timeout',
- 'wait_for_active_shards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- copySettings: 'copy_settings',
- masterTimeout: 'master_timeout',
- waitForActiveShards: 'wait_for_active_shards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesShrink (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['target'] == null) {
- const err = new ConfigurationError('Missing required parameter: target')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['target'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, target } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'target'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesShrink
diff --git a/api/api/indices.split.js b/api/api/indices.split.js
deleted file mode 100644
index fbb062d1f..000000000
--- a/api/api/indices.split.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesSplit (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.split](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html) request
- *
- * @param {string} index - The name of the source index to split
- * @param {string} target - The name of the target index to split into
- * @param {boolean} copy_settings - whether or not to copy settings from the source index (defaults to false)
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {string} wait_for_active_shards - Set the number of active shards to wait for on the shrunken index before the operation returns.
- * @param {object} body - The configuration for the target index (`settings` and `aliases`)
- */
-
- const acceptedQuerystring = [
- 'copy_settings',
- 'timeout',
- 'master_timeout',
- 'wait_for_active_shards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- copySettings: 'copy_settings',
- masterTimeout: 'master_timeout',
- waitForActiveShards: 'wait_for_active_shards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesSplit (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['target'] == null) {
- const err = new ConfigurationError('Missing required parameter: target')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['target'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, target } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'target'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesSplit
diff --git a/api/api/indices.stats.js b/api/api/indices.stats.js
deleted file mode 100644
index e4b811ea5..000000000
--- a/api/api/indices.stats.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @param {list} metric - Limit the information returned the specific metrics.
- * @param {list} completion_fields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
- * @param {list} fielddata_fields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
- * @param {list} fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
- * @param {list} groups - A comma-separated list of search groups for `search` index metric
- * @param {enum} level - Return stats aggregated at cluster, index or shard level
- * @param {list} types - A comma-separated list of document types for the `indexing` index metric
- * @param {boolean} include_segment_file_sizes - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
- */
-
- const acceptedQuerystring = [
- 'completion_fields',
- 'fielddata_fields',
- 'fields',
- 'groups',
- 'level',
- 'types',
- 'include_segment_file_sizes',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- completionFields: 'completion_fields',
- fielddataFields: 'fielddata_fields',
- includeSegmentFileSizes: 'include_segment_file_sizes',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, metric } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'metric'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (metric) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_stats' + '/' + encodeURIComponent(metric)
- } else if ((metric) != null) {
- path = '/' + '_stats' + '/' + encodeURIComponent(metric)
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_stats'
- } else {
- path = '/' + '_stats'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesStats
diff --git a/api/api/indices.unfreeze.js b/api/api/indices.unfreeze.js
deleted file mode 100644
index cac430b25..000000000
--- a/api/api/indices.unfreeze.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesUnfreeze (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.unfreeze](https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html) request
- *
- * @param {string} index - The name of the index to unfreeze
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @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 {string} wait_for_active_shards - Sets the number of active shards to wait for before the operation returns.
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'wait_for_active_shards'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- waitForActiveShards: 'wait_for_active_shards'
- }
-
- return function indicesUnfreeze (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_unfreeze'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesUnfreeze
diff --git a/api/api/indices.update_aliases.js b/api/api/indices.update_aliases.js
deleted file mode 100644
index 869bd1e42..000000000
--- a/api/api/indices.update_aliases.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesUpdateAliases (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.update_aliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
- *
- * @param {time} timeout - Request timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {object} body - The definition of `actions` to perform
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesUpdateAliases (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_aliases'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesUpdateAliases
diff --git a/api/api/indices.upgrade.js b/api/api/indices.upgrade.js
deleted file mode 100644
index a2b5e25b6..000000000
--- a/api/api/indices.upgrade.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesUpgrade (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @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} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * @param {boolean} wait_for_completion - Specify whether the request should block until the all segments are upgraded (default: false)
- * @param {boolean} only_ancient_segments - If true, only ancient (an older Lucene major release) segments will be upgraded
- */
-
- const acceptedQuerystring = [
- 'allow_no_indices',
- 'expand_wildcards',
- 'ignore_unavailable',
- 'wait_for_completion',
- 'only_ancient_segments',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- ignoreUnavailable: 'ignore_unavailable',
- waitForCompletion: 'wait_for_completion',
- onlyAncientSegments: 'only_ancient_segments',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesUpgrade (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
- } else {
- path = '/' + '_upgrade'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesUpgrade
diff --git a/api/api/indices.validate_query.js b/api/api/indices.validate_query.js
deleted file mode 100644
index fca278548..000000000
--- a/api/api/indices.validate_query.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIndicesValidateQuery (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [indices.validate_query](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html) request
- *
- * @param {list} index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
- * @param {list} type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
- * @param {boolean} explain - Return detailed information about the error
- * @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 {string} q - Query in the Lucene query string syntax
- * @param {string} analyzer - The analyzer to use for the query string
- * @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
- * @param {enum} default_operator - The default operator for query string query (AND or OR)
- * @param {string} df - The field to use as default where no field prefix is given in the query string
- * @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * @param {boolean} rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
- * @param {boolean} all_shards - Execute validation on all shards instead of one random shard per index
- * @param {object} body - The query definition specified with the Query DSL
- */
-
- const acceptedQuerystring = [
- 'explain',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'q',
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'lenient',
- 'rewrite',
- 'all_shards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- analyzeWildcard: 'analyze_wildcard',
- defaultOperator: 'default_operator',
- allShards: 'all_shards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function indicesValidateQuery (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_validate' + '/' + 'query'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query'
- } else {
- path = '/' + '_validate' + '/' + 'query'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIndicesValidateQuery
diff --git a/api/api/info.js b/api/api/info.js
deleted file mode 100644
index 681d465a4..000000000
--- a/api/api/info.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildInfo (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [info](http://www.elastic.co/guide/) request
- *
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function info (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildInfo
diff --git a/api/api/ingest.delete_pipeline.js b/api/api/ingest.delete_pipeline.js
deleted file mode 100644
index 98377da51..000000000
--- a/api/api/ingest.delete_pipeline.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIngestDeletePipeline (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ingest.delete_pipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
- *
- * @param {string} id - Pipeline ID
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function ingestDeletePipeline (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIngestDeletePipeline
diff --git a/api/api/ingest.get_pipeline.js b/api/api/ingest.get_pipeline.js
deleted file mode 100644
index c0cd21726..000000000
--- a/api/api/ingest.get_pipeline.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIngestGetPipeline (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ingest.get_pipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
- *
- * @param {string} id - Comma separated list of pipeline ids. Wildcards supported
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function ingestGetPipeline (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null) {
- path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
- } else {
- path = '/' + '_ingest' + '/' + 'pipeline'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIngestGetPipeline
diff --git a/api/api/ingest.processor_grok.js b/api/api/ingest.processor_grok.js
deleted file mode 100644
index f3c88aa8f..000000000
--- a/api/api/ingest.processor_grok.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIngestProcessorGrok (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ingest.processor_grok](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
- *
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function ingestProcessorGrok (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIngestProcessorGrok
diff --git a/api/api/ingest.put_pipeline.js b/api/api/ingest.put_pipeline.js
deleted file mode 100644
index 1ce8e62b7..000000000
--- a/api/api/ingest.put_pipeline.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIngestPutPipeline (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ingest.put_pipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
- *
- * @param {string} id - Pipeline ID
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- * @param {object} body - The ingest definition
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function ingestPutPipeline (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIngestPutPipeline
diff --git a/api/api/ingest.simulate.js b/api/api/ingest.simulate.js
deleted file mode 100644
index b157763cb..000000000
--- a/api/api/ingest.simulate.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildIngestSimulate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
- *
- * @param {string} id - Pipeline ID
- * @param {boolean} verbose - Verbose mode. Display data output for each processor in executed pipeline
- * @param {object} body - The simulate definition
- */
-
- const acceptedQuerystring = [
- 'verbose',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function ingestSimulate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null) {
- path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate'
- } else {
- path = '/' + '_ingest' + '/' + 'pipeline' + '/' + '_simulate'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildIngestSimulate
diff --git a/api/api/mget.js b/api/api/mget.js
deleted file mode 100644
index f01283b20..000000000
--- a/api/api/mget.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMget (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html) request
- *
- * @param {string} index - The name of the index
- * @param {string} type - The type of the document
- * @param {list} stored_fields - A comma-separated list of stored fields to return in the response
- * @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
- * @param {boolean} refresh - Refresh the shard containing the document before performing the operation
- * @param {string} routing - Specific routing value
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {object} body - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.
- */
-
- const acceptedQuerystring = [
- 'stored_fields',
- 'preference',
- 'realtime',
- 'refresh',
- 'routing',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- storedFields: 'stored_fields',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function mget (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mget'
- } else {
- path = '/' + '_mget'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMget
diff --git a/api/api/ml.close_job.js b/api/api/ml.close_job.js
deleted file mode 100644
index c5b2fb379..000000000
--- a/api/api/ml.close_job.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlCloseJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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)
- * @param {boolean} force - True if the job should be forcefully closed
- * @param {time} timeout - Controls the time to wait until a job has closed. Default to 30 minutes
- * @param {object} body - The URL params optionally sent in the body
- */
-
- const acceptedQuerystring = [
- 'allow_no_jobs',
- 'force',
- 'timeout'
- ]
-
- const snakeCase = {
- allowNoJobs: 'allow_no_jobs'
-
- }
-
- return function mlCloseJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_close'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlCloseJob
diff --git a/api/api/ml.delete_calendar.js b/api/api/ml.delete_calendar.js
deleted file mode 100644
index 4d2cd5920..000000000
--- a/api/api/ml.delete_calendar.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteCalendar (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.delete_calendar](undefined) request
- *
- * @param {string} calendar_id - The ID of the calendar to delete
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteCalendar (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteCalendar
diff --git a/api/api/ml.delete_calendar_event.js b/api/api/ml.delete_calendar_event.js
deleted file mode 100644
index 4470e735f..000000000
--- a/api/api/ml.delete_calendar_event.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteCalendarEvent (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteCalendarEvent (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
- if (params['event_id'] == null && params['eventId'] == null) {
- const err = new ConfigurationError('Missing required parameter: event_id or eventId')
- 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['event_id'] != null || params['eventId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: calendar_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id, eventId, event_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id', 'eventId', 'event_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events' + '/' + encodeURIComponent(event_id || eventId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteCalendarEvent
diff --git a/api/api/ml.delete_calendar_job.js b/api/api/ml.delete_calendar_job.js
deleted file mode 100644
index 3bf8d33b8..000000000
--- a/api/api/ml.delete_calendar_job.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteCalendarJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteCalendarJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- 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['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: calendar_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteCalendarJob
diff --git a/api/api/ml.delete_datafeed.js b/api/api/ml.delete_datafeed.js
deleted file mode 100644
index 1cee977d0..000000000
--- a/api/api/ml.delete_datafeed.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteDatafeed (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
- 'force'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteDatafeed (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['datafeed_id'] == null && params['datafeedId'] == null) {
- const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteDatafeed
diff --git a/api/api/ml.delete_expired_data.js b/api/api/ml.delete_expired_data.js
deleted file mode 100644
index cf21a2e86..000000000
--- a/api/api/ml.delete_expired_data.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteExpiredData (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.delete_expired_data](undefined) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteExpiredData (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + '_delete_expired_data'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteExpiredData
diff --git a/api/api/ml.delete_filter.js b/api/api/ml.delete_filter.js
deleted file mode 100644
index cdf204830..000000000
--- a/api/api/ml.delete_filter.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteFilter (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.delete_filter](undefined) request
- *
- * @param {string} filter_id - The ID of the filter to delete
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteFilter (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['filter_id'] == null && params['filterId'] == null) {
- const err = new ConfigurationError('Missing required parameter: filter_id or filterId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, filterId, filter_id } = params
- var querystring = semicopy(params, ['method', 'body', 'filterId', 'filter_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteFilter
diff --git a/api/api/ml.delete_forecast.js b/api/api/ml.delete_forecast.js
deleted file mode 100644
index bb112a9ce..000000000
--- a/api/api/ml.delete_forecast.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteForecast (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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`
- * @param {boolean} allow_no_forecasts - Whether to ignore if `_all` matches no forecasts
- * @param {time} timeout - Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds
- */
-
- const acceptedQuerystring = [
- 'allow_no_forecasts',
- 'timeout'
- ]
-
- const snakeCase = {
- allowNoForecasts: 'allow_no_forecasts'
-
- }
-
- return function mlDeleteForecast (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- 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['forecast_id'] != null || params['forecastId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: job_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, forecastId, forecast_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'forecastId', 'forecast_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((job_id || jobId) != null && (forecast_id || forecastId) != null) {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast' + '/' + encodeURIComponent(forecast_id || forecastId)
- } else {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteForecast
diff --git a/api/api/ml.delete_job.js b/api/api/ml.delete_job.js
deleted file mode 100644
index 7a63de2b5..000000000
--- a/api/api/ml.delete_job.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {boolean} wait_for_completion - Should this request wait until the operation has completed before returning
- */
-
- const acceptedQuerystring = [
- 'force',
- 'wait_for_completion'
- ]
-
- const snakeCase = {
- waitForCompletion: 'wait_for_completion'
- }
-
- return function mlDeleteJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteJob
diff --git a/api/api/ml.delete_model_snapshot.js b/api/api/ml.delete_model_snapshot.js
deleted file mode 100644
index 62a071ec1..000000000
--- a/api/api/ml.delete_model_snapshot.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlDeleteModelSnapshot (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlDeleteModelSnapshot (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- if (params['snapshot_id'] == null && params['snapshotId'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot_id or snapshotId')
- 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['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: job_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, snapshotId, snapshot_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'snapshotId', 'snapshot_id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlDeleteModelSnapshot
diff --git a/api/api/ml.find_file_structure.js b/api/api/ml.find_file_structure.js
deleted file mode 100644
index 37d2db4dd..000000000
--- a/api/api/ml.find_file_structure.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlFindFileStructure (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.find_file_structure](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-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
- * @param {string} charset - Optional parameter to specify the character set of the file
- * @param {enum} format - Optional parameter to specify the high level file format
- * @param {boolean} has_header_row - Optional parameter to specify whether a delimited file includes the column names in its first row
- * @param {list} column_names - Optional parameter containing a comma separated list of the column names for a delimited file
- * @param {string} delimiter - Optional parameter to specify the delimiter character for a delimited file - must be a single character
- * @param {string} quote - Optional parameter to specify the quote character for a delimited file - must be a single character
- * @param {boolean} should_trim_fields - Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
- * @param {string} grok_pattern - Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
- * @param {string} timestamp_field - Optional parameter to specify the timestamp field in the file
- * @param {string} timestamp_format - Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
- * @param {boolean} explain - Whether to include a commentary on how the structure was derived
- * @param {object} body - The contents of the file to be analyzed
- */
-
- const acceptedQuerystring = [
- 'lines_to_sample',
- 'timeout',
- 'charset',
- 'format',
- 'has_header_row',
- 'column_names',
- 'delimiter',
- 'quote',
- 'should_trim_fields',
- 'grok_pattern',
- 'timestamp_field',
- 'timestamp_format',
- 'explain'
- ]
-
- const snakeCase = {
- linesToSample: 'lines_to_sample',
- hasHeaderRow: 'has_header_row',
- columnNames: 'column_names',
- shouldTrimFields: 'should_trim_fields',
- grokPattern: 'grok_pattern',
- timestampField: 'timestamp_field',
- timestampFormat: 'timestamp_format'
-
- }
-
- return function mlFindFileStructure (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'find_file_structure'
-
- // build request object
- const request = {
- method,
- path,
- bulkBody: body,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlFindFileStructure
diff --git a/api/api/ml.flush_job.js b/api/api/ml.flush_job.js
deleted file mode 100644
index a2e1dae52..000000000
--- a/api/api/ml.flush_job.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlFlushJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {string} start - When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
- * @param {string} end - When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
- * @param {string} advance_time - Advances time to the given value generating results and updating the model for the advanced interval
- * @param {string} skip_time - Skips time to the given value without generating results or updating the model for the skipped interval
- * @param {object} body - Flush parameters
- */
-
- const acceptedQuerystring = [
- 'calc_interim',
- 'start',
- 'end',
- 'advance_time',
- 'skip_time'
- ]
-
- const snakeCase = {
- calcInterim: 'calc_interim',
- advanceTime: 'advance_time',
- skipTime: 'skip_time'
- }
-
- return function mlFlushJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_flush'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlFlushJob
diff --git a/api/api/ml.forecast.js b/api/api/ml.forecast.js
deleted file mode 100644
index b623627fb..000000000
--- a/api/api/ml.forecast.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlForecast (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {time} expires_in - The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity.
- */
-
- const acceptedQuerystring = [
- 'duration',
- 'expires_in'
- ]
-
- const snakeCase = {
- expiresIn: 'expires_in'
- }
-
- return function mlForecast (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlForecast
diff --git a/api/api/ml.get_buckets.js b/api/api/ml.get_buckets.js
deleted file mode 100644
index 80873c653..000000000
--- a/api/api/ml.get_buckets.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetBuckets (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {boolean} expand - Include anomaly records
- * @param {boolean} exclude_interim - Exclude interim results
- * @param {int} from - skips a number of buckets
- * @param {int} size - specifies a max number of buckets to get
- * @param {string} start - Start time filter for buckets
- * @param {string} end - End time filter for buckets
- * @param {double} anomaly_score - Filter for the most anomalous buckets
- * @param {string} sort - Sort buckets by a particular field
- * @param {boolean} desc - Set the sort direction
- * @param {object} body - Bucket selection details if not provided in URI
- */
-
- const acceptedQuerystring = [
- 'expand',
- 'exclude_interim',
- 'from',
- 'size',
- 'start',
- 'end',
- 'anomaly_score',
- 'sort',
- 'desc'
- ]
-
- const snakeCase = {
- excludeInterim: 'exclude_interim',
- anomalyScore: 'anomaly_score'
-
- }
-
- return function mlGetBuckets (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['timestamp'] != null && ((params['job_id'] == null && params['jobId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: job_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, timestamp } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'timestamp'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((job_id || jobId) != null && (timestamp) != null) {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets' + '/' + encodeURIComponent(timestamp)
- } else {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetBuckets
diff --git a/api/api/ml.get_calendar_events.js b/api/api/ml.get_calendar_events.js
deleted file mode 100644
index c7aa2d77a..000000000
--- a/api/api/ml.get_calendar_events.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetCalendarEvents (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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'
- * @param {string} start - Get events after this time
- * @param {date} end - Get events before this time
- * @param {int} from - Skips a number of events
- * @param {int} size - Specifies a max number of events to get
- */
-
- const acceptedQuerystring = [
- 'job_id',
- 'start',
- 'end',
- 'from',
- 'size'
- ]
-
- const snakeCase = {
- jobId: 'job_id'
-
- }
-
- return function mlGetCalendarEvents (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetCalendarEvents
diff --git a/api/api/ml.get_calendars.js b/api/api/ml.get_calendars.js
deleted file mode 100644
index 365f18942..000000000
--- a/api/api/ml.get_calendars.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetCalendars (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
- 'from',
- 'size'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlGetCalendars (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((calendar_id || calendarId) != null) {
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
- } else {
- path = '/' + '_ml' + '/' + 'calendars'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetCalendars
diff --git a/api/api/ml.get_categories.js b/api/api/ml.get_categories.js
deleted file mode 100644
index 4ab14462f..000000000
--- a/api/api/ml.get_categories.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetCategories (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {int} from - skips a number of categories
- * @param {int} size - specifies a max number of categories to get
- * @param {object} body - Category selection details if not provided in URI
- */
-
- const acceptedQuerystring = [
- 'from',
- 'size'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlGetCategories (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, categoryId, category_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'categoryId', 'category_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((job_id || jobId) != null && (category_id || categoryId) != null) {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories' + '/' + encodeURIComponent(category_id || categoryId)
- } else {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetCategories
diff --git a/api/api/ml.get_datafeed_stats.js b/api/api/ml.get_datafeed_stats.js
deleted file mode 100644
index e1e61aa33..000000000
--- a/api/api/ml.get_datafeed_stats.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetDatafeedStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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)
- */
-
- const acceptedQuerystring = [
- 'allow_no_datafeeds'
- ]
-
- const snakeCase = {
- allowNoDatafeeds: 'allow_no_datafeeds'
- }
-
- return function mlGetDatafeedStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((datafeed_id || datafeedId) != null) {
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stats'
- } else {
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + '_stats'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetDatafeedStats
diff --git a/api/api/ml.get_datafeeds.js b/api/api/ml.get_datafeeds.js
deleted file mode 100644
index 4f7fb7d66..000000000
--- a/api/api/ml.get_datafeeds.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetDatafeeds (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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)
- */
-
- const acceptedQuerystring = [
- 'allow_no_datafeeds'
- ]
-
- const snakeCase = {
- allowNoDatafeeds: 'allow_no_datafeeds'
- }
-
- return function mlGetDatafeeds (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((datafeed_id || datafeedId) != null) {
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
- } else {
- path = '/' + '_ml' + '/' + 'datafeeds'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetDatafeeds
diff --git a/api/api/ml.get_filters.js b/api/api/ml.get_filters.js
deleted file mode 100644
index f3f4a74e9..000000000
--- a/api/api/ml.get_filters.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetFilters (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {int} size - specifies a max number of filters to get
- */
-
- const acceptedQuerystring = [
- 'from',
- 'size'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlGetFilters (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, filterId, filter_id } = params
- var querystring = semicopy(params, ['method', 'body', 'filterId', 'filter_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((filter_id || filterId) != null) {
- path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
- } else {
- path = '/' + '_ml' + '/' + 'filters'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetFilters
diff --git a/api/api/ml.get_influencers.js b/api/api/ml.get_influencers.js
deleted file mode 100644
index 591d40e85..000000000
--- a/api/api/ml.get_influencers.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetInfluencers (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {int} from - skips a number of influencers
- * @param {int} size - specifies a max number of influencers to get
- * @param {string} start - start timestamp for the requested influencers
- * @param {string} end - end timestamp for the requested influencers
- * @param {double} influencer_score - influencer score threshold for the requested influencers
- * @param {string} sort - sort field for the requested influencers
- * @param {boolean} desc - whether the results should be sorted in decending order
- * @param {object} body - Influencer selection criteria
- */
-
- const acceptedQuerystring = [
- 'exclude_interim',
- 'from',
- 'size',
- 'start',
- 'end',
- 'influencer_score',
- 'sort',
- 'desc'
- ]
-
- const snakeCase = {
- excludeInterim: 'exclude_interim',
- influencerScore: 'influencer_score'
-
- }
-
- return function mlGetInfluencers (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'influencers'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetInfluencers
diff --git a/api/api/ml.get_job_stats.js b/api/api/ml.get_job_stats.js
deleted file mode 100644
index c0855dc08..000000000
--- a/api/api/ml.get_job_stats.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetJobStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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)
- */
-
- const acceptedQuerystring = [
- 'allow_no_jobs'
- ]
-
- const snakeCase = {
- allowNoJobs: 'allow_no_jobs'
- }
-
- return function mlGetJobStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((job_id || jobId) != null) {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_stats'
- } else {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_stats'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetJobStats
diff --git a/api/api/ml.get_jobs.js b/api/api/ml.get_jobs.js
deleted file mode 100644
index 17d83fec9..000000000
--- a/api/api/ml.get_jobs.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetJobs (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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)
- */
-
- const acceptedQuerystring = [
- 'allow_no_jobs'
- ]
-
- const snakeCase = {
- allowNoJobs: 'allow_no_jobs'
- }
-
- return function mlGetJobs (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((job_id || jobId) != null) {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
- } else {
- path = '/' + '_ml' + '/' + 'anomaly_detectors'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetJobs
diff --git a/api/api/ml.get_model_snapshots.js b/api/api/ml.get_model_snapshots.js
deleted file mode 100644
index 466c6829d..000000000
--- a/api/api/ml.get_model_snapshots.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetModelSnapshots (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {int} from - Skips a number of documents
- * @param {int} size - The default number of documents returned in queries as a string.
- * @param {date} start - The filter 'start' query parameter
- * @param {date} end - The filter 'end' query parameter
- * @param {string} sort - Name of the field to sort on
- * @param {boolean} desc - True if the results should be sorted in descending order
- * @param {object} body - Model snapshot selection criteria
- */
-
- const acceptedQuerystring = [
- 'from',
- 'size',
- 'start',
- 'end',
- 'sort',
- 'desc'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlGetModelSnapshots (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // check required url components
- if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: job_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, snapshotId, snapshot_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'snapshotId', 'snapshot_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((job_id || jobId) != null && (snapshot_id || snapshotId) != null) {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId)
- } else {
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetModelSnapshots
diff --git a/api/api/ml.get_overall_buckets.js b/api/api/ml.get_overall_buckets.js
deleted file mode 100644
index ba1c7c9ac..000000000
--- a/api/api/ml.get_overall_buckets.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetOverallBuckets (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {string} bucket_span - The span of the overall buckets. Defaults to the longest job bucket_span
- * @param {double} overall_score - Returns overall buckets with overall scores higher than this value
- * @param {boolean} exclude_interim - If true overall buckets that include interim buckets will be excluded
- * @param {string} start - Returns overall buckets with timestamps after this time
- * @param {string} end - Returns overall buckets with timestamps earlier than this time
- * @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)
- * @param {object} body - Overall bucket selection details if not provided in URI
- */
-
- const acceptedQuerystring = [
- 'top_n',
- 'bucket_span',
- 'overall_score',
- 'exclude_interim',
- 'start',
- 'end',
- 'allow_no_jobs'
- ]
-
- const snakeCase = {
- topN: 'top_n',
- bucketSpan: 'bucket_span',
- overallScore: 'overall_score',
- excludeInterim: 'exclude_interim',
- allowNoJobs: 'allow_no_jobs'
- }
-
- return function mlGetOverallBuckets (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'overall_buckets'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetOverallBuckets
diff --git a/api/api/ml.get_records.js b/api/api/ml.get_records.js
deleted file mode 100644
index 3a3e5335f..000000000
--- a/api/api/ml.get_records.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlGetRecords (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {int} from - skips a number of records
- * @param {int} size - specifies a max number of records to get
- * @param {string} start - Start time filter for records
- * @param {string} end - End time filter for records
- * @param {double} record_score -
- * @param {string} sort - Sort records by a particular field
- * @param {boolean} desc - Set the sort direction
- * @param {object} body - Record selection criteria
- */
-
- const acceptedQuerystring = [
- 'exclude_interim',
- 'from',
- 'size',
- 'start',
- 'end',
- 'record_score',
- 'sort',
- 'desc'
- ]
-
- const snakeCase = {
- excludeInterim: 'exclude_interim',
- recordScore: 'record_score'
-
- }
-
- return function mlGetRecords (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'records'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlGetRecords
diff --git a/api/api/ml.info.js b/api/api/ml.info.js
deleted file mode 100644
index 3e0b95328..000000000
--- a/api/api/ml.info.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlInfo (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.info](undefined) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlInfo (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'info'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlInfo
diff --git a/api/api/ml.open_job.js b/api/api/ml.open_job.js
deleted file mode 100644
index 72b4ab402..000000000
--- a/api/api/ml.open_job.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlOpenJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {time} timeout - Controls the time to wait until a job has opened. Default to 30 minutes
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlOpenJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, ignoreDowntime, ignore_downtime, timeout } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'ignoreDowntime', 'ignore_downtime', 'timeout'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_open'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlOpenJob
diff --git a/api/api/ml.post_calendar_events.js b/api/api/ml.post_calendar_events.js
deleted file mode 100644
index 8ad6e683d..000000000
--- a/api/api/ml.post_calendar_events.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPostCalendarEvents (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPostCalendarEvents (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPostCalendarEvents
diff --git a/api/api/ml.post_data.js b/api/api/ml.post_data.js
deleted file mode 100644
index 4661fc231..000000000
--- a/api/api/ml.post_data.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPostData (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {string} reset_end - Optional parameter to specify the end of the bucket resetting range
- * @param {object} body - The data to process
- */
-
- const acceptedQuerystring = [
- 'reset_start',
- 'reset_end'
- ]
-
- const snakeCase = {
- resetStart: 'reset_start',
- resetEnd: 'reset_end'
- }
-
- return function mlPostData (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_data'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPostData
diff --git a/api/api/ml.preview_datafeed.js b/api/api/ml.preview_datafeed.js
deleted file mode 100644
index 0f78bc7dd..000000000
--- a/api/api/ml.preview_datafeed.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPreviewDatafeed (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPreviewDatafeed (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['datafeed_id'] == null && params['datafeedId'] == null) {
- const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_preview'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPreviewDatafeed
diff --git a/api/api/ml.put_calendar.js b/api/api/ml.put_calendar.js
deleted file mode 100644
index bcd5d40ac..000000000
--- a/api/api/ml.put_calendar.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPutCalendar (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.put_calendar](undefined) request
- *
- * @param {string} calendar_id - The ID of the calendar to create
- * @param {object} body - The calendar details
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPutCalendar (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPutCalendar
diff --git a/api/api/ml.put_calendar_job.js b/api/api/ml.put_calendar_job.js
deleted file mode 100644
index 3f160c47d..000000000
--- a/api/api/ml.put_calendar_job.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPutCalendarJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPutCalendarJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['calendar_id'] == null && params['calendarId'] == null) {
- const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId')
- return handleError(err, callback)
- }
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- 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['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: calendar_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, calendarId, calendar_id, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'calendarId', 'calendar_id', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPutCalendarJob
diff --git a/api/api/ml.put_datafeed.js b/api/api/ml.put_datafeed.js
deleted file mode 100644
index 2de0baa75..000000000
--- a/api/api/ml.put_datafeed.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPutDatafeed (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPutDatafeed (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['datafeed_id'] == null && params['datafeedId'] == null) {
- const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPutDatafeed
diff --git a/api/api/ml.put_filter.js b/api/api/ml.put_filter.js
deleted file mode 100644
index 057f71e1e..000000000
--- a/api/api/ml.put_filter.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPutFilter (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.put_filter](undefined) request
- *
- * @param {string} filter_id - The ID of the filter to create
- * @param {object} body - The filter details
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPutFilter (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['filter_id'] == null && params['filterId'] == null) {
- const err = new ConfigurationError('Missing required parameter: filter_id or filterId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, filterId, filter_id } = params
- var querystring = semicopy(params, ['method', 'body', 'filterId', 'filter_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPutFilter
diff --git a/api/api/ml.put_job.js b/api/api/ml.put_job.js
deleted file mode 100644
index 0aa4a256e..000000000
--- a/api/api/ml.put_job.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlPutJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlPutJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlPutJob
diff --git a/api/api/ml.revert_model_snapshot.js b/api/api/ml.revert_model_snapshot.js
deleted file mode 100644
index 41ff3c13b..000000000
--- a/api/api/ml.revert_model_snapshot.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlRevertModelSnapshot (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {boolean} delete_intervening_results - Should we reset the results back to the time of the snapshot?
- * @param {object} body - Reversion options
- */
-
- const acceptedQuerystring = [
- 'delete_intervening_results'
- ]
-
- const snakeCase = {
- deleteInterveningResults: 'delete_intervening_results'
- }
-
- return function mlRevertModelSnapshot (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- if (params['snapshot_id'] == null && params['snapshotId'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot_id or snapshotId')
- return handleError(err, callback)
- }
-
- // check required url components
- if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: job_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, snapshotId, snapshot_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'snapshotId', 'snapshot_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_revert'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlRevertModelSnapshot
diff --git a/api/api/ml.set_upgrade_mode.js b/api/api/ml.set_upgrade_mode.js
deleted file mode 100644
index 57a4df4d1..000000000
--- a/api/api/ml.set_upgrade_mode.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlSetUpgradeMode (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
- 'enabled',
- 'timeout'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlSetUpgradeMode (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'set_upgrade_mode'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlSetUpgradeMode
diff --git a/api/api/ml.start_datafeed.js b/api/api/ml.start_datafeed.js
deleted file mode 100644
index 1c11f9f31..000000000
--- a/api/api/ml.start_datafeed.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlStartDatafeed (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {string} end - The end time when the datafeed should stop. When not set, the datafeed continues in real time
- * @param {time} timeout - Controls the time to wait until a datafeed has started. Default to 20 seconds
- * @param {object} body - The start datafeed parameters
- */
-
- const acceptedQuerystring = [
- 'start',
- 'end',
- 'timeout'
- ]
-
- const snakeCase = {
-
- }
-
- return function mlStartDatafeed (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['datafeed_id'] == null && params['datafeedId'] == null) {
- const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_start'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlStartDatafeed
diff --git a/api/api/ml.stop_datafeed.js b/api/api/ml.stop_datafeed.js
deleted file mode 100644
index f845de47a..000000000
--- a/api/api/ml.stop_datafeed.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlStopDatafeed (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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)
- * @param {boolean} force - True if the datafeed should be forcefully stopped.
- * @param {time} timeout - Controls the time to wait until a datafeed has stopped. Default to 20 seconds
- */
-
- const acceptedQuerystring = [
- 'allow_no_datafeeds',
- 'force',
- 'timeout'
- ]
-
- const snakeCase = {
- allowNoDatafeeds: 'allow_no_datafeeds'
-
- }
-
- return function mlStopDatafeed (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['datafeed_id'] == null && params['datafeedId'] == null) {
- const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stop'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlStopDatafeed
diff --git a/api/api/ml.update_datafeed.js b/api/api/ml.update_datafeed.js
deleted file mode 100644
index 486a2b881..000000000
--- a/api/api/ml.update_datafeed.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlUpdateDatafeed (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlUpdateDatafeed (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['datafeed_id'] == null && params['datafeedId'] == null) {
- const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, datafeedId, datafeed_id } = params
- var querystring = semicopy(params, ['method', 'body', 'datafeedId', 'datafeed_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_update'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlUpdateDatafeed
diff --git a/api/api/ml.update_filter.js b/api/api/ml.update_filter.js
deleted file mode 100644
index 0b203684d..000000000
--- a/api/api/ml.update_filter.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlUpdateFilter (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.update_filter](undefined) request
- *
- * @param {string} filter_id - The ID of the filter to update
- * @param {object} body - The filter update
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlUpdateFilter (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['filter_id'] == null && params['filterId'] == null) {
- const err = new ConfigurationError('Missing required parameter: filter_id or filterId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, filterId, filter_id } = params
- var querystring = semicopy(params, ['method', 'body', 'filterId', 'filter_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) + '/' + '_update'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlUpdateFilter
diff --git a/api/api/ml.update_job.js b/api/api/ml.update_job.js
deleted file mode 100644
index 2e9617666..000000000
--- a/api/api/ml.update_job.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlUpdateJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlUpdateJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_update'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlUpdateJob
diff --git a/api/api/ml.update_model_snapshot.js b/api/api/ml.update_model_snapshot.js
deleted file mode 100644
index 7e80fa05b..000000000
--- a/api/api/ml.update_model_snapshot.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlUpdateModelSnapshot (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- * @param {object} body - The model snapshot properties to update
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlUpdateModelSnapshot (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['job_id'] == null && params['jobId'] == null) {
- const err = new ConfigurationError('Missing required parameter: job_id or jobId')
- return handleError(err, callback)
- }
- if (params['snapshot_id'] == null && params['snapshotId'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot_id or snapshotId')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: job_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, jobId, job_id, snapshotId, snapshot_id } = params
- var querystring = semicopy(params, ['method', 'body', 'jobId', 'job_id', 'snapshotId', 'snapshot_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_update'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlUpdateModelSnapshot
diff --git a/api/api/ml.validate.js b/api/api/ml.validate.js
deleted file mode 100644
index 61b6da7c7..000000000
--- a/api/api/ml.validate.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlValidate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.validate](undefined) request
- *
- * @param {object} body - The job config
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlValidate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_validate'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlValidate
diff --git a/api/api/ml.validate_detector.js b/api/api/ml.validate_detector.js
deleted file mode 100644
index 8b00f4597..000000000
--- a/api/api/ml.validate_detector.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMlValidateDetector (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ml.validate_detector](undefined) request
- *
- * @param {object} body - The detector
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function mlValidateDetector (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_validate' + '/' + 'detector'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMlValidateDetector
diff --git a/api/api/monitoring.bulk.js b/api/api/monitoring.bulk.js
deleted file mode 100644
index ff488720b..000000000
--- a/api/api/monitoring.bulk.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMonitoringBulk (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [monitoring.bulk](http://www.elastic.co/guide/en/monitoring/current/appendix-api-bulk.html) request
- *
- * @param {string} type - Default document type for items which don't provide one
- * @param {string} system_id - Identifier of the monitored system
- * @param {string} system_api_version - API Version of the monitored system
- * @param {string} interval - Collection interval (e.g., '10s' or '10000ms') of the payload
- * @param {object} body - The operation definition and data (action-data pairs), separated by newlines
- */
-
- const acceptedQuerystring = [
- 'system_id',
- 'system_api_version',
- 'interval'
- ]
-
- const snakeCase = {
- systemId: 'system_id',
- systemApiVersion: 'system_api_version'
-
- }
-
- return function monitoringBulk (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, type } = params
- var querystring = semicopy(params, ['method', 'body', 'type'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((type) != null) {
- path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'
- } else {
- path = '/' + '_monitoring' + '/' + 'bulk'
- }
-
- // build request object
- const request = {
- method,
- path,
- bulkBody: body,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMonitoringBulk
diff --git a/api/api/msearch.js b/api/api/msearch.js
deleted file mode 100644
index a4615c4fb..000000000
--- a/api/api/msearch.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMsearch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html) request
- *
- * @param {list} index - A comma-separated list of index names to use as default
- * @param {list} type - A comma-separated list of document types to use as default
- * @param {enum} search_type - Search operation type
- * @param {number} max_concurrent_searches - Controls the maximum number of concurrent searches the multi search api will execute
- * @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 - 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
- */
-
- const acceptedQuerystring = [
- 'search_type',
- 'max_concurrent_searches',
- 'typed_keys',
- 'pre_filter_shard_size',
- 'max_concurrent_shard_requests',
- 'rest_total_hits_as_int',
- 'ccs_minimize_roundtrips',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- searchType: 'search_type',
- maxConcurrentSearches: 'max_concurrent_searches',
- typedKeys: 'typed_keys',
- 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'
- }
-
- return function msearch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_msearch'
- } else {
- path = '/' + '_msearch'
- }
-
- // build request object
- const request = {
- method,
- path,
- bulkBody: body,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMsearch
diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js
deleted file mode 100644
index 1692f567f..000000000
--- a/api/api/msearch_template.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMsearchTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [msearch_template](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) request
- *
- * @param {list} index - A comma-separated list of index names to use as default
- * @param {list} type - A comma-separated list of document types to use as default
- * @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 - 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
- */
-
- const acceptedQuerystring = [
- 'search_type',
- 'typed_keys',
- 'max_concurrent_searches',
- 'rest_total_hits_as_int',
- 'ccs_minimize_roundtrips',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- searchType: 'search_type',
- typedKeys: 'typed_keys',
- maxConcurrentSearches: 'max_concurrent_searches',
- restTotalHitsAsInt: 'rest_total_hits_as_int',
- ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function msearchTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_msearch' + '/' + 'template'
- } else {
- path = '/' + '_msearch' + '/' + 'template'
- }
-
- // build request object
- const request = {
- method,
- path,
- bulkBody: body,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMsearchTemplate
diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js
deleted file mode 100644
index fe4c49a6e..000000000
--- a/api/api/mtermvectors.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildMtermvectors (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html) request
- *
- * @param {string} index - The index in which the document resides.
- * @param {string} type - The type of the document.
- * @param {list} ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
- * @param {boolean} term_statistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {boolean} field_statistics - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {list} fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {boolean} offsets - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {boolean} positions - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {boolean} payloads - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {string} routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {string} parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
- * @param {boolean} realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- * @param {object} body - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
- */
-
- const acceptedQuerystring = [
- 'ids',
- 'term_statistics',
- 'field_statistics',
- 'fields',
- 'offsets',
- 'positions',
- 'payloads',
- 'preference',
- 'routing',
- 'parent',
- 'realtime',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- termStatistics: 'term_statistics',
- fieldStatistics: 'field_statistics',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function mtermvectors (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_mtermvectors'
- } else {
- path = '/' + '_mtermvectors'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildMtermvectors
diff --git a/api/api/nodes.hot_threads.js b/api/api/nodes.hot_threads.js
deleted file mode 100644
index 12f59399c..000000000
--- a/api/api/nodes.hot_threads.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildNodesHotThreads (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [nodes.hot_threads](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html) request
- *
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {time} interval - The interval for the second sampling of threads
- * @param {number} snapshots - Number of samples of thread stacktrace (default: 10)
- * @param {number} threads - Specify the number of threads to provide information for (default: 3)
- * @param {boolean} ignore_idle_threads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
- * @param {enum} type - The type to sample (default: cpu)
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'interval',
- 'snapshots',
- 'threads',
- 'ignore_idle_threads',
- 'type',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreIdleThreads: 'ignore_idle_threads',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function nodesHotThreads (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, nodeId, node_id } = params
- var querystring = semicopy(params, ['method', 'body', 'nodeId', 'node_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null) {
- path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
- } else if ((node_id || nodeId) != null) {
- path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
- } else if ((node_id || nodeId) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
- } else if ((node_id || nodeId) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
- } else {
- path = '/' + '_cluster' + '/' + 'nodes' + '/' + 'hotthreads'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildNodesHotThreads
diff --git a/api/api/nodes.info.js b/api/api/nodes.info.js
deleted file mode 100644
index 4179dd155..000000000
--- a/api/api/nodes.info.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildNodesInfo (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html) request
- *
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {list} metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
- * @param {boolean} flat_settings - Return settings in flat format (default: false)
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'flat_settings',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- flatSettings: 'flat_settings',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function nodesInfo (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, nodeId, node_id, metric } = params
- var querystring = semicopy(params, ['method', 'body', 'nodeId', 'node_id', 'metric'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null && (metric) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + encodeURIComponent(metric)
- } else if ((node_id || nodeId) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId)
- } else if ((metric) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(metric)
- } else {
- path = '/' + '_nodes'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildNodesInfo
diff --git a/api/api/nodes.reload_secure_settings.js b/api/api/nodes.reload_secure_settings.js
deleted file mode 100644
index 53f6a6a1a..000000000
--- a/api/api/nodes.reload_secure_settings.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildNodesReloadSecureSettings (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * 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
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function nodesReloadSecureSettings (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, nodeId, node_id } = params
- var querystring = semicopy(params, ['method', 'body', 'nodeId', 'node_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings'
- } else {
- path = '/' + '_nodes' + '/' + 'reload_secure_settings'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildNodesReloadSecureSettings
diff --git a/api/api/nodes.stats.js b/api/api/nodes.stats.js
deleted file mode 100644
index 4553511fd..000000000
--- a/api/api/nodes.stats.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildNodesStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html) request
- *
- * @param {list} metric - Limit the information returned to the specified metrics
- * @param {list} index_metric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {list} completion_fields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
- * @param {list} fielddata_fields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
- * @param {list} fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
- * @param {boolean} groups - A comma-separated list of search groups for `search` index metric
- * @param {enum} level - Return indices stats aggregated at index, node or shard level
- * @param {list} types - A comma-separated list of document types for the `indexing` index metric
- * @param {time} timeout - Explicit operation timeout
- * @param {boolean} include_segment_file_sizes - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
- */
-
- const acceptedQuerystring = [
- 'completion_fields',
- 'fielddata_fields',
- 'fields',
- 'groups',
- 'level',
- 'types',
- 'timeout',
- 'include_segment_file_sizes',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- completionFields: 'completion_fields',
- fielddataFields: 'fielddata_fields',
- includeSegmentFileSizes: 'include_segment_file_sizes',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function nodesStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, metric, indexMetric, index_metric, nodeId, node_id } = params
- var querystring = semicopy(params, ['method', 'body', 'metric', 'indexMetric', 'index_metric', 'nodeId', 'node_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
- } else if ((node_id || nodeId) != null && (metric) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric)
- } else if ((metric) != null && (index_metric || indexMetric) != null) {
- path = '/' + '_nodes' + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
- } else if ((node_id || nodeId) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats'
- } else if ((metric) != null) {
- path = '/' + '_nodes' + '/' + 'stats' + '/' + encodeURIComponent(metric)
- } else {
- path = '/' + '_nodes' + '/' + 'stats'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildNodesStats
diff --git a/api/api/nodes.usage.js b/api/api/nodes.usage.js
deleted file mode 100644
index 308a6645b..000000000
--- a/api/api/nodes.usage.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildNodesUsage (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [nodes.usage](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html) request
- *
- * @param {list} metric - Limit the information returned to the specified metrics
- * @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function nodesUsage (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, metric, nodeId, node_id } = params
- var querystring = semicopy(params, ['method', 'body', 'metric', 'nodeId', 'node_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((node_id || nodeId) != null && (metric) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage' + '/' + encodeURIComponent(metric)
- } else if ((node_id || nodeId) != null) {
- path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage'
- } else if ((metric) != null) {
- path = '/' + '_nodes' + '/' + 'usage' + '/' + encodeURIComponent(metric)
- } else {
- path = '/' + '_nodes' + '/' + 'usage'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildNodesUsage
diff --git a/api/api/ping.js b/api/api/ping.js
deleted file mode 100644
index 71192c360..000000000
--- a/api/api/ping.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildPing (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ping](http://www.elastic.co/guide/) request
- *
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function ping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'HEAD'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildPing
diff --git a/api/api/put_script.js b/api/api/put_script.js
deleted file mode 100644
index bad10957b..000000000
--- a/api/api/put_script.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildPutScript (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [put_script](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
- *
- * @param {string} id - Script ID
- * @param {string} context - Script context
- * @param {time} timeout - Explicit operation timeout
- * @param {time} master_timeout - Specify timeout for connection to master
- * @param {string} context - Context name to compile script against
- * @param {object} body - The document
- */
-
- const acceptedQuerystring = [
- 'timeout',
- 'master_timeout',
- 'context',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function putScript (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['context'] != null && (params['id'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, context } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'context'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null && (context) != null) {
- path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context)
- } else {
- path = '/' + '_scripts' + '/' + encodeURIComponent(id)
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildPutScript
diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js
deleted file mode 100644
index a32132466..000000000
--- a/api/api/rank_eval.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildRankEval (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [rank_eval](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.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 {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 - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function rankEval (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'
- } else {
- path = '/' + '_rank_eval'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildRankEval
diff --git a/api/api/reindex.js b/api/api/reindex.js
deleted file mode 100644
index 90397417b..000000000
--- a/api/api/reindex.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildReindex (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html) request
- *
- * @param {boolean} refresh - Should the effected indexes be refreshed?
- * @param {time} timeout - Time each individual bulk request should wait for shards that are unavailable.
- * @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 {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.
- */
-
- const acceptedQuerystring = [
- 'refresh',
- 'timeout',
- 'wait_for_active_shards',
- 'wait_for_completion',
- 'requests_per_second',
- 'slices',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards',
- waitForCompletion: 'wait_for_completion',
- requestsPerSecond: 'requests_per_second',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function reindex (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_reindex'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildReindex
diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js
deleted file mode 100644
index 605a2ea83..000000000
--- a/api/api/reindex_rethrottle.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildReindexRethrottle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [reindex_rethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html) request
- *
- * @param {string} task_id - The task id to rethrottle
- * @param {number} requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
- */
-
- const acceptedQuerystring = [
- 'requests_per_second',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- requestsPerSecond: 'requests_per_second',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function reindexRethrottle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['task_id'] == null && params['taskId'] == null) {
- const err = new ConfigurationError('Missing required parameter: task_id or taskId')
- return handleError(err, callback)
- }
- if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
- const err = new ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, taskId, task_id } = params
- var querystring = semicopy(params, ['method', 'body', 'taskId', 'task_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildReindexRethrottle
diff --git a/api/api/render_search_template.js b/api/api/render_search_template.js
deleted file mode 100644
index 59bcab0b1..000000000
--- a/api/api/render_search_template.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildRenderSearchTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [render_search_template](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
- *
- * @param {string} id - The id of the stored search template
- * @param {object} body - The search definition template and its params
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function renderSearchTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null) {
- path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id)
- } else {
- path = '/' + '_render' + '/' + 'template'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildRenderSearchTemplate
diff --git a/api/api/scripts_painless_execute.js b/api/api/scripts_painless_execute.js
deleted file mode 100644
index 3a2785063..000000000
--- a/api/api/scripts_painless_execute.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildScriptsPainlessExecute (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [scripts_painless_execute](https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html) request
- *
- * @param {object} body - The script to execute
- */
-
- const acceptedQuerystring = [
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function scriptsPainlessExecute (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildScriptsPainlessExecute
diff --git a/api/api/scroll.js b/api/api/scroll.js
deleted file mode 100644
index 0bfd11aff..000000000
--- a/api/api/scroll.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildScroll (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
- *
- * @param {string} scroll_id - The scroll ID
- * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search
- * @param {string} scroll_id - The scroll ID for scrolled search
- * @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 {object} body - The scroll ID if not passed by URL or query parameter.
- */
-
- const acceptedQuerystring = [
- 'scroll',
- 'scroll_id',
- 'rest_total_hits_as_int',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- scrollId: 'scroll_id',
- restTotalHitsAsInt: 'rest_total_hits_as_int',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function scroll (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, scrollId, scroll_id } = params
- var querystring = semicopy(params, ['method', 'body', 'scrollId', 'scroll_id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((scroll_id || scrollId) != null) {
- path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
- } else {
- path = '/' + '_search' + '/' + 'scroll'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildScroll
diff --git a/api/api/search.js b/api/api/search.js
deleted file mode 100644
index c7c08cd8d..000000000
--- a/api/api/search.js
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSearch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.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
- * @param {string} analyzer - The analyzer to use for the query string
- * @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
- * @param {boolean} ccs_minimize_roundtrips - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
- * @param {enum} default_operator - The default operator for query string query (AND or OR)
- * @param {string} df - The field to use as default where no field prefix is given in the query string
- * @param {boolean} explain - Specify whether to return detailed information about score computation as part of a hit
- * @param {list} stored_fields - A comma-separated list of stored fields to return as part of a hit
- * @param {list} docvalue_fields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
- * @param {number} from - Starting offset (default: 0)
- * @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * @param {boolean} ignore_throttled - Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * @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} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
- * @param {string} q - Query in the Lucene query string syntax
- * @param {list} routing - A comma-separated list of specific routing values
- * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search
- * @param {enum} search_type - Search operation type
- * @param {number} size - Number of hits to return (default: 10)
- * @param {list} sort - A comma-separated list of : pairs
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {number} terminate_after - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * @param {list} stats - Specific 'tag' of the request for logging and statistical purposes
- * @param {string} suggest_field - Specify which field to use for suggestions
- * @param {enum} suggest_mode - Specify suggest mode
- * @param {number} suggest_size - How many suggestions to return in response
- * @param {string} suggest_text - The source text for which the suggestions should be returned
- * @param {time} timeout - Explicit operation timeout
- * @param {boolean} track_scores - Whether to calculate and return scores even if they are not used for sorting
- * @param {boolean} track_total_hits - Indicate if the number of documents that match the query should be tracked
- * @param {boolean} allow_partial_search_results - Indicate if an error should be returned if there is a partial search failure or timeout
- * @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * @param {boolean} version - Specify whether to return document version as part of a hit
- * @param {boolean} seq_no_primary_term - Specify whether to return sequence number and primary term of the last modification of each hit
- * @param {boolean} request_cache - Specify if request cache should be used for this request or not, defaults to index level setting
- * @param {number} batched_reduce_size - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
- * @param {number} max_concurrent_shard_requests - The number of concurrent shard requests per node this 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 {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 {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 {object} body - The search definition using the Query DSL
- */
-
- const acceptedQuerystring = [
- 'analyzer',
- 'analyze_wildcard',
- 'ccs_minimize_roundtrips',
- 'default_operator',
- 'df',
- 'explain',
- 'stored_fields',
- 'docvalue_fields',
- 'from',
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'lenient',
- 'preference',
- 'q',
- 'routing',
- 'scroll',
- 'search_type',
- 'size',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'suggest_field',
- 'suggest_mode',
- 'suggest_size',
- 'suggest_text',
- 'timeout',
- 'track_scores',
- 'track_total_hits',
- 'allow_partial_search_results',
- 'typed_keys',
- 'version',
- 'seq_no_primary_term',
- 'request_cache',
- 'batched_reduce_size',
- 'max_concurrent_shard_requests',
- 'pre_filter_shard_size',
- 'rest_total_hits_as_int',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- analyzeWildcard: 'analyze_wildcard',
- ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips',
- defaultOperator: 'default_operator',
- storedFields: 'stored_fields',
- docvalueFields: 'docvalue_fields',
- ignoreUnavailable: 'ignore_unavailable',
- ignoreThrottled: 'ignore_throttled',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- searchType: 'search_type',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- terminateAfter: 'terminate_after',
- suggestField: 'suggest_field',
- suggestMode: 'suggest_mode',
- suggestSize: 'suggest_size',
- suggestText: 'suggest_text',
- trackScores: 'track_scores',
- trackTotalHits: 'track_total_hits',
- allowPartialSearchResults: 'allow_partial_search_results',
- typedKeys: 'typed_keys',
- seqNoPrimaryTerm: 'seq_no_primary_term',
- requestCache: 'request_cache',
- batchedReduceSize: 'batched_reduce_size',
- maxConcurrentShardRequests: 'max_concurrent_shard_requests',
- preFilterShardSize: 'pre_filter_shard_size',
- restTotalHitsAsInt: 'rest_total_hits_as_int',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function search (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_search'
- } else {
- path = '/' + '_search'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSearch
diff --git a/api/api/search_shards.js b/api/api/search_shards.js
deleted file mode 100644
index 43eed2ed8..000000000
--- a/api/api/search_shards.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSearchShards (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [search_shards](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.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 {string} preference - Specify the node or shard the operation should be performed on (default: random)
- * @param {string} routing - Specific routing value
- * @param {boolean} local - Return local information, do not retrieve the state from master node (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.
- */
-
- const acceptedQuerystring = [
- 'preference',
- 'routing',
- 'local',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'expand_wildcards',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function searchShards (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_search_shards'
- } else {
- path = '/' + '_search_shards'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSearchShards
diff --git a/api/api/search_template.js b/api/api/search_template.js
deleted file mode 100644
index aadc63aaf..000000000
--- a/api/api/search_template.js
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSearchTemplate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [search_template](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.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
- * @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
- * @param {boolean} ignore_throttled - Whether specified concrete, expanded or aliased indices should be ignored when throttled
- * @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 {string} preference - Specify the node or shard the operation should be performed on (default: random)
- * @param {list} routing - A comma-separated list of specific routing values
- * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search
- * @param {enum} search_type - Search operation type
- * @param {boolean} explain - Specify whether to return detailed information about score computation as part of a hit
- * @param {boolean} profile - Specify whether to profile the query execution
- * @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * @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 search definition template and its params
- */
-
- const acceptedQuerystring = [
- 'ignore_unavailable',
- 'ignore_throttled',
- 'allow_no_indices',
- 'expand_wildcards',
- 'preference',
- 'routing',
- 'scroll',
- 'search_type',
- 'explain',
- 'profile',
- 'typed_keys',
- 'rest_total_hits_as_int',
- 'ccs_minimize_roundtrips',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- ignoreUnavailable: 'ignore_unavailable',
- ignoreThrottled: 'ignore_throttled',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- searchType: 'search_type',
- typedKeys: 'typed_keys',
- restTotalHitsAsInt: 'rest_total_hits_as_int',
- ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function searchTemplate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
- } else if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_search' + '/' + 'template'
- } else {
- path = '/' + '_search' + '/' + 'template'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSearchTemplate
diff --git a/api/api/security.authenticate.js b/api/api/security.authenticate.js
deleted file mode 100644
index 747b7718c..000000000
--- a/api/api/security.authenticate.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityAuthenticate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.authenticate](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityAuthenticate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + '_authenticate'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityAuthenticate
diff --git a/api/api/security.change_password.js b/api/api/security.change_password.js
deleted file mode 100644
index b0a9ed5d0..000000000
--- a/api/api/security.change_password.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityChangePassword (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.change_password](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html) request
- *
- * @param {string} username - The username of the user to change the password for
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- * @param {object} body - the new password for the user
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityChangePassword (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, username } = params
- var querystring = semicopy(params, ['method', 'body', 'username'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((username) != null) {
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password'
- } else {
- path = '/' + '_security' + '/' + 'user' + '/' + '_password'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityChangePassword
diff --git a/api/api/security.clear_cached_realms.js b/api/api/security.clear_cached_realms.js
deleted file mode 100644
index 8cd3bf99b..000000000
--- a/api/api/security.clear_cached_realms.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityClearCachedRealms (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.clear_cached_realms](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html) request
- *
- * @param {list} realms - Comma-separated list of realms to clear
- * @param {list} usernames - Comma-separated list of usernames to clear from the cache
- */
-
- const acceptedQuerystring = [
- 'usernames'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityClearCachedRealms (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['realms'] == null) {
- const err = new ConfigurationError('Missing required parameter: realms')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, realms } = params
- var querystring = semicopy(params, ['method', 'body', 'realms'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityClearCachedRealms
diff --git a/api/api/security.clear_cached_roles.js b/api/api/security.clear_cached_roles.js
deleted file mode 100644
index 41de57377..000000000
--- a/api/api/security.clear_cached_roles.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityClearCachedRoles (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.clear_cached_roles](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html) request
- *
- * @param {list} name - Role name
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityClearCachedRoles (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityClearCachedRoles
diff --git a/api/api/security.create_api_key.js b/api/api/security.create_api_key.js
deleted file mode 100644
index bb5e69379..000000000
--- a/api/api/security.create_api_key.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityCreateApiKey (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.create_api_key](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html) request
- *
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- * @param {object} body - The api key request to create an API key
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityCreateApiKey (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'api_key'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityCreateApiKey
diff --git a/api/api/security.delete_privileges.js b/api/api/security.delete_privileges.js
deleted file mode 100644
index 9cfd26d1c..000000000
--- a/api/api/security.delete_privileges.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityDeletePrivileges (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.delete_privileges](TODO) request
- *
- * @param {string} application - Application name
- * @param {string} name - Privilege name
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityDeletePrivileges (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['application'] == null) {
- const err = new ConfigurationError('Missing required parameter: application')
- return handleError(err, callback)
- }
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- 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['name'] != null && (params['application'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: application')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, application, name } = params
- var querystring = semicopy(params, ['method', 'body', 'application', 'name'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityDeletePrivileges
diff --git a/api/api/security.delete_role.js b/api/api/security.delete_role.js
deleted file mode 100644
index 6fb2d0496..000000000
--- a/api/api/security.delete_role.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityDeleteRole (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.delete_role](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html) request
- *
- * @param {string} name - Role name
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityDeleteRole (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityDeleteRole
diff --git a/api/api/security.delete_role_mapping.js b/api/api/security.delete_role_mapping.js
deleted file mode 100644
index 700d76f4f..000000000
--- a/api/api/security.delete_role_mapping.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityDeleteRoleMapping (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.delete_role_mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html) request
- *
- * @param {string} name - Role-mapping name
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityDeleteRoleMapping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityDeleteRoleMapping
diff --git a/api/api/security.delete_user.js b/api/api/security.delete_user.js
deleted file mode 100644
index 7fb437fe2..000000000
--- a/api/api/security.delete_user.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityDeleteUser (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.delete_user](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html) request
- *
- * @param {string} username - username
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityDeleteUser (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['username'] == null) {
- const err = new ConfigurationError('Missing required parameter: username')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, username } = params
- var querystring = semicopy(params, ['method', 'body', 'username'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityDeleteUser
diff --git a/api/api/security.disable_user.js b/api/api/security.disable_user.js
deleted file mode 100644
index d991c4853..000000000
--- a/api/api/security.disable_user.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityDisableUser (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.disable_user](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html) request
- *
- * @param {string} username - The username of the user to disable
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityDisableUser (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, username } = params
- var querystring = semicopy(params, ['method', 'body', 'username'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityDisableUser
diff --git a/api/api/security.enable_user.js b/api/api/security.enable_user.js
deleted file mode 100644
index de69556c4..000000000
--- a/api/api/security.enable_user.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityEnableUser (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.enable_user](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html) request
- *
- * @param {string} username - The username of the user to enable
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityEnableUser (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, username } = params
- var querystring = semicopy(params, ['method', 'body', 'username'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityEnableUser
diff --git a/api/api/security.get_api_key.js b/api/api/security.get_api_key.js
deleted file mode 100644
index 9a82ec39e..000000000
--- a/api/api/security.get_api_key.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetApiKey (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_api_key](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html) request
- *
- * @param {string} id - API key id of the API key to be retrieved
- * @param {string} name - API key name of the API key to be retrieved
- * @param {string} username - user name of the user who created this API key to be retrieved
- * @param {string} realm_name - realm name of the user who created this API key to be retrieved
- */
-
- const acceptedQuerystring = [
- 'id',
- 'name',
- 'username',
- 'realm_name'
- ]
-
- const snakeCase = {
- realmName: 'realm_name'
- }
-
- return function securityGetApiKey (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'api_key'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetApiKey
diff --git a/api/api/security.get_privileges.js b/api/api/security.get_privileges.js
deleted file mode 100644
index fd2d39da1..000000000
--- a/api/api/security.get_privileges.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetPrivileges (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_privileges](TODO) request
- *
- * @param {string} application - Application name
- * @param {string} name - Privilege name
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityGetPrivileges (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('This API does not require a body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['name'] != null && (params['application'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: application')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, application, name } = params
- var querystring = semicopy(params, ['method', 'body', 'application', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if (application && name) {
- path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
- } else if (application) {
- path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application)
- } else {
- path = '/' + '_security' + '/' + 'privilege'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetPrivileges
diff --git a/api/api/security.get_role.js b/api/api/security.get_role.js
deleted file mode 100644
index d2b433f1d..000000000
--- a/api/api/security.get_role.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetRole (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_role](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html) request
- *
- * @param {string} name - Role name
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityGetRole (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((name) != null) {
- path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_security' + '/' + 'role'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetRole
diff --git a/api/api/security.get_role_mapping.js b/api/api/security.get_role_mapping.js
deleted file mode 100644
index 1c3e2287c..000000000
--- a/api/api/security.get_role_mapping.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetRoleMapping (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_role_mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html) request
- *
- * @param {string} name - Role-Mapping name
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityGetRoleMapping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((name) != null) {
- path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
- } else {
- path = '/' + '_security' + '/' + 'role_mapping'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetRoleMapping
diff --git a/api/api/security.get_token.js b/api/api/security.get_token.js
deleted file mode 100644
index 6e3245b62..000000000
--- a/api/api/security.get_token.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetToken (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_token](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html) request
- *
- * @param {object} body - The token request to get
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityGetToken (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetToken
diff --git a/api/api/security.get_user.js b/api/api/security.get_user.js
deleted file mode 100644
index abedf7cc5..000000000
--- a/api/api/security.get_user.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetUser (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_user](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html) request
- *
- * @param {list} username - A comma-separated list of usernames
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityGetUser (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, username } = params
- var querystring = semicopy(params, ['method', 'body', 'username'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((username) != null) {
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
- } else {
- path = '/' + '_security' + '/' + 'user'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetUser
diff --git a/api/api/security.get_user_privileges.js b/api/api/security.get_user_privileges.js
deleted file mode 100644
index 4b489297b..000000000
--- a/api/api/security.get_user_privileges.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityGetUserPrivileges (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.get_user_privileges](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityGetUserPrivileges (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityGetUserPrivileges
diff --git a/api/api/security.has_privileges.js b/api/api/security.has_privileges.js
deleted file mode 100644
index ba46e6fde..000000000
--- a/api/api/security.has_privileges.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityHasPrivileges (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.has_privileges](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html) request
- *
- * @param {string} user - Username
- * @param {object} body - The privileges to test
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityHasPrivileges (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, user } = params
- var querystring = semicopy(params, ['method', 'body', 'user'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((user) != null) {
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
- } else {
- path = '/' + '_security' + '/' + 'user' + '/' + '_has_privileges'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityHasPrivileges
diff --git a/api/api/security.invalidate_api_key.js b/api/api/security.invalidate_api_key.js
deleted file mode 100644
index f32685f97..000000000
--- a/api/api/security.invalidate_api_key.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityInvalidateApiKey (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.invalidate_api_key](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html) request
- *
- * @param {object} body - The api key request to invalidate API key(s)
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityInvalidateApiKey (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'api_key'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityInvalidateApiKey
diff --git a/api/api/security.invalidate_token.js b/api/api/security.invalidate_token.js
deleted file mode 100644
index 0e891bf38..000000000
--- a/api/api/security.invalidate_token.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityInvalidateToken (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.invalidate_token](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html) request
- *
- * @param {object} body - The token to invalidate
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function securityInvalidateToken (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityInvalidateToken
diff --git a/api/api/security.put_privileges.js b/api/api/security.put_privileges.js
deleted file mode 100644
index c20c25a91..000000000
--- a/api/api/security.put_privileges.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityPutPrivileges (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.put_privileges](TODO) request
- *
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- * @param {object} body - The privilege(s) to add
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityPutPrivileges (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'privilege'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityPutPrivileges
diff --git a/api/api/security.put_role.js b/api/api/security.put_role.js
deleted file mode 100644
index 3becd8b55..000000000
--- a/api/api/security.put_role.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityPutRole (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.put_role](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html) request
- *
- * @param {string} name - Role name
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- * @param {object} body - The role to add
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityPutRole (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityPutRole
diff --git a/api/api/security.put_role_mapping.js b/api/api/security.put_role_mapping.js
deleted file mode 100644
index cd40cbad1..000000000
--- a/api/api/security.put_role_mapping.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityPutRoleMapping (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.put_role_mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html) request
- *
- * @param {string} name - Role-mapping name
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- * @param {object} body - The role to add
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityPutRoleMapping (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['name'] == null) {
- const err = new ConfigurationError('Missing required parameter: name')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, name } = params
- var querystring = semicopy(params, ['method', 'body', 'name'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityPutRoleMapping
diff --git a/api/api/security.put_user.js b/api/api/security.put_user.js
deleted file mode 100644
index 73e1e6722..000000000
--- a/api/api/security.put_user.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSecurityPutUser (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [security.put_user](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html) request
- *
- * @param {string} username - The username of the User
- * @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
- * @param {object} body - The user to add
- */
-
- const acceptedQuerystring = [
- 'refresh'
- ]
-
- const snakeCase = {
-
- }
-
- return function securityPutUser (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['username'] == null) {
- const err = new ConfigurationError('Missing required parameter: username')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, username } = params
- var querystring = semicopy(params, ['method', 'body', 'username'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSecurityPutUser
diff --git a/api/api/snapshot.create.js b/api/api/snapshot.create.js
deleted file mode 100644
index e1aa00e93..000000000
--- a/api/api/snapshot.create.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotCreate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {string} snapshot - A snapshot name
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} wait_for_completion - Should this request wait until the operation has completed before returning
- * @param {object} body - The snapshot definition
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'wait_for_completion',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- waitForCompletion: 'wait_for_completion',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotCreate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params['snapshot'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['snapshot'] != null && (params['repository'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: repository')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository, snapshot } = params
- var querystring = semicopy(params, ['method', 'body', 'repository', 'snapshot'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotCreate
diff --git a/api/api/snapshot.create_repository.js b/api/api/snapshot.create_repository.js
deleted file mode 100644
index ff1c1f80c..000000000
--- a/api/api/snapshot.create_repository.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotCreateRepository (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.create_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- * @param {boolean} verify - Whether to verify the repository after creation
- * @param {object} body - The repository definition
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'timeout',
- 'verify',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotCreateRepository (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository } = params
- var querystring = semicopy(params, ['method', 'body', 'repository'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotCreateRepository
diff --git a/api/api/snapshot.delete.js b/api/api/snapshot.delete.js
deleted file mode 100644
index 22f309ae7..000000000
--- a/api/api/snapshot.delete.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotDelete (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {string} snapshot - A snapshot name
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotDelete (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params['snapshot'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot')
- return handleError(err, callback)
- }
- 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['snapshot'] != null && (params['repository'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: repository')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository, snapshot } = params
- var querystring = semicopy(params, ['method', 'body', 'repository', 'snapshot'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotDelete
diff --git a/api/api/snapshot.delete_repository.js b/api/api/snapshot.delete_repository.js
deleted file mode 100644
index 0316765cd..000000000
--- a/api/api/snapshot.delete_repository.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotDeleteRepository (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.delete_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {list} repository - A comma-separated list of repository names
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotDeleteRepository (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository } = params
- var querystring = semicopy(params, ['method', 'body', 'repository'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotDeleteRepository
diff --git a/api/api/snapshot.get.js b/api/api/snapshot.get.js
deleted file mode 100644
index f3b4243f6..000000000
--- a/api/api/snapshot.get.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotGet (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {list} snapshot - A comma-separated list of snapshot names
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} ignore_unavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
- * @param {boolean} verbose - Whether to show verbose snapshot info or only show the basic info found in the repository index blob
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'ignore_unavailable',
- 'verbose',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotGet (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params['snapshot'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot')
- return handleError(err, callback)
- }
- if (params.body != null) {
- const err = new ConfigurationError('This API does not require a body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['snapshot'] != null && (params['repository'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: repository')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository, snapshot } = params
- var querystring = semicopy(params, ['method', 'body', 'repository', 'snapshot'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotGet
diff --git a/api/api/snapshot.get_repository.js b/api/api/snapshot.get_repository.js
deleted file mode 100644
index f825b04a0..000000000
--- a/api/api/snapshot.get_repository.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotGetRepository (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.get_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {list} repository - A comma-separated list of repository names
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'local',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotGetRepository (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository } = params
- var querystring = semicopy(params, ['method', 'body', 'repository'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((repository) != null) {
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
- } else {
- path = '/' + '_snapshot'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotGetRepository
diff --git a/api/api/snapshot.restore.js b/api/api/snapshot.restore.js
deleted file mode 100644
index 7df0ac952..000000000
--- a/api/api/snapshot.restore.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotRestore (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {string} snapshot - A snapshot name
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} wait_for_completion - Should this request wait until the operation has completed before returning
- * @param {object} body - Details of what to restore
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'wait_for_completion',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- waitForCompletion: 'wait_for_completion',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotRestore (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params['snapshot'] == null) {
- const err = new ConfigurationError('Missing required parameter: snapshot')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['snapshot'] != null && (params['repository'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: repository')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository, snapshot } = params
- var querystring = semicopy(params, ['method', 'body', 'repository', 'snapshot'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotRestore
diff --git a/api/api/snapshot.status.js b/api/api/snapshot.status.js
deleted file mode 100644
index d0820b6c6..000000000
--- a/api/api/snapshot.status.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotStatus (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {list} snapshot - A comma-separated list of snapshot names
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {boolean} ignore_unavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'ignore_unavailable',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- ignoreUnavailable: 'ignore_unavailable',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotStatus (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('This API does not require a body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['snapshot'] != null && (params['repository'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: repository')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository, snapshot } = params
- var querystring = semicopy(params, ['method', 'body', 'repository', 'snapshot'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((repository) != null && (snapshot) != null) {
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status'
- } else if ((repository) != null) {
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_status'
- } else {
- path = '/' + '_snapshot' + '/' + '_status'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotStatus
diff --git a/api/api/snapshot.verify_repository.js b/api/api/snapshot.verify_repository.js
deleted file mode 100644
index ea23febc8..000000000
--- a/api/api/snapshot.verify_repository.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSnapshotVerifyRepository (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [snapshot.verify_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
- *
- * @param {string} repository - A repository name
- * @param {time} master_timeout - Explicit operation timeout for connection to master node
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'master_timeout',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function snapshotVerifyRepository (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['repository'] == null) {
- const err = new ConfigurationError('Missing required parameter: repository')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, repository } = params
- var querystring = semicopy(params, ['method', 'body', 'repository'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSnapshotVerifyRepository
diff --git a/api/api/ssl.certificates.js b/api/api/ssl.certificates.js
deleted file mode 100644
index 28f8fc9f7..000000000
--- a/api/api/ssl.certificates.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildSslCertificates (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [ssl.certificates](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function sslCertificates (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_ssl' + '/' + 'certificates'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildSslCertificates
diff --git a/api/api/tasks.cancel.js b/api/api/tasks.cancel.js
deleted file mode 100644
index 3d3dd5d3e..000000000
--- a/api/api/tasks.cancel.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildTasksCancel (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [tasks.cancel](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
- *
- * @param {string} task_id - Cancel the task with specified task id (node_id:task_number)
- * @param {list} nodes - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {list} actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
- * @param {string} parent_task_id - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
- */
-
- const acceptedQuerystring = [
- 'nodes',
- 'actions',
- 'parent_task_id',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- parentTaskId: 'parent_task_id',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function tasksCancel (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, taskId, task_id } = params
- var querystring = semicopy(params, ['method', 'body', 'taskId', 'task_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((task_id || taskId) != null) {
- path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel'
- } else {
- path = '/' + '_tasks' + '/' + '_cancel'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildTasksCancel
diff --git a/api/api/tasks.get.js b/api/api/tasks.get.js
deleted file mode 100644
index 426fe46af..000000000
--- a/api/api/tasks.get.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildTasksGet (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [tasks.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
- *
- * @param {string} task_id - Return the task with specified id (node_id:task_number)
- * @param {boolean} wait_for_completion - Wait for the matching tasks to complete (default: false)
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'wait_for_completion',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForCompletion: 'wait_for_completion',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function tasksGet (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['task_id'] == null && params['taskId'] == null) {
- const err = new ConfigurationError('Missing required parameter: task_id or taskId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, taskId, task_id } = params
- var querystring = semicopy(params, ['method', 'body', 'taskId', 'task_id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildTasksGet
diff --git a/api/api/tasks.list.js b/api/api/tasks.list.js
deleted file mode 100644
index 57f170927..000000000
--- a/api/api/tasks.list.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildTasksList (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [tasks.list](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
- *
- * @param {list} nodes - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
- * @param {list} actions - A comma-separated list of actions that should be returned. Leave empty to return all.
- * @param {boolean} detailed - Return detailed task information (default: false)
- * @param {string} parent_task_id - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
- * @param {boolean} wait_for_completion - Wait for the matching tasks to complete (default: false)
- * @param {enum} group_by - Group tasks by nodes or parent/child relationships
- * @param {time} timeout - Explicit operation timeout
- */
-
- const acceptedQuerystring = [
- 'nodes',
- 'actions',
- 'detailed',
- 'parent_task_id',
- 'wait_for_completion',
- 'group_by',
- 'timeout',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- parentTaskId: 'parent_task_id',
- waitForCompletion: 'wait_for_completion',
- groupBy: 'group_by',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function tasksList (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_tasks'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildTasksList
diff --git a/api/api/termvectors.js b/api/api/termvectors.js
deleted file mode 100644
index 2571b64fd..000000000
--- a/api/api/termvectors.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildTermvectors (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html) request
- *
- * @param {string} index - The index in which the document resides.
- * @param {string} type - The type of the document.
- * @param {string} id - The id of the document, when not specified a doc param should be supplied.
- * @param {boolean} term_statistics - Specifies if total term frequency and document frequency should be returned.
- * @param {boolean} field_statistics - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
- * @param {list} fields - A comma-separated list of fields to return.
- * @param {boolean} offsets - Specifies if term offsets should be returned.
- * @param {boolean} positions - Specifies if term positions should be returned.
- * @param {boolean} payloads - Specifies if term payloads should be returned.
- * @param {string} preference - Specify the node or shard the operation should be performed on (default: random).
- * @param {string} routing - Specific routing value.
- * @param {string} parent - Parent id of documents.
- * @param {boolean} realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
- * @param {number} version - Explicit version number for concurrency control
- * @param {enum} version_type - Specific version type
- * @param {object} body - Define parameters and or supply a document to get termvectors for. See documentation.
- */
-
- const acceptedQuerystring = [
- 'term_statistics',
- 'field_statistics',
- 'fields',
- 'offsets',
- 'positions',
- 'payloads',
- 'preference',
- 'routing',
- 'parent',
- 'realtime',
- 'version',
- 'version_type',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- termStatistics: 'term_statistics',
- fieldStatistics: 'field_statistics',
- versionType: 'version_type',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function termvectors (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type, id } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type', 'id'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null && (id) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'
- } else if ((index) != null && (id) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_termvectors' + '/' + encodeURIComponent(id)
- } else if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_termvectors'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_termvectors'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildTermvectors
diff --git a/api/api/update.js b/api/api/update.js
deleted file mode 100644
index 3a4f6120d..000000000
--- a/api/api/update.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildUpdate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html) request
- *
- * @param {string} id - Document ID
- * @param {string} index - The name of the index
- * @param {string} type - The type of the document
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the update 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 {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {string} lang - The script language (default: painless)
- * @param {string} parent - ID of the parent document. Is is only used for routing and when for the upsert request
- * @param {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
- * @param {number} retry_on_conflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
- * @param {string} routing - Specific routing value
- * @param {time} timeout - Explicit operation timeout
- * @param {number} if_seq_no - only perform the update operation if the last operation that has changed the document has the specified sequence number
- * @param {number} if_primary_term - only perform the update operation if the last operation that has changed the document has the specified primary term
- * @param {object} body - The request definition requires either `script` or partial `doc`
- */
-
- const acceptedQuerystring = [
- 'wait_for_active_shards',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'lang',
- 'parent',
- 'refresh',
- 'retry_on_conflict',
- 'routing',
- 'timeout',
- 'if_seq_no',
- 'if_primary_term',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- waitForActiveShards: 'wait_for_active_shards',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- retryOnConflict: 'retry_on_conflict',
- ifSeqNo: 'if_seq_no',
- ifPrimaryTerm: 'if_primary_term',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function update (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'id', 'index', 'type'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null && (id) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_update' + '/' + encodeURIComponent(id)
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildUpdate
diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js
deleted file mode 100644
index ab41dcf72..000000000
--- a/api/api/update_by_query.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildUpdateByQuery (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [update_by_query](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.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
- * @param {string} analyzer - The analyzer to use for the query string
- * @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
- * @param {enum} default_operator - The default operator for query string query (AND or OR)
- * @param {string} df - The field to use as default where no field prefix is given in the query string
- * @param {number} from - Starting offset (default: 0)
- * @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} conflicts - What to do when the update by query hits version conflicts?
- * @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
- * @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
- * @param {string} pipeline - Ingest pipeline to set on index requests made by this action. (default: none)
- * @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
- * @param {string} q - Query in the Lucene query string syntax
- * @param {list} routing - A comma-separated list of specific routing values
- * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search
- * @param {enum} search_type - Search operation type
- * @param {time} search_timeout - Explicit timeout for each search request. Defaults to no timeout.
- * @param {number} size - Number of hits to return (default: 10)
- * @param {list} sort - A comma-separated list of : pairs
- * @param {list} _source - True or false to return the _source field or not, or a list of fields to return
- * @param {list} _source_excludes - A list of fields to exclude from the returned _source field
- * @param {list} _source_includes - A list of fields to extract and return from the _source field
- * @param {number} terminate_after - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
- * @param {list} stats - Specific 'tag' of the request for logging and statistical purposes
- * @param {boolean} version - Specify whether to return document version as part of a hit
- * @param {boolean} version_type - Should the document increment the version number (internal) on hit or not (reindex)
- * @param {boolean} request_cache - Specify if request cache should be used for this request or not, defaults to index level setting
- * @param {boolean} refresh - Should the effected indexes be refreshed?
- * @param {time} timeout - Time each individual bulk request should wait for shards that are unavailable.
- * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the update by query 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 {number} scroll_size - Size on the scroll request powering the update by query
- * @param {boolean} wait_for_completion - Should the request should block until the update by query operation is complete.
- * @param {number} requests_per_second - The throttle to set on this request in sub-requests per second. -1 means no throttle.
- * @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
- */
-
- const acceptedQuerystring = [
- 'analyzer',
- 'analyze_wildcard',
- 'default_operator',
- 'df',
- 'from',
- 'ignore_unavailable',
- 'allow_no_indices',
- 'conflicts',
- 'expand_wildcards',
- 'lenient',
- 'pipeline',
- 'preference',
- 'q',
- 'routing',
- 'scroll',
- 'search_type',
- 'search_timeout',
- 'size',
- 'sort',
- '_source',
- '_source_excludes',
- '_source_includes',
- 'terminate_after',
- 'stats',
- 'version',
- 'version_type',
- 'request_cache',
- 'refresh',
- 'timeout',
- 'wait_for_active_shards',
- 'scroll_size',
- 'wait_for_completion',
- 'requests_per_second',
- 'slices',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- analyzeWildcard: 'analyze_wildcard',
- defaultOperator: 'default_operator',
- ignoreUnavailable: 'ignore_unavailable',
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- searchType: 'search_type',
- searchTimeout: 'search_timeout',
- _sourceExcludes: '_source_excludes',
- _sourceIncludes: '_source_includes',
- terminateAfter: 'terminate_after',
- versionType: 'version_type',
- requestCache: 'request_cache',
- waitForActiveShards: 'wait_for_active_shards',
- scrollSize: 'scroll_size',
- waitForCompletion: 'wait_for_completion',
- requestsPerSecond: 'requests_per_second',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function updateByQuery (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_update_by_query'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildUpdateByQuery
diff --git a/api/api/update_by_query_rethrottle.js b/api/api/update_by_query_rethrottle.js
deleted file mode 100644
index 2937a00d1..000000000
--- a/api/api/update_by_query_rethrottle.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildUpdateByQueryRethrottle (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [update_by_query_rethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html) request
- *
- * @param {string} task_id - The task id to rethrottle
- * @param {number} requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
- */
-
- const acceptedQuerystring = [
- 'requests_per_second',
- 'pretty',
- 'human',
- 'error_trace',
- 'source',
- 'filter_path'
- ]
-
- const snakeCase = {
- requestsPerSecond: 'requests_per_second',
- errorTrace: 'error_trace',
- filterPath: 'filter_path'
- }
-
- return function updateByQueryRethrottle (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['task_id'] == null && params['taskId'] == null) {
- const err = new ConfigurationError('Missing required parameter: task_id or taskId')
- return handleError(err, callback)
- }
- if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
- const err = new ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, taskId, task_id } = params
- var querystring = semicopy(params, ['method', 'body', 'taskId', 'task_id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildUpdateByQueryRethrottle
diff --git a/api/api/xpack.graph.explore.js b/api/api/xpack.graph.explore.js
deleted file mode 100644
index 1217aa335..000000000
--- a/api/api/xpack.graph.explore.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackGraphExplore (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.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
- * @param {string} routing - Specific routing value
- * @param {time} timeout - Explicit operation timeout
- * @param {object} body - Graph Query DSL
- */
-
- const acceptedQuerystring = [
- 'routing',
- 'timeout'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackGraphExplore (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackGraphExplore
diff --git a/api/api/xpack.info.js b/api/api/xpack.info.js
deleted file mode 100644
index 13cefe3b2..000000000
--- a/api/api/xpack.info.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackInfo (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.info](https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html) request
- *
- * @param {list} categories - Comma-separated list of info categories. Can be any of: build, license, features
- */
-
- const acceptedQuerystring = [
- 'categories'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackInfo (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_xpack'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackInfo
diff --git a/api/api/xpack.license.delete.js b/api/api/xpack.license.delete.js
deleted file mode 100644
index ca14c02bd..000000000
--- a/api/api/xpack.license.delete.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicenseDelete (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.delete](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicenseDelete (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicenseDelete
diff --git a/api/api/xpack.license.get.js b/api/api/xpack.license.get.js
deleted file mode 100644
index c189b2b13..000000000
--- a/api/api/xpack.license.get.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicenseGet (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.get](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request
- *
- * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
- */
-
- const acceptedQuerystring = [
- 'local'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicenseGet (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicenseGet
diff --git a/api/api/xpack.license.get_basic_status.js b/api/api/xpack.license.get_basic_status.js
deleted file mode 100644
index a3f9cd80a..000000000
--- a/api/api/xpack.license.get_basic_status.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicenseGetBasicStatus (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.get_basic_status](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicenseGetBasicStatus (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license' + '/' + 'basic_status'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicenseGetBasicStatus
diff --git a/api/api/xpack.license.get_trial_status.js b/api/api/xpack.license.get_trial_status.js
deleted file mode 100644
index 34487dd5c..000000000
--- a/api/api/xpack.license.get_trial_status.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicenseGetTrialStatus (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.get_trial_status](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicenseGetTrialStatus (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license' + '/' + 'trial_status'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicenseGetTrialStatus
diff --git a/api/api/xpack.license.post.js b/api/api/xpack.license.post.js
deleted file mode 100644
index f0f81c6c4..000000000
--- a/api/api/xpack.license.post.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicensePost (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.post](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request
- *
- * @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false)
- * @param {object} body - licenses to be installed
- */
-
- const acceptedQuerystring = [
- 'acknowledge'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicensePost (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicensePost
diff --git a/api/api/xpack.license.post_start_basic.js b/api/api/xpack.license.post_start_basic.js
deleted file mode 100644
index c473ceb73..000000000
--- a/api/api/xpack.license.post_start_basic.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicensePostStartBasic (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.post_start_basic](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request
- *
- * @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false)
- */
-
- const acceptedQuerystring = [
- 'acknowledge'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicensePostStartBasic (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license' + '/' + 'start_basic'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicensePostStartBasic
diff --git a/api/api/xpack.license.post_start_trial.js b/api/api/xpack.license.post_start_trial.js
deleted file mode 100644
index 67fffcc4e..000000000
--- a/api/api/xpack.license.post_start_trial.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackLicensePostStartTrial (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.license.post_start_trial](https://www.elastic.co/guide/en/x-pack/current/license-management.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)
- */
-
- const acceptedQuerystring = [
- 'type',
- 'acknowledge'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackLicensePostStartTrial (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_license' + '/' + 'start_trial'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackLicensePostStartTrial
diff --git a/api/api/xpack.migration.deprecations.js b/api/api/xpack.migration.deprecations.js
deleted file mode 100644
index d6d5edef8..000000000
--- a/api/api/xpack.migration.deprecations.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackMigrationDeprecations (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.migration.deprecations](http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html) request
- *
- * @param {string} index - Index pattern
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackMigrationDeprecations (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations'
- } else {
- path = '/' + '_migration' + '/' + 'deprecations'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackMigrationDeprecations
diff --git a/api/api/xpack.migration.get_assistance.js b/api/api/xpack.migration.get_assistance.js
deleted file mode 100644
index 43e6041ac..000000000
--- a/api/api/xpack.migration.get_assistance.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackMigrationGetAssistance (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.migration.get_assistance](https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html) request
- *
- * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
- * @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} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
- */
-
- const acceptedQuerystring = [
- 'allow_no_indices',
- 'expand_wildcards',
- 'ignore_unavailable'
- ]
-
- const snakeCase = {
- allowNoIndices: 'allow_no_indices',
- expandWildcards: 'expand_wildcards',
- ignoreUnavailable: 'ignore_unavailable'
- }
-
- return function xpackMigrationGetAssistance (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null) {
- path = '/' + '_migration' + '/' + 'assistance' + '/' + encodeURIComponent(index)
- } else {
- path = '/' + '_migration' + '/' + 'assistance'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackMigrationGetAssistance
diff --git a/api/api/xpack.migration.upgrade.js b/api/api/xpack.migration.upgrade.js
deleted file mode 100644
index e1663d3e9..000000000
--- a/api/api/xpack.migration.upgrade.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackMigrationUpgrade (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.migration.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html) request
- *
- * @param {string} index - The name of the index
- * @param {boolean} wait_for_completion - Should the request block until the upgrade operation is completed
- */
-
- const acceptedQuerystring = [
- 'wait_for_completion'
- ]
-
- const snakeCase = {
- waitForCompletion: 'wait_for_completion'
- }
-
- return function xpackMigrationUpgrade (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_migration' + '/' + 'upgrade' + '/' + encodeURIComponent(index)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackMigrationUpgrade
diff --git a/api/api/xpack.rollup.delete_job.js b/api/api/xpack.rollup.delete_job.js
deleted file mode 100644
index a4e960daa..000000000
--- a/api/api/xpack.rollup.delete_job.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupDeleteJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.delete_job]() request
- *
- * @param {string} id - The ID of the job to delete
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackRollupDeleteJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupDeleteJob
diff --git a/api/api/xpack.rollup.get_jobs.js b/api/api/xpack.rollup.get_jobs.js
deleted file mode 100644
index 90a58f40f..000000000
--- a/api/api/xpack.rollup.get_jobs.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupGetJobs (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.get_jobs]() request
- *
- * @param {string} id - The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackRollupGetJobs (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null) {
- path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
- } else {
- path = '/' + '_rollup' + '/' + 'job'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupGetJobs
diff --git a/api/api/xpack.rollup.get_rollup_caps.js b/api/api/xpack.rollup.get_rollup_caps.js
deleted file mode 100644
index 712061e83..000000000
--- a/api/api/xpack.rollup.get_rollup_caps.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupGetRollupCaps (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.get_rollup_caps]() request
- *
- * @param {string} id - The ID of the index to check rollup capabilities on, or left blank for all jobs
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackRollupGetRollupCaps (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null) {
- path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id)
- } else {
- path = '/' + '_rollup' + '/' + 'data'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupGetRollupCaps
diff --git a/api/api/xpack.rollup.get_rollup_index_caps.js b/api/api/xpack.rollup.get_rollup_index_caps.js
deleted file mode 100644
index ceb97b228..000000000
--- a/api/api/xpack.rollup.get_rollup_index_caps.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupGetRollupIndexCaps (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.get_rollup_index_caps]() request
- *
- * @param {string} index - The rollup index or index pattern to obtain rollup capabilities from.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackRollupGetRollupIndexCaps (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index } = params
- var querystring = semicopy(params, ['method', 'body', 'index'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupGetRollupIndexCaps
diff --git a/api/api/xpack.rollup.put_job.js b/api/api/xpack.rollup.put_job.js
deleted file mode 100644
index 48518f09e..000000000
--- a/api/api/xpack.rollup.put_job.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupPutJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.put_job]() request
- *
- * @param {string} id - The ID of the job to create
- * @param {object} body - The job configuration
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackRollupPutJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupPutJob
diff --git a/api/api/xpack.rollup.rollup_search.js b/api/api/xpack.rollup.rollup_search.js
deleted file mode 100644
index b21faaf22..000000000
--- a/api/api/xpack.rollup.rollup_search.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupRollupSearch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.rollup_search]() request
- *
- * @param {string} index - The index or index-pattern (containing rollup or regular data) that should be searched
- * @param {string} type - The doc type inside the index
- * @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
- * @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 {object} body - The search request body
- */
-
- const acceptedQuerystring = [
- 'typed_keys',
- 'rest_total_hits_as_int'
- ]
-
- const snakeCase = {
- typedKeys: 'typed_keys',
- restTotalHitsAsInt: 'rest_total_hits_as_int'
- }
-
- return function xpackRollupRollupSearch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['index'] == null) {
- const err = new ConfigurationError('Missing required parameter: index')
- return handleError(err, callback)
- }
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // check required url components
- if (params['type'] != null && (params['index'] == null)) {
- const err = new ConfigurationError('Missing required parameter of the url: index')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, index, type } = params
- var querystring = semicopy(params, ['method', 'body', 'index', 'type'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((index) != null && (type) != null) {
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search'
- } else {
- path = '/' + encodeURIComponent(index) + '/' + '_rollup_search'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupRollupSearch
diff --git a/api/api/xpack.rollup.start_job.js b/api/api/xpack.rollup.start_job.js
deleted file mode 100644
index 823221c1d..000000000
--- a/api/api/xpack.rollup.start_job.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupStartJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.start_job]() request
- *
- * @param {string} id - The ID of the job to start
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackRollupStartJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupStartJob
diff --git a/api/api/xpack.rollup.stop_job.js b/api/api/xpack.rollup.stop_job.js
deleted file mode 100644
index ad4683d83..000000000
--- a/api/api/xpack.rollup.stop_job.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackRollupStopJob (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.rollup.stop_job]() request
- *
- * @param {string} id - The ID of the job to stop
- * @param {boolean} wait_for_completion - True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
- * @param {time} timeout - Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.
- */
-
- const acceptedQuerystring = [
- 'wait_for_completion',
- 'timeout'
- ]
-
- const snakeCase = {
- waitForCompletion: 'wait_for_completion'
-
- }
-
- return function xpackRollupStopJob (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackRollupStopJob
diff --git a/api/api/xpack.sql.clear_cursor.js b/api/api/xpack.sql.clear_cursor.js
deleted file mode 100644
index 79548622c..000000000
--- a/api/api/xpack.sql.clear_cursor.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackSqlClearCursor (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.sql.clear_cursor](Clear SQL cursor) request
- *
- * @param {object} body - Specify the cursor value in the `cursor` element to clean the cursor.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackSqlClearCursor (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_sql' + '/' + 'close'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackSqlClearCursor
diff --git a/api/api/xpack.sql.query.js b/api/api/xpack.sql.query.js
deleted file mode 100644
index 923190fef..000000000
--- a/api/api/xpack.sql.query.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackSqlQuery (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.sql.query](Execute SQL) request
- *
- * @param {string} format - a short version of the Accept header, e.g. json, yaml
- * @param {object} body - Use the `query` element to start a query. Use the `cursor` element to continue a query.
- */
-
- const acceptedQuerystring = [
- 'format'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackSqlQuery (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_sql'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackSqlQuery
diff --git a/api/api/xpack.sql.translate.js b/api/api/xpack.sql.translate.js
deleted file mode 100644
index c5204666e..000000000
--- a/api/api/xpack.sql.translate.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackSqlTranslate (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.sql.translate](Translate SQL into Elasticsearch queries) request
- *
- * @param {object} body - Specify the query in the `query` element.
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackSqlTranslate (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['body'] == null) {
- const err = new ConfigurationError('Missing required parameter: body')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = body == null ? 'GET' : 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_sql' + '/' + 'translate'
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackSqlTranslate
diff --git a/api/api/xpack.usage.js b/api/api/xpack.usage.js
deleted file mode 100644
index 50cd02732..000000000
--- a/api/api/xpack.usage.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackUsage (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.usage](Retrieve information about xpack features usage) request
- *
- * @param {time} master_timeout - Specify timeout for watch write operation
- */
-
- const acceptedQuerystring = [
- 'master_timeout'
- ]
-
- const snakeCase = {
- masterTimeout: 'master_timeout'
- }
-
- return function xpackUsage (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_xpack' + '/' + 'usage'
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackUsage
diff --git a/api/api/xpack.watcher.ack_watch.js b/api/api/xpack.watcher.ack_watch.js
deleted file mode 100644
index 0dc0481b6..000000000
--- a/api/api/xpack.watcher.ack_watch.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherAckWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.ack_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html) request
- *
- * @param {string} watch_id - Watch ID
- * @param {list} action_id - A comma-separated list of the action ids to be acked
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherAckWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['watch_id'] == null && params['watchId'] == null) {
- const err = new ConfigurationError('Missing required parameter: watch_id or watchId')
- 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['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) {
- const err = new ConfigurationError('Missing required parameter of the url: watch_id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, watchId, watch_id, actionId, action_id } = params
- var querystring = semicopy(params, ['method', 'body', 'watchId', 'watch_id', 'actionId', 'action_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((watch_id || watchId) != null && (action_id || actionId) != null) {
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack' + '/' + encodeURIComponent(action_id || actionId)
- } else {
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherAckWatch
diff --git a/api/api/xpack.watcher.activate_watch.js b/api/api/xpack.watcher.activate_watch.js
deleted file mode 100644
index cadf57117..000000000
--- a/api/api/xpack.watcher.activate_watch.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherActivateWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.activate_watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html) request
- *
- * @param {string} watch_id - Watch ID
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherActivateWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['watch_id'] == null && params['watchId'] == null) {
- const err = new ConfigurationError('Missing required parameter: watch_id or watchId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, watchId, watch_id } = params
- var querystring = semicopy(params, ['method', 'body', 'watchId', 'watch_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_activate'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherActivateWatch
diff --git a/api/api/xpack.watcher.deactivate_watch.js b/api/api/xpack.watcher.deactivate_watch.js
deleted file mode 100644
index ce5f741bb..000000000
--- a/api/api/xpack.watcher.deactivate_watch.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherDeactivateWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.deactivate_watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html) request
- *
- * @param {string} watch_id - Watch ID
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherDeactivateWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['watch_id'] == null && params['watchId'] == null) {
- const err = new ConfigurationError('Missing required parameter: watch_id or watchId')
- return handleError(err, callback)
- }
- 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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, watchId, watch_id } = params
- var querystring = semicopy(params, ['method', 'body', 'watchId', 'watch_id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_deactivate'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherDeactivateWatch
diff --git a/api/api/xpack.watcher.delete_watch.js b/api/api/xpack.watcher.delete_watch.js
deleted file mode 100644
index 15d5c2f8e..000000000
--- a/api/api/xpack.watcher.delete_watch.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherDeleteWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.delete_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html) request
- *
- * @param {string} id - Watch ID
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherDeleteWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'DELETE'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherDeleteWatch
diff --git a/api/api/xpack.watcher.execute_watch.js b/api/api/xpack.watcher.execute_watch.js
deleted file mode 100644
index b692e6045..000000000
--- a/api/api/xpack.watcher.execute_watch.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherExecuteWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.execute_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html) request
- *
- * @param {string} id - Watch ID
- * @param {boolean} debug - indicates whether the watch should execute in debug mode
- * @param {object} body - Execution control
- */
-
- const acceptedQuerystring = [
- 'debug'
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherExecuteWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((id) != null) {
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) + '/' + '_execute'
- } else {
- path = '/' + '_watcher' + '/' + 'watch' + '/' + '_execute'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherExecuteWatch
diff --git a/api/api/xpack.watcher.get_watch.js b/api/api/xpack.watcher.get_watch.js
deleted file mode 100644
index 452b03ce8..000000000
--- a/api/api/xpack.watcher.get_watch.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherGetWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.get_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html) request
- *
- * @param {string} id - Watch ID
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherGetWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
- if (params.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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherGetWatch
diff --git a/api/api/xpack.watcher.put_watch.js b/api/api/xpack.watcher.put_watch.js
deleted file mode 100644
index 35e973534..000000000
--- a/api/api/xpack.watcher.put_watch.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherPutWatch (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.put_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html) request
- *
- * @param {string} id - Watch ID
- * @param {boolean} active - Specify whether the watch is in/active by default
- * @param {number} version - Explicit version number for concurrency control
- * @param {number} if_seq_no - only update the watch if the last operation that has changed the watch has the specified sequence number
- * @param {number} if_primary_term - only update the watch if the last operation that has changed the watch has the specified primary term
- * @param {object} body - The watch
- */
-
- const acceptedQuerystring = [
- 'active',
- 'version',
- 'if_seq_no',
- 'if_primary_term'
- ]
-
- const snakeCase = {
- ifSeqNo: 'if_seq_no',
- ifPrimaryTerm: 'if_primary_term'
- }
-
- return function xpackWatcherPutWatch (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params['id'] == null) {
- const err = new ConfigurationError('Missing required parameter: id')
- return handleError(err, callback)
- }
-
- // validate headers object
- if (options.headers != null && typeof options.headers !== 'object') {
- const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, id } = params
- var querystring = semicopy(params, ['method', 'body', 'id'])
-
- if (method == null) {
- method = 'PUT'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
-
- // build request object
- const request = {
- method,
- path,
- body: body || '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherPutWatch
diff --git a/api/api/xpack.watcher.start.js b/api/api/xpack.watcher.start.js
deleted file mode 100644
index 0684c8260..000000000
--- a/api/api/xpack.watcher.start.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherStart (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.start](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherStart (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + '_start'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherStart
diff --git a/api/api/xpack.watcher.stats.js b/api/api/xpack.watcher.stats.js
deleted file mode 100644
index 444dfd49b..000000000
--- a/api/api/xpack.watcher.stats.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherStats (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html) request
- *
- * @param {enum} metric - Controls what additional stat metrics should be include in the response
- * @param {enum} metric - Controls what additional stat metrics should be include in the response
- * @param {boolean} emit_stacktraces - Emits stack traces of currently running watches
- */
-
- const acceptedQuerystring = [
- 'metric',
- 'emit_stacktraces'
- ]
-
- const snakeCase = {
- emitStacktraces: 'emit_stacktraces'
- }
-
- return function xpackWatcherStats (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body, metric } = params
- var querystring = semicopy(params, ['method', 'body', 'metric'])
-
- if (method == null) {
- method = 'GET'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- if ((metric) != null) {
- path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric)
- } else {
- path = '/' + '_watcher' + '/' + 'stats'
- }
-
- // build request object
- const request = {
- method,
- path,
- body: null,
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherStats
diff --git a/api/api/xpack.watcher.stop.js b/api/api/xpack.watcher.stop.js
deleted file mode 100644
index 0490656ac..000000000
--- a/api/api/xpack.watcher.stop.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-/* eslint camelcase: 0 */
-/* eslint no-unused-vars: 0 */
-
-function buildXpackWatcherStop (opts) {
- // eslint-disable-next-line no-unused-vars
- const { makeRequest, ConfigurationError, handleError } = opts
- /**
- * Perform a [xpack.watcher.stop](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html) request
- *
- */
-
- const acceptedQuerystring = [
-
- ]
-
- const snakeCase = {
-
- }
-
- return function xpackWatcherStop (params, options, callback) {
- options = options || {}
- if (typeof options === 'function') {
- callback = options
- options = {}
- }
- if (typeof params === 'function' || params == null) {
- callback = params
- params = {}
- options = {}
- }
-
- // check required parameters
- if (params.body != null) {
- const err = new ConfigurationError('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}`)
- return handleError(err, callback)
- }
-
- var warnings = null
- var { method, body } = params
- var querystring = semicopy(params, ['method', 'body'])
-
- if (method == null) {
- method = 'POST'
- }
-
- var ignore = options.ignore || null
- if (typeof ignore === 'number') {
- ignore = [ignore]
- }
-
- var path = ''
-
- path = '/' + '_watcher' + '/' + '_stop'
-
- // build request object
- const request = {
- method,
- path,
- body: '',
- querystring
- }
-
- const requestOptions = {
- ignore,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null,
- querystring: options.querystring || null,
- compression: options.compression || false,
- warnings
- }
-
- return makeRequest(request, requestOptions, callback)
-
- function semicopy (obj, exclude) {
- var target = {}
- var keys = Object.keys(obj)
- for (var i = 0, len = keys.length; i < len; i++) {
- var key = keys[i]
- if (exclude.indexOf(key) === -1) {
- target[snakeCase[key] || key] = obj[key]
- if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
- warnings = warnings || []
- warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
- }
- }
- }
- return target
- }
- }
-}
-
-module.exports = buildXpackWatcherStop
diff --git a/api/index.js b/api/index.js
deleted file mode 100644
index 57622d189..000000000
--- a/api/index.js
+++ /dev/null
@@ -1,510 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-'use strict'
-
-const assert = require('assert')
-
-function ESAPI (opts) {
- assert(opts.makeRequest, 'Missing makeRequest function')
- assert(opts.ConfigurationError, 'Missing ConfigurationError class')
- assert(opts.result, 'Missing default result object')
-
- const { result } = opts
- opts.handleError = handleError
-
- const apis = {
- bulk: lazyLoad('bulk', opts),
- cat: {
- aliases: lazyLoad('cat.aliases', opts),
- allocation: lazyLoad('cat.allocation', opts),
- count: lazyLoad('cat.count', opts),
- fielddata: lazyLoad('cat.fielddata', opts),
- health: lazyLoad('cat.health', opts),
- help: lazyLoad('cat.help', opts),
- indices: lazyLoad('cat.indices', opts),
- master: lazyLoad('cat.master', opts),
- nodeattrs: lazyLoad('cat.nodeattrs', opts),
- nodes: lazyLoad('cat.nodes', opts),
- pending_tasks: lazyLoad('cat.pending_tasks', opts),
- pendingTasks: lazyLoad('cat.pending_tasks', opts),
- plugins: lazyLoad('cat.plugins', opts),
- recovery: lazyLoad('cat.recovery', opts),
- repositories: lazyLoad('cat.repositories', opts),
- segments: lazyLoad('cat.segments', opts),
- shards: lazyLoad('cat.shards', opts),
- snapshots: lazyLoad('cat.snapshots', opts),
- tasks: lazyLoad('cat.tasks', opts),
- templates: lazyLoad('cat.templates', opts),
- thread_pool: lazyLoad('cat.thread_pool', opts),
- threadPool: lazyLoad('cat.thread_pool', opts)
- },
- ccr: {
- delete_auto_follow_pattern: lazyLoad('ccr.delete_auto_follow_pattern', opts),
- deleteAutoFollowPattern: lazyLoad('ccr.delete_auto_follow_pattern', opts),
- follow: lazyLoad('ccr.follow', opts),
- follow_info: lazyLoad('ccr.follow_info', opts),
- followInfo: lazyLoad('ccr.follow_info', opts),
- follow_stats: lazyLoad('ccr.follow_stats', opts),
- followStats: lazyLoad('ccr.follow_stats', opts),
- get_auto_follow_pattern: lazyLoad('ccr.get_auto_follow_pattern', opts),
- getAutoFollowPattern: lazyLoad('ccr.get_auto_follow_pattern', opts),
- pause_follow: lazyLoad('ccr.pause_follow', opts),
- pauseFollow: lazyLoad('ccr.pause_follow', opts),
- put_auto_follow_pattern: lazyLoad('ccr.put_auto_follow_pattern', opts),
- putAutoFollowPattern: lazyLoad('ccr.put_auto_follow_pattern', opts),
- resume_follow: lazyLoad('ccr.resume_follow', opts),
- resumeFollow: lazyLoad('ccr.resume_follow', opts),
- stats: lazyLoad('ccr.stats', opts),
- unfollow: lazyLoad('ccr.unfollow', opts)
- },
- clear_scroll: lazyLoad('clear_scroll', opts),
- clearScroll: lazyLoad('clear_scroll', opts),
- cluster: {
- allocation_explain: lazyLoad('cluster.allocation_explain', opts),
- allocationExplain: lazyLoad('cluster.allocation_explain', opts),
- get_settings: lazyLoad('cluster.get_settings', opts),
- getSettings: lazyLoad('cluster.get_settings', opts),
- health: lazyLoad('cluster.health', opts),
- pending_tasks: lazyLoad('cluster.pending_tasks', opts),
- pendingTasks: lazyLoad('cluster.pending_tasks', opts),
- put_settings: lazyLoad('cluster.put_settings', opts),
- putSettings: lazyLoad('cluster.put_settings', opts),
- remote_info: lazyLoad('cluster.remote_info', opts),
- remoteInfo: lazyLoad('cluster.remote_info', opts),
- reroute: lazyLoad('cluster.reroute', opts),
- state: lazyLoad('cluster.state', opts),
- stats: lazyLoad('cluster.stats', opts)
- },
- count: lazyLoad('count', opts),
- create: lazyLoad('create', opts),
- delete: lazyLoad('delete', opts),
- delete_by_query: lazyLoad('delete_by_query', opts),
- deleteByQuery: lazyLoad('delete_by_query', opts),
- delete_by_query_rethrottle: lazyLoad('delete_by_query_rethrottle', opts),
- deleteByQueryRethrottle: lazyLoad('delete_by_query_rethrottle', opts),
- delete_script: lazyLoad('delete_script', opts),
- deleteScript: lazyLoad('delete_script', opts),
- exists: lazyLoad('exists', opts),
- exists_source: lazyLoad('exists_source', opts),
- existsSource: lazyLoad('exists_source', opts),
- explain: lazyLoad('explain', opts),
- field_caps: lazyLoad('field_caps', opts),
- fieldCaps: lazyLoad('field_caps', opts),
- get: lazyLoad('get', opts),
- get_script: lazyLoad('get_script', opts),
- getScript: lazyLoad('get_script', opts),
- get_source: lazyLoad('get_source', opts),
- getSource: lazyLoad('get_source', opts),
- ilm: {
- delete_lifecycle: lazyLoad('ilm.delete_lifecycle', opts),
- deleteLifecycle: lazyLoad('ilm.delete_lifecycle', opts),
- explain_lifecycle: lazyLoad('ilm.explain_lifecycle', opts),
- explainLifecycle: lazyLoad('ilm.explain_lifecycle', opts),
- get_lifecycle: lazyLoad('ilm.get_lifecycle', opts),
- getLifecycle: lazyLoad('ilm.get_lifecycle', opts),
- get_status: lazyLoad('ilm.get_status', opts),
- getStatus: lazyLoad('ilm.get_status', opts),
- move_to_step: lazyLoad('ilm.move_to_step', opts),
- moveToStep: lazyLoad('ilm.move_to_step', opts),
- put_lifecycle: lazyLoad('ilm.put_lifecycle', opts),
- putLifecycle: lazyLoad('ilm.put_lifecycle', opts),
- remove_policy: lazyLoad('ilm.remove_policy', opts),
- removePolicy: lazyLoad('ilm.remove_policy', opts),
- retry: lazyLoad('ilm.retry', opts),
- start: lazyLoad('ilm.start', opts),
- stop: lazyLoad('ilm.stop', opts)
- },
- index: lazyLoad('index', opts),
- indices: {
- analyze: lazyLoad('indices.analyze', opts),
- clear_cache: lazyLoad('indices.clear_cache', opts),
- clearCache: lazyLoad('indices.clear_cache', opts),
- close: lazyLoad('indices.close', opts),
- create: lazyLoad('indices.create', opts),
- delete: lazyLoad('indices.delete', opts),
- delete_alias: lazyLoad('indices.delete_alias', opts),
- deleteAlias: lazyLoad('indices.delete_alias', opts),
- delete_template: lazyLoad('indices.delete_template', opts),
- deleteTemplate: lazyLoad('indices.delete_template', opts),
- exists: lazyLoad('indices.exists', opts),
- exists_alias: lazyLoad('indices.exists_alias', opts),
- existsAlias: lazyLoad('indices.exists_alias', opts),
- exists_template: lazyLoad('indices.exists_template', opts),
- existsTemplate: lazyLoad('indices.exists_template', opts),
- exists_type: lazyLoad('indices.exists_type', opts),
- existsType: lazyLoad('indices.exists_type', opts),
- flush: lazyLoad('indices.flush', opts),
- flush_synced: lazyLoad('indices.flush_synced', opts),
- flushSynced: lazyLoad('indices.flush_synced', opts),
- forcemerge: lazyLoad('indices.forcemerge', opts),
- freeze: lazyLoad('indices.freeze', opts),
- get: lazyLoad('indices.get', opts),
- get_alias: lazyLoad('indices.get_alias', opts),
- getAlias: lazyLoad('indices.get_alias', opts),
- get_field_mapping: lazyLoad('indices.get_field_mapping', opts),
- getFieldMapping: lazyLoad('indices.get_field_mapping', opts),
- get_mapping: lazyLoad('indices.get_mapping', opts),
- getMapping: lazyLoad('indices.get_mapping', opts),
- get_settings: lazyLoad('indices.get_settings', opts),
- getSettings: lazyLoad('indices.get_settings', opts),
- get_template: lazyLoad('indices.get_template', opts),
- getTemplate: lazyLoad('indices.get_template', opts),
- get_upgrade: lazyLoad('indices.get_upgrade', opts),
- getUpgrade: lazyLoad('indices.get_upgrade', opts),
- open: lazyLoad('indices.open', opts),
- put_alias: lazyLoad('indices.put_alias', opts),
- putAlias: lazyLoad('indices.put_alias', opts),
- put_mapping: lazyLoad('indices.put_mapping', opts),
- putMapping: lazyLoad('indices.put_mapping', opts),
- put_settings: lazyLoad('indices.put_settings', opts),
- putSettings: lazyLoad('indices.put_settings', opts),
- put_template: lazyLoad('indices.put_template', opts),
- putTemplate: lazyLoad('indices.put_template', opts),
- recovery: lazyLoad('indices.recovery', opts),
- refresh: lazyLoad('indices.refresh', opts),
- rollover: lazyLoad('indices.rollover', opts),
- segments: lazyLoad('indices.segments', opts),
- shard_stores: lazyLoad('indices.shard_stores', opts),
- shardStores: lazyLoad('indices.shard_stores', opts),
- shrink: lazyLoad('indices.shrink', opts),
- split: lazyLoad('indices.split', opts),
- stats: lazyLoad('indices.stats', opts),
- unfreeze: lazyLoad('indices.unfreeze', opts),
- update_aliases: lazyLoad('indices.update_aliases', opts),
- updateAliases: lazyLoad('indices.update_aliases', opts),
- upgrade: lazyLoad('indices.upgrade', opts),
- validate_query: lazyLoad('indices.validate_query', opts),
- validateQuery: lazyLoad('indices.validate_query', opts)
- },
- info: lazyLoad('info', opts),
- ingest: {
- delete_pipeline: lazyLoad('ingest.delete_pipeline', opts),
- deletePipeline: lazyLoad('ingest.delete_pipeline', opts),
- get_pipeline: lazyLoad('ingest.get_pipeline', opts),
- getPipeline: lazyLoad('ingest.get_pipeline', opts),
- processor_grok: lazyLoad('ingest.processor_grok', opts),
- processorGrok: lazyLoad('ingest.processor_grok', opts),
- put_pipeline: lazyLoad('ingest.put_pipeline', opts),
- putPipeline: lazyLoad('ingest.put_pipeline', opts),
- simulate: lazyLoad('ingest.simulate', opts)
- },
- mget: lazyLoad('mget', opts),
- ml: {
- close_job: lazyLoad('ml.close_job', opts),
- closeJob: lazyLoad('ml.close_job', opts),
- delete_calendar: lazyLoad('ml.delete_calendar', opts),
- deleteCalendar: lazyLoad('ml.delete_calendar', opts),
- delete_calendar_event: lazyLoad('ml.delete_calendar_event', opts),
- deleteCalendarEvent: lazyLoad('ml.delete_calendar_event', opts),
- delete_calendar_job: lazyLoad('ml.delete_calendar_job', opts),
- deleteCalendarJob: lazyLoad('ml.delete_calendar_job', opts),
- delete_datafeed: lazyLoad('ml.delete_datafeed', opts),
- deleteDatafeed: lazyLoad('ml.delete_datafeed', opts),
- delete_expired_data: lazyLoad('ml.delete_expired_data', opts),
- deleteExpiredData: lazyLoad('ml.delete_expired_data', opts),
- delete_filter: lazyLoad('ml.delete_filter', opts),
- deleteFilter: lazyLoad('ml.delete_filter', opts),
- delete_forecast: lazyLoad('ml.delete_forecast', opts),
- deleteForecast: lazyLoad('ml.delete_forecast', opts),
- delete_job: lazyLoad('ml.delete_job', opts),
- deleteJob: lazyLoad('ml.delete_job', opts),
- delete_model_snapshot: lazyLoad('ml.delete_model_snapshot', opts),
- deleteModelSnapshot: lazyLoad('ml.delete_model_snapshot', opts),
- find_file_structure: lazyLoad('ml.find_file_structure', opts),
- findFileStructure: lazyLoad('ml.find_file_structure', opts),
- flush_job: lazyLoad('ml.flush_job', opts),
- flushJob: lazyLoad('ml.flush_job', opts),
- forecast: lazyLoad('ml.forecast', opts),
- get_buckets: lazyLoad('ml.get_buckets', opts),
- getBuckets: lazyLoad('ml.get_buckets', opts),
- get_calendar_events: lazyLoad('ml.get_calendar_events', opts),
- getCalendarEvents: lazyLoad('ml.get_calendar_events', opts),
- get_calendars: lazyLoad('ml.get_calendars', opts),
- getCalendars: lazyLoad('ml.get_calendars', opts),
- get_categories: lazyLoad('ml.get_categories', opts),
- getCategories: lazyLoad('ml.get_categories', opts),
- get_datafeed_stats: lazyLoad('ml.get_datafeed_stats', opts),
- getDatafeedStats: lazyLoad('ml.get_datafeed_stats', opts),
- get_datafeeds: lazyLoad('ml.get_datafeeds', opts),
- getDatafeeds: lazyLoad('ml.get_datafeeds', opts),
- get_filters: lazyLoad('ml.get_filters', opts),
- getFilters: lazyLoad('ml.get_filters', opts),
- get_influencers: lazyLoad('ml.get_influencers', opts),
- getInfluencers: lazyLoad('ml.get_influencers', opts),
- get_job_stats: lazyLoad('ml.get_job_stats', opts),
- getJobStats: lazyLoad('ml.get_job_stats', opts),
- get_jobs: lazyLoad('ml.get_jobs', opts),
- getJobs: lazyLoad('ml.get_jobs', opts),
- get_model_snapshots: lazyLoad('ml.get_model_snapshots', opts),
- getModelSnapshots: lazyLoad('ml.get_model_snapshots', opts),
- get_overall_buckets: lazyLoad('ml.get_overall_buckets', opts),
- getOverallBuckets: lazyLoad('ml.get_overall_buckets', opts),
- get_records: lazyLoad('ml.get_records', opts),
- getRecords: lazyLoad('ml.get_records', opts),
- info: lazyLoad('ml.info', opts),
- open_job: lazyLoad('ml.open_job', opts),
- openJob: lazyLoad('ml.open_job', opts),
- post_calendar_events: lazyLoad('ml.post_calendar_events', opts),
- postCalendarEvents: lazyLoad('ml.post_calendar_events', opts),
- post_data: lazyLoad('ml.post_data', opts),
- postData: lazyLoad('ml.post_data', opts),
- preview_datafeed: lazyLoad('ml.preview_datafeed', opts),
- previewDatafeed: lazyLoad('ml.preview_datafeed', opts),
- put_calendar: lazyLoad('ml.put_calendar', opts),
- putCalendar: lazyLoad('ml.put_calendar', opts),
- put_calendar_job: lazyLoad('ml.put_calendar_job', opts),
- putCalendarJob: lazyLoad('ml.put_calendar_job', opts),
- put_datafeed: lazyLoad('ml.put_datafeed', opts),
- putDatafeed: lazyLoad('ml.put_datafeed', opts),
- put_filter: lazyLoad('ml.put_filter', opts),
- putFilter: lazyLoad('ml.put_filter', opts),
- put_job: lazyLoad('ml.put_job', opts),
- putJob: lazyLoad('ml.put_job', opts),
- revert_model_snapshot: lazyLoad('ml.revert_model_snapshot', opts),
- revertModelSnapshot: lazyLoad('ml.revert_model_snapshot', opts),
- set_upgrade_mode: lazyLoad('ml.set_upgrade_mode', opts),
- setUpgradeMode: lazyLoad('ml.set_upgrade_mode', opts),
- start_datafeed: lazyLoad('ml.start_datafeed', opts),
- startDatafeed: lazyLoad('ml.start_datafeed', opts),
- stop_datafeed: lazyLoad('ml.stop_datafeed', opts),
- stopDatafeed: lazyLoad('ml.stop_datafeed', opts),
- update_datafeed: lazyLoad('ml.update_datafeed', opts),
- updateDatafeed: lazyLoad('ml.update_datafeed', opts),
- update_filter: lazyLoad('ml.update_filter', opts),
- updateFilter: lazyLoad('ml.update_filter', opts),
- update_job: lazyLoad('ml.update_job', opts),
- updateJob: lazyLoad('ml.update_job', opts),
- update_model_snapshot: lazyLoad('ml.update_model_snapshot', opts),
- updateModelSnapshot: lazyLoad('ml.update_model_snapshot', opts),
- validate: lazyLoad('ml.validate', opts),
- validate_detector: lazyLoad('ml.validate_detector', opts),
- validateDetector: lazyLoad('ml.validate_detector', opts)
- },
- monitoring: {
- bulk: lazyLoad('monitoring.bulk', opts)
- },
- msearch: lazyLoad('msearch', opts),
- msearch_template: lazyLoad('msearch_template', opts),
- msearchTemplate: lazyLoad('msearch_template', opts),
- mtermvectors: lazyLoad('mtermvectors', opts),
- nodes: {
- hot_threads: lazyLoad('nodes.hot_threads', opts),
- hotThreads: lazyLoad('nodes.hot_threads', opts),
- info: lazyLoad('nodes.info', opts),
- reload_secure_settings: lazyLoad('nodes.reload_secure_settings', opts),
- reloadSecureSettings: lazyLoad('nodes.reload_secure_settings', opts),
- stats: lazyLoad('nodes.stats', opts),
- usage: lazyLoad('nodes.usage', opts)
- },
- ping: lazyLoad('ping', opts),
- put_script: lazyLoad('put_script', opts),
- putScript: lazyLoad('put_script', opts),
- rank_eval: lazyLoad('rank_eval', opts),
- rankEval: lazyLoad('rank_eval', opts),
- reindex: lazyLoad('reindex', opts),
- reindex_rethrottle: lazyLoad('reindex_rethrottle', opts),
- reindexRethrottle: lazyLoad('reindex_rethrottle', opts),
- render_search_template: lazyLoad('render_search_template', opts),
- renderSearchTemplate: lazyLoad('render_search_template', opts),
- scripts_painless_execute: lazyLoad('scripts_painless_execute', opts),
- scriptsPainlessExecute: lazyLoad('scripts_painless_execute', opts),
- scroll: lazyLoad('scroll', opts),
- search: lazyLoad('search', opts),
- search_shards: lazyLoad('search_shards', opts),
- searchShards: lazyLoad('search_shards', opts),
- search_template: lazyLoad('search_template', opts),
- searchTemplate: lazyLoad('search_template', opts),
- security: {
- authenticate: lazyLoad('security.authenticate', opts),
- change_password: lazyLoad('security.change_password', opts),
- changePassword: lazyLoad('security.change_password', opts),
- clear_cached_realms: lazyLoad('security.clear_cached_realms', opts),
- clearCachedRealms: lazyLoad('security.clear_cached_realms', opts),
- clear_cached_roles: lazyLoad('security.clear_cached_roles', opts),
- clearCachedRoles: lazyLoad('security.clear_cached_roles', opts),
- create_api_key: lazyLoad('security.create_api_key', opts),
- createApiKey: lazyLoad('security.create_api_key', opts),
- delete_privileges: lazyLoad('security.delete_privileges', opts),
- deletePrivileges: lazyLoad('security.delete_privileges', opts),
- delete_role: lazyLoad('security.delete_role', opts),
- deleteRole: lazyLoad('security.delete_role', opts),
- delete_role_mapping: lazyLoad('security.delete_role_mapping', opts),
- deleteRoleMapping: lazyLoad('security.delete_role_mapping', opts),
- delete_user: lazyLoad('security.delete_user', opts),
- deleteUser: lazyLoad('security.delete_user', opts),
- disable_user: lazyLoad('security.disable_user', opts),
- disableUser: lazyLoad('security.disable_user', opts),
- enable_user: lazyLoad('security.enable_user', opts),
- enableUser: lazyLoad('security.enable_user', opts),
- get_api_key: lazyLoad('security.get_api_key', opts),
- getApiKey: lazyLoad('security.get_api_key', opts),
- get_privileges: lazyLoad('security.get_privileges', opts),
- getPrivileges: lazyLoad('security.get_privileges', opts),
- get_role: lazyLoad('security.get_role', opts),
- getRole: lazyLoad('security.get_role', opts),
- get_role_mapping: lazyLoad('security.get_role_mapping', opts),
- getRoleMapping: lazyLoad('security.get_role_mapping', opts),
- get_token: lazyLoad('security.get_token', opts),
- getToken: lazyLoad('security.get_token', opts),
- get_user: lazyLoad('security.get_user', opts),
- getUser: lazyLoad('security.get_user', opts),
- get_user_privileges: lazyLoad('security.get_user_privileges', opts),
- getUserPrivileges: lazyLoad('security.get_user_privileges', opts),
- has_privileges: lazyLoad('security.has_privileges', opts),
- hasPrivileges: lazyLoad('security.has_privileges', opts),
- invalidate_api_key: lazyLoad('security.invalidate_api_key', opts),
- invalidateApiKey: lazyLoad('security.invalidate_api_key', opts),
- invalidate_token: lazyLoad('security.invalidate_token', opts),
- invalidateToken: lazyLoad('security.invalidate_token', opts),
- put_privileges: lazyLoad('security.put_privileges', opts),
- putPrivileges: lazyLoad('security.put_privileges', opts),
- put_role: lazyLoad('security.put_role', opts),
- putRole: lazyLoad('security.put_role', opts),
- put_role_mapping: lazyLoad('security.put_role_mapping', opts),
- putRoleMapping: lazyLoad('security.put_role_mapping', opts),
- put_user: lazyLoad('security.put_user', opts),
- putUser: lazyLoad('security.put_user', opts)
- },
- snapshot: {
- create: lazyLoad('snapshot.create', opts),
- create_repository: lazyLoad('snapshot.create_repository', opts),
- createRepository: lazyLoad('snapshot.create_repository', opts),
- delete: lazyLoad('snapshot.delete', opts),
- delete_repository: lazyLoad('snapshot.delete_repository', opts),
- deleteRepository: lazyLoad('snapshot.delete_repository', opts),
- get: lazyLoad('snapshot.get', opts),
- get_repository: lazyLoad('snapshot.get_repository', opts),
- getRepository: lazyLoad('snapshot.get_repository', opts),
- restore: lazyLoad('snapshot.restore', opts),
- status: lazyLoad('snapshot.status', opts),
- verify_repository: lazyLoad('snapshot.verify_repository', opts),
- verifyRepository: lazyLoad('snapshot.verify_repository', opts)
- },
- ssl: {
- certificates: lazyLoad('ssl.certificates', opts)
- },
- tasks: {
- cancel: lazyLoad('tasks.cancel', opts),
- get: lazyLoad('tasks.get', opts),
- list: lazyLoad('tasks.list', opts)
- },
- termvectors: lazyLoad('termvectors', opts),
- update: lazyLoad('update', opts),
- update_by_query: lazyLoad('update_by_query', opts),
- updateByQuery: lazyLoad('update_by_query', opts),
- update_by_query_rethrottle: lazyLoad('update_by_query_rethrottle', opts),
- updateByQueryRethrottle: lazyLoad('update_by_query_rethrottle', opts),
- xpack: {
- graph: {
- explore: lazyLoad('xpack.graph.explore', opts)
- },
- info: lazyLoad('xpack.info', opts),
- license: {
- delete: lazyLoad('xpack.license.delete', opts),
- get: lazyLoad('xpack.license.get', opts),
- get_basic_status: lazyLoad('xpack.license.get_basic_status', opts),
- getBasicStatus: lazyLoad('xpack.license.get_basic_status', opts),
- get_trial_status: lazyLoad('xpack.license.get_trial_status', opts),
- getTrialStatus: lazyLoad('xpack.license.get_trial_status', opts),
- post: lazyLoad('xpack.license.post', opts),
- post_start_basic: lazyLoad('xpack.license.post_start_basic', opts),
- postStartBasic: lazyLoad('xpack.license.post_start_basic', opts),
- post_start_trial: lazyLoad('xpack.license.post_start_trial', opts),
- postStartTrial: lazyLoad('xpack.license.post_start_trial', opts)
- },
- migration: {
- deprecations: lazyLoad('xpack.migration.deprecations', opts),
- get_assistance: lazyLoad('xpack.migration.get_assistance', opts),
- getAssistance: lazyLoad('xpack.migration.get_assistance', opts),
- upgrade: lazyLoad('xpack.migration.upgrade', opts)
- },
- rollup: {
- delete_job: lazyLoad('xpack.rollup.delete_job', opts),
- deleteJob: lazyLoad('xpack.rollup.delete_job', opts),
- get_jobs: lazyLoad('xpack.rollup.get_jobs', opts),
- getJobs: lazyLoad('xpack.rollup.get_jobs', opts),
- get_rollup_caps: lazyLoad('xpack.rollup.get_rollup_caps', opts),
- getRollupCaps: lazyLoad('xpack.rollup.get_rollup_caps', opts),
- get_rollup_index_caps: lazyLoad('xpack.rollup.get_rollup_index_caps', opts),
- getRollupIndexCaps: lazyLoad('xpack.rollup.get_rollup_index_caps', opts),
- put_job: lazyLoad('xpack.rollup.put_job', opts),
- putJob: lazyLoad('xpack.rollup.put_job', opts),
- rollup_search: lazyLoad('xpack.rollup.rollup_search', opts),
- rollupSearch: lazyLoad('xpack.rollup.rollup_search', opts),
- start_job: lazyLoad('xpack.rollup.start_job', opts),
- startJob: lazyLoad('xpack.rollup.start_job', opts),
- stop_job: lazyLoad('xpack.rollup.stop_job', opts),
- stopJob: lazyLoad('xpack.rollup.stop_job', opts)
- },
- sql: {
- clear_cursor: lazyLoad('xpack.sql.clear_cursor', opts),
- clearCursor: lazyLoad('xpack.sql.clear_cursor', opts),
- query: lazyLoad('xpack.sql.query', opts),
- translate: lazyLoad('xpack.sql.translate', opts)
- },
- usage: lazyLoad('xpack.usage', opts),
- watcher: {
- ack_watch: lazyLoad('xpack.watcher.ack_watch', opts),
- ackWatch: lazyLoad('xpack.watcher.ack_watch', opts),
- activate_watch: lazyLoad('xpack.watcher.activate_watch', opts),
- activateWatch: lazyLoad('xpack.watcher.activate_watch', opts),
- deactivate_watch: lazyLoad('xpack.watcher.deactivate_watch', opts),
- deactivateWatch: lazyLoad('xpack.watcher.deactivate_watch', opts),
- delete_watch: lazyLoad('xpack.watcher.delete_watch', opts),
- deleteWatch: lazyLoad('xpack.watcher.delete_watch', opts),
- execute_watch: lazyLoad('xpack.watcher.execute_watch', opts),
- executeWatch: lazyLoad('xpack.watcher.execute_watch', opts),
- get_watch: lazyLoad('xpack.watcher.get_watch', opts),
- getWatch: lazyLoad('xpack.watcher.get_watch', opts),
- put_watch: lazyLoad('xpack.watcher.put_watch', opts),
- putWatch: lazyLoad('xpack.watcher.put_watch', opts),
- start: lazyLoad('xpack.watcher.start', opts),
- stats: lazyLoad('xpack.watcher.stats', opts),
- stop: lazyLoad('xpack.watcher.stop', opts)
- }
- }
- }
-
- return apis
-
- function handleError (err, callback) {
- if (callback) return callback(err, result)
- return Promise.reject(err)
- }
-}
-
-// It's unlikely that a user needs all of our APIs,
-// and since require is a sync operation that takes time
-// (given the amount of APIs we have), let's lazy load them,
-// so a given API file will be required only
-// if the user actually needs that API.
-// The following implementation takes advantage
-// of js closures to have a simple cache with the least overhead.
-function lazyLoad (file, opts) {
- var fn = null
- return function _lazyLoad (params, options, callback) {
- if (fn === null) {
- fn = require(`./api/${file}.js`)(opts)
- }
- return fn(params, options, callback)
- }
-}
-
-module.exports = ESAPI
diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts
deleted file mode 100644
index 755fddf88..000000000
--- a/api/requestParams.d.ts
+++ /dev/null
@@ -1,2021 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-export interface Generic {
- method?: string;
- ignore?: number | number[];
- filter_path?: string | string[];
- pretty?: boolean;
- human?: boolean;
- error_trace?: boolean;
- source?: string;
-}
-
-export interface Bulk extends Generic {
- index?: string;
- type?: string;
- wait_for_active_shards?: string;
- refresh?: 'true' | 'false' | 'wait_for';
- routing?: string;
- timeout?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- pipeline?: string;
- body: any;
-}
-
-export interface CatAliases extends Generic {
- name?: string | string[];
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatAllocation extends Generic {
- node_id?: string | string[];
- format?: string;
- bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatCount extends Generic {
- index?: string | string[];
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatFielddata extends Generic {
- fields?: string | string[];
- format?: string;
- bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatHealth extends Generic {
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- ts?: boolean;
- v?: boolean;
-}
-
-export interface CatHelp extends Generic {
- help?: boolean;
- s?: string | string[];
-}
-
-export interface CatIndices extends Generic {
- index?: string | string[];
- format?: string;
- bytes?: 'b' | 'k' | 'm' | 'g';
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- health?: 'green' | 'yellow' | 'red';
- help?: boolean;
- pri?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatMaster extends Generic {
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatNodeattrs extends Generic {
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatNodes extends Generic {
- format?: string;
- full_id?: boolean;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatPendingTasks extends Generic {
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatPlugins extends Generic {
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatRecovery extends Generic {
- index?: string | string[];
- format?: string;
- bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatRepositories extends Generic {
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatSegments extends Generic {
- index?: string | string[];
- format?: string;
- bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatShards extends Generic {
- index?: string | string[];
- format?: string;
- bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatSnapshots extends Generic {
- repository?: string | string[];
- format?: string;
- ignore_unavailable?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatTasks extends Generic {
- format?: string;
- node_id?: string | string[];
- actions?: string | string[];
- detailed?: boolean;
- parent_task?: number;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatTemplates extends Generic {
- name?: string;
- format?: string;
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface CatThreadPool extends Generic {
- thread_pool_patterns?: string | string[];
- format?: string;
- size?: '' | 'k' | 'm' | 'g' | 't' | 'p';
- local?: boolean;
- master_timeout?: string;
- h?: string | string[];
- help?: boolean;
- s?: string | string[];
- v?: boolean;
-}
-
-export interface ClearScroll extends Generic {
- scroll_id?: string | string[];
- body?: any;
-}
-
-export interface ClusterAllocationExplain extends Generic {
- include_yes_decisions?: boolean;
- include_disk_info?: boolean;
- body?: any;
-}
-
-export interface ClusterGetSettings extends Generic {
- flat_settings?: boolean;
- master_timeout?: string;
- timeout?: string;
- include_defaults?: boolean;
-}
-
-export interface ClusterHealth extends Generic {
- index?: string | string[];
- level?: 'cluster' | 'indices' | 'shards';
- local?: boolean;
- master_timeout?: string;
- timeout?: string;
- wait_for_active_shards?: string;
- wait_for_nodes?: string;
- wait_for_events?: 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid';
- wait_for_no_relocating_shards?: boolean;
- wait_for_no_initializing_shards?: boolean;
- wait_for_status?: 'green' | 'yellow' | 'red';
-}
-
-export interface ClusterPendingTasks extends Generic {
- local?: boolean;
- master_timeout?: string;
-}
-
-export interface ClusterPutSettings extends Generic {
- flat_settings?: boolean;
- master_timeout?: string;
- timeout?: string;
- body: any;
-}
-
-export interface ClusterRemoteInfo extends Generic {
-}
-
-export interface ClusterReroute extends Generic {
- dry_run?: boolean;
- explain?: boolean;
- retry_failed?: boolean;
- metric?: string | string[];
- master_timeout?: string;
- timeout?: string;
- body?: any;
-}
-
-export interface ClusterState extends Generic {
- index?: string | string[];
- metric?: string | string[];
- local?: boolean;
- master_timeout?: string;
- flat_settings?: boolean;
- wait_for_metadata_version?: number;
- wait_for_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface ClusterStats extends Generic {
- node_id?: string | string[];
- flat_settings?: boolean;
- timeout?: string;
-}
-
-export interface Count extends Generic {
- index?: string | string[];
- type?: string | string[];
- ignore_unavailable?: boolean;
- ignore_throttled?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- min_score?: number;
- preference?: string;
- routing?: string | string[];
- q?: string;
- analyzer?: string;
- analyze_wildcard?: boolean;
- default_operator?: 'AND' | 'OR';
- df?: string;
- lenient?: boolean;
- terminate_after?: number;
- body?: any;
-}
-
-export interface Create extends Generic {
- id: string;
- index: string;
- type?: string;
- wait_for_active_shards?: string;
- parent?: string;
- refresh?: 'true' | 'false' | 'wait_for';
- routing?: string;
- timeout?: string;
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
- pipeline?: string;
- body: any;
-}
-
-export interface Delete extends Generic {
- id: string;
- index: string;
- type?: string;
- wait_for_active_shards?: string;
- parent?: string;
- refresh?: 'true' | 'false' | 'wait_for';
- routing?: string;
- timeout?: string;
- if_seq_no?: number;
- if_primary_term?: number;
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
-}
-
-export interface DeleteByQuery extends Generic {
- index: string | string[];
- type?: string | string[];
- analyzer?: string;
- analyze_wildcard?: boolean;
- default_operator?: 'AND' | 'OR';
- df?: string;
- from?: number;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- conflicts?: 'abort' | 'proceed';
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- lenient?: boolean;
- preference?: string;
- q?: string;
- routing?: string | string[];
- scroll?: string;
- search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
- search_timeout?: string;
- size?: number;
- sort?: string | string[];
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- terminate_after?: number;
- stats?: string | string[];
- version?: boolean;
- request_cache?: boolean;
- refresh?: boolean;
- timeout?: string;
- wait_for_active_shards?: string;
- scroll_size?: number;
- wait_for_completion?: boolean;
- requests_per_second?: number;
- slices?: number;
- body: any;
-}
-
-export interface DeleteByQueryRethrottle extends Generic {
- task_id: string;
- requests_per_second: number;
-}
-
-export interface DeleteScript extends Generic {
- id: string;
- timeout?: string;
- master_timeout?: string;
-}
-
-export interface Exists extends Generic {
- id: string;
- index: string;
- type?: string;
- stored_fields?: string | string[];
- parent?: string;
- preference?: string;
- realtime?: boolean;
- refresh?: boolean;
- routing?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
-}
-
-export interface ExistsSource extends Generic {
- id: string;
- index: string;
- type?: string;
- parent?: string;
- preference?: string;
- realtime?: boolean;
- refresh?: boolean;
- routing?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
-}
-
-export interface Explain extends Generic {
- id: string;
- index: string;
- type?: string;
- analyze_wildcard?: boolean;
- analyzer?: string;
- default_operator?: 'AND' | 'OR';
- df?: string;
- stored_fields?: string | string[];
- lenient?: boolean;
- parent?: string;
- preference?: string;
- q?: string;
- routing?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- body?: any;
-}
-
-export interface FieldCaps extends Generic {
- index?: string | string[];
- fields?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface Get extends Generic {
- id: string;
- index: string;
- type?: string;
- stored_fields?: string | string[];
- parent?: string;
- preference?: string;
- realtime?: boolean;
- refresh?: boolean;
- routing?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- _source_exclude?: string | string[];
- _source_include?: string | string[];
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
-}
-
-export interface GetScript extends Generic {
- id: string;
- master_timeout?: string;
-}
-
-export interface GetSource extends Generic {
- id: string;
- index: string;
- type?: string;
- parent?: string;
- preference?: string;
- realtime?: boolean;
- refresh?: boolean;
- routing?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
-}
-
-export interface Index extends Generic {
- id?: string;
- index: string;
- type?: string;
- wait_for_active_shards?: string;
- op_type?: 'index' | 'create';
- parent?: string;
- refresh?: 'true' | 'false' | 'wait_for';
- routing?: string;
- timeout?: string;
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
- if_seq_no?: number;
- if_primary_term?: number;
- pipeline?: string;
- body: any;
-}
-
-export interface IndicesAnalyze extends Generic {
- index?: string;
- body?: any;
-}
-
-export interface IndicesClearCache extends Generic {
- index?: string | string[];
- fielddata?: boolean;
- fields?: string | string[];
- query?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- request?: boolean;
-}
-
-export interface IndicesClose extends Generic {
- index: string | string[];
- timeout?: string;
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesCreate extends Generic {
- index: string;
- include_type_name?: boolean;
- wait_for_active_shards?: string;
- timeout?: string;
- master_timeout?: string;
- body?: any;
-}
-
-export interface IndicesDelete extends Generic {
- index: string | string[];
- timeout?: string;
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesDeleteAlias extends Generic {
- index: string | string[];
- name: string | string[];
- timeout?: string;
- master_timeout?: string;
-}
-
-export interface IndicesDeleteTemplate extends Generic {
- name: string;
- timeout?: string;
- master_timeout?: string;
-}
-
-export interface IndicesExists extends Generic {
- index: string | string[];
- local?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- flat_settings?: boolean;
- include_defaults?: boolean;
-}
-
-export interface IndicesExistsAlias extends Generic {
- index?: string | string[];
- name: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- local?: boolean;
-}
-
-export interface IndicesExistsTemplate extends Generic {
- name: string | string[];
- flat_settings?: boolean;
- master_timeout?: string;
- local?: boolean;
-}
-
-export interface IndicesExistsType extends Generic {
- index: string | string[];
- type: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- local?: boolean;
-}
-
-export interface IndicesFlush extends Generic {
- index?: string | string[];
- force?: boolean;
- wait_if_ongoing?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesFlushSynced extends Generic {
- index?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesForcemerge extends Generic {
- index?: string | string[];
- flush?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- max_num_segments?: number;
- only_expunge_deletes?: boolean;
-}
-
-export interface IndicesGet extends Generic {
- index: string | string[];
- include_type_name?: boolean;
- local?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- flat_settings?: boolean;
- include_defaults?: boolean;
- master_timeout?: string;
-}
-
-export interface IndicesGetAlias extends Generic {
- index?: string | string[];
- name?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- local?: boolean;
-}
-
-export interface IndicesGetFieldMapping extends Generic {
- index?: string | string[];
- type?: string | string[];
- fields: string | string[];
- include_type_name?: boolean;
- include_defaults?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- local?: boolean;
-}
-
-export interface IndicesGetMapping extends Generic {
- index?: string | string[];
- type?: string | string[];
- include_type_name?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- master_timeout?: string;
- local?: boolean;
-}
-
-export interface IndicesGetSettings extends Generic {
- index?: string | string[];
- name?: string | string[];
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- flat_settings?: boolean;
- local?: boolean;
- include_defaults?: boolean;
-}
-
-export interface IndicesGetTemplate extends Generic {
- name?: string | string[];
- include_type_name?: boolean;
- flat_settings?: boolean;
- master_timeout?: string;
- local?: boolean;
-}
-
-export interface IndicesGetUpgrade extends Generic {
- index?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesOpen extends Generic {
- index: string | string[];
- timeout?: string;
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- wait_for_active_shards?: string;
-}
-
-export interface IndicesPutAlias extends Generic {
- index: string | string[];
- name: string;
- timeout?: string;
- master_timeout?: string;
- body?: any;
-}
-
-export interface IndicesPutMapping extends Generic {
- index?: string | string[];
- type?: string;
- include_type_name?: boolean;
- timeout?: string;
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- body: any;
-}
-
-export interface IndicesPutSettings extends Generic {
- index?: string | string[];
- master_timeout?: string;
- timeout?: string;
- preserve_existing?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- flat_settings?: boolean;
- body: any;
-}
-
-export interface IndicesPutTemplate extends Generic {
- name: string;
- include_type_name?: boolean;
- order?: number;
- create?: boolean;
- timeout?: string;
- master_timeout?: string;
- flat_settings?: boolean;
- body: any;
-}
-
-export interface IndicesRecovery extends Generic {
- index?: string | string[];
- detailed?: boolean;
- active_only?: boolean;
-}
-
-export interface IndicesRefresh extends Generic {
- index?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesRollover extends Generic {
- alias: string;
- new_index?: string;
- include_type_name?: boolean;
- timeout?: string;
- dry_run?: boolean;
- master_timeout?: string;
- wait_for_active_shards?: string;
- body?: any;
-}
-
-export interface IndicesSegments extends Generic {
- index?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- verbose?: boolean;
-}
-
-export interface IndicesShardStores extends Generic {
- index?: string | string[];
- status?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface IndicesShrink extends Generic {
- index: string;
- target: string;
- copy_settings?: boolean;
- timeout?: string;
- master_timeout?: string;
- wait_for_active_shards?: string;
- body?: any;
-}
-
-export interface IndicesSplit extends Generic {
- index: string;
- target: string;
- copy_settings?: boolean;
- timeout?: string;
- master_timeout?: string;
- wait_for_active_shards?: string;
- body?: any;
-}
-
-export interface IndicesStats extends Generic {
- index?: string | string[];
- metric?: string | string[];
- completion_fields?: string | string[];
- fielddata_fields?: string | string[];
- fields?: string | string[];
- groups?: string | string[];
- level?: 'cluster' | 'indices' | 'shards';
- types?: string | string[];
- include_segment_file_sizes?: boolean;
-}
-
-export interface IndicesUpdateAliases extends Generic {
- timeout?: string;
- master_timeout?: string;
- body: any;
-}
-
-export interface IndicesUpgrade extends Generic {
- index?: string | string[];
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- ignore_unavailable?: boolean;
- wait_for_completion?: boolean;
- only_ancient_segments?: boolean;
-}
-
-export interface IndicesValidateQuery extends Generic {
- index?: string | string[];
- type?: string | string[];
- explain?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- q?: string;
- analyzer?: string;
- analyze_wildcard?: boolean;
- default_operator?: 'AND' | 'OR';
- df?: string;
- lenient?: boolean;
- rewrite?: boolean;
- all_shards?: boolean;
- body?: any;
-}
-
-export interface Info extends Generic {
-}
-
-export interface IngestDeletePipeline extends Generic {
- id: string;
- master_timeout?: string;
- timeout?: string;
-}
-
-export interface IngestGetPipeline extends Generic {
- id?: string;
- master_timeout?: string;
-}
-
-export interface IngestProcessorGrok extends Generic {
-}
-
-export interface IngestPutPipeline extends Generic {
- id: string;
- master_timeout?: string;
- timeout?: string;
- body: any;
-}
-
-export interface IngestSimulate extends Generic {
- id?: string;
- verbose?: boolean;
- body: any;
-}
-
-export interface Mget extends Generic {
- index?: string;
- type?: string;
- stored_fields?: string | string[];
- preference?: string;
- realtime?: boolean;
- refresh?: boolean;
- routing?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- body: any;
-}
-
-export interface Msearch extends Generic {
- index?: string | string[];
- type?: string | string[];
- search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
- max_concurrent_searches?: number;
- typed_keys?: boolean;
- pre_filter_shard_size?: number;
- max_concurrent_shard_requests?: number;
- rest_total_hits_as_int?: boolean;
- ccs_minimize_roundtrips?: boolean;
- body: any;
-}
-
-export interface MsearchTemplate extends Generic {
- index?: string | string[];
- type?: string | string[];
- search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
- typed_keys?: boolean;
- max_concurrent_searches?: number;
- rest_total_hits_as_int?: boolean;
- ccs_minimize_roundtrips?: boolean;
- body: any;
-}
-
-export interface Mtermvectors extends Generic {
- index?: string;
- type?: string;
- ids?: string | string[];
- term_statistics?: boolean;
- field_statistics?: boolean;
- fields?: string | string[];
- offsets?: boolean;
- positions?: boolean;
- payloads?: boolean;
- preference?: string;
- routing?: string;
- parent?: string;
- realtime?: boolean;
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
- body?: any;
-}
-
-export interface NodesHotThreads extends Generic {
- node_id?: string | string[];
- interval?: string;
- snapshots?: number;
- threads?: number;
- ignore_idle_threads?: boolean;
- type?: 'cpu' | 'wait' | 'block';
- timeout?: string;
-}
-
-export interface NodesInfo extends Generic {
- node_id?: string | string[];
- metric?: string | string[];
- flat_settings?: boolean;
- timeout?: string;
-}
-
-export interface NodesReloadSecureSettings extends Generic {
- node_id?: string | string[];
- timeout?: string;
-}
-
-export interface NodesStats extends Generic {
- metric?: string | string[];
- index_metric?: string | string[];
- node_id?: string | string[];
- completion_fields?: string | string[];
- fielddata_fields?: string | string[];
- fields?: string | string[];
- groups?: boolean;
- level?: 'indices' | 'node' | 'shards';
- types?: string | string[];
- timeout?: string;
- include_segment_file_sizes?: boolean;
-}
-
-export interface NodesUsage extends Generic {
- metric?: string | string[];
- node_id?: string | string[];
- timeout?: string;
-}
-
-export interface Ping extends Generic {
-}
-
-export interface PutScript extends Generic {
- id: string;
- context?: string;
- timeout?: string;
- master_timeout?: string;
- body: any;
-}
-
-export interface RankEval extends Generic {
- index?: string | string[];
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- body: any;
-}
-
-export interface Reindex extends Generic {
- refresh?: boolean;
- timeout?: string;
- wait_for_active_shards?: string;
- wait_for_completion?: boolean;
- requests_per_second?: number;
- slices?: number;
- body: any;
-}
-
-export interface ReindexRethrottle extends Generic {
- task_id: string;
- requests_per_second: number;
-}
-
-export interface RenderSearchTemplate extends Generic {
- id?: string;
- body?: any;
-}
-
-export interface ScriptsPainlessExecute extends Generic {
- body?: any;
-}
-
-export interface Scroll extends Generic {
- scroll_id?: string;
- scroll?: string;
- rest_total_hits_as_int?: boolean;
- body?: any;
-}
-
-export interface Search extends Generic {
- index?: string | string[];
- type?: string | string[];
- analyzer?: string;
- analyze_wildcard?: boolean;
- ccs_minimize_roundtrips?: boolean;
- default_operator?: 'AND' | 'OR';
- df?: string;
- explain?: boolean;
- stored_fields?: string | string[];
- docvalue_fields?: string | string[];
- from?: number;
- ignore_unavailable?: boolean;
- ignore_throttled?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- lenient?: boolean;
- preference?: string;
- q?: string;
- routing?: string | string[];
- scroll?: string;
- search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
- size?: number;
- sort?: string | string[];
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- terminate_after?: number;
- stats?: string | string[];
- suggest_field?: string;
- suggest_mode?: 'missing' | 'popular' | 'always';
- suggest_size?: number;
- suggest_text?: string;
- timeout?: string;
- track_scores?: boolean;
- track_total_hits?: boolean;
- allow_partial_search_results?: boolean;
- typed_keys?: boolean;
- version?: boolean;
- seq_no_primary_term?: boolean;
- request_cache?: boolean;
- batched_reduce_size?: number;
- max_concurrent_shard_requests?: number;
- pre_filter_shard_size?: number;
- rest_total_hits_as_int?: boolean;
- body?: any;
-}
-
-export interface SearchShards extends Generic {
- index?: string | string[];
- preference?: string;
- routing?: string;
- local?: boolean;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
-}
-
-export interface SearchTemplate extends Generic {
- index?: string | string[];
- type?: string | string[];
- ignore_unavailable?: boolean;
- ignore_throttled?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- preference?: string;
- routing?: string | string[];
- scroll?: string;
- search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
- explain?: boolean;
- profile?: boolean;
- typed_keys?: boolean;
- rest_total_hits_as_int?: boolean;
- ccs_minimize_roundtrips?: boolean;
- body: any;
-}
-
-export interface SnapshotCreate extends Generic {
- repository: string;
- snapshot: string;
- master_timeout?: string;
- wait_for_completion?: boolean;
- body?: any;
-}
-
-export interface SnapshotCreateRepository extends Generic {
- repository: string;
- master_timeout?: string;
- timeout?: string;
- verify?: boolean;
- body: any;
-}
-
-export interface SnapshotDelete extends Generic {
- repository: string;
- snapshot: string;
- master_timeout?: string;
-}
-
-export interface SnapshotDeleteRepository extends Generic {
- repository: string | string[];
- master_timeout?: string;
- timeout?: string;
-}
-
-export interface SnapshotGet extends Generic {
- repository: string;
- snapshot: string | string[];
- master_timeout?: string;
- ignore_unavailable?: boolean;
- verbose?: boolean;
-}
-
-export interface SnapshotGetRepository extends Generic {
- repository?: string | string[];
- master_timeout?: string;
- local?: boolean;
-}
-
-export interface SnapshotRestore extends Generic {
- repository: string;
- snapshot: string;
- master_timeout?: string;
- wait_for_completion?: boolean;
- body?: any;
-}
-
-export interface SnapshotStatus extends Generic {
- repository?: string;
- snapshot?: string | string[];
- master_timeout?: string;
- ignore_unavailable?: boolean;
-}
-
-export interface SnapshotVerifyRepository extends Generic {
- repository: string;
- master_timeout?: string;
- timeout?: string;
-}
-
-export interface TasksCancel extends Generic {
- task_id?: string;
- nodes?: string | string[];
- actions?: string | string[];
- parent_task_id?: string;
-}
-
-export interface TasksGet extends Generic {
- task_id: string;
- wait_for_completion?: boolean;
- timeout?: string;
-}
-
-export interface TasksList extends Generic {
- nodes?: string | string[];
- actions?: string | string[];
- detailed?: boolean;
- parent_task_id?: string;
- wait_for_completion?: boolean;
- group_by?: 'nodes' | 'parents' | 'none';
- timeout?: string;
-}
-
-export interface Termvectors extends Generic {
- index: string;
- type?: string;
- id?: string;
- term_statistics?: boolean;
- field_statistics?: boolean;
- fields?: string | string[];
- offsets?: boolean;
- positions?: boolean;
- payloads?: boolean;
- preference?: string;
- routing?: string;
- parent?: string;
- realtime?: boolean;
- version?: number;
- version_type?: 'internal' | 'external' | 'external_gte' | 'force';
- body?: any;
-}
-
-export interface Update extends Generic {
- id: string;
- index: string;
- type?: string;
- wait_for_active_shards?: string;
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- lang?: string;
- parent?: string;
- refresh?: 'true' | 'false' | 'wait_for';
- retry_on_conflict?: number;
- routing?: string;
- timeout?: string;
- if_seq_no?: number;
- if_primary_term?: number;
- body: any;
-}
-
-export interface UpdateByQuery extends Generic {
- index: string | string[];
- type?: string | string[];
- analyzer?: string;
- analyze_wildcard?: boolean;
- default_operator?: 'AND' | 'OR';
- df?: string;
- from?: number;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- conflicts?: 'abort' | 'proceed';
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- lenient?: boolean;
- pipeline?: string;
- preference?: string;
- q?: string;
- routing?: string | string[];
- scroll?: string;
- search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
- search_timeout?: string;
- size?: number;
- sort?: string | string[];
- _source?: string | string[];
- _source_excludes?: string | string[];
- _source_includes?: string | string[];
- terminate_after?: number;
- stats?: string | string[];
- version?: boolean;
- version_type?: boolean;
- request_cache?: boolean;
- refresh?: boolean;
- timeout?: string;
- wait_for_active_shards?: string;
- scroll_size?: number;
- wait_for_completion?: boolean;
- requests_per_second?: number;
- slices?: number;
- body?: any;
-}
-
-export interface UpdateByQueryRethrottle extends Generic {
- task_id: string;
- requests_per_second: number;
-}
-
-export interface CcrDeleteAutoFollowPattern extends Generic {
- name: string;
-}
-
-export interface CcrFollow extends Generic {
- index: string;
- wait_for_active_shards?: string;
- body: any;
-}
-
-export interface CcrFollowInfo extends Generic {
- index?: string | string[];
-}
-
-export interface CcrFollowStats extends Generic {
- index?: string | string[];
-}
-
-export interface CcrGetAutoFollowPattern extends Generic {
- name?: string;
-}
-
-export interface CcrPauseFollow extends Generic {
- index: string;
-}
-
-export interface CcrPutAutoFollowPattern extends Generic {
- name: string;
- body: any;
-}
-
-export interface CcrResumeFollow extends Generic {
- index: string;
- body?: any;
-}
-
-export interface CcrStats extends Generic {
-}
-
-export interface CcrUnfollow extends Generic {
- index: string;
-}
-
-export interface IlmDeleteLifecycle extends Generic {
- policy?: string;
-}
-
-export interface IlmExplainLifecycle extends Generic {
- index?: string;
- human?: boolean;
-}
-
-export interface IlmGetLifecycle extends Generic {
- policy?: string;
-}
-
-export interface IlmGetStatus extends Generic {
-}
-
-export interface IlmMoveToStep extends Generic {
- index?: string;
- body?: any;
-}
-
-export interface IlmPutLifecycle extends Generic {
- policy?: string;
- body?: any;
-}
-
-export interface IlmRemovePolicy extends Generic {
- index?: string;
-}
-
-export interface IlmRetry extends Generic {
- index?: string;
-}
-
-export interface IlmStart extends Generic {
-}
-
-export interface IlmStop extends Generic {
-}
-
-export interface IndicesFreeze extends Generic {
- index: string;
- timeout?: string;
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- wait_for_active_shards?: string;
-}
-
-export interface IndicesUnfreeze extends Generic {
- index: string;
- timeout?: string;
- master_timeout?: string;
- ignore_unavailable?: boolean;
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- wait_for_active_shards?: string;
-}
-
-export interface MlCloseJob extends Generic {
- job_id: string;
- allow_no_jobs?: boolean;
- force?: boolean;
- timeout?: string;
- body?: any;
-}
-
-export interface MlDeleteCalendar extends Generic {
- calendar_id: string;
-}
-
-export interface MlDeleteCalendarEvent extends Generic {
- calendar_id: string;
- event_id: string;
-}
-
-export interface MlDeleteCalendarJob extends Generic {
- calendar_id: string;
- job_id: string;
-}
-
-export interface MlDeleteDatafeed extends Generic {
- datafeed_id: string;
- force?: boolean;
-}
-
-export interface MlDeleteExpiredData extends Generic {
-}
-
-export interface MlDeleteFilter extends Generic {
- filter_id: string;
-}
-
-export interface MlDeleteForecast extends Generic {
- job_id: string;
- forecast_id?: string;
- allow_no_forecasts?: boolean;
- timeout?: string;
-}
-
-export interface MlDeleteJob extends Generic {
- job_id: string;
- force?: boolean;
- wait_for_completion?: boolean;
-}
-
-export interface MlDeleteModelSnapshot extends Generic {
- job_id: string;
- snapshot_id: string;
-}
-
-export interface MlFindFileStructure extends Generic {
- lines_to_sample?: number;
- timeout?: string;
- charset?: string;
- format?: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text';
- has_header_row?: boolean;
- column_names?: string | string[];
- delimiter?: string;
- quote?: string;
- should_trim_fields?: boolean;
- grok_pattern?: string;
- timestamp_field?: string;
- timestamp_format?: string;
- explain?: boolean;
- body: any;
-}
-
-export interface MlFlushJob extends Generic {
- job_id: string;
- calc_interim?: boolean;
- start?: string;
- end?: string;
- advance_time?: string;
- skip_time?: string;
- body?: any;
-}
-
-export interface MlForecast extends Generic {
- job_id: string;
- duration?: string;
- expires_in?: string;
-}
-
-export interface MlGetBuckets extends Generic {
- job_id: string;
- timestamp?: string;
- expand?: boolean;
- exclude_interim?: boolean;
- from?: number;
- size?: number;
- start?: string;
- end?: string;
- anomaly_score?: number;
- sort?: string;
- desc?: boolean;
- body?: any;
-}
-
-export interface MlGetCalendarEvents extends Generic {
- calendar_id: string;
- job_id?: string;
- start?: string;
- end?: string;
- from?: number;
- size?: number;
-}
-
-export interface MlGetCalendars extends Generic {
- calendar_id?: string;
- from?: number;
- size?: number;
-}
-
-export interface MlGetCategories extends Generic {
- job_id: string;
- category_id?: number;
- from?: number;
- size?: number;
- body?: any;
-}
-
-export interface MlGetDatafeedStats extends Generic {
- datafeed_id?: string;
- allow_no_datafeeds?: boolean;
-}
-
-export interface MlGetDatafeeds extends Generic {
- datafeed_id?: string;
- allow_no_datafeeds?: boolean;
-}
-
-export interface MlGetFilters extends Generic {
- filter_id?: string;
- from?: number;
- size?: number;
-}
-
-export interface MlGetInfluencers extends Generic {
- job_id: string;
- exclude_interim?: boolean;
- from?: number;
- size?: number;
- start?: string;
- end?: string;
- influencer_score?: number;
- sort?: string;
- desc?: boolean;
- body?: any;
-}
-
-export interface MlGetJobStats extends Generic {
- job_id?: string;
- allow_no_jobs?: boolean;
-}
-
-export interface MlGetJobs extends Generic {
- job_id?: string;
- allow_no_jobs?: boolean;
-}
-
-export interface MlGetModelSnapshots extends Generic {
- job_id: string;
- snapshot_id?: string;
- from?: number;
- size?: number;
- start?: string;
- end?: string;
- sort?: string;
- desc?: boolean;
- body?: any;
-}
-
-export interface MlGetOverallBuckets extends Generic {
- job_id: string;
- top_n?: number;
- bucket_span?: string;
- overall_score?: number;
- exclude_interim?: boolean;
- start?: string;
- end?: string;
- allow_no_jobs?: boolean;
- body?: any;
-}
-
-export interface MlGetRecords extends Generic {
- job_id: string;
- exclude_interim?: boolean;
- from?: number;
- size?: number;
- start?: string;
- end?: string;
- record_score?: number;
- sort?: string;
- desc?: boolean;
- body?: any;
-}
-
-export interface MlInfo extends Generic {
-}
-
-export interface MlOpenJob extends Generic {
- job_id: string;
- ignore_downtime?: boolean;
- timeout?: string;
-}
-
-export interface MlPostCalendarEvents extends Generic {
- calendar_id: string;
- body: any;
-}
-
-export interface MlPostData extends Generic {
- job_id: string;
- reset_start?: string;
- reset_end?: string;
- body: any;
-}
-
-export interface MlPreviewDatafeed extends Generic {
- datafeed_id: string;
-}
-
-export interface MlPutCalendar extends Generic {
- calendar_id: string;
- body?: any;
-}
-
-export interface MlPutCalendarJob extends Generic {
- calendar_id: string;
- job_id: string;
-}
-
-export interface MlPutDatafeed extends Generic {
- datafeed_id: string;
- body: any;
-}
-
-export interface MlPutFilter extends Generic {
- filter_id: string;
- body: any;
-}
-
-export interface MlPutJob extends Generic {
- job_id: string;
- body: any;
-}
-
-export interface MlRevertModelSnapshot extends Generic {
- job_id: string;
- snapshot_id: string;
- delete_intervening_results?: boolean;
- body?: any;
-}
-
-export interface MlSetUpgradeMode extends Generic {
- enabled?: boolean;
- timeout?: string;
-}
-
-export interface MlStartDatafeed extends Generic {
- datafeed_id: string;
- start?: string;
- end?: string;
- timeout?: string;
- body?: any;
-}
-
-export interface MlStopDatafeed extends Generic {
- datafeed_id: string;
- allow_no_datafeeds?: boolean;
- force?: boolean;
- timeout?: string;
-}
-
-export interface MlUpdateDatafeed extends Generic {
- datafeed_id: string;
- body: any;
-}
-
-export interface MlUpdateFilter extends Generic {
- filter_id: string;
- body: any;
-}
-
-export interface MlUpdateJob extends Generic {
- job_id: string;
- body: any;
-}
-
-export interface MlUpdateModelSnapshot extends Generic {
- job_id: string;
- snapshot_id: string;
- body: any;
-}
-
-export interface MlValidate extends Generic {
- body: any;
-}
-
-export interface MlValidateDetector extends Generic {
- body: any;
-}
-
-export interface MonitoringBulk extends Generic {
- type?: string;
- system_id?: string;
- system_api_version?: string;
- interval?: string;
- body: any;
-}
-
-export interface SecurityAuthenticate extends Generic {
-}
-
-export interface SecurityChangePassword extends Generic {
- username?: string;
- refresh?: 'true' | 'false' | 'wait_for';
- body: any;
-}
-
-export interface SecurityClearCachedRealms extends Generic {
- realms: string | string[];
- usernames?: string | string[];
-}
-
-export interface SecurityClearCachedRoles extends Generic {
- name: string | string[];
-}
-
-export interface SecurityCreateApiKey extends Generic {
- refresh?: 'true' | 'false' | 'wait_for';
- body: any;
-}
-
-export interface SecurityDeletePrivileges extends Generic {
- application: string;
- name: string;
- refresh?: 'true' | 'false' | 'wait_for';
-}
-
-export interface SecurityDeleteRole extends Generic {
- name: string;
- refresh?: 'true' | 'false' | 'wait_for';
-}
-
-export interface SecurityDeleteRoleMapping extends Generic {
- name: string;
- refresh?: 'true' | 'false' | 'wait_for';
-}
-
-export interface SecurityDeleteUser extends Generic {
- username: string;
- refresh?: 'true' | 'false' | 'wait_for';
-}
-
-export interface SecurityDisableUser extends Generic {
- username?: string;
- refresh?: 'true' | 'false' | 'wait_for';
-}
-
-export interface SecurityEnableUser extends Generic {
- username?: string;
- refresh?: 'true' | 'false' | 'wait_for';
-}
-
-export interface SecurityGetApiKey extends Generic {
- id?: string;
- name?: string;
- username?: string;
- realm_name?: string;
-}
-
-export interface SecurityGetPrivileges extends Generic {
- application?: string;
- name?: string;
-}
-
-export interface SecurityGetRole extends Generic {
- name?: string;
-}
-
-export interface SecurityGetRoleMapping extends Generic {
- name?: string;
-}
-
-export interface SecurityGetToken extends Generic {
- body: any;
-}
-
-export interface SecurityGetUser extends Generic {
- username?: string | string[];
-}
-
-export interface SecurityGetUserPrivileges extends Generic {
-}
-
-export interface SecurityHasPrivileges extends Generic {
- user?: string;
- body: any;
-}
-
-export interface SecurityInvalidateApiKey extends Generic {
- body: any;
-}
-
-export interface SecurityInvalidateToken extends Generic {
- body: any;
-}
-
-export interface SecurityPutPrivileges extends Generic {
- refresh?: 'true' | 'false' | 'wait_for';
- body: any;
-}
-
-export interface SecurityPutRole extends Generic {
- name: string;
- refresh?: 'true' | 'false' | 'wait_for';
- body: any;
-}
-
-export interface SecurityPutRoleMapping extends Generic {
- name: string;
- refresh?: 'true' | 'false' | 'wait_for';
- body: any;
-}
-
-export interface SecurityPutUser extends Generic {
- username: string;
- refresh?: 'true' | 'false' | 'wait_for';
- body: any;
-}
-
-export interface SslCertificates extends Generic {
-}
-
-export interface XpackGraphExplore extends Generic {
- index?: string | string[];
- type?: string | string[];
- routing?: string;
- timeout?: string;
- body?: any;
-}
-
-export interface XpackInfo extends Generic {
- categories?: string | string[];
-}
-
-export interface XpackLicenseDelete extends Generic {
-}
-
-export interface XpackLicenseGet extends Generic {
- local?: boolean;
-}
-
-export interface XpackLicenseGetBasicStatus extends Generic {
-}
-
-export interface XpackLicenseGetTrialStatus extends Generic {
-}
-
-export interface XpackLicensePost extends Generic {
- acknowledge?: boolean;
- body?: any;
-}
-
-export interface XpackLicensePostStartBasic extends Generic {
- acknowledge?: boolean;
-}
-
-export interface XpackLicensePostStartTrial extends Generic {
- type?: string;
- acknowledge?: boolean;
-}
-
-export interface XpackMigrationDeprecations extends Generic {
- index?: string;
-}
-
-export interface XpackMigrationGetAssistance extends Generic {
- index?: string | string[];
- allow_no_indices?: boolean;
- expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
- ignore_unavailable?: boolean;
-}
-
-export interface XpackMigrationUpgrade extends Generic {
- index: string;
- wait_for_completion?: boolean;
-}
-
-export interface XpackRollupDeleteJob extends Generic {
- id: string;
-}
-
-export interface XpackRollupGetJobs extends Generic {
- id?: string;
-}
-
-export interface XpackRollupGetRollupCaps extends Generic {
- id?: string;
-}
-
-export interface XpackRollupGetRollupIndexCaps extends Generic {
- index: string;
-}
-
-export interface XpackRollupPutJob extends Generic {
- id: string;
- body: any;
-}
-
-export interface XpackRollupRollupSearch extends Generic {
- index: string;
- type?: string;
- typed_keys?: boolean;
- rest_total_hits_as_int?: boolean;
- body: any;
-}
-
-export interface XpackRollupStartJob extends Generic {
- id: string;
-}
-
-export interface XpackRollupStopJob extends Generic {
- id: string;
- wait_for_completion?: boolean;
- timeout?: string;
-}
-
-export interface XpackSqlClearCursor extends Generic {
- body: any;
-}
-
-export interface XpackSqlQuery extends Generic {
- format?: string;
- body: any;
-}
-
-export interface XpackSqlTranslate extends Generic {
- body: any;
-}
-
-export interface XpackUsage extends Generic {
- master_timeout?: string;
-}
-
-export interface XpackWatcherAckWatch extends Generic {
- watch_id: string;
- action_id?: string | string[];
-}
-
-export interface XpackWatcherActivateWatch extends Generic {
- watch_id: string;
-}
-
-export interface XpackWatcherDeactivateWatch extends Generic {
- watch_id: string;
-}
-
-export interface XpackWatcherDeleteWatch extends Generic {
- id: string;
-}
-
-export interface XpackWatcherExecuteWatch extends Generic {
- id?: string;
- debug?: boolean;
- body?: any;
-}
-
-export interface XpackWatcherGetWatch extends Generic {
- id: string;
-}
-
-export interface XpackWatcherPutWatch extends Generic {
- id: string;
- active?: boolean;
- version?: number;
- if_seq_no?: number;
- if_primary_term?: number;
- body?: any;
-}
-
-export interface XpackWatcherStart extends Generic {
-}
-
-export interface XpackWatcherStats extends Generic {
- metric?: '_all' | 'queued_watches' | 'current_watches' | 'pending_watches';
- emit_stacktraces?: boolean;
-}
-
-export interface XpackWatcherStop extends Generic {
-}
diff --git a/catalog-info.yaml b/catalog-info.yaml
new file mode 100644
index 000000000..80d0514aa
--- /dev/null
+++ b/catalog-info.yaml
@@ -0,0 +1,50 @@
+---
+# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+ name: elasticsearch-js
+spec:
+ type: library
+ owner: group:devtools-team
+ lifecycle: production
+
+---
+# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
+apiVersion: backstage.io/v1alpha1
+kind: Resource
+metadata:
+ name: elasticsearch-js-integration-tests
+ description: elasticsearch-js - integration tests
+spec:
+ type: buildkite-pipeline
+ owner: group:devtools-team
+ system: buildkite
+ implementation:
+ apiVersion: buildkite.elastic.dev/v1
+ kind: Pipeline
+ metadata:
+ name: elasticsearch-js - integration tests
+ spec:
+ repository: elastic/elasticsearch-js
+ pipeline_file: .buildkite/pipeline.yml
+ teams:
+ devtools-team:
+ access_level: MANAGE_BUILD_AND_READ
+ everyone:
+ access_level: READ_ONLY
+ provider_settings:
+ build_pull_requests: false
+ build_branches: false
+ cancel_intermediate_builds: true
+ cancel_intermediate_builds_branch_filter: "!main"
+ schedules:
+ main:
+ branch: "main"
+ cronline: "@daily"
+ 8_x:
+ branch: "8.x"
+ cronline: "@daily"
+ 8_14:
+ branch: "8.16"
+ cronline: "@daily"
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 000000000..fdefc5a9d
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,14 @@
+comment: off
+
+coverage:
+ precision: 2
+ round: down
+ range: "95...100"
+
+ status:
+ project: yes
+ patch: yes
+ changes: no
+
+ignore:
+ - "api"
diff --git a/docs/advanced-config.asciidoc b/docs/advanced-config.asciidoc
new file mode 100644
index 000000000..b3c9388a4
--- /dev/null
+++ b/docs/advanced-config.asciidoc
@@ -0,0 +1,195 @@
+[[advanced-config]]
+=== Advanced configuration
+
+If you need to customize the client behavior heavily, you are in the right
+place! The client enables you to customize the following internals:
+
+* `ConnectionPool` class
+* `Connection` class
+* `Serializer` class
+
+NOTE: For information about the `Transport` class, refer to <>.
+
+
+[discrete]
+==== `ConnectionPool`
+
+This class is responsible for keeping in memory all the {es} Connection that you
+are using. There is a single Connection for every node. The connection pool
+handles the resurrection strategies and the updates of the pool.
+
+[source,js]
+----
+const { Client, ConnectionPool } = require('@elastic/elasticsearch')
+
+class MyConnectionPool extends ConnectionPool {
+ markAlive (connection) {
+ // your code
+ super.markAlive(connection)
+ }
+}
+
+const client = new Client({
+ ConnectionPool: MyConnectionPool,
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+----
+
+
+[discrete]
+==== `Connection`
+
+This class represents a single node, it holds every information we have on the
+node, such as roles, id, URL, custom headers and so on. The actual HTTP request
+is performed here, this means that if you want to swap the default HTTP client
+(Node.js core), you should override the `request` method of this class.
+
+[source,js]
+----
+const { Client, BaseConnection } = require('@elastic/elasticsearch')
+
+class MyConnection extends BaseConnection {
+ request (params, callback) {
+ // your code
+ }
+}
+
+const client = new Client({
+ Connection: MyConnection,
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+----
+
+
+[discrete]
+==== `Serializer`
+
+This class is responsible for the serialization of every request, it offers the
+following methods:
+
+* `serialize(object: any): string;` serializes request objects.
+* `deserialize(json: string): any;` deserializes response strings.
+* `ndserialize(array: any[]): string;` serializes bulk request objects.
+* `qserialize(object: any): string;` serializes request query parameters.
+
+[source,js]
+----
+const { Client, Serializer } = require('@elastic/elasticsearch')
+
+class MySerializer extends Serializer {
+ serialize (object) {
+ // your code
+ }
+}
+
+const client = new Client({
+ Serializer: MySerializer,
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+----
+
+[discrete]
+[[redaction]]
+==== Redaction of potentially sensitive data
+
+When the client raises an `Error` that originated at the HTTP layer, like a `ConnectionError` or `TimeoutError`, a `meta` object is often attached to the error object that includes metadata useful for debugging, like request and response information. Because this can include potentially sensitive data, like authentication secrets in an `Authorization` header, the client takes measures to redact common sources of sensitive data when this metadata is attached and serialized.
+
+If your configuration requires extra headers or other configurations that may include sensitive data, you may want to adjust these settings to account for that.
+
+By default, the `redaction` option is set to `{ type: 'replace' }`, which recursively searches for sensitive key names, case insensitive, and replaces their values with the string `[redacted]`.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+})
+
+try {
+ await client.indices.create({ index: 'my_index' })
+} catch (err) {
+ console.log(err.meta.meta.request.options.headers.authorization) // prints "[redacted]"
+}
+----
+
+If you would like to redact additional properties, you can include additional key names to search and replace:
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ headers: { 'X-My-Secret-Password': 'shhh it's a secret!' },
+ redaction: {
+ type: "replace",
+ additionalKeys: ["x-my-secret-password"]
+ }
+})
+
+try {
+ await client.indices.create({ index: 'my_index' })
+} catch (err) {
+ console.log(err.meta.meta.request.options.headers['X-My-Secret-Password']) // prints "[redacted]"
+}
+----
+
+Alternatively, if you know you're not going to use the metadata at all, setting the redaction type to `remove` will remove all optional sources of potentially sensitive data entirely, or replacing them with `null` for required properties.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ redaction: { type: "remove" }
+})
+
+try {
+ await client.indices.create({ index: 'my_index' })
+} catch (err) {
+ console.log(err.meta.meta.request.options.headers) // undefined
+}
+----
+
+Finally, if you prefer to turn off redaction altogether, perhaps while debugging on a local developer environment, you can set the redaction type to `off`. This will revert the client to pre-8.11.0 behavior, where basic redaction is only performed during common serialization methods like `console.log` and `JSON.stringify`.
+
+WARNING: Setting `redaction.type` to `off` is not recommended in production environments.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ redaction: { type: "off" }
+})
+
+try {
+ await client.indices.create({ index: 'my_index' })
+} catch (err) {
+ console.log(err.meta.meta.request.options.headers.authorization) // the actual header value will be logged
+}
+----
+
+[discrete]
+==== Migrate to v8
+
+The Node.js client can be configured to emit an HTTP header
+`Accept: application/vnd.elasticsearch+json; compatible-with=7`
+which signals to Elasticsearch that the client is requesting
+`7.x` version of request and response bodies. This allows for
+upgrading from 7.x to 8.x version of Elasticsearch without upgrading
+everything at once. Elasticsearch should be upgraded first after
+the compatibility header is configured and clients should be upgraded
+second.
+To enable to setting, configure the environment variable
+`ELASTIC_CLIENT_APIVERSIONING` to `true`.
diff --git a/docs/authentication.asciidoc b/docs/authentication.asciidoc
deleted file mode 100644
index 8a69cb404..000000000
--- a/docs/authentication.asciidoc
+++ /dev/null
@@ -1,69 +0,0 @@
-= Authentication
-
-This document contains code snippets to show you how to connect to various Elasticsearch providers.
-
-== Basic Auth
-
-You can provide your credentials in the node(s) URL.
-
-[source,js]
-----
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({
- node: 'https://username:password@localhost:9200'
-})
-----
-
-Or you can use the full node declaration.
-
-[source,js]
-----
-const { URL } = require('url')
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({
- node: {
- url: new URL('https://username:password@localhost:9200'),
- id: 'node-1',
- ...
- }
-})
-----
-
-== SSL configuration
-
-Without any additional configuration you can specify `https://` node urls, but the certificates used to sign these requests will not verified (`rejectUnauthorized: false`). To turn on certificate verification you must specify an `ssl` object either in the top level config or in each host config object and set `rejectUnauthorized: true`. The ssl config object can contain many of the same configuration options that https://nodejs.org/api/tls.html#tls_tls_connect_options_callback[tls.connect()] accepts.
-
-[source,js]
-----
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({
- node: 'http://username:password@localhost:9200',
- ssl: {
- ca: fs.readFileSync('./cacert.pem'),
- rejectUnauthorized: true
- }
-})
-----
-
-== Elastic Cloud
-
-If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers a easy way to connect to it via the `cloud` option. +
-You must pass the Cloud ID that you can find in the cloud console, then your username and password.
-
-NOTE: When connecting to Elastic Cloud, the client will automatically enable both request and response compression by default, since it yields significant throughput improvements. +
-Moreover, the client will also set the ssl option `secureProtocol` to `TLSv1_2_method` unless specified otherwise.
-You can still override this option by configuring them.
-
-IMPORTANT: Do not enable sniffing when using Elastic Cloud, since the nodes are behind a load balancer, Elastic Cloud will take care of everything for you.
-
-[source,js]
-----
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({
- cloud: {
- id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
- username: 'elastic',
- password: 'changeme'
- }
-})
-----
\ No newline at end of file
diff --git a/docs/basic-config.asciidoc b/docs/basic-config.asciidoc
new file mode 100644
index 000000000..799866f93
--- /dev/null
+++ b/docs/basic-config.asciidoc
@@ -0,0 +1,270 @@
+[[basic-config]]
+=== Basic configuration
+
+This page shows you the possible basic configuration options that the clients
+offers.
+
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ maxRetries: 5,
+ requestTimeout: 60000,
+ sniffOnStart: true
+})
+----
+
+
+[cols=2*]
+|===
+|`node` or `nodes`
+a|The Elasticsearch endpoint to use. +
+It can be a single string or an array of strings:
+[source,js]
+----
+node: 'http://localhost:9200'
+----
+Or it can be an object (or an array of objects) that represents the node:
+[source,js]
+----
+node: {
+ url: new URL('http://localhost:9200'),
+ tls: 'tls options',
+ agent: 'http agent options',
+ id: 'custom node id',
+ headers: { 'custom': 'headers' }
+ roles: {
+ master: true,
+ data: true,
+ ingest: true,
+ ml: false
+ }
+}
+----
+
+|`auth`
+a|Your authentication data. You can use both basic authentication and
+{ref}/security-api-create-api-key.html[ApiKey]. +
+See <> for more details. +
+_Default:_ `null`
+
+Basic authentication:
+[source,js]
+----
+auth: {
+ username: 'elastic',
+ password: 'changeme'
+}
+----
+{ref}/security-api-create-api-key.html[ApiKey] authentication:
+[source,js]
+----
+auth: {
+ apiKey: 'base64EncodedKey'
+}
+----
+Bearer authentication, useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens]. Be aware that it does not handle automatic token refresh:
+[source,js]
+----
+auth: {
+ bearer: 'token'
+}
+----
+
+
+|`maxRetries`
+|`number` - Max number of retries for each request. +
+_Default:_ `3`
+
+|`requestTimeout`
+|`number` - Max request timeout in milliseconds for each request. +
+_Default:_ `30000`
+
+|`pingTimeout`
+|`number` - Max ping request timeout in milliseconds for each request. +
+_Default:_ `3000`
+
+|`sniffInterval`
+|`number, boolean` - Perform a sniff operation every `n` milliseconds. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
+_Default:_ `false`
+
+|`sniffOnStart`
+|`boolean` - Perform a sniff once the client is started. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
+_Default:_ `false`
+
+|`sniffEndpoint`
+|`string` - Endpoint to ping during a sniff. +
+_Default:_ `'_nodes/_all/http'`
+
+|`sniffOnConnectionFault`
+|`boolean` - Perform a sniff on connection fault. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
+_Default:_ `false`
+
+|`resurrectStrategy`
+|`string` - Configure the node resurrection strategy. +
+_Options:_ `'ping'`, `'optimistic'`, `'none'` +
+_Default:_ `'ping'`
+
+|`suggestCompression`
+|`boolean` - Adds `accept-encoding` header to every request. +
+_Default:_ `false`
+
+|`compression`
+|`string, boolean` - Enables gzip request body compression. +
+_Options:_ `'gzip'`, `false` +
+_Default:_ `false`
+
+|`tls`
+|`http.SecureContextOptions` - tls https://nodejs.org/api/tls.html[configuraton]. +
+_Default:_ `null`
+
+|`proxy`
+a|`string, URL` - If you are using an http(s) proxy, you can put its url here.
+The client will automatically handle the connection to it. +
+_Default:_ `null`
+[source,js]
+----
+const client = new Client({
+ node: 'http://localhost:9200',
+ proxy: 'http://localhost:8080'
+})
+
+// Proxy with basic authentication
+const client = new Client({
+ node: 'http://localhost:9200',
+ proxy: 'http://user:pwd@localhost:8080'
+})
+----
+
+|`agent`
+a|`http.AgentOptions, function` - http agent https://nodejs.org/api/http.html#http_new_agent_options[options],
+or a function that returns an actual http agent instance. If you want to disable the http agent use entirely
+(and disable the `keep-alive` feature), set the agent to `false`. +
+_Default:_ `null`
+[source,js]
+----
+const client = new Client({
+ node: 'http://localhost:9200',
+ agent: { agent: 'options' }
+})
+
+const client = new Client({
+ node: 'http://localhost:9200',
+ // the function takes as parameter the option
+ // object passed to the Connection constructor
+ agent: (opts) => new CustomAgent()
+})
+
+const client = new Client({
+ node: 'http://localhost:9200',
+ // Disable agent and keep-alive
+ agent: false
+})
+----
+
+|`nodeFilter`
+a|`function` - Filters which node not to use for a request. +
+_Default:_
+[source,js]
+----
+function defaultNodeFilter (node) {
+ // avoid master only nodes
+ if (node.roles.master === true &&
+ node.roles.data === false &&
+ node.roles.ingest === false) {
+ return false
+ }
+ return true
+}
+----
+
+|`nodeSelector`
+a|`function` - custom selection strategy. +
+_Options:_ `'round-robin'`, `'random'`, custom function +
+_Default:_ `'round-robin'` +
+_Custom function example:_
+[source,js]
+----
+function nodeSelector (connections) {
+ const index = calculateIndex()
+ return connections[index]
+}
+----
+
+|`generateRequestId`
+a|`function` - function to generate the request id for every request, it takes
+two parameters, the request parameters and options. +
+By default it generates an incremental integer for every request. +
+_Custom function example:_
+[source,js]
+----
+function generateRequestId (params, options) {
+ // your id generation logic
+ // must be syncronous
+ return 'id'
+}
+----
+
+|`name`
+|`string, symbol` - The name to identify the client instance in the events. +
+_Default:_ `elasticsearch-js`
+
+|`opaqueIdPrefix`
+|`string` - A string that will be use to prefix any `X-Opaque-Id` header. +
+See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html#_x-opaque-id_support[`X-Opaque-Id` support] for more details. +
+_Default:_ `null`
+
+|`headers`
+|`object` - A set of custom headers to send in every request. +
+_Default:_ `{}`
+
+|`context`
+|`object` - A custom object that you can use for observability in your events.
+It will be merged with the API level context option. +
+_Default:_ `null`
+
+|`enableMetaHeader`
+|`boolean` - If true, adds an header named `'x-elastic-client-meta'`, containing some minimal telemetry data,
+such as the client and platform version. +
+_Default:_ `true`
+
+|`cloud`
+a|`object` - Custom configuration for connecting to
+https://cloud.elastic.co[Elastic Cloud]. See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
+for more details. +
+_Default:_ `null` +
+_Cloud configuration example:_
+[source,js]
+----
+const client = new Client({
+ cloud: {
+ id: ''
+ },
+ auth: {
+ username: 'elastic',
+ password: 'changeme'
+ }
+})
+----
+
+|`disablePrototypePoisoningProtection`
+|`boolean`, `'proto'`, `'constructor'` - The client can protect you against prototype poisoning attacks. Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more about this security concern. If needed, you can enable prototype poisoning protection entirely (`false`) or one of the two checks (`'proto'` or `'constructor'`). For performance reasons, it is disabled by default. Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more. +
+_Default:_ `true`
+
+|`caFingerprint`
+|`string` - If configured, verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied fingerprint. Only accepts SHA256 digest fingerprints. +
+_Default:_ `null`
+
+|`maxResponseSize`
+|`number` - When configured, it verifies that the uncompressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_STRING_LENGTH +
+_Default:_ `null`
+
+|`maxCompressedResponseSize`
+|`number` - When configured, it verifies that the compressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_LENGTH +
+_Default:_ `null`
+
+|===
diff --git a/docs/breaking-changes.asciidoc b/docs/breaking-changes.asciidoc
deleted file mode 100644
index 3170fd922..000000000
--- a/docs/breaking-changes.asciidoc
+++ /dev/null
@@ -1,286 +0,0 @@
-= Breaking changes coming from the old client
-
-If you were already using the previous version of this client --i.e. the one you used to install with `npm install elasticsearch`-- you will encounter some breaking changes.
-
-=== Don’t panic!
-
-Every breaking change was carefully weighed, and each is justified. Furthermore, the new codebase has been rewritten with modern JavaScript and has been carefully designed to be easy to maintain.
-
-=== Breaking changes
-
-* Minimum supported version of Node.js is `v6`.
-
-* Everything has been rewritten using ES6 classes to help users extend the defaults more easily.
-
-* There is no longer an integrated logger. The client now is an event emitter that emits the following events: `request`, `response`, and `error`.
-
-* The code is no longer shipped with all the versions of the API, but only that of the package’s major version, This means that if you are using Elasticsearch `v6`, you will be required to install `@elastic/elasticsearch@6`, and so on.
-
-* The internals are completely different, so if you used to tweak them a lot, you will need to refactor your code. The public API should be almost the same.
-
-* No more browser support, for that will be distributed via another module, `@elastic/elasticsearch-browser`. This module is intended for Node.js only.
-
-* The returned value of an API call will no longer be the `body`, `statusCode`, and `headers` for callbacks and just the `body` for promises. The new returned value will be a unique object containing the `body`, `statusCode`, `headers`, `warnings`, and `meta`, for both callback and promises.
-
-[source,js]
-----
-// before
-const body = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-})
-
-client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, (err, body, statusCode, headers) => {
- if (err) console.log(err)
-})
-
-// after
-const { body, statusCode, headers, warnings } = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-})
-
-client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, (err, { body, statusCode, headers, warnings }) => {
- if (err) console.log(err)
-})
-----
-
-
-* Errors: there is no longer a custom error class for every HTTP status code (such as `BadRequest` or `NotFound`). There is instead a single `ResponseError`. Each error class has been renamed, and now each is suffixed with `Error` at the end.
-
-* Errors that have been removed: `RequestTypeError`, `Generic`, and all the status code specific errors (such as `BadRequest` or `NotFound`).
-
-* Errors that have been added: `ConfigurationError` (in case of bad configurations) and `ResponseError`, which contains all the data you may need to handle the specific error, such as `statusCode`, `headers`, `body`, and `message`.
-
-
-* Errors that has been renamed:
-
-** `RequestTimeout` (408 statusCode) => `TimeoutError`
-** `ConnectionFault` => `ConnectionError`
-** `NoConnections` => `NoLivingConnectionsError`
-** `Serialization` => `SerializationError`
-** `Serialization` => `DeserializationError`
-
-* You must specify the port number in the configuration. In the previous version you can specify the host and port in a variety of ways, with the new client there is only one via the `node` parameter.
-
-* The `plugins` option has been removed, if you want to extend the client now you should use the `client.extend` API.
-
-[source,js]
-----
-// before
-const { Client } = require('elasticsearch')
-const client = new Client({ plugins: [...] })
-
-// after
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ ... })
-client.extend(...)
-----
-
-* There is a clear distinction between the API related parameters and the client related configurations, the parameters `ignore`, `headers`, `requestTimeout` and `maxRetries` are no longer part of the API object, and you should specify them in a second option object.
-
-[source,js]
-----
-// before
-const body = await client.search({
- index: 'my-index',
- body: { foo: 'bar' },
- ignore: [404]
-})
-
-client.search({
- index: 'my-index',
- body: { foo: 'bar' },
- ignore: [404]
-}, (err, body, statusCode, headers) => {
- if (err) console.log(err)
-})
-
-// after
-const { body, statusCode, headers, warnings } = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404]
-})
-
-client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404]
-}, (err, { body, statusCode, headers, warnings }) => {
- if (err) console.log(err)
-})
-----
-
-* The `transport.request` method will no longer accept the `query` key, but the `querystring` key instead (which can be a string or an object), furthermore, you need to send a bulk-like request, instead of the `body` key, you should use the `bulkBody` key. Also in this method, the client specific parameters should be passed as a second object.
-
-[source,js]
-----
-// before
-const body = await client.transport.request({
- method: 'GET',
- path: '/my-index/_search',
- body: { foo: 'bar' },
- query: { bar: 'baz' }
- ignore: [404]
-})
-
-client.transport.request({
- method: 'GET',
- path: '/my-index/_search',
- body: { foo: 'bar' },
- query: { bar: 'baz' }
- ignore: [404]
-}, (err, body, statusCode, headers) => {
- if (err) console.log(err)
-})
-
-// after
-const { body, statusCode, headers, warnings } = await client.transport.request({
- method: 'GET',
- path: '/my-index/_search',
- body: { foo: 'bar' },
- querystring: { bar: 'baz' }
-}, {
- ignore: [404]
-})
-
-client.transport.request({
- method: 'GET',
- path: '/my-index/_search',
- body: { foo: 'bar' },
- querystring: { bar: 'baz' }
-}, {
- ignore: [404]
-}, (err, { body, statusCode, headers, warnings }) => {
- if (err) console.log(err)
-})
-----
-
-=== Talk is cheap. Show me the code.
-
-Following you will find a snippet of code with the old client, followed by the same code logic, but with the new client.
-
-[source,js]
-----
-const { Client, errors } = require('elasticsearch')
-const client = new Client({
- host: 'http://localhost:9200',
- plugins: [utility]
-})
-
-async function run () {
- try {
- const body = await client.search({
- index: 'game-of-thrones',
- body: {
- query: {
- match: { quote: 'winter' }
- }
- }
- ignore: [404]
- })
- console.log(body)
- } catch (err) {
- if (err instanceof errors.BadRequest) {
- console.log('Bad request')
- } else {
- console.log(err)
- }
- }
-}
-
-function utility (Client, config, components) {
- const ca = components.clientAction.factory
- Client.prototype.utility = components.clientAction.namespaceFactory()
- const utility = Client.prototype.utility.prototype
-
- utility.index = ca({
- params: {
- refresh: {
- type: 'enum',
- options: [
- 'true',
- 'false',
- 'wait_for',
- ''
- ]
- },
- },
- urls: [
- {
- fmt: '/<%=index%>/_doc',
- req: {
- index: {
- type: 'string',
- required: true
- }
- }
- }
- ],
- needBody: true,
- method: 'POST'
- })
-})
-----
-
-And now with the new client.
-
-[source,js]
-----
-const { Client, errors } = require('@elastic/elasticsearch')
-// NOTE: `host` has been renamed to `node`,
-// and `plugins` is no longer supported
-const client = new Client({ node: 'http://localhost:9200' })
-
-async function run () {
- try {
- // NOTE: we are using the destructuring assignment
- const { body } = await client.search({
- index: 'game-of-thrones',
- body: {
- query: {
- match: { quote: 'winter' }
- }
- }
- // NOTE: `ignore` now is in a separated object
- }, {
- ignore: [404]
- })
- console.log(body)
- } catch (err) {
- // NOTE: we are checking the `statusCode` property
- if (err.statusCode === 400) {
- console.log('Bad request')
- } else {
- console.log(err)
- }
- }
-}
-
-// NOTE: we can still extend the client, but with a different API.
-// This new API is a little bit more verbose, since you must write
-// your own validations, but it's way more flexible.
-client.extend('utility.index', ({ makeRequest, ConfigurationError }) => {
- return function utilityIndex (params, options) {
- const { body, index, ...querystring } = params
- if (body == null) throw new ConfigurationError('Missing body')
- if (index == null) throw new ConfigurationError('Missing index')
- const requestParams = {
- method: 'POST',
- path: `/${index}/_doc`,
- body: body,
- querystring
- }
- return makeRequest(requestParams, options)
- }
-})
-----
diff --git a/docs/changelog.asciidoc b/docs/changelog.asciidoc
new file mode 100644
index 000000000..02f383f21
--- /dev/null
+++ b/docs/changelog.asciidoc
@@ -0,0 +1,917 @@
+[[changelog-client]]
+== Release notes
+
+[discrete]
+=== 8.17.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.17`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.17/release-notes-8.17.0.html[here].
+
+[discrete]
+=== 8.16.3
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Improved support for Elasticsearch `v8.16`
+
+Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
+
+[discrete]
+=== 8.16.2
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Improved support for Elasticsearch `v8.16`
+
+Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
+
+[discrete]
+===== Drop testing artifacts from npm package
+
+Tap, the unit testing tool used by this project, was recently upgraded and started writing to a `.tap` directory. Since tests are run prior to an `npm publish` in CI, this directory was being included in the published package and bloating its size.
+
+[discrete]
+=== 8.16.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Fix ECMAScript imports
+
+Fixed package configuration to correctly support native ECMAScript `import` syntax.
+
+[discrete]
+=== 8.16.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.16`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.16/release-notes-8.16.0.html[here].
+
+[discrete]
+===== Support Apache Arrow in ES|QL helper
+
+The ES|QL helper can now return results as an Apache Arrow `Table` or `RecordBatchReader`, which enables high-performance calculations on ES|QL results, even if the response data is larger than the system's available memory. See <> for more information.
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Pass prototype poisoning options to serializer correctly
+
+The client's `disablePrototypePoisoningProtection` option was set to `true` by default, but when it was set to any other value it was ignored, making it impossible to enable prototype poisoning protection without providing a custom serializer implementation.
+
+[discrete]
+=== 8.15.3
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Improved support for Elasticsearch `v8.15`
+
+Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
+
+[discrete]
+===== Drop testing artifacts from npm package
+
+Tap, the unit testing tool, was recently upgraded and started writing to a `.tap` directory. Since tests are run prior to an `npm publish` in CI, this directory was being included in the published package and bloating its size.
+
+[discrete]
+=== 8.15.2
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Improved support for Elasticsearch `v8.15`
+
+Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
+
+[discrete]
+=== 8.15.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Improved support for Elasticsearch `v8.15`
+
+Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
+
+[discrete]
+=== 8.15.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.15.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.15/release-notes-8.15.0.html[here].
+
+[discrete]
+===== OpenTelemetry zero-code instrumentation support
+
+For those that use an observability service that supports OpenTelemetry spans, the client will now automatically generate traces for each Elasticsearch request it makes.
+See {jsclient}/observability.html#_opentelemetry[the docs]
+for more information.
+
+[discrete]
+=== 8.14.1
+
+[discrete]
+==== Features
+
+[discrete]
+===== Improved support for Elasticsearch `8.14`
+
+Updated types based on fixes and changes to the Elasticsearch specification.
+
+[discrete]
+=== 8.14.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.14.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.14/release-notes-8.14.0.html[here].
+
+[discrete]
+===== ES|QL object API helper
+
+A helper method has been added that parses the response of an ES|QL query and converts it into an array of objects.
+A TypeScript type parameter can also be provided to improve developer experience when working with the result. https://github.com/elastic/elasticsearch-js/pull/2238[#2238]
+
+[discrete]
+===== `onSuccess` callback added to bulk helper
+
+The bulk helper now supports an `onSuccess` callback that will be called for each successful operation. https://github.com/elastic/elasticsearch-js/pull/2199[#2199]
+
+[discrete]
+===== Request retries are more polite
+
+https://github.com/elastic/elastic-transport-js/releases/tag/v8.6.0[`@elastic/transport` v8.6.0] was released, which refactored when and how failed requests are retried. Timed-out requests are no longer retried by default, and retries now use exponential backoff rather than running immediately.
+
+
+[discrete]
+=== 8.13.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Pin @elastic/transport to `~8.4.1`
+
+Switching from `^8.4.1` to `~8.4.1` ensures 8.13 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+v8.13.0 was also released depending on v8.4.0 of `@elastic/transport` instead of v8.4.1, which was unintentional.
+
+[discrete]
+=== 8.13.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.13.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.13/release-notes-8.13.0.html[here].
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Ensure new connections inherit client's set defaults https://github.com/elastic/elasticsearch-js/pull/2159[#2159]
+
+When instantiating a client, any connection-related defaults (e.g. `requestTimeout`) set on that client instance would not be inherited by nodes if they were entered as strings rather than a `ConnectionOptions` object.
+
+[discrete]
+=== 8.12.3
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.4.1`
+
+Switching from `^8.4.1` to `~8.4.1` ensures 8.12 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.12.2
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Upgrade transport to 8.4.1 https://github.com/elastic/elasticsearch-js/pull/2137[#2137]
+
+Upgrades `@elastic/transport` to 8.4.1 to resolve https://github.com/elastic/elastic-transport-js/pull/83[a bug] where arrays in error diagnostics were unintentionally transformed into objects.
+
+[discrete]
+=== 8.12.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Fix hang in bulk helper semaphore https://github.com/elastic/elasticsearch-js/pull/2027[#2027]
+
+The failing state could be reached when a server's response times are slower than flushInterval.
+
+[discrete]
+=== 8.12.0
+
+[discrete]
+=== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.12.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.12/release-notes-8.12.0.html[here].
+
+[discrete]
+=== 8.11.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.4.0`
+
+Switching from `^8.4.0` to `~8.4.0` ensures 8.11 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.11.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.11.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.11/release-notes-8.11.0.html[here].
+
+[discrete]
+===== Enhanced support for redacting potentially sensitive data https://github.com/elastic/elasticsearch-js/pull/2095[#2095]
+
+`@elastic/transport` https://github.com/elastic/elastic-transport-js/releases/tag/v8.4.0[version 8.4.0] introduces enhanced measures for ensuring that request metadata attached to some `Error` objects is redacted. This functionality is primarily to address custom logging solutions that don't use common serialization methods like `JSON.stringify`, `console.log`, or `util.inspect`, which were already accounted for.
+
+See <> for more information.
+
+[discrete]
+=== 8.10.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.3.4`
+
+Switching from `^8.3.4` to `~8.3.4` ensures 8.10 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.10.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.10.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.10/release-notes-8.10.0.html[here].
+
+[discrete]
+=== 8.9.2
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.3.4`
+
+Switching from `^8.3.4` to `~8.3.4` ensures 8.9 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.9.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Upgrade Transport https://github.com/elastic/elasticsearch-js/pull/1968[#1968]
+
+Upgrades `@elastic/transport` to the latest patch release to fix https://github.com/elastic/elastic-transport-js/pull/69[a bug] that could cause the process to exit when handling malformed `HEAD` requests.
+
+[discrete]
+=== 8.9.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.9.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.9/release-notes-8.9.0.html[here].
+
+[discrete]
+===== Allow document to be overwritten in `onDocument` iteratee of bulk helper https://github.com/elastic/elasticsearch-js/pull/1732[#1732]
+
+In the {jsclient}/client-helpers.html#bulk-helper[bulk helper], documents could not be modified before being sent to Elasticsearch. It is now possible to {jsclient}/client-helpers.html#_modifying_a_document_before_operation[modify a document] before sending it.
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Updated `user-agent` header https://github.com/elastic/elasticsearch-js/pull/1954[#1954]
+
+The `user-agent` header the client used to connect to Elasticsearch was using a non-standard format that has been improved.
+
+[discrete]
+=== 8.8.2
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.3.2`
+
+Switching from `^8.3.2` to `~8.3.2` ensures 8.8 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.8.1
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.8.1`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.8/release-notes-8.8.1.html[here].
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Fix index drift bug in bulk helper https://github.com/elastic/elasticsearch-js/pull/1759[#1759]
+
+Fixes a bug in the bulk helper that would cause `onDrop` to send back the wrong JSON document or error on a nonexistent document when an error occurred on a bulk HTTP request that contained a `delete` action.
+
+[discrete]
+===== Fix a memory leak caused by an outdated version of Undici https://github.com/elastic/elasticsearch-js/pull/1902[#1902]
+
+Undici 5.5.1, used by https://github.com/elastic/elastic-transport-js[elastic-transport-js], could create a memory leak when a high volume of requests created too many HTTP `abort` listeners. Upgrading Undici to 5.22.1 removed the memory leak.
+
+[discrete]
+=== 8.8.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.8.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.8/release-notes-8.8.0.html[here].
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Fix type declarations for legacy types with a body key https://github.com/elastic/elasticsearch-js/pull/1784[#1784]
+
+Prior releases contained a bug where type declarations for legacy types that include a `body` key were not actually importing the type that includes the `body` key.
+
+[discrete]
+=== 8.7.3
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.3.1`
+
+Switching from `^8.3.1` to `~8.3.1` ensures 8.7 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.7.0
+
+[discrete]
+===== Support for Elasticsearch `v8.7.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.7/release-notes-8.7.0.html[here].
+
+[discrete]
+=== 8.6.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Bump @elastic/transport to `~8.3.1`
+
+Switching from `^8.3.1` to `~8.3.1` ensures 8.6 client users are not required to update to Node.js v18+, which is a new requirement set by `@elastic/transport` v8.5.0. See https://github.com/elastic/elastic-transport-js/issues/91[elastic/elastic-transport-js#91] for details.
+
+[discrete]
+=== 8.6.0
+
+[discrete]
+===== Bump @elastic/transport to 8.3.1+ https://github.com/elastic/elasticsearch-js/pull/1802[#1802]
+
+The `@elastic/transport` dependency has been bumped to `~8.3.1` to ensure
+fixes to the `maxResponseSize` option are available in the client.
+
+[discrete]
+===== Support for Elasticsearch `v8.6.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.6/release-notes-8.6.0.html[here].
+
+[discrete]
+=== 8.5.0
+
+[discrete]
+===== Support for Elasticsearch `v8.5.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.5/release-notes-8.5.0.html[here].
+
+[discrete]
+=== 8.4.0
+
+[discrete]
+===== Support for Elasticsearch `v8.4.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.4/release-notes-8.4.0.html[here].
+
+[discrete]
+=== 8.2.1
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Support for Elasticsearch `v8.2.1`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.2/release-notes-8.2.1.html[here].
+
+[discrete]
+===== Fix ndjson APIs https://github.com/elastic/elasticsearch-js/pull/1688[#1688]
+
+The previous release contained a bug that broken ndjson APIs.
+We have released `v8.2.0-patch.1` to address this.
+This fix is the same as the one we have released and we strongly recommend upgrading to this version.
+
+[discrete]
+===== Fix node shutdown apis https://github.com/elastic/elasticsearch-js/pull/1697[#1697]
+
+The shutdown APIs wheren't complete, this fix completes them.
+
+[discrete]
+==== Types: move query keys to body https://github.com/elastic/elasticsearch-js/pull/1693[#1693]
+
+The types definitions where wrongly representing the types of fields present in both query and body.
+
+[discrete]
+=== 8.2.0
+
+[discrete]
+==== Breaking changes
+
+[discrete]
+===== Drop Node.js v12 https://github.com/elastic/elasticsearch-js/pull/1670[#1670]
+
+According to our https://github.com/elastic/elasticsearch-js#nodejs-support[Node.js support matrix].
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.2`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.2/release-notes-8.2.0.html[here].
+
+[discrete]
+===== More lenient parameter checks https://github.com/elastic/elasticsearch-js/pull/1662[#1662]
+
+When creating a new client, an `undefined` `caFingerprint` no longer trigger an error for a http connection.
+
+[discrete]
+===== Update TypeScript docs and export estypes https://github.com/elastic/elasticsearch-js/pull/1675[#1675]
+
+You can import the full TypeScript requests & responses definitions as it follows:
+[source,ts]
+----
+import { estypes } from '@elastic/elasticsearch'
+----
+
+If you need the legacy definitions with the body, you can do the following:
+
+[source,ts]
+----
+import { estypesWithBody } from '@elastic/elasticsearch'
+----
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Updated hpagent to the latest version https://github.com/elastic/elastic-transport-js/pull/49[transport/#49]
+
+You can fing the related changes https://github.com/delvedor/hpagent/releases/tag/v1.0.0[here].
+
+[discrete]
+=== 8.1.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.1`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.1/release-notes-8.1.0.html[here].
+
+[discrete]
+===== Export SniffingTransport https://github.com/elastic/elasticsearch-js/pull/1653[#1653]
+
+Now the client exports the SniffingTransport class.
+
+[discrete]
+==== Fixes
+
+[discrete]
+===== Fix onFlushTimeout timer not being cleared when upstream errors https://github.com/elastic/elasticsearch-js/pull/1616[#1616]
+
+Fixes a memory leak caused by an error in the upstream dataset of the bulk helper.
+
+[discrete]
+===== Cleanup abort listener https://github.com/elastic/elastic-transport-js/pull/42[transport/#42]
+
+The legacy http client was not cleaning up the abort listener, which could cause a memory leak.
+
+[discrete]
+===== Improve undici performances https://github.com/elastic/elastic-transport-js/pull/41[transport/#41]
+
+Improve the stream body collection and keep alive timeout.
+
+[discrete]
+=== 8.0.0
+
+[discrete]
+==== Features
+
+[discrete]
+===== Support for Elasticsearch `v8.0`
+
+You can find all the API changes
+https://www.elastic.co/guide/en/elasticsearch/reference/8.0/release-notes-8.0.0.html[here].
+
+[discrete]
+===== Drop old typescript definitions
+
+*Breaking: Yes* | *Migration effort: Medium*
+
+The current TypeScript definitions will be removed from the client, and the new definitions, which contain request and response definitions as well will be shipped by default.
+
+[discrete]
+===== Drop callback-style API
+
+*Breaking: Yes* | *Migration effort: Large*
+
+Maintaining both API styles is not a problem per se, but it makes error handling more convoluted due to async stack traces.
+Moving to a full-promise API will solve this issue.
+
+[source,js]
+----
+// callback-style api
+client.search({ params }, { options }, (err, result) => {
+ console.log(err || result)
+})
+
+// promise-style api
+client.search({ params }, { options })
+ .then(console.log)
+ .catch(console.log)
+
+// async-style (sugar syntax on top of promises)
+const response = await client.search({ params }, { options })
+console.log(response)
+----
+
+If you are already using the promise-style API, this won't be a breaking change for you.
+
+[discrete]
+===== Remove the current abort API and use the new AbortController standard
+
+*Breaking: Yes* | *Migration effort: Small*
+
+The old abort API makes sense for callbacks but it's annoying to use with promises
+
+[source,js]
+----
+// callback-style api
+const request = client.search({ params }, { options }, (err, result) => {
+ console.log(err) // RequestAbortedError
+})
+
+request.abort()
+
+// promise-style api
+const promise = client.search({ params }, { options })
+
+promise
+ .then(console.log)
+ .catch(console.log) // RequestAbortedError
+
+promise.abort()
+----
+
+Node v12 has added the standard https://nodejs.org/api/globals.html#globals_class_abortcontroller[`AbortController`] API which is designed to work well with both callbacks and promises.
+[source,js]
+----
+const ac = new AbortController()
+client.search({ params }, { signal: ac.signal })
+ .then(console.log)
+ .catch(console.log) // RequestAbortedError
+
+ac.abort()
+----
+
+[discrete]
+===== Remove the body key from the request
+
+*Breaking: Yes* | *Migration effort: Small*
+
+Thanks to the new types we are developing now we know exactly where a parameter should go.
+The client API leaks HTTP-related notions in many places, and removing them would definitely improve the DX.
+
+This could be a rather big breaking change, so a double solution could be used during the 8.x lifecycle. (accepting body keys without them being wrapped in the body as well as the current solution).
+
+To convert code from 7.x, you need to remove the `body` parameter in all the endpoints request.
+For instance, this is an example for the `search` endpoint:
+
+[source,js]
+----
+// from
+const response = await client.search({
+ index: 'test',
+ body: {
+ query: {
+ match_all: {}
+ }
+ }
+})
+
+// to
+const response = await client.search({
+ index: 'test',
+ query: {
+ match_all: {}
+ }
+})
+----
+
+[discrete]
+===== Migrate to new separate transport
+
+*Breaking: Yes* | *Migration effort: Small to none*
+
+The separated transport has been rewritten in TypeScript and has already dropped the callback style API.
+Given that now is separated, most of the Elasticsearch specific concepts have been removed, and the client will likely need to extend parts of it for reintroducing them.
+If you weren't extending the internals of the client, this won't be a breaking change for you.
+
+[discrete]
+===== The returned value of API calls is the body and not the HTTP related keys
+
+*Breaking: Yes* | *Migration effort: Small*
+
+The client API leaks HTTP-related notions in many places, and removing them would definitely improve the DX.
+The client will expose a new request-specific option to still get the full response details.
+
+The new behaviour returns the `body` value directly as response.
+If you want to have the 7.x response format, you need to add `meta : true` in the request.
+This will return all the HTTP meta information, including the `body`.
+
+For instance, this is an example for the `search` endpoint:
+
+[source,js]
+----
+// from
+const response = await client.search({
+ index: 'test',
+ body: {
+ query: {
+ match_all: {}
+ }
+ }
+})
+console.log(response) // { body: SearchResponse, statusCode: number, headers: object, warnings: array }
+
+// to
+const response = await client.search({
+ index: 'test',
+ query: {
+ match_all: {}
+ }
+})
+console.log(response) // SearchResponse
+
+// with a bit of TypeScript and JavaScript magic...
+const response = await client.search({
+ index: 'test',
+ query: {
+ match_all: {}
+ }
+}, {
+ meta: true
+})
+console.log(response) // { body: SearchResponse, statusCode: number, headers: object, warnings: array }
+----
+
+[discrete]
+===== Use a weighted connection pool
+
+*Breaking: Yes* | *Migration effort: Small to none*
+
+Move from the current cluster connection pool to a weight-based implementation.
+This new implementation offers better performances and runs less code in the background, the old connection pool can still be used.
+If you weren't extending the internals of the client, this won't be a breaking change for you.
+
+[discrete]
+===== Migrate to the "undici" http client
+
+*Breaking: Yes* | *Migration effort: Small to none*
+
+By default, the HTTP client will no longer be the default Node.js HTTP client, but https://github.com/nodejs/undici[undici] instead.
+Undici is a brand new HTTP client written from scratch, it offers vastly improved performances and has better support for promises.
+Furthermore, it offers comprehensive and predictable error handling. The old HTTP client can still be used.
+If you weren't extending the internals of the client, this won't be a breaking change for you.
+
+[discrete]
+===== Drop support for old camelCased keys
+
+*Breaking: Yes* | *Migration effort: Medium*
+
+Currently, every path or query parameter could be expressed in both `snake_case` and `camelCase`. Internally the client will convert everything to `snake_case`.
+This was done in an effort to reduce the friction of migrating from the legacy to the new client, but now it no longer makes sense.
+If you are already using `snake_case` keys, this won't be a breaking change for you.
+
+[discrete]
+===== Rename `ssl` option to `tls`
+
+*Breaking: Yes* | *Migration effort: Small*
+
+People usually refers to this as `tls`, furthermore, internally we use the tls API and Node.js refers to it as tls everywhere.
+[source,js]
+----
+// before
+const client = new Client({
+ node: 'https://localhost:9200',
+ ssl: {
+ rejectUnauthorized: false
+ }
+})
+
+// after
+const client = new Client({
+ node: 'https://localhost:9200',
+ tls: {
+ rejectUnauthorized: false
+ }
+})
+----
+
+[discrete]
+===== Remove prototype poisoning protection
+
+*Breaking: Yes* | *Migration effort: Small*
+
+Prototype poisoning protection is very useful, but it can cause performances issues with big payloads.
+In v8 it will be removed, and the documentation will show how to add it back with a custom serializer.
+
+[discrete]
+===== Remove client extensions API
+
+*Breaking: Yes* | *Migration effort: Large*
+
+Nowadays the client support the entire Elasticsearch API, and the `transport.request` method can be used if necessary. The client extensions API have no reason to exist.
+[source,js]
+----
+client.extend('utility.index', ({ makeRequest }) => {
+ return function _index (params, options) {
+ // your code
+ }
+})
+
+client.utility.index(...)
+----
+
+If you weren't using client extensions, this won't be a breaking change for you.
+
+[discrete]
+===== Move to TypeScript
+
+*Breaking: No* | *Migration effort: None*
+
+The new separated transport is already written in TypeScript, and it makes sense that the client v8 will be fully written in TypeScript as well.
+
+[discrete]
+===== Move from emitter-like interface to a diagnostic method
+
+*Breaking: Yes* | *Migration effort: Small*
+
+Currently, the client offers a subset of methods of the `EventEmitter` class, v8 will ship with a `diagnostic` property which will be a proper event emitter.
+[source,js]
+----
+// from
+client.on('request', console.log)
+
+// to
+client.diagnostic.on('request', console.log)
+----
+
+[discrete]
+===== Remove username & password properties from Cloud configuration
+
+*Breaking: Yes* | *Migration effort: Small*
+
+The Cloud configuration does not support ApiKey and Bearer auth, while the `auth` options does.
+There is no need to keep the legacy basic auth support in the cloud configuration.
+[source,js]
+----
+// before
+const client = new Client({
+ cloud: {
+ id: '',
+ username: 'elastic',
+ password: 'changeme'
+ }
+})
+
+// after
+const client = new Client({
+ cloud: {
+ id: ''
+ },
+ auth: {
+ username: 'elastic',
+ password: 'changeme'
+ }
+})
+----
+
+If you are already passing the basic auth options in the `auth` configuration, this won't be a breaking change for you.
+
+[discrete]
+===== Calling `client.close` will reject new requests
+
+Once you call `client.close` every new request after that will be rejected with a `NoLivingConnectionsError`. In-flight requests will be executed normally unless an in-flight request requires a retry, in which case it will be rejected.
+
+[discrete]
+===== Parameters rename
+
+- `ilm.delete_lifecycle`: `policy` parameter has been renamed to `name`
+- `ilm.get_lifecycle`: `policy` parameter has been renamed to `name`
+- `ilm.put_lifecycle`: `policy` parameter has been renamed to `name`
+- `snapshot.cleanup_repository`: `repository` parameter has been renamed to `name`
+- `snapshot.create_repository`: `repository` parameter has been renamed to `name`
+- `snapshot.delete_repository`: `repository` parameter has been renamed to `name`
+- `snapshot.get_repository`: `repository` parameter has been renamed to `name`
+- `snapshot.verify_repository`: `repository` parameter has been renamed to `name`
+
+[discrete]
+===== Removal of snake_cased methods
+
+The v7 client provided snake_cased methods, such as `client.delete_by_query`. This is no longer supported, now only camelCased method are present.
+So `client.delete_by_query` can be accessed with `client.deleteByQuery`
+
diff --git a/docs/child.asciidoc b/docs/child.asciidoc
index 74ba23185..0bd7ace21 100644
--- a/docs/child.asciidoc
+++ b/docs/child.asciidoc
@@ -1,23 +1,36 @@
-= Creating a child client
+[[child]]
+=== Creating a child client
-There are some use cases where you may need multiple instances of the client. You can easily do that by calling `new Client()` as many times as you need, but you will lose all the benefits of using one single client, such as the long living connections and the connection pool handling. +
-To avoid this problem the client offers a `child` API, which returns a new client instance that shares the connection pool with the parent client. +
+There are some use cases where you may need multiple instances of the client.
+You can easily do that by calling `new Client()` as many times as you need, but
+you will lose all the benefits of using one single client, such as the long
+living connections and the connection pool handling. To avoid this problem, the
+client offers a `child` API, which returns a new client instance that shares the
+connection pool with the parent client.
-NOTE: The event emitter is shared between the parent and the child(ren), and if you extend the parent client, the child client will have the same extensions, while if the child client adds an extension, the parent client will not be extended.
+NOTE: The event emitter is shared between the parent and the child(ren). If you
+extend the parent client, the child client will have the same extensions, while
+if the child client adds an extension, the parent client will not be extended.
-You can pass to the `child` every client option you would pass to a normal client, but the connection pool specific options (`ssl`, `agent`, `pingTimeout`, `Connection`, and `resurrectStrategy`).
+You can pass to the `child` every client option you would pass to a normal
+client, but the connection pool specific options (`ssl`, `agent`, `pingTimeout`,
+`Connection`, and `resurrectStrategy`).
-CAUTION: If you call `close` in any of the parent/child clients, every client will be closed.
+CAUTION: If you call `close` in any of the parent/child clients, every client
+will be closed.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
const child = client.child({
headers: { 'x-foo': 'bar' },
requestTimeout: 1000
})
-client.info(console.log)
-child.info(console.log)
-----
+client.info().then(console.log, console.log)
+child.info().then(console.log, console.log)
+----
\ No newline at end of file
diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc
index 5392cec24..402c5e9a3 100644
--- a/docs/configuration.asciidoc
+++ b/docs/configuration.asciidoc
@@ -1,219 +1,12 @@
-= Client configuration
+[[client-configuration]]
+== Configuration
-The client is designed to be easily configured as you see fit for your needs, following you can see all the possible basic options that you can use to configure it.
-[source,js]
-----
-const { Client } = require('@elastic/elasticsearch')
+The client is designed to be easily configured for your needs. In the following
+section, you can see the possible options that you can use to configure it.
-const client = new Client({
- node: 'http://localhost:9200'
- maxRetries: 5,
- requestTimeout: 60000,
- sniffOnStart: true
-})
-----
-
-== Basic options
-[cols=2*]
-|===
-|`node` or `nodes`
-a|The Elasticsearch endpoint to use. +
-It can be a single string or an array of strings:
-[source,js]
-----
-node: 'http://localhost:9200'
-----
-Or it can be an object (or an array of objects) that represents the node
-[source,js]
-----
-node: {
- url: new URL('http://localhost:9200'),
- ssl: 'ssl options',
- agent: 'http agent options',
- id: 'custom node id',
- headers: { 'custom': 'headers' }
- roles: {
- master: true,
- data: true,
- ingest: true,
- ml: false
- }
-}
-----
-
-|`maxRetries`
-|`number` - Max number of retries for each request. +
-_Default:_ `3`
-
-|`requestTimeout`
-|`number` - Max request timeout for each request. +
-_Default:_ `30000`
-
-|`pingTimeout`
-|`number` - Max ping request timeout for each request. +
-_Default:_ `3000`
-
-|`sniffInterval`
-|`number, boolean` - Perform a sniff operation every `n` milliseconds. +
-_Default:_ `false`
-
-|`sniffOnStart`
-|`boolean` - Perform a sniff once the client is started. +
-_Default:_ `false`
-
-|`sniffEndpoint`
-|`string` - Max request timeout for each request. +
-_Default:_ `'_nodes/_all/http'`
-
-|`sniffOnConnectionFault`
-|`boolean` - Perform a sniff on connection fault. +
-_Default:_ `false`
-
-|`resurrectStrategy`
-|`string` - Configure the node resurrection strategy. +
-_Options:_ `'ping'`, `'optimistic'`, `'none'` +
-_Default:_ `'ping'`
-
-|`suggestCompression`
-|`boolean` - Adds `accept-encoding` header to every request. +
-_Default:_ `false`
-
-|`compression`
-|`string, boolean` - Enables gzip request body compression. +
-_Options:_ `'gzip'`, `false` +
-_Default:_ `false`
-
-|`ssl`
-|`http.SecureContextOptions` - ssl https://nodejs.org/api/tls.html[configuraton]. +
-_Default:_ `null`
-
-|`agent`
-|`http.AgentOptions` - http agent https://nodejs.org/api/http.html#http_new_agent_options[options]. +
-_Default:_ `null`
-
-|`nodeFilter`
-a|`function` - Filters which node not to use for a request. +
-_Default:_
-[source,js]
-----
-function defaultNodeFilter (node) {
- // avoid master only nodes
- if (node.roles.master === true &&
- node.roles.data === false &&
- node.roles.ingest === false) {
- return false
- }
- return true
-}
-----
-
-|`nodeSelector`
-a|`function` - custom selection strategy. +
-_Options:_ `'round-robin'`, `'random'`, custom function +
-_Default:_ `'round-robin'` +
-_Custom function example:_
-[source,js]
-----
-function nodeSelector (connections) {
- const index = calculateIndex()
- return connections[index]
-}
-----
-|===
-
-== Advanced configuration
-If you need to customize the client behavior heavily, you are in the right place! +
-The client allows you to customize the following internals:
-
-* `Transport` class
-* `ConnectionPool` class
-* `Connection` class
-* `Serializer` class
-
-=== `Transport`
-This class is responsible to perform the request to Elasticsearch and handling errors, it also handle the sniffing.
-[source,js]
-----
-const { Client, Transport } = require('@elastic/elasticsearch')
-
-class MyTransport extends Transport {
- request (params, options, callback) {
- // your code
- }
-}
-
-const client = new Client({
- Transport: MyTransport
-})
-----
-
-Sometimes you just need to inject a little snippet of your code and then continue to use the usual client code, in such case, you should call `super.method`.
-[source,js]
-----
-class MyTransport extends Transport {
- request (params, options, callback) {
- // your code
- super.request(params, options, callback)
- }
-}
-----
-
-=== `ConnectionPool`
-This class is responsible for keeping in memory all the Elasticsearch Connection that we are using, there is a single Connection for every node. +
-Moreover, the connection pool will handle the resurrection strategies and the updates of the pool.
-[source,js]
-----
-const { Client, ConnectionPool } = require('@elastic/elasticsearch')
-
-class MyConnectionPool extends ConnectionPool {
- markAlive (connection) {
- // your code
- super.markAlive(connection)
- }
-}
-
-const client = new Client({
- ConnectionPool: MyConnectionPool
-})
-----
-
-=== `Connection`
-This class represents a single Node, it holds every information we have on the node, such as roles, id, URL, custom headers and so on. The actual HTTP request is performed here, this means that if you want to swap the default HTTP client (Node.js core), you should override this class `request` method.
-[source,js]
-----
-const { Client, Connection } = require('@elastic/elasticsearch')
-
-class MyConnection extends Connection {
- request (params, callback) {
- // your code
- }
-}
-
-const client = new Client({
- Connection: MyConnection
-})
-----
-
-=== `Serializer`
-This class is responsible of the serialization of every request, it offers the following methods:
-
-* `serialize(object: any): string;`, serializes request objects
-* `deserialize(json: string): any;`, deserializes response strings
-* `ndserialize(array: any[]): string;`, serializes bulk request objects
-* `qserialize(object: any): string;`, serializes request query parameters
-
-[source,js]
-----
-const { Client, Serializer } = require('@elastic/elasticsearch')
-
-class MySerializer extends Serializer {
- serialize (object) {
- // your code
- }
-}
-
-const client = new Client({
- Serializer: MySerializer
-})
-----
\ No newline at end of file
+* <>
+* <>
+* <>
+* <>
+* <>
diff --git a/docs/connecting.asciidoc b/docs/connecting.asciidoc
new file mode 100644
index 000000000..4646ee5f1
--- /dev/null
+++ b/docs/connecting.asciidoc
@@ -0,0 +1,738 @@
+[[client-connecting]]
+== Connecting
+
+This page contains the information you need to connect and use the Client with
+{es}.
+
+**On this page**
+
+* <>
+* <>
+* <>
+* <>
+* <>
+* <>
+* <>
+* <>
+
+[[authentication]]
+[discrete]
+=== Authentication
+
+This document contains code snippets to show you how to connect to various {es}
+providers.
+
+
+[discrete]
+[[auth-ec]]
+==== Elastic Cloud
+
+If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers
+an easy way to connect to it via the `cloud` option. You must pass the Cloud ID
+that you can find in the cloud console, then your username and password inside
+the `auth` option.
+
+NOTE: When connecting to Elastic Cloud, the client will automatically enable
+both request and response compression by default, since it yields significant
+throughput improvements. Moreover, the client will also set the tls option
+`secureProtocol` to `TLSv1_2_method` unless specified otherwise. You can still
+override this option by configuring them.
+
+IMPORTANT: Do not enable sniffing when using Elastic Cloud, since the nodes are
+behind a load balancer, Elastic Cloud will take care of everything for you.
+Take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here]
+to know more.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: {
+ id: ''
+ },
+ auth: {
+ username: 'elastic',
+ password: 'changeme'
+ }
+})
+----
+
+[discrete]
+[[connect-self-managed-new]]
+=== Connecting to a self-managed cluster
+
+By default {es} will start with security features like authentication and TLS
+enabled. To connect to the {es} cluster you'll need to configure the Node.js {es}
+client to use HTTPS with the generated CA certificate in order to make requests
+successfully.
+
+If you're just getting started with {es} we recommend reading the documentation
+on https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html[configuring]
+and
+https://www.elastic.co/guide/en/elasticsearch/reference/current/starting-elasticsearch.html[starting {es}]
+to ensure your cluster is running as expected.
+
+When you start {es} for the first time you'll see a distinct block like the one
+below in the output from {es} (you may have to scroll up if it's been a while):
+
+[source,sh]
+----
+
+-> Elasticsearch security features have been automatically configured!
+-> Authentication is enabled and cluster connections are encrypted.
+
+-> Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
+ lhQpLELkjkrawaBoaz0Q
+
+-> HTTP CA certificate SHA-256 fingerprint:
+ a52dd93511e8c6045e21f16654b77c9ee0f34aea26d9f40320b531c474676228
+...
+
+----
+
+Depending on the circumstances there are two options for verifying the HTTPS
+connection, either verifying with the CA certificate itself or via the HTTP CA
+certificate fingerprint.
+
+[discrete]
+[[auth-tls]]
+==== TLS configuration
+
+The generated root CA certificate can be found in the `certs` directory in your
+{es} config location (`$ES_CONF_PATH/certs/http_ca.crt`). If you're running {es}
+in Docker there is
+https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html[additional documentation for retrieving the CA certificate].
+
+Without any additional configuration you can specify `https://` node urls, and
+the certificates used to sign these requests will be verified. To turn off
+certificate verification, you must specify an `tls` object in the top level
+config and set `rejectUnauthorized: false`. The default `tls` values are the
+same that Node.js's https://nodejs.org/api/tls.html#tls_tls_connect_options_callback[`tls.connect()`]
+uses.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://localhost:9200',
+ auth: {
+ username: 'elastic',
+ password: 'changeme'
+ },
+ tls: {
+ ca: fs.readFileSync('./http_ca.crt'),
+ rejectUnauthorized: false
+ }
+})
+----
+
+[discrete]
+[[auth-ca-fingerprint]]
+==== CA fingerprint
+
+You can configure the client to only trust certificates that are signed by a specific CA certificate
+(CA certificate pinning) by providing a `caFingerprint` option.
+This will verify that the fingerprint of the CA certificate that has signed
+the certificate of the server matches the supplied value.
+You must configure a SHA256 digest.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://example.com'
+ auth: { ... },
+ // the fingerprint (SHA256) of the CA certificate that is used to sign
+ // the certificate that the Elasticsearch node presents for TLS.
+ caFingerprint: '20:0D:CA:FA:76:...',
+ tls: {
+ // might be required if it's a self-signed certificate
+ rejectUnauthorized: false
+ }
+})
+----
+
+The certificate fingerprint can be calculated using `openssl x509` with the
+certificate file:
+
+[source,sh]
+----
+openssl x509 -fingerprint -sha256 -noout -in /path/to/http_ca.crt
+----
+
+If you don't have access to the generated CA file from {es} you can use the
+following script to output the root CA fingerprint of the {es} instance with
+`openssl s_client`:
+
+[source,sh]
+----
+# Replace the values of 'localhost' and '9200' to the
+# corresponding host and port values for the cluster.
+openssl s_client -connect localhost:9200 -servername localhost -showcerts /dev/null \
+ | openssl x509 -fingerprint -sha256 -noout -in /dev/stdin
+----
+
+The output of `openssl x509` will look something like this:
+
+[source,sh]
+----
+SHA256 Fingerprint=A5:2D:D9:35:11:E8:C6:04:5E:21:F1:66:54:B7:7C:9E:E0:F3:4A:EA:26:D9:F4:03:20:B5:31:C4:74:67:62:28
+----
+
+
+[discrete]
+[[connect-no-security]]
+=== Connecting without security enabled
+
+WARNING: Running {es} without security enabled is not recommended.
+
+If your cluster is configured with
+https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html[security explicitly disabled]
+then you can connect via HTTP:
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'http://example.com'
+})
+----
+
+[discrete]
+[[auth-strategies]]
+=== Authentication strategies
+
+Following you can find all the supported authentication strategies.
+
+[discrete]
+[[auth-apikey]]
+==== ApiKey authentication
+
+You can use the
+{ref-7x}/security-api-create-api-key.html[ApiKey]
+authentication by passing the `apiKey` parameter via the `auth` option. The
+`apiKey` parameter can be either a base64 encoded string or an object with the
+values that you can obtain from the
+{ref-7x}/security-api-create-api-key.html[create api key endpoint].
+
+NOTE: If you provide both basic authentication credentials and the ApiKey
+configuration, the ApiKey takes precedence.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://localhost:9200',
+ auth: {
+ apiKey: 'base64EncodedKey'
+ }
+})
+----
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://localhost:9200',
+ auth: {
+ apiKey: {
+ id: 'foo',
+ api_key: 'bar'
+ }
+ }
+})
+----
+
+[discrete]
+[[auth-bearer]]
+==== Bearer authentication
+
+You can provide your credentials by passing the `bearer` token
+parameter via the `auth` option.
+Useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens].
+Be aware that it does not handle automatic token refresh.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://localhost:9200',
+ auth: {
+ bearer: 'token'
+ }
+})
+----
+
+
+[discrete]
+[[auth-basic]]
+==== Basic authentication
+
+You can provide your credentials by passing the `username` and `password`
+parameters via the `auth` option.
+
+NOTE: If you provide both basic authentication credentials and the Api Key
+configuration, the Api Key will take precedence.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://localhost:9200',
+ auth: {
+ username: 'elastic',
+ password: 'changeme'
+ }
+})
+----
+
+
+Otherwise, you can provide your credentials in the node(s) URL.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://username:password@localhost:9200'
+})
+----
+
+
+[discrete]
+[[client-usage]]
+=== Usage
+
+Using the client is straightforward, it supports all the public APIs of {es},
+and every method exposes the same signature.
+
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+const result = await client.search({
+ index: 'my-index',
+ query: {
+ match: { hello: 'world' }
+ }
+})
+----
+
+The returned value of every API call is the response body from {es}.
+If you need to access additonal metadata, such as the status code or headers,
+you must specify `meta: true` in the request options:
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+const result = await client.search({
+ index: 'my-index',
+ query: {
+ match: { hello: 'world' }
+ }
+}, { meta: true })
+----
+
+In this case, the result will be:
+[source,ts]
+----
+{
+ body: object | boolean
+ statusCode: number
+ headers: object
+ warnings: string[],
+ meta: object
+}
+----
+
+NOTE: The body is a boolean value when you use `HEAD` APIs.
+
+[discrete]
+==== Aborting a request
+
+If needed, you can abort a running request by using the `AbortController` standard.
+
+CAUTION: If you abort a request, the request will fail with a
+`RequestAbortedError`.
+
+
+[source,js]
+----
+const AbortController = require('node-abort-controller')
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+const abortController = new AbortController()
+setImmediate(() => abortController.abort())
+
+const result = await client.search({
+ index: 'my-index',
+ query: {
+ match: { hello: 'world' }
+ }
+}, { signal: abortController.signal })
+----
+
+[discrete]
+==== Request specific options
+
+If needed you can pass request specific options in a second object:
+
+[source,js]
+----
+const result = await client.search({
+ index: 'my-index',
+ body: {
+ query: {
+ match: { hello: 'world' }
+ }
+ }
+}, {
+ ignore: [404],
+ maxRetries: 3
+})
+----
+
+
+The supported request specific options are:
+[cols=2*]
+|===
+|`ignore`
+|`number[]` - HTTP status codes which should not be considered errors for this request. +
+_Default:_ `null`
+
+|`requestTimeout`
+|`number | string` - Max request timeout for the request in milliseconds, it overrides the client default. +
+_Default:_ `30000`
+
+|`retryOnTimeout`
+|`boolean` - Retry requests that have timed out.
+_Default:_ `false`
+
+|`maxRetries`
+|`number` - Max number of retries for the request, it overrides the client default. +
+_Default:_ `3`
+
+|`compression`
+|`string | boolean` - Enables body compression for the request. +
+_Options:_ `false`, `'gzip'` +
+_Default:_ `false`
+
+|`asStream`
+|`boolean` - Instead of getting the parsed body back, you get the raw Node.js stream of data. +
+_Default:_ `false`
+
+|`headers`
+|`object` - Custom headers for the request. +
+_Default:_ `null`
+
+|`querystring`
+|`object` - Custom querystring for the request. +
+_Default:_ `null`
+
+|`id`
+|`any` - Custom request id. _(overrides the top level request id generator)_ +
+_Default:_ `null`
+
+|`context`
+|`any` - Custom object per request. _(you can use it to pass data to the clients events)_ +
+_Default:_ `null`
+
+|`opaqueId`
+|`string` - Set the `X-Opaque-Id` HTTP header. See {ref}/api-conventions.html#x-opaque-id
+_Default:_ `null`
+
+|`maxResponseSize`
+|`number` - When configured, it verifies that the uncompressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_STRING_LENTGH +
+_Default:_ `null`
+
+|`maxCompressedResponseSize`
+|`number` - When configured, it verifies that the compressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_LENTGH +
+_Default:_ `null`
+
+|`signal`
+|`AbortSignal` - The AbortSignal instance to allow request abortion. +
+_Default:_ `null`
+
+|`meta`
+|`boolean` - Rather than returning the body, return an object containing `body`, `statusCode`, `headers` and `meta` keys +
+_Default_: `false`
+
+|`redaction`
+|`object` - Options for redacting potentially sensitive data from error metadata. See <>.
+
+|`retryBackoff`
+|`(min: number, max: number, attempt: number) => number;` - A function that calculates how long to sleep, in seconds, before the next request retry +
+_Default:_ A built-in function that uses exponential backoff with jitter.
+
+|===
+
+[discrete]
+[[client-faas-env]]
+=== Using the Client in a Function-as-a-Service Environment
+
+This section illustrates the best practices for leveraging the {es} client in a Function-as-a-Service (FaaS) environment.
+The most influential optimization is to initialize the client outside of the function, the global scope.
+This practice does not only improve performance but also enables background functionality as – for example – https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[sniffing].
+The following examples provide a skeleton for the best practices.
+
+[discrete]
+==== GCP Cloud Functions
+
+[source,js]
+----
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ // client initialisation
+})
+
+exports.testFunction = async function (req, res) {
+ // use the client
+}
+----
+
+[discrete]
+==== AWS Lambda
+
+[source,js]
+----
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ // client initialisation
+})
+
+exports.handler = async function (event, context) {
+ // use the client
+}
+----
+
+[discrete]
+==== Azure Functions
+
+[source,js]
+----
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ // client initialisation
+})
+
+module.exports = async function (context, req) {
+ // use the client
+}
+----
+
+Resources used to assess these recommendations:
+
+- https://cloud.google.com/functions/docs/bestpractices/tips#use_global_variables_to_reuse_objects_in_future_invocations[GCP Cloud Functions: Tips & Tricks]
+- https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html[Best practices for working with AWS Lambda functions]
+- https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=azurecli-linux%2Capplication-level#global-variables[Azure Functions Python developer guide]
+- https://docs.aws.amazon.com/lambda/latest/operatorguide/global-scope.html[AWS Lambda: Comparing the effect of global scope]
+
+
+[discrete]
+[[client-connect-proxy]]
+=== Connecting through a proxy
+
+~Added~ ~in~ ~`v7.10.0`~
+
+If you need to pass through an http(s) proxy for connecting to {es}, the client
+out of the box offers a handy configuration for helping you with it. Under the
+hood, it uses the https://github.com/delvedor/hpagent[`hpagent`] module.
+
+IMPORTANT: In versions 8.0+ of the client, the default `Connection` type is set to `UndiciConnection`, which does not support proxy configurations.
+To use a proxy, you will need to use the `HttpConnection` class from `@elastic/transport` instead.
+
+[source,js]
+----
+import { HttpConnection } from '@elastic/transport'
+
+const client = new Client({
+ node: 'http://localhost:9200',
+ proxy: 'http://localhost:8080',
+ Connection: HttpConnection,
+})
+----
+
+Basic authentication is supported as well:
+
+[source,js]
+----
+const client = new Client({
+ node: 'http://localhost:9200',
+ proxy: 'http:user:pwd@//localhost:8080',
+ Connection: HttpConnection,
+})
+----
+
+If you are connecting through a non-http(s) proxy, such as a `socks5` or `pac`,
+you can use the `agent` option to configure it.
+
+[source,js]
+----
+const SocksProxyAgent = require('socks-proxy-agent')
+const client = new Client({
+ node: 'http://localhost:9200',
+ agent () {
+ return new SocksProxyAgent('socks://127.0.0.1:1080')
+ },
+ Connection: HttpConnection,
+})
+----
+
+
+[discrete]
+[[client-error-handling]]
+=== Error handling
+
+The client exposes a variety of error objects that you can use to enhance your
+error handling. You can find all the error objects inside the `errors` key in
+the client.
+
+[source,js]
+----
+const { errors } = require('@elastic/elasticsearch')
+console.log(errors)
+----
+
+
+You can find the errors exported by the client in the table below.
+
+[cols=3*]
+|===
+|*Error*
+|*Description*
+|*Properties*
+
+|`ElasticsearchClientError`
+|Every error inherits from this class, it is the basic error generated by the client.
+a|* `name` - `string`
+* `message` - `string`
+
+|`TimeoutError`
+|Generated when a request exceeds the `requestTimeout` option.
+a|* `name` - `string`
+* `message` - `string`
+* `meta` - `object`, contains all the information about the request
+
+|`ConnectionError`
+|Generated when an error occurs during the request, it can be a connection error or a malformed stream of data.
+a|* `name` - `string`
+* `message` - `string`
+* `meta` - `object`, contains all the information about the request
+
+|`RequestAbortedError`
+|Generated if the user calls the `request.abort()` method.
+a|* `name` - `string`
+* `message` - `string`
+* `meta` - `object`, contains all the information about the request
+
+|`NoLivingConnectionsError`
+|Given the configuration, the ConnectionPool was not able to find a usable Connection for this request.
+a|* `name` - `string`
+* `message` - `string`
+* `meta` - `object`, contains all the information about the request
+
+|`SerializationError`
+|Generated if the serialization fails.
+a|* `name` - `string`
+* `message` - `string`
+* `data` - `object`, the object to serialize
+
+|`DeserializationError`
+|Generated if the deserialization fails.
+a|* `name` - `string`
+* `message` - `string`
+* `data` - `string`, the string to deserialize
+
+|`ConfigurationError`
+|Generated if there is a malformed configuration or parameter.
+a|* `name` - `string`
+* `message` - `string`
+
+|`ResponseError`
+|Generated when in case of a `4xx` or `5xx` response.
+a|* `name` - `string`
+* `message` - `string`
+* `meta` - `object`, contains all the information about the request
+* `body` - `object`, the response body
+* `statusCode` - `object`, the response headers
+* `headers` - `object`, the response status code
+|===
+
+[[keep-alive]]
+[discrete]
+=== Keep-alive connections
+
+By default, the client uses persistent, keep-alive connections to reduce the overhead of creating a new HTTP connection for each Elasticsearch request.
+If you are using the default `UndiciConnection` connection class, it maintains a pool of 256 connections with a keep-alive of 10 minutes.
+If you are using the legacy `HttpConnection` connection class, it maintains a pool of 256 connections with a keep-alive of 1 minute.
+
+If you need to disable keep-alive connections, you can override the HTTP agent with your preferred https://nodejs.org/api/http.html#http_new_agent_options[HTTP agent options]:
+
+[source,js]
+----
+const client = new Client({
+ node: 'http://localhost:9200',
+ // the function takes as parameter the option
+ // object passed to the Connection constructor
+ agent: (opts) => new CustomAgent()
+})
+----
+
+Or you can disable the HTTP agent entirely:
+
+[source,js]
+----
+const client = new Client({
+ node: 'http://localhost:9200',
+ // Disable agent and keep-alive
+ agent: false
+})
+----
+
+[discrete]
+[[close-connections]]
+=== Closing a client's connections
+
+If you would like to close all open connections being managed by an instance of the client, use the `close()` function:
+
+[source,js]
+----
+const client = new Client({
+ node: 'http://localhost:9200'
+});
+client.close();
+----
+
+[discrete]
+[[product-check]]
+=== Automatic product check
+
+Since v7.14.0, the client performs a required product check before the first call.
+This pre-flight product check allows the client to establish the version of Elasticsearch
+that it is communicating with. The product check requires one additional HTTP request to
+be sent to the server as part of the request pipeline before the main API call is sent.
+In most cases, this will succeed during the very first API call that the client sends.
+Once the product check completes, no further product check HTTP requests are sent for
+subsequent API calls.
diff --git a/docs/doc_examples/00272f75a6afea91f8554ef7cda0c1f2.asciidoc b/docs/doc_examples/00272f75a6afea91f8554ef7cda0c1f2.asciidoc
new file mode 100644
index 000000000..2bd8aa7df
--- /dev/null
+++ b/docs/doc_examples/00272f75a6afea91f8554ef7cda0c1f2.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRealms({
+ realms: "default_file,ldap1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/004743b9c9f61588926ccf734696b713.asciidoc b/docs/doc_examples/004743b9c9f61588926ccf734696b713.asciidoc
new file mode 100644
index 000000000..146e97702
--- /dev/null
+++ b/docs/doc_examples/004743b9c9f61588926ccf734696b713.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: ".ds-my-data-stream-2099.03.07-000001",
+ max_num_segments: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/004a17b42ab5155bb61da797a006fa9f.asciidoc b/docs/doc_examples/004a17b42ab5155bb61da797a006fa9f.asciidoc
new file mode 100644
index 000000000..4c8ea77d9
--- /dev/null
+++ b/docs/doc_examples/004a17b42ab5155bb61da797a006fa9f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ pinned: {
+ ids: ["1", "4", "100"],
+ organic: {
+ match: {
+ description: "iphone",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/006e0e16c9f1da58c0bfe57377f7fc38.asciidoc b/docs/doc_examples/006e0e16c9f1da58c0bfe57377f7fc38.asciidoc
new file mode 100644
index 000000000..f1d0b2224
--- /dev/null
+++ b/docs/doc_examples/006e0e16c9f1da58c0bfe57377f7fc38.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "whitespace",
+ filter: ["stemmer"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/007179b5e241da650562a5f0a5007823.asciidoc b/docs/doc_examples/007179b5e241da650562a5f0a5007823.asciidoc
new file mode 100644
index 000000000..7ef9728b5
--- /dev/null
+++ b/docs/doc_examples/007179b5e241da650562a5f0a5007823.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "cluster_health_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ http: {
+ request: {
+ host: "localhost",
+ port: 9200,
+ path: "/_cluster/health",
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.status": {
+ eq: "red",
+ },
+ },
+ },
+ actions: {
+ send_email: {
+ email: {
+ to: "username@example.org",
+ subject: "Cluster Status Warning",
+ body: "Cluster status is RED",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/008ed823c89e703c447ac89c6b689833.asciidoc b/docs/doc_examples/008ed823c89e703c447ac89c6b689833.asciidoc
new file mode 100644
index 000000000..9498fb4aa
--- /dev/null
+++ b/docs/doc_examples/008ed823c89e703c447ac89c6b689833.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.migration.postFeatureUpgrade();
+console.log(response);
+----
diff --git a/docs/doc_examples/0091fc75271b1fbbd4269622a4881e8b.asciidoc b/docs/doc_examples/0091fc75271b1fbbd4269622a4881e8b.asciidoc
new file mode 100644
index 000000000..af23c1cc6
--- /dev/null
+++ b/docs/doc_examples/0091fc75271b1fbbd4269622a4881e8b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ match: {
+ "http.clientip": "40.135.0.0",
+ },
+ },
+ fields: ["http.clientip"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/00b3b6d76a368ae71277ea24af318693.asciidoc b/docs/doc_examples/00b3b6d76a368ae71277ea24af318693.asciidoc
new file mode 100644
index 000000000..7f1e2c035
--- /dev/null
+++ b/docs/doc_examples/00b3b6d76a368ae71277ea24af318693.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shardStores();
+console.log(response);
+----
diff --git a/docs/doc_examples/00c05aa931fc985985e3e21c93cf43ff.asciidoc b/docs/doc_examples/00c05aa931fc985985e3e21c93cf43ff.asciidoc
new file mode 100644
index 000000000..63bfc32fe
--- /dev/null
+++ b/docs/doc_examples/00c05aa931fc985985e3e21c93cf43ff.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: '{ "query": {{#toJson}}my_query{{/toJson}} }',
+ params: {
+ my_query: {
+ match_all: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/00d65f7b9daa1c6b18eedd8ace206bae.asciidoc b/docs/doc_examples/00d65f7b9daa1c6b18eedd8ace206bae.asciidoc
new file mode 100644
index 000000000..36a79d081
--- /dev/null
+++ b/docs/doc_examples/00d65f7b9daa1c6b18eedd8ace206bae.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["asciifolding"],
+ text: "açaí à la carte",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/00e0c964c79fcc1876ab957da2ffce82.asciidoc b/docs/doc_examples/00e0c964c79fcc1876ab957da2ffce82.asciidoc
new file mode 100644
index 000000000..92160eef7
--- /dev/null
+++ b/docs/doc_examples/00e0c964c79fcc1876ab957da2ffce82.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "italian_example",
+ settings: {
+ analysis: {
+ filter: {
+ italian_elision: {
+ type: "elision",
+ articles: [
+ "c",
+ "l",
+ "all",
+ "dall",
+ "dell",
+ "nell",
+ "sull",
+ "coll",
+ "pell",
+ "gl",
+ "agl",
+ "dagl",
+ "degl",
+ "negl",
+ "sugl",
+ "un",
+ "m",
+ "t",
+ "s",
+ "v",
+ "d",
+ ],
+ articles_case: true,
+ },
+ italian_stop: {
+ type: "stop",
+ stopwords: "_italian_",
+ },
+ italian_keywords: {
+ type: "keyword_marker",
+ keywords: ["esempio"],
+ },
+ italian_stemmer: {
+ type: "stemmer",
+ language: "light_italian",
+ },
+ },
+ analyzer: {
+ rebuilt_italian: {
+ tokenizer: "standard",
+ filter: [
+ "italian_elision",
+ "lowercase",
+ "italian_stop",
+ "italian_keywords",
+ "italian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc b/docs/doc_examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc
new file mode 100644
index 000000000..09675e02d
--- /dev/null
+++ b/docs/doc_examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "my-e5-model",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ num_allocations: 1,
+ num_threads: 1,
+ model_id: ".multilingual-e5-small",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/010d5e901a2690fa7b2396edbe6cd463.asciidoc b/docs/doc_examples/010d5e901a2690fa7b2396edbe6cd463.asciidoc
new file mode 100644
index 000000000..de83fe2e1
--- /dev/null
+++ b/docs/doc_examples/010d5e901a2690fa7b2396edbe6cd463.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc b/docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc
new file mode 100644
index 000000000..dc90ae673
--- /dev/null
+++ b/docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ range: {
+ year: {
+ gt: 2023,
+ },
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ term: {
+ topic: "elastic",
+ },
+ },
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ _source: false,
+ aggs: {
+ topics: {
+ terms: {
+ field: "topic",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc b/docs/doc_examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc
new file mode 100644
index 000000000..184d88118
--- /dev/null
+++ b/docs/doc_examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ filter_path: "aggregations",
+ query: {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc b/docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc
new file mode 100644
index 000000000..279e91656
--- /dev/null
+++ b/docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "my-rerank-model",
+ inference_config: {
+ service: "cohere",
+ service_settings: {
+ model_id: "rerank-english-v3.0",
+ api_key: "{{COHERE_API_KEY}}",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/016f3147dae9ff2c3e831257ae470361.asciidoc b/docs/doc_examples/016f3147dae9ff2c3e831257ae470361.asciidoc
new file mode 100644
index 000000000..0985ba535
--- /dev/null
+++ b/docs/doc_examples/016f3147dae9ff2c3e831257ae470361.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "logs-*",
+ alias: "logs",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/019e329ed5a930aef825266822e7377a.asciidoc b/docs/doc_examples/019e329ed5a930aef825266822e7377a.asciidoc
new file mode 100644
index 000000000..1e0efb671
--- /dev/null
+++ b/docs/doc_examples/019e329ed5a930aef825266822e7377a.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "asciifold_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_asciifolding: {
+ tokenizer: "standard",
+ filter: ["my_ascii_folding"],
+ },
+ },
+ filter: {
+ my_ascii_folding: {
+ type: "asciifolding",
+ preserve_original: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/01ae196538fac197eedbbf458a4ef31b.asciidoc b/docs/doc_examples/01ae196538fac197eedbbf458a4ef31b.asciidoc
new file mode 100644
index 000000000..487139330
--- /dev/null
+++ b/docs/doc_examples/01ae196538fac197eedbbf458a4ef31b.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ kwd: {
+ type: "keyword",
+ ignore_above: 3,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ kwd: ["foo", "foo", "bang", "bar", "baz"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc b/docs/doc_examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc
new file mode 100644
index 000000000..2752b8336
--- /dev/null
+++ b/docs/doc_examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "component_template1",
+ template: {
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putComponentTemplate({
+ name: "runtime_component_template",
+ template: {
+ mappings: {
+ runtime: {
+ day_of_week: {
+ type: "keyword",
+ script: {
+ source:
+ "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/01bc0f2ed30eb3dd23511d01ce0ac6e1.asciidoc b/docs/doc_examples/01bc0f2ed30eb3dd23511d01ce0ac6e1.asciidoc
new file mode 100644
index 000000000..0a9693fe3
--- /dev/null
+++ b/docs/doc_examples/01bc0f2ed30eb3dd23511d01ce0ac6e1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.startTransform({
+ transform_id: "ecommerce_transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/01cd0ea360282a2c591a366679d7187d.asciidoc b/docs/doc_examples/01cd0ea360282a2c591a366679d7187d.asciidoc
new file mode 100644
index 000000000..71f3092da
--- /dev/null
+++ b/docs/doc_examples/01cd0ea360282a2c591a366679d7187d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ human: "true",
+ detailed: "true",
+ actions: "indices:data/write/bulk",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/01da9e0620e48270617fc248e6415cac.asciidoc b/docs/doc_examples/01da9e0620e48270617fc248e6415cac.asciidoc
new file mode 100644
index 000000000..e243fb4f9
--- /dev/null
+++ b/docs/doc_examples/01da9e0620e48270617fc248e6415cac.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ "my-agg-name": {
+ terms: {
+ field: "my-field",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/01dc7bdc223bd651574ed2d3954a5b1c.asciidoc b/docs/doc_examples/01dc7bdc223bd651574ed2d3954a5b1c.asciidoc
new file mode 100644
index 000000000..89f99c966
--- /dev/null
+++ b/docs/doc_examples/01dc7bdc223bd651574ed2d3954a5b1c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ id: "my_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/01f50acf7998b24969f451e922d145eb.asciidoc b/docs/doc_examples/01f50acf7998b24969f451e922d145eb.asciidoc
new file mode 100644
index 000000000..d92c8bdfe
--- /dev/null
+++ b/docs/doc_examples/01f50acf7998b24969f451e922d145eb.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "basque_example",
+ settings: {
+ analysis: {
+ filter: {
+ basque_stop: {
+ type: "stop",
+ stopwords: "_basque_",
+ },
+ basque_keywords: {
+ type: "keyword_marker",
+ keywords: ["Adibidez"],
+ },
+ basque_stemmer: {
+ type: "stemmer",
+ language: "basque",
+ },
+ },
+ analyzer: {
+ rebuilt_basque: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "basque_stop",
+ "basque_keywords",
+ "basque_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/020c95db88ef356093f03be84893ddf9.asciidoc b/docs/doc_examples/020c95db88ef356093f03be84893ddf9.asciidoc
new file mode 100644
index 000000000..0dc8775df
--- /dev/null
+++ b/docs/doc_examples/020c95db88ef356093f03be84893ddf9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.followStats({
+ index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/020de6b6cb960a76297452725a38889f.asciidoc b/docs/doc_examples/020de6b6cb960a76297452725a38889f.asciidoc
new file mode 100644
index 000000000..7fb6cecdf
--- /dev/null
+++ b/docs/doc_examples/020de6b6cb960a76297452725a38889f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ has_child: {
+ type: "child",
+ query: {
+ match_all: {},
+ },
+ max_children: 10,
+ min_children: 2,
+ score_mode: "min",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0246f73cc2ed3dfec577119e8cd15404.asciidoc b/docs/doc_examples/0246f73cc2ed3dfec577119e8cd15404.asciidoc
new file mode 100644
index 000000000..78f7c8a6c
--- /dev/null
+++ b/docs/doc_examples/0246f73cc2ed3dfec577119e8cd15404.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ name: {
+ properties: {
+ last: {
+ type: "text",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/025155da86802ebf4c3aeee5aab692f9.asciidoc b/docs/doc_examples/025155da86802ebf4c3aeee5aab692f9.asciidoc
new file mode 100644
index 000000000..f41e9eb7a
--- /dev/null
+++ b/docs/doc_examples/025155da86802ebf4c3aeee5aab692f9.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "sales",
+ mappings: {
+ properties: {
+ tags: {
+ type: "keyword",
+ },
+ comments: {
+ type: "nested",
+ properties: {
+ username: {
+ type: "keyword",
+ },
+ comment: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02520ac7816b2c4cf8fb413fd16122f2.asciidoc b/docs/doc_examples/02520ac7816b2c4cf8fb413fd16122f2.asciidoc
new file mode 100644
index 000000000..6349c1f6e
--- /dev/null
+++ b/docs/doc_examples/02520ac7816b2c4cf8fb413fd16122f2.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.flushJob({
+ job_id: "low_request_rate",
+ calc_interim: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc b/docs/doc_examples/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc
new file mode 100644
index 000000000..6be1d4da8
--- /dev/null
+++ b/docs/doc_examples/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ JapaneseCars: {
+ terms: {
+ field: "make",
+ include: ["mazda", "honda"],
+ },
+ },
+ ActiveCarManufacturers: {
+ terms: {
+ field: "make",
+ exclude: ["rover", "jensen"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0280247e0cf2e561c548f22c9fb31163.asciidoc b/docs/doc_examples/0280247e0cf2e561c548f22c9fb31163.asciidoc
new file mode 100644
index 000000000..b2677e6bc
--- /dev/null
+++ b/docs/doc_examples/0280247e0cf2e561c548f22c9fb31163.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateToken({
+ username: "myuser",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02853293a5b7cd9cc7a886eb413bbeb6.asciidoc b/docs/doc_examples/02853293a5b7cd9cc7a886eb413bbeb6.asciidoc
new file mode 100644
index 000000000..f6abfb4c5
--- /dev/null
+++ b/docs/doc_examples/02853293a5b7cd9cc7a886eb413bbeb6.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ char_filter: [
+ {
+ type: "mapping",
+ mappings: [
+ "٠ => 0",
+ "١ => 1",
+ "٢ => 2",
+ "٣ => 3",
+ "٤ => 4",
+ "٥ => 5",
+ "٦ => 6",
+ "٧ => 7",
+ "٨ => 8",
+ "٩ => 9",
+ ],
+ },
+ ],
+ text: "My license plate is ٢٥٠١٥",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/029de2f5383a42e1ac4ca1565bd2a130.asciidoc b/docs/doc_examples/029de2f5383a42e1ac4ca1565bd2a130.asciidoc
new file mode 100644
index 000000000..18aa9dece
--- /dev/null
+++ b/docs/doc_examples/029de2f5383a42e1ac4ca1565bd2a130.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ full_name: {
+ type: "text",
+ index_prefixes: {
+ min_chars: 1,
+ max_chars: 10,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02b00f21e9d23d82276ace0dd154d779.asciidoc b/docs/doc_examples/02b00f21e9d23d82276ace0dd154d779.asciidoc
new file mode 100644
index 000000000..3619352ce
--- /dev/null
+++ b/docs/doc_examples/02b00f21e9d23d82276ace0dd154d779.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ routing: "user1,user2",
+ query: {
+ match: {
+ title: "document",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02b6aa3e5652839f03de3a655854b897.asciidoc b/docs/doc_examples/02b6aa3e5652839f03de3a655854b897.asciidoc
new file mode 100644
index 000000000..fad61ac26
--- /dev/null
+++ b/docs/doc_examples/02b6aa3e5652839f03de3a655854b897.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02c48d461536709c3fc8a0e8147c3787.asciidoc b/docs/doc_examples/02c48d461536709c3fc8a0e8147c3787.asciidoc
new file mode 100644
index 000000000..dec8449bb
--- /dev/null
+++ b/docs/doc_examples/02c48d461536709c3fc8a0e8147c3787.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "pipelineB",
+ description: "outer pipeline",
+ processors: [
+ {
+ pipeline: {
+ name: "pipelineA",
+ },
+ },
+ {
+ set: {
+ field: "outer_pipeline_set",
+ value: "outer",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02f65c6bab8f40bf3ce18160623d1870.asciidoc b/docs/doc_examples/02f65c6bab8f40bf3ce18160623d1870.asciidoc
new file mode 100644
index 000000000..ab8ea60ad
--- /dev/null
+++ b/docs/doc_examples/02f65c6bab8f40bf3ce18160623d1870.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getTemplate({
+ name: "template_1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/02fad6b80bb29c2a7e6840db2fc67b18.asciidoc b/docs/doc_examples/02fad6b80bb29c2a7e6840db2fc67b18.asciidoc
new file mode 100644
index 000000000..e5501afe9
--- /dev/null
+++ b/docs/doc_examples/02fad6b80bb29c2a7e6840db2fc67b18.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_wildcard: {
+ type: "wildcard",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_wildcard: "This string can be quite lengthy",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ wildcard: {
+ my_wildcard: {
+ value: "*quite*lengthy",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/0308cbd85281f95fc458042afe3f587d.asciidoc b/docs/doc_examples/0308cbd85281f95fc458042afe3f587d.asciidoc
new file mode 100644
index 000000000..07249ec05
--- /dev/null
+++ b/docs/doc_examples/0308cbd85281f95fc458042afe3f587d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 0,
+ _source: "*.id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/032eac56b798bea29390e102538f4a26.asciidoc b/docs/doc_examples/032eac56b798bea29390e102538f4a26.asciidoc
new file mode 100644
index 000000000..936e558a2
--- /dev/null
+++ b/docs/doc_examples/032eac56b798bea29390e102538f4a26.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.refresh({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/033838729cfb5d1a28d04f69ee78d924.asciidoc b/docs/doc_examples/033838729cfb5d1a28d04f69ee78d924.asciidoc
new file mode 100644
index 000000000..1f4149800
--- /dev/null
+++ b/docs/doc_examples/033838729cfb5d1a28d04f69ee78d924.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "Polygon",
+ orientation: "LEFT",
+ coordinates: [
+ [
+ [-177, 10],
+ [176, 15],
+ [172, 0],
+ [176, -15],
+ [-177, -10],
+ [-177, 10],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0350410d11579f4e876c798ce1eaef5b.asciidoc b/docs/doc_examples/0350410d11579f4e876c798ce1eaef5b.asciidoc
new file mode 100644
index 000000000..39af7ac7a
--- /dev/null
+++ b/docs/doc_examples/0350410d11579f4e876c798ce1eaef5b.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 5,
+ refresh: "true",
+ document: {
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ message: {
+ query: "Japanese art",
+ _name: "query1",
+ },
+ },
+ },
+ {
+ match: {
+ message: {
+ query: "Holand culture",
+ _name: "query2",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0350ff5ebb8207c004eb771088339cb4.asciidoc b/docs/doc_examples/0350ff5ebb8207c004eb771088339cb4.asciidoc
new file mode 100644
index 000000000..4962104be
--- /dev/null
+++ b/docs/doc_examples/0350ff5ebb8207c004eb771088339cb4.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "example-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ term: {
+ text: "blue shoes sale",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ sparse_vector: {
+ field: "ml.tokens",
+ inference_id: "my_elser_model",
+ query: "What blue shoes are on sale?",
+ },
+ },
+ },
+ },
+ ],
+ rank_window_size: 50,
+ rank_constant: 20,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/03582fc93683e573062bcfda45e01d69.asciidoc b/docs/doc_examples/03582fc93683e573062bcfda45e01d69.asciidoc
new file mode 100644
index 000000000..acf03f1b5
--- /dev/null
+++ b/docs/doc_examples/03582fc93683e573062bcfda45e01d69.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ char_filter: ["html_strip"],
+ filter: ["lowercase", "asciifolding"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_custom_analyzer",
+ text: "Is this déjà vu?",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/035a7a919eb6513b4769a3727b7d6447.asciidoc b/docs/doc_examples/035a7a919eb6513b4769a3727b7d6447.asciidoc
new file mode 100644
index 000000000..4c4a3671a
--- /dev/null
+++ b/docs/doc_examples/035a7a919eb6513b4769a3727b7d6447.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "whitespace",
+ text: "The quick brown fox.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/03891265df2111a38e0b6b24c1b967e1.asciidoc b/docs/doc_examples/03891265df2111a38e0b6b24c1b967e1.asciidoc
new file mode 100644
index 000000000..d0da136f7
--- /dev/null
+++ b/docs/doc_examples/03891265df2111a38e0b6b24c1b967e1.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getServiceAccounts();
+console.log(response);
+----
diff --git a/docs/doc_examples/03b1d76fa0b773d5b7d74ecb7e1e1a80.asciidoc b/docs/doc_examples/03b1d76fa0b773d5b7d74ecb7e1e1a80.asciidoc
new file mode 100644
index 000000000..23fad0184
--- /dev/null
+++ b/docs/doc_examples/03b1d76fa0b773d5b7d74ecb7e1e1a80.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+ indices: "my-index,logs-my_app-default",
+ rename_pattern: "(.+)",
+ rename_replacement: "restored-$1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/03c4b815bf1e6a8c5cfcc6ddf94bc093.asciidoc b/docs/doc_examples/03c4b815bf1e6a8c5cfcc6ddf94bc093.asciidoc
new file mode 100644
index 000000000..7e6d9a983
--- /dev/null
+++ b/docs/doc_examples/03c4b815bf1e6a8c5cfcc6ddf94bc093.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query: "SELECT * FROM library ORDER BY page_count DESC LIMIT 5",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/04412d11783dac25b5fd2ec5407078a3.asciidoc b/docs/doc_examples/04412d11783dac25b5fd2ec5407078a3.asciidoc
new file mode 100644
index 000000000..fbefc580b
--- /dev/null
+++ b/docs/doc_examples/04412d11783dac25b5fd2ec5407078a3.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateApiKeyId({
+ connector_id: "my-connector",
+ api_key_id: "my-api-key-id",
+ api_key_secret_id: "my-connector-secret-id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/044b2f99e7438e408685b258db17f863.asciidoc b/docs/doc_examples/044b2f99e7438e408685b258db17f863.asciidoc
new file mode 100644
index 000000000..577720dbb
--- /dev/null
+++ b/docs/doc_examples/044b2f99e7438e408685b258db17f863.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query: '\n process where process.name == "regsvr32.exe"\n ',
+ size: 50,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/046b2249bbc49e77848c114cee940f17.asciidoc b/docs/doc_examples/046b2249bbc49e77848c114cee940f17.asciidoc
new file mode 100644
index 000000000..7541cfe0d
--- /dev/null
+++ b/docs/doc_examples/046b2249bbc49e77848c114cee940f17.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ multi_match: {
+ query: "How is the weather in Jamaica?",
+ fields: ["title", "description"],
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ text_expansion: {
+ "ml.inference.title_expanded.predicted_value": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ },
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ text_expansion: {
+ "ml.inference.description_expanded.predicted_value": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ },
+ },
+ },
+ },
+ },
+ ],
+ window_size: 10,
+ rank_constant: 20,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0470d7101637568b9d3d1239f06325a7.asciidoc b/docs/doc_examples/0470d7101637568b9d3d1239f06325a7.asciidoc
new file mode 100644
index 000000000..0e0773a12
--- /dev/null
+++ b/docs/doc_examples/0470d7101637568b9d3d1239f06325a7.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_internal/desired_nodes/<history_id>/<version>",
+ body: {
+ nodes: [
+ {
+ settings: {
+ "node.name": "instance-000187",
+ "node.external_id": "instance-000187",
+ "node.roles": ["data_hot", "master"],
+ "node.attr.data": "hot",
+ "node.attr.logical_availability_zone": "zone-0",
+ },
+ processors: 8,
+ memory: "58gb",
+ storage: "2tb",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc b/docs/doc_examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc
new file mode 100644
index 000000000..6358e9f97
--- /dev/null
+++ b/docs/doc_examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "Will Smith",
+ type: "cross_fields",
+ fields: ["first_name", "last_name"],
+ operator: "and",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/048652b6abfe195da8ea8cef10ee01b1.asciidoc b/docs/doc_examples/048652b6abfe195da8ea8cef10ee01b1.asciidoc
new file mode 100644
index 000000000..9ab89027c
--- /dev/null
+++ b/docs/doc_examples/048652b6abfe195da8ea8cef10ee01b1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.resetTransform({
+ transform_id: "ecommerce_transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/04d586a536061ec1045d0bb2dc3d1a5f.asciidoc b/docs/doc_examples/04d586a536061ec1045d0bb2dc3d1a5f.asciidoc
new file mode 100644
index 000000000..ffb79faa8
--- /dev/null
+++ b/docs/doc_examples/04d586a536061ec1045d0bb2dc3d1a5f.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "set_os",
+ description: "sets the value of host.os.name from the field os",
+ processors: [
+ {
+ set: {
+ field: "host.os.name",
+ value: "{{{os}}}",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.ingest.simulate({
+ id: "set_os",
+ docs: [
+ {
+ _source: {
+ os: "Ubuntu",
+ },
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/04d6ce0c903bd468afbecd3aa1c4a78a.asciidoc b/docs/doc_examples/04d6ce0c903bd468afbecd3aa1c4a78a.asciidoc
new file mode 100644
index 000000000..5496c5a44
--- /dev/null
+++ b/docs/doc_examples/04d6ce0c903bd468afbecd3aa1c4a78a.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline-id",
+ description: "My optional pipeline description",
+ processors: [
+ {
+ set: {
+ description: "My optional processor description",
+ field: "my-keyword-field",
+ value: "foo",
+ },
+ },
+ ],
+ _meta: {
+ reason: "set my-keyword-field to foo",
+ serialization: {
+ class: "MyPipeline",
+ id: 10,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc b/docs/doc_examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc
new file mode 100644
index 000000000..00ef08a92
--- /dev/null
+++ b/docs/doc_examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "google_vertex_ai_embeddings",
+ inference_config: {
+ service: "googlevertexai",
+ service_settings: {
+ service_account_json: "",
+ model_id: "",
+ location: "",
+ project_id: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc b/docs/doc_examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc
new file mode 100644
index 000000000..2622f6cef
--- /dev/null
+++ b/docs/doc_examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.health({
+ wait_for_status: "yellow",
+ timeout: "50s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0502284d4685c478eb68761f979f4303.asciidoc b/docs/doc_examples/0502284d4685c478eb68761f979f4303.asciidoc
new file mode 100644
index 000000000..35597e672
--- /dev/null
+++ b/docs/doc_examples/0502284d4685c478eb68761f979f4303.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.evaluateDataFrame({
+ index: "house_price_predictions",
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ "ml.is_training": false,
+ },
+ },
+ ],
+ },
+ },
+ evaluation: {
+ regression: {
+ actual_field: "price",
+ predicted_field: "ml.price_prediction",
+ metrics: {
+ r_squared: {},
+ mse: {},
+ msle: {
+ offset: 10,
+ },
+ huber: {
+ delta: 1.5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/050b3947025fee403232b8e6e9112dab.asciidoc b/docs/doc_examples/050b3947025fee403232b8e6e9112dab.asciidoc
new file mode 100644
index 000000000..7e17a91ea
--- /dev/null
+++ b/docs/doc_examples/050b3947025fee403232b8e6e9112dab.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "yaml",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05148cc541f447486d9daf15ab77292b.asciidoc b/docs/doc_examples/05148cc541f447486d9daf15ab77292b.asciidoc
new file mode 100644
index 000000000..cebe6e3bd
--- /dev/null
+++ b/docs/doc_examples/05148cc541f447486d9daf15ab77292b.asciidoc
@@ -0,0 +1,54 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "logs",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "50gb",
+ },
+ },
+ },
+ warm: {
+ min_age: "30d",
+ actions: {
+ shrink: {
+ number_of_shards: 1,
+ },
+ forcemerge: {
+ max_num_segments: 1,
+ },
+ },
+ },
+ cold: {
+ min_age: "60d",
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "found-snapshots",
+ },
+ },
+ },
+ frozen: {
+ min_age: "90d",
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "found-snapshots",
+ },
+ },
+ },
+ delete: {
+ min_age: "735d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0518c673094fb18ecb491a3b78af4695.asciidoc b/docs/doc_examples/0518c673094fb18ecb491a3b78af4695.asciidoc
new file mode 100644
index 000000000..1b3f88827
--- /dev/null
+++ b/docs/doc_examples/0518c673094fb18ecb491a3b78af4695.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ allocate: {
+ include: {
+ box_type: "hot,warm",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05284c8ea91769c09c8db47db8a6629a.asciidoc b/docs/doc_examples/05284c8ea91769c09c8db47db8a6629a.asciidoc
new file mode 100644
index 000000000..1017e8824
--- /dev/null
+++ b/docs/doc_examples/05284c8ea91769c09c8db47db8a6629a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.repositories({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/053497b6960f80fd7b005b7c6d54358f.asciidoc b/docs/doc_examples/053497b6960f80fd7b005b7c6d54358f.asciidoc
new file mode 100644
index 000000000..5a4d4ee7a
--- /dev/null
+++ b/docs/doc_examples/053497b6960f80fd7b005b7c6d54358f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ delete: {
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05500e77aef581d92f6c605f7a48f7df.asciidoc b/docs/doc_examples/05500e77aef581d92f6c605f7a48f7df.asciidoc
new file mode 100644
index 000000000..80f74e73e
--- /dev/null
+++ b/docs/doc_examples/05500e77aef581d92f6c605f7a48f7df.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "polygon",
+ coordinates: [
+ [
+ [1000, -1001],
+ [1001, -1001],
+ [1001, -1000],
+ [1000, -1000],
+ [1000, -1001],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/059e04aaf093379401f665c33ac796dc.asciidoc b/docs/doc_examples/059e04aaf093379401f665c33ac796dc.asciidoc
new file mode 100644
index 000000000..44a0e488d
--- /dev/null
+++ b/docs/doc_examples/059e04aaf093379401f665c33ac796dc.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "keyword_marker",
+ keywords: ["jumping"],
+ },
+ "stemmer",
+ ],
+ text: "fox running and jumping",
+ explain: true,
+ attributes: "keyword",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05a09078fe1016e900e445ad4039cf97.asciidoc b/docs/doc_examples/05a09078fe1016e900e445ad4039cf97.asciidoc
new file mode 100644
index 000000000..791b13f13
--- /dev/null
+++ b/docs/doc_examples/05a09078fe1016e900e445ad4039cf97.asciidoc
@@ -0,0 +1,78 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "clientips",
+ mappings: {
+ properties: {
+ client_ip: {
+ type: "keyword",
+ },
+ env: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "clientips",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ client_ip: "172.21.0.5",
+ env: "Development",
+ },
+ {
+ index: {},
+ },
+ {
+ client_ip: "172.21.2.113",
+ env: "QA",
+ },
+ {
+ index: {},
+ },
+ {
+ client_ip: "172.21.2.162",
+ env: "QA",
+ },
+ {
+ index: {},
+ },
+ {
+ client_ip: "172.21.3.15",
+ env: "Production",
+ },
+ {
+ index: {},
+ },
+ {
+ client_ip: "172.21.3.16",
+ env: "Production",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.enrich.putPolicy({
+ name: "clientip_policy",
+ match: {
+ indices: "clientips",
+ match_field: "client_ip",
+ enrich_fields: ["env"],
+ },
+});
+console.log(response2);
+
+const response3 = await client.enrich.executePolicy({
+ name: "clientip_policy",
+ wait_for_completion: "false",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/05ba0fdd0215e313ecea8a2f8f5a43b4.asciidoc b/docs/doc_examples/05ba0fdd0215e313ecea8a2f8f5a43b4.asciidoc
new file mode 100644
index 000000000..cdd215727
--- /dev/null
+++ b/docs/doc_examples/05ba0fdd0215e313ecea8a2f8f5a43b4.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05bee3adf46b9d6a2fef96c51bf958da.asciidoc b/docs/doc_examples/05bee3adf46b9d6a2fef96c51bf958da.asciidoc
new file mode 100644
index 000000000..39c360520
--- /dev/null
+++ b/docs/doc_examples/05bee3adf46b9d6a2fef96c51bf958da.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "click_role",
+ indices: [
+ {
+ names: ["events-*"],
+ privileges: ["read"],
+ query: {
+ match: {
+ category: "click",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05e637284bc3bedd46e0b7c26ad983c4.asciidoc b/docs/doc_examples/05e637284bc3bedd46e0b7c26ad983c4.asciidoc
new file mode 100644
index 000000000..1b9967b11
--- /dev/null
+++ b/docs/doc_examples/05e637284bc3bedd46e0b7c26ad983c4.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "alibabacloud_ai_search_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "alibabacloud_ai_search_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05f4a4b284f68f7fb13603d7cd854083.asciidoc b/docs/doc_examples/05f4a4b284f68f7fb13603d7cd854083.asciidoc
new file mode 100644
index 000000000..d80e2c6ab
--- /dev/null
+++ b/docs/doc_examples/05f4a4b284f68f7fb13603d7cd854083.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "logs-my_app-default",
+ settings: {
+ index: {
+ lifecycle: {
+ name: "new-lifecycle-policy",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/05f6049c677a156bdf9b83e71a3b87ed.asciidoc b/docs/doc_examples/05f6049c677a156bdf9b83e71a3b87ed.asciidoc
new file mode 100644
index 000000000..ceb726560
--- /dev/null
+++ b/docs/doc_examples/05f6049c677a156bdf9b83e71a3b87ed.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ssl.certificates();
+console.log(response);
+----
diff --git a/docs/doc_examples/0601b5cb5328c9ebff30f4be1b210f93.asciidoc b/docs/doc_examples/0601b5cb5328c9ebff30f4be1b210f93.asciidoc
new file mode 100644
index 000000000..709f0fadb
--- /dev/null
+++ b/docs/doc_examples/0601b5cb5328c9ebff30f4be1b210f93.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.status({
+ repository: "my_repository",
+ snapshot: "snapshot_2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/060a56477e39f272fc5a9cfe47443cf1.asciidoc b/docs/doc_examples/060a56477e39f272fc5a9cfe47443cf1.asciidoc
new file mode 100644
index 000000000..7f41907ea
--- /dev/null
+++ b/docs/doc_examples/060a56477e39f272fc5a9cfe47443cf1.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "simple_pattern",
+ pattern: "[0123456789]{3}",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "fd-786-335-514-x",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/0620a10ff15a2bb3eb489afc24ff0131.asciidoc b/docs/doc_examples/0620a10ff15a2bb3eb489afc24ff0131.asciidoc
new file mode 100644
index 000000000..6d337053c
--- /dev/null
+++ b/docs/doc_examples/0620a10ff15a2bb3eb489afc24ff0131.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: "surprise_me",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/06454a8e85e2d3479c90390bb955eb39.asciidoc b/docs/doc_examples/06454a8e85e2d3479c90390bb955eb39.asciidoc
new file mode 100644
index 000000000..5c103b7f9
--- /dev/null
+++ b/docs/doc_examples/06454a8e85e2d3479c90390bb955eb39.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "snapshot*,-snapshot_3",
+ sort: "name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/066e0bdcdfa3b8afa5d1e5777f73fccb.asciidoc b/docs/doc_examples/066e0bdcdfa3b8afa5d1e5777f73fccb.asciidoc
new file mode 100644
index 000000000..ebf376463
--- /dev/null
+++ b/docs/doc_examples/066e0bdcdfa3b8afa5d1e5777f73fccb.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-alias",
+ conditions: {
+ max_age: "7d",
+ max_docs: 1000,
+ max_primary_shard_size: "50gb",
+ max_primary_shard_docs: "2000",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/069030e5f43d8f8ce3e3eca40205027e.asciidoc b/docs/doc_examples/069030e5f43d8f8ce3e3eca40205027e.asciidoc
new file mode 100644
index 000000000..083a9bb5a
--- /dev/null
+++ b/docs/doc_examples/069030e5f43d8f8ce3e3eca40205027e.asciidoc
@@ -0,0 +1,58 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ manager: {
+ properties: {
+ age: {
+ type: "integer",
+ },
+ name: {
+ type: "text",
+ },
+ },
+ },
+ employees: {
+ type: "nested",
+ properties: {
+ age: {
+ type: "integer",
+ },
+ name: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ region: "US",
+ manager: {
+ name: "Alice White",
+ age: 30,
+ },
+ employees: [
+ {
+ name: "John Smith",
+ age: 34,
+ },
+ {
+ name: "Peter Brown",
+ age: 26,
+ },
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/06a761823a694850a6efe5d5bf61478c.asciidoc b/docs/doc_examples/06a761823a694850a6efe5d5bf61478c.asciidoc
new file mode 100644
index 000000000..e5aaf6495
--- /dev/null
+++ b/docs/doc_examples/06a761823a694850a6efe5d5bf61478c.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.putPolicy({
+ name: "users-policy",
+ match: {
+ indices: "users",
+ match_field: "email",
+ enrich_fields: ["first_name", "last_name", "city", "zip", "state"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/06b5d3d56c4d4e3b61ae42ea26401c40.asciidoc b/docs/doc_examples/06b5d3d56c4d4e3b61ae42ea26401c40.asciidoc
new file mode 100644
index 000000000..57334617a
--- /dev/null
+++ b/docs/doc_examples/06b5d3d56c4d4e3b61ae42ea26401c40.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.msearch({
+ index: "my-index-000001",
+ searches: [
+ {},
+ {
+ query: {
+ match: {
+ message: "this is a test",
+ },
+ },
+ },
+ {
+ index: "my-index-000002",
+ },
+ {
+ query: {
+ match_all: {},
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/06c0db0f42223761e32fa418066b275f.asciidoc b/docs/doc_examples/06c0db0f42223761e32fa418066b275f.asciidoc
new file mode 100644
index 000000000..2ee03c83d
--- /dev/null
+++ b/docs/doc_examples/06c0db0f42223761e32fa418066b275f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my-repo",
+ repository: {
+ type: "s3",
+ settings: {
+ bucket: "repo-bucket",
+ client: "elastic-internal-71bcd3",
+ base_path: "myrepo",
+ readonly: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/06d65e3505dcb306977185e8545cf4a8.asciidoc b/docs/doc_examples/06d65e3505dcb306977185e8545cf4a8.asciidoc
new file mode 100644
index 000000000..c4044aad9
--- /dev/null
+++ b/docs/doc_examples/06d65e3505dcb306977185e8545cf4a8.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.total_shards_per_node": 400,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0709a38613d2de90d418ce12b36af30e.asciidoc b/docs/doc_examples/0709a38613d2de90d418ce12b36af30e.asciidoc
new file mode 100644
index 000000000..dfe9d6be5
--- /dev/null
+++ b/docs/doc_examples/0709a38613d2de90d418ce12b36af30e.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.reroute();
+console.log(response);
+----
diff --git a/docs/doc_examples/070cf72783cfe534a04f2f64e4016052.asciidoc b/docs/doc_examples/070cf72783cfe534a04f2f64e4016052.asciidoc
new file mode 100644
index 000000000..9bde2346e
--- /dev/null
+++ b/docs/doc_examples/070cf72783cfe534a04f2f64e4016052.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ subobjects: false,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "metric_1",
+ document: {
+ time: "100ms",
+ "time.min": "10ms",
+ "time.max": "900ms",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/0718a0b4f4905a8c90c1ff93de557e56.asciidoc b/docs/doc_examples/0718a0b4f4905a8c90c1ff93de557e56.asciidoc
new file mode 100644
index 000000000..260c6a967
--- /dev/null
+++ b/docs/doc_examples/0718a0b4f4905a8c90c1ff93de557e56.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ grades_stats: {
+ extended_stats: {
+ field: "grade",
+ sigma: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0721c8adec544d5ecea3fcc410e45feb.asciidoc b/docs/doc_examples/0721c8adec544d5ecea3fcc410e45feb.asciidoc
new file mode 100644
index 000000000..c292cfd78
--- /dev/null
+++ b/docs/doc_examples/0721c8adec544d5ecea3fcc410e45feb.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.activateUserProfile({
+ grant_type: "password",
+ username: "jacknich",
+ password: "l0ng-r4nd0m-p@ssw0rd",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0737ebaea33631f001fb3f4226948492.asciidoc b/docs/doc_examples/0737ebaea33631f001fb3f4226948492.asciidoc
new file mode 100644
index 000000000..99f666660
--- /dev/null
+++ b/docs/doc_examples/0737ebaea33631f001fb3f4226948492.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_ip_locations",
+ mappings: {
+ properties: {
+ geoip: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/073864d3f52f8f79aafdaa85a88ac46a.asciidoc b/docs/doc_examples/073864d3f52f8f79aafdaa85a88ac46a.asciidoc
new file mode 100644
index 000000000..e1d337be8
--- /dev/null
+++ b/docs/doc_examples/073864d3f52f8f79aafdaa85a88ac46a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRealms({
+ realms: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0755471d7dce4785d2e7ed0c10182ea3.asciidoc b/docs/doc_examples/0755471d7dce4785d2e7ed0c10182ea3.asciidoc
new file mode 100644
index 000000000..23b0f56fe
--- /dev/null
+++ b/docs/doc_examples/0755471d7dce4785d2e7ed0c10182ea3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.getTransformStats({
+ transform_id: "ecommerce-customer-transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/07a5fdeb7805cec1d28ba288b28f5ff5.asciidoc b/docs/doc_examples/07a5fdeb7805cec1d28ba288b28f5ff5.asciidoc
new file mode 100644
index 000000000..3580265c3
--- /dev/null
+++ b/docs/doc_examples/07a5fdeb7805cec1d28ba288b28f5ff5.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.stopJob({
+ id: "sensor",
+ wait_for_completion: "true",
+ timeout: "10s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/07ba3eaa931f2cf110052e3544db51f8.asciidoc b/docs/doc_examples/07ba3eaa931f2cf110052e3544db51f8.asciidoc
new file mode 100644
index 000000000..eb7e9575d
--- /dev/null
+++ b/docs/doc_examples/07ba3eaa931f2cf110052e3544db51f8.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ max_docs: 10,
+ source: {
+ index: "my-index-000001",
+ query: {
+ function_score: {
+ random_score: {},
+ min_score: 0.9,
+ },
+ },
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/07c07f6d497b1a3012aa4320f830e09e.asciidoc b/docs/doc_examples/07c07f6d497b1a3012aa4320f830e09e.asciidoc
new file mode 100644
index 000000000..e70d7e96c
--- /dev/null
+++ b/docs/doc_examples/07c07f6d497b1a3012aa4320f830e09e.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.forgetFollower({
+ index: "leader_index",
+ follower_cluster: "follower_cluster",
+ follower_index: "follower_index",
+ follower_index_uuid: "vYpnaWPRQB6mNspmoCeYyA",
+ leader_remote_cluster: "leader_cluster",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/07dadb9b0a774bd8e7f3527cf8a44afc.asciidoc b/docs/doc_examples/07dadb9b0a774bd8e7f3527cf8a44afc.asciidoc
new file mode 100644
index 000000000..e69d25470
--- /dev/null
+++ b/docs/doc_examples/07dadb9b0a774bd8e7f3527cf8a44afc.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ semantic: {
+ field: "inference_field",
+ query: "Best surfing places",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/07de76cb0e7f11c7533788faf8c093c3.asciidoc b/docs/doc_examples/07de76cb0e7f11c7533788faf8c093c3.asciidoc
new file mode 100644
index 000000000..66dacc74e
--- /dev/null
+++ b/docs/doc_examples/07de76cb0e7f11c7533788faf8c093c3.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ },
+ labels: {
+ type: "flattened",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/07ec38b97601286ec106986a84e1e5f7.asciidoc b/docs/doc_examples/07ec38b97601286ec106986a84e1e5f7.asciidoc
new file mode 100644
index 000000000..b473ddcdc
--- /dev/null
+++ b/docs/doc_examples/07ec38b97601286ec106986a84e1e5f7.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "job-candidates",
+ mappings: {
+ properties: {
+ name: {
+ type: "keyword",
+ },
+ programming_languages: {
+ type: "keyword",
+ },
+ required_matches: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/080c34d8151d02b760571e3a2899fa97.asciidoc b/docs/doc_examples/080c34d8151d02b760571e3a2899fa97.asciidoc
new file mode 100644
index 000000000..0c931b62f
--- /dev/null
+++ b/docs/doc_examples/080c34d8151d02b760571e3a2899fa97.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ settings: {
+ analysis: {
+ filter: {
+ email: {
+ type: "pattern_capture",
+ preserve_original: true,
+ patterns: ["([^@]+)", "(\\p{L}+)", "(\\d+)", "@(.+)"],
+ },
+ },
+ analyzer: {
+ email: {
+ tokenizer: "uax_url_email",
+ filter: ["email", "lowercase", "unique"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc b/docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc
new file mode 100644
index 000000000..16eda0fcc
--- /dev/null
+++ b/docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "my-e5-model",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ adaptive_allocations: {
+ enabled: true,
+ min_number_of_allocations: 3,
+ max_number_of_allocations: 10,
+ },
+ num_threads: 1,
+ model_id: ".multilingual-e5-small",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/083e514297c09e91211f0d168aef1b0b.asciidoc b/docs/doc_examples/083e514297c09e91211f0d168aef1b0b.asciidoc
new file mode 100644
index 000000000..744d438b3
--- /dev/null
+++ b/docs/doc_examples/083e514297c09e91211f0d168aef1b0b.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "logs-generic-default",
+ query: {
+ match: {
+ "event.sequence": "97",
+ },
+ },
+ script: {
+ source: "ctx._source.event.original = params.new_event",
+ lang: "painless",
+ params: {
+ new_event: "FOOBAR",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/086ec4c5d86bbf80fb80162e94037689.asciidoc b/docs/doc_examples/086ec4c5d86bbf80fb80162e94037689.asciidoc
new file mode 100644
index 000000000..7508b3af3
--- /dev/null
+++ b/docs/doc_examples/086ec4c5d86bbf80fb80162e94037689.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ weighted_tokens: {
+ query_expansion_field: {
+ tokens: {
+ "2161": 0.4679,
+ "2621": 0.307,
+ "2782": 0.1299,
+ "2851": 0.1056,
+ "3088": 0.3041,
+ "3376": 0.1038,
+ "3467": 0.4873,
+ "3684": 0.8958,
+ "4380": 0.334,
+ "4542": 0.4636,
+ "4633": 2.2805,
+ "4785": 1.2628,
+ "4860": 1.0655,
+ "5133": 1.0709,
+ "7139": 1.0016,
+ "7224": 0.2486,
+ "7387": 0.0985,
+ "7394": 0.0542,
+ "8915": 0.369,
+ "9156": 2.8947,
+ "10505": 0.2771,
+ "11464": 0.3996,
+ "13525": 0.0088,
+ "14178": 0.8161,
+ "16893": 0.1376,
+ "17851": 1.5348,
+ "19939": 0.6012,
+ },
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: false,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0881397074d261ccc2db514daf116c31.asciidoc b/docs/doc_examples/0881397074d261ccc2db514daf116c31.asciidoc
new file mode 100644
index 000000000..c15090e30
--- /dev/null
+++ b/docs/doc_examples/0881397074d261ccc2db514daf116c31.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ id: "VuaCfGcBCdbkQm-e5aOx",
+ with_limited_by: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/08a76b3f5a8394d8f9084113334a260a.asciidoc b/docs/doc_examples/08a76b3f5a8394d8f9084113334a260a.asciidoc
new file mode 100644
index 000000000..d10141ebc
--- /dev/null
+++ b/docs/doc_examples/08a76b3f5a8394d8f9084113334a260a.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_boxplot: {
+ boxplot: {
+ field: "load_time",
+ compression: 200,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/08c9af9dd519c011deedd406f3061836.asciidoc b/docs/doc_examples/08c9af9dd519c011deedd406f3061836.asciidoc
new file mode 100644
index 000000000..0707e105c
--- /dev/null
+++ b/docs/doc_examples/08c9af9dd519c011deedd406f3061836.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.previewDatafeed({
+ datafeed_config: {
+ indices: ["kibana_sample_data_ecommerce"],
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ _index: "kibana_sample_data_ecommerce",
+ },
+ },
+ ],
+ },
+ },
+ scroll_size: 1000,
+ },
+ job_config: {
+ description: "Find customers spending an unusually high amount in an hour",
+ analysis_config: {
+ bucket_span: "1h",
+ detectors: [
+ {
+ detector_description: "High total sales",
+ function: "high_sum",
+ field_name: "taxful_total_price",
+ over_field_name: "customer_full_name.keyword",
+ },
+ ],
+ influencers: ["customer_full_name.keyword", "category.keyword"],
+ },
+ analysis_limits: {
+ model_memory_limit: "10mb",
+ },
+ data_description: {
+ time_field: "order_date",
+ time_format: "epoch_ms",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/08e08feb514b24006e13f258d617d873.asciidoc b/docs/doc_examples/08e08feb514b24006e13f258d617d873.asciidoc
new file mode 100644
index 000000000..ad2134f5b
--- /dev/null
+++ b/docs/doc_examples/08e08feb514b24006e13f258d617d873.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getScript({
+ id: "calculate-score",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/08e79ca9fdcdfebb2c6a79e6837e649d.asciidoc b/docs/doc_examples/08e79ca9fdcdfebb2c6a79e6837e649d.asciidoc
new file mode 100644
index 000000000..ab12f4a4c
--- /dev/null
+++ b/docs/doc_examples/08e79ca9fdcdfebb2c6a79e6837e649d.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ tag_cardinality: {
+ cardinality: {
+ field: "tag",
+ missing: "N/A",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc b/docs/doc_examples/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc
new file mode 100644
index 000000000..5c797b641
--- /dev/null
+++ b/docs/doc_examples/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ regexp: {
+ "user.id": {
+ value: "k.*y",
+ flags: "ALL",
+ case_insensitive: true,
+ max_determinized_states: 10000,
+ rewrite: "constant_score_blended",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/091200b658023db31dffc2f08a85a9cc.asciidoc b/docs/doc_examples/091200b658023db31dffc2f08a85a9cc.asciidoc
new file mode 100644
index 000000000..6c0f24be4
--- /dev/null
+++ b/docs/doc_examples/091200b658023db31dffc2f08a85a9cc.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "routing.allocation.total_shards_per_node": -1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0957bbd535f58c97b12ffba90813d64c.asciidoc b/docs/doc_examples/0957bbd535f58c97b12ffba90813d64c.asciidoc
new file mode 100644
index 000000000..f21197ae4
--- /dev/null
+++ b/docs/doc_examples/0957bbd535f58c97b12ffba90813d64c.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "analyze_sample",
+ settings: {
+ "index.analyze.max_token_count": 20000,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/095d60b2cfc5004c97efc49f27287262.asciidoc b/docs/doc_examples/095d60b2cfc5004c97efc49f27287262.asciidoc
new file mode 100644
index 000000000..2b125347a
--- /dev/null
+++ b/docs/doc_examples/095d60b2cfc5004c97efc49f27287262.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date",
+ fixed_interval: "30d",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/095e3f21941a9cc75f398389a075152d.asciidoc b/docs/doc_examples/095e3f21941a9cc75f398389a075152d.asciidoc
new file mode 100644
index 000000000..f88e0adc9
--- /dev/null
+++ b/docs/doc_examples/095e3f21941a9cc75f398389a075152d.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "cross-encoder__ms-marco-tinybert-l-2-v2",
+ docs: [
+ {
+ text_field:
+ "Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.",
+ },
+ {
+ text_field: "New York City is famous for the Metropolitan Museum of Art.",
+ },
+ ],
+ inference_config: {
+ text_similarity: {
+ text: "How many people live in Berlin?",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09769561f082b50558fb7d8707719963.asciidoc b/docs/doc_examples/09769561f082b50558fb7d8707719963.asciidoc
new file mode 100644
index 000000000..674ca8a30
--- /dev/null
+++ b/docs/doc_examples/09769561f082b50558fb7d8707719963.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "ingest",
+ filter_path: "nodes.*.ingest",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/099006ab11b52ea99693401dceee8bad.asciidoc b/docs/doc_examples/099006ab11b52ea99693401dceee8bad.asciidoc
new file mode 100644
index 000000000..e9a963852
--- /dev/null
+++ b/docs/doc_examples/099006ab11b52ea99693401dceee8bad.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "calculate-score",
+ script: {
+ lang: "painless",
+ source: "Math.log(_score * 2) + params['my_modifier']",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09944369863fd8666d5301d717317276.asciidoc b/docs/doc_examples/09944369863fd8666d5301d717317276.asciidoc
new file mode 100644
index 000000000..9a6bf1366
--- /dev/null
+++ b/docs/doc_examples/09944369863fd8666d5301d717317276.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "condition",
+ filter: ["lowercase"],
+ script: {
+ source: "token.getTerm().length() < 5",
+ },
+ },
+ ],
+ text: "THE QUICK BROWN FOX",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09a44b619a99f6bf3f01bd5e258fd22d.asciidoc b/docs/doc_examples/09a44b619a99f6bf3f01bd5e258fd22d.asciidoc
new file mode 100644
index 000000000..40a384942
--- /dev/null
+++ b/docs/doc_examples/09a44b619a99f6bf3f01bd5e258fd22d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ text: "New York",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09a478fe32a7b7d814083ffa5297bcdf.asciidoc b/docs/doc_examples/09a478fe32a7b7d814083ffa5297bcdf.asciidoc
new file mode 100644
index 000000000..31140522e
--- /dev/null
+++ b/docs/doc_examples/09a478fe32a7b7d814083ffa5297bcdf.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ fuzzy: {
+ "user.id": {
+ value: "ki",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09bdf9a7e22733d668476724042a406c.asciidoc b/docs/doc_examples/09bdf9a7e22733d668476724042a406c.asciidoc
new file mode 100644
index 000000000..74ff0e94b
--- /dev/null
+++ b/docs/doc_examples/09bdf9a7e22733d668476724042a406c.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "timeseries_template",
+ index_patterns: ["timeseries"],
+ data_stream: {},
+ template: {
+ settings: {
+ number_of_shards: 1,
+ number_of_replicas: 1,
+ "index.lifecycle.name": "timeseries_policy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc b/docs/doc_examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc
new file mode 100644
index 000000000..c5eca11d6
--- /dev/null
+++ b/docs/doc_examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ rule: {
+ match_criteria: {
+ user_query: "pugs",
+ },
+ ruleset_ids: ["my-ruleset"],
+ organic: {
+ match: {
+ description: "puggles",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09ce0ec993c494ac01f01ef9815fcc4b.asciidoc b/docs/doc_examples/09ce0ec993c494ac01f01ef9815fcc4b.asciidoc
new file mode 100644
index 000000000..2d45c039f
--- /dev/null
+++ b/docs/doc_examples/09ce0ec993c494ac01f01ef9815fcc4b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index",
+ runtime: {
+ "http.clientip": {
+ type: "ip",
+ script:
+ "\n String clientip=grok('%{COMMONAPACHELOG}').extract(doc[\"message\"].value)?.clientip;\n if (clientip != null) emit(clientip);\n ",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09d617863a103c82fb4101e6165ea7fe.asciidoc b/docs/doc_examples/09d617863a103c82fb4101e6165ea7fe.asciidoc
new file mode 100644
index 000000000..f8e0b44af
--- /dev/null
+++ b/docs/doc_examples/09d617863a103c82fb4101e6165ea7fe.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_all: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/09e6e06ba562f4b9bac59455e9151a80.asciidoc b/docs/doc_examples/09e6e06ba562f4b9bac59455e9151a80.asciidoc
new file mode 100644
index 000000000..2c768dba6
--- /dev/null
+++ b/docs/doc_examples/09e6e06ba562f4b9bac59455e9151a80.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.evaluateDataFrame({
+ index: "animal_classification",
+ evaluation: {
+ classification: {
+ actual_field: "animal_class",
+ metrics: {
+ auc_roc: {
+ class_name: "dog",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a3003fa5af850e415634b50b1029859.asciidoc b/docs/doc_examples/0a3003fa5af850e415634b50b1029859.asciidoc
new file mode 100644
index 000000000..9d6394951
--- /dev/null
+++ b/docs/doc_examples/0a3003fa5af850e415634b50b1029859.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "logs-generic-default*",
+ filter_path: "hits.hits._index",
+ query: {
+ match: {
+ "event.sequence": "97",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a3186bf20b5359393406fc0cb433313.asciidoc b/docs/doc_examples/0a3186bf20b5359393406fc0cb433313.asciidoc
new file mode 100644
index 000000000..e534e77b4
--- /dev/null
+++ b/docs/doc_examples/0a3186bf20b5359393406fc0cb433313.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+ columnar: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a46ac2968a574ce145f197f10d30152.asciidoc b/docs/doc_examples/0a46ac2968a574ce145f197f10d30152.asciidoc
new file mode 100644
index 000000000..ebec6756f
--- /dev/null
+++ b/docs/doc_examples/0a46ac2968a574ce145f197f10d30152.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "library",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "Leviathan Wakes",
+ },
+ },
+ {
+ name: "Leviathan Wakes",
+ author: "James S.A. Corey",
+ release_date: "2011-06-02",
+ page_count: 561,
+ },
+ {
+ index: {
+ _id: "Hyperion",
+ },
+ },
+ {
+ name: "Hyperion",
+ author: "Dan Simmons",
+ release_date: "1989-05-26",
+ page_count: 482,
+ },
+ {
+ index: {
+ _id: "Dune",
+ },
+ },
+ {
+ name: "Dune",
+ author: "Frank Herbert",
+ release_date: "1965-06-01",
+ page_count: 604,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a46cc8fe93e372909660a63dc52ae3b.asciidoc b/docs/doc_examples/0a46cc8fe93e372909660a63dc52ae3b.asciidoc
new file mode 100644
index 000000000..497a5e10b
--- /dev/null
+++ b/docs/doc_examples/0a46cc8fe93e372909660a63dc52ae3b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "",
+ aliases: {
+ "my-alias": {
+ is_write_index: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a650401134f07e40216f0d0d1a66a32.asciidoc b/docs/doc_examples/0a650401134f07e40216f0d0d1a66a32.asciidoc
new file mode 100644
index 000000000..68956e123
--- /dev/null
+++ b/docs/doc_examples/0a650401134f07e40216f0d0d1a66a32.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.allocation({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a6d56a66a2652ac6de68f8bd544a175.asciidoc b/docs/doc_examples/0a6d56a66a2652ac6de68f8bd544a175.asciidoc
new file mode 100644
index 000000000..994e1c6be
--- /dev/null
+++ b/docs/doc_examples/0a6d56a66a2652ac6de68f8bd544a175.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index1",
+ query: {
+ query_string: {
+ query: "running with scissors",
+ fields: ["comment", "comment.english"],
+ },
+ },
+ highlight: {
+ order: "score",
+ fields: {
+ comment: {
+ matched_fields: ["comment.english"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a701bdc7b6786026f40c0be8ebfc753.asciidoc b/docs/doc_examples/0a701bdc7b6786026f40c0be8ebfc753.asciidoc
new file mode 100644
index 000000000..187671a16
--- /dev/null
+++ b/docs/doc_examples/0a701bdc7b6786026f40c0be8ebfc753.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ query: {
+ bool: {
+ filter: {
+ term: {
+ currency: "EUR",
+ },
+ },
+ },
+ },
+ },
+ latest: {
+ unique_key: ["geoip.country_iso_code", "geoip.region_name"],
+ sort: "order_date",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a758d9dec74d9e942cf41a06499234f.asciidoc b/docs/doc_examples/0a758d9dec74d9e942cf41a06499234f.asciidoc
new file mode 100644
index 000000000..c33a0b1dd
--- /dev/null
+++ b/docs/doc_examples/0a758d9dec74d9e942cf41a06499234f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ counter: 1,
+ tags: ["red"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a84c5b7c0793be745b13eaf13e94422.asciidoc b/docs/doc_examples/0a84c5b7c0793be745b13eaf13e94422.asciidoc
new file mode 100644
index 000000000..cf13f17c8
--- /dev/null
+++ b/docs/doc_examples/0a84c5b7c0793be745b13eaf13e94422.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "routing.allocation.total_shards_per_node": "2",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0a9173f3b22716c78653976dc4799eae.asciidoc b/docs/doc_examples/0a9173f3b22716c78653976dc4799eae.asciidoc
new file mode 100644
index 000000000..dd6c9eac3
--- /dev/null
+++ b/docs/doc_examples/0a9173f3b22716c78653976dc4799eae.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ product: {
+ terms: {
+ field: "product",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ac295efdabd59e7b1f1a4577535d942.asciidoc b/docs/doc_examples/0ac295efdabd59e7b1f1a4577535d942.asciidoc
new file mode 100644
index 000000000..cbc8b66d8
--- /dev/null
+++ b/docs/doc_examples/0ac295efdabd59e7b1f1a4577535d942.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence\n [ process where process.name == "regsvr32.exe" ]\n [ file where stringContains(file.name, "scrobj.dll") ]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc b/docs/doc_examples/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc
new file mode 100644
index 000000000..e6c8eca1b
--- /dev/null
+++ b/docs/doc_examples/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ track_total_hits: true,
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ad86b582aff1235f37ccb2cc90adad5.asciidoc b/docs/doc_examples/0ad86b582aff1235f37ccb2cc90adad5.asciidoc
new file mode 100644
index 000000000..2d94108dd
--- /dev/null
+++ b/docs/doc_examples/0ad86b582aff1235f37ccb2cc90adad5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.open({
+ index: ".ds-my-data-stream-2099.03.07-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc b/docs/doc_examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc
new file mode 100644
index 000000000..5c948b3d2
--- /dev/null
+++ b/docs/doc_examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "amazon_bedrock_embeddings",
+ inference_config: {
+ service: "amazonbedrock",
+ service_settings: {
+ access_key: "",
+ secret_key: "",
+ region: "us-east-1",
+ provider: "amazontitan",
+ model: "amazon.titan-embed-text-v2:0",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0adbce828234ca221e3d03b184296407.asciidoc b/docs/doc_examples/0adbce828234ca221e3d03b184296407.asciidoc
new file mode 100644
index 000000000..65d80a5f0
--- /dev/null
+++ b/docs/doc_examples/0adbce828234ca221e3d03b184296407.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index",
+ runtime: {
+ "http.clientip": {
+ type: "ip",
+ script:
+ "\n String clientip=grok('%{COMMONAPACHELOG}').extract(doc[\"message\"].value)?.clientip;\n if (clientip != null) emit(clientip); \n ",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc b/docs/doc_examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc
new file mode 100644
index 000000000..2c93643b2
--- /dev/null
+++ b/docs/doc_examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateFiltering({
+ connector_id: "my-g-drive-connector",
+ rules: [
+ {
+ field: "file_extension",
+ id: "exclude-txt-files",
+ order: 0,
+ policy: "exclude",
+ rule: "equals",
+ value: "txt",
+ },
+ {
+ field: "_",
+ id: "DEFAULT",
+ order: 1,
+ policy: "include",
+ rule: "regex",
+ value: ".*",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0aff04881be21eea45375ec4f4f50e66.asciidoc b/docs/doc_examples/0aff04881be21eea45375ec4f4f50e66.asciidoc
new file mode 100644
index 000000000..3aa94fd9f
--- /dev/null
+++ b/docs/doc_examples/0aff04881be21eea45375ec4f4f50e66.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-api-key",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0b1c5486f96bfa5db8db854c0178dbe5.asciidoc b/docs/doc_examples/0b1c5486f96bfa5db8db854c0178dbe5.asciidoc
new file mode 100644
index 000000000..ce0112e17
--- /dev/null
+++ b/docs/doc_examples/0b1c5486f96bfa5db8db854c0178dbe5.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ cluster_one: {
+ seeds: ["127.0.0.1:{remote-interface-default-port}"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0b47b0bef81b9b5eecfb3775695bd6ad.asciidoc b/docs/doc_examples/0b47b0bef81b9b5eecfb3775695bd6ad.asciidoc
new file mode 100644
index 000000000..ac32302d7
--- /dev/null
+++ b/docs/doc_examples/0b47b0bef81b9b5eecfb3775695bd6ad.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "remote_monitor",
+ password: "changeme",
+ roles: ["remote_monitoring_agent"],
+ full_name: "Internal Agent For Remote Monitoring",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0b4e50f1b5a0537cbb1a41276bb51c54.asciidoc b/docs/doc_examples/0b4e50f1b5a0537cbb1a41276bb51c54.asciidoc
new file mode 100644
index 000000000..6f9ec7de2
--- /dev/null
+++ b/docs/doc_examples/0b4e50f1b5a0537cbb1a41276bb51c54.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ runtime_mappings: {
+ day_of_week: {
+ type: "keyword",
+ script: {
+ source:
+ "emit(doc['@timestamp'].value.dayOfWeekEnum\n .getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
+ },
+ },
+ },
+ aggs: {
+ day_of_week: {
+ terms: {
+ field: "day_of_week",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0b615ff4ef5a8847ee8109b2fd11619a.asciidoc b/docs/doc_examples/0b615ff4ef5a8847ee8109b2fd11619a.asciidoc
new file mode 100644
index 000000000..ccd775ed1
--- /dev/null
+++ b/docs/doc_examples/0b615ff4ef5a8847ee8109b2fd11619a.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ match: {
+ message: "some message",
+ },
+ },
+ script: {
+ id: "calculate-score",
+ params: {
+ my_modifier: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0b913fb9e010d877c0be015519cfddc6.asciidoc b/docs/doc_examples/0b913fb9e010d877c0be015519cfddc6.asciidoc
new file mode 100644
index 000000000..9717c0327
--- /dev/null
+++ b/docs/doc_examples/0b913fb9e010d877c0be015519cfddc6.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ document: {
+ "@timestamp": "2019-05-18T15:57:27.541Z",
+ ip: "225.44.217.191",
+ extension: "jpg",
+ response: "200",
+ geo: {
+ coordinates: {
+ lat: 38.53146222,
+ lon: -121.7864906,
+ },
+ },
+ url: "https://media-for-the-masses.theacademyofperformingartsandscience.org/uploads/charles-fullerton.jpg",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000002",
+ document: {
+ "@timestamp": "2019-05-20T03:44:20.844Z",
+ ip: "198.247.165.49",
+ extension: "php",
+ response: "200",
+ geo: {
+ coordinates: {
+ lat: 37.13189556,
+ lon: -76.4929875,
+ },
+ },
+ memory: 241720,
+ url: "https://theacademyofperformingartsandscience.org/people/type:astronauts/name:laurel-b-clark/profile",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/0b987b4101e016653a32d7b092d47e4c.asciidoc b/docs/doc_examples/0b987b4101e016653a32d7b092d47e4c.asciidoc
new file mode 100644
index 000000000..a2a3e2f36
--- /dev/null
+++ b/docs/doc_examples/0b987b4101e016653a32d7b092d47e4c.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ region: {
+ type: "keyword",
+ },
+ manager: {
+ properties: {
+ age: {
+ type: "integer",
+ },
+ name: {
+ properties: {
+ first: {
+ type: "text",
+ },
+ last: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc b/docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc
new file mode 100644
index 000000000..01200be80
--- /dev/null
+++ b/docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example_nested",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ nested: {
+ path: "nested_field",
+ inner_hits: {
+ name: "nested_vector",
+ _source: false,
+ fields: ["nested_field.paragraph_id"],
+ },
+ query: {
+ knn: {
+ field: "nested_field.nested_vector",
+ query_vector: [1, 0, 0.5],
+ k: 10,
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ term: {
+ topic: "ai",
+ },
+ },
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ _source: ["topic"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc b/docs/doc_examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc
new file mode 100644
index 000000000..395132389
--- /dev/null
+++ b/docs/doc_examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ price: {
+ unmapped_type: "long",
+ },
+ },
+ ],
+ query: {
+ term: {
+ product: "chocolate",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc b/docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc
new file mode 100644
index 000000000..5b0c7d4e7
--- /dev/null
+++ b/docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.asyncQuery({
+ format: "json",
+ body: {
+ query:
+ "\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
+ include_ccs_metadata: true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c05c66cfe3a2169b1ec1aba77e26db2.asciidoc b/docs/doc_examples/0c05c66cfe3a2169b1ec1aba77e26db2.asciidoc
new file mode 100644
index 000000000..a53e1145d
--- /dev/null
+++ b/docs/doc_examples/0c05c66cfe3a2169b1ec1aba77e26db2.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ query: {
+ rank_feature: {
+ field: "pagerank",
+ saturation: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc b/docs/doc_examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc
new file mode 100644
index 000000000..4b95c61f7
--- /dev/null
+++ b/docs/doc_examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ "http.client_ip": {
+ type: "ip",
+ script:
+ "\n String clientip=grok('%{COMMONAPACHELOG}').extract(doc[\"message\"].value)?.clientip;\n if (clientip != null) emit(clientip); \n ",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc b/docs/doc_examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc
new file mode 100644
index 000000000..9d967d750
--- /dev/null
+++ b/docs/doc_examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.recovery({
+ v: "true",
+ h: "i,s,t,ty,st,shost,thost,f,fp,b,bp",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c464965126cc09e6812716a145991d4.asciidoc b/docs/doc_examples/0c464965126cc09e6812716a145991d4.asciidoc
new file mode 100644
index 000000000..179e814a0
--- /dev/null
+++ b/docs/doc_examples/0c464965126cc09e6812716a145991d4.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.info({
+ node_id: "ingest",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc b/docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc
new file mode 100644
index 000000000..e0413d7dd
--- /dev/null
+++ b/docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "cbor-attachment",
+ description: "Extract attachment information",
+ processors: [
+ {
+ attachment: {
+ field: "data",
+ remove_binary: true,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c688eecf4ebdffdbe1deae0983c3ed8.asciidoc b/docs/doc_examples/0c688eecf4ebdffdbe1deae0983c3ed8.asciidoc
new file mode 100644
index 000000000..5ee262246
--- /dev/null
+++ b/docs/doc_examples/0c688eecf4ebdffdbe1deae0983c3ed8.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "user_hits",
+ size: 0,
+ aggs: {
+ users_per_day: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "day",
+ },
+ aggs: {
+ distinct_users: {
+ cardinality: {
+ field: "user_id",
+ },
+ },
+ total_new_users: {
+ cumulative_cardinality: {
+ buckets_path: "distinct_users",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c6f9c9da75293fae69659ac1d6329de.asciidoc b/docs/doc_examples/0c6f9c9da75293fae69659ac1d6329de.asciidoc
new file mode 100644
index 000000000..a22aa8928
--- /dev/null
+++ b/docs/doc_examples/0c6f9c9da75293fae69659ac1d6329de.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateToken({
+ refresh_token: "vLBPvmAB6KvwvJZr27cS",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c6fc67c2dd1c1771cd866ce471d74e1.asciidoc b/docs/doc_examples/0c6fc67c2dd1c1771cd866ce471d74e1.asciidoc
new file mode 100644
index 000000000..1ade11a6c
--- /dev/null
+++ b/docs/doc_examples/0c6fc67c2dd1c1771cd866ce471d74e1.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping4",
+ roles: ["superuser"],
+ enabled: true,
+ rules: {
+ any: [
+ {
+ field: {
+ username: "esadmin",
+ },
+ },
+ {
+ field: {
+ groups: ["cn=admins,dc=example,dc=com", "cn=other,dc=example,dc=com"],
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc b/docs/doc_examples/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc
new file mode 100644
index 000000000..c89f06982
--- /dev/null
+++ b/docs/doc_examples/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ match: {
+ message: "{{^name_exists}}Hello World{{/name_exists}}",
+ },
+ },
+ },
+ params: {
+ name_exists: false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc b/docs/doc_examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc
new file mode 100644
index 000000000..4b46d7ad7
--- /dev/null
+++ b/docs/doc_examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.delete({
+ index: "my-index-000001",
+ id: 1,
+ routing: "shard-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc b/docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc
new file mode 100644
index 000000000..54759101e
--- /dev/null
+++ b/docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ match: {
+ title: {
+ query: "fluffy pancakes breakfast",
+ minimum_should_match: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ca6aae1ab2f0be6127beea8a245374e.asciidoc b/docs/doc_examples/0ca6aae1ab2f0be6127beea8a245374e.asciidoc
new file mode 100644
index 000000000..a2c6d6af8
--- /dev/null
+++ b/docs/doc_examples/0ca6aae1ab2f0be6127beea8a245374e.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index: "my-index-000001,cluster*:my-index-000001,-cluster_three:*",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ _source: ["user.id", "message", "http.response.status_code"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0cee58617e75f493c5049d77be1c49f3.asciidoc b/docs/doc_examples/0cee58617e75f493c5049d77be1c49f3.asciidoc
new file mode 100644
index 000000000..8d23a9a95
--- /dev/null
+++ b/docs/doc_examples/0cee58617e75f493c5049d77be1c49f3.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ fuzzy: {
+ "user.id": {
+ value: "ki",
+ fuzziness: "AUTO",
+ max_expansions: 50,
+ prefix_length: 0,
+ transpositions: true,
+ rewrite: "constant_score_blended",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc b/docs/doc_examples/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc
new file mode 100644
index 000000000..5f8112567
--- /dev/null
+++ b/docs/doc_examples/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ runtime_mappings: {
+ "grade.corrected": {
+ type: "double",
+ script: {
+ source: "emit(Math.min(100, doc['grade'].value * params.correction))",
+ params: {
+ correction: 1.2,
+ },
+ },
+ },
+ },
+ aggs: {
+ avg_corrected_grade: {
+ avg: {
+ field: "grade.corrected",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d0f7ece06f21e624d21b09804732f61.asciidoc b/docs/doc_examples/0d0f7ece06f21e624d21b09804732f61.asciidoc
new file mode 100644
index 000000000..700c152f7
--- /dev/null
+++ b/docs/doc_examples/0d0f7ece06f21e624d21b09804732f61.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ grade_avg: {
+ avg: {
+ field: "grade",
+ missing: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc b/docs/doc_examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc
new file mode 100644
index 000000000..fb9189c62
--- /dev/null
+++ b/docs/doc_examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.put({
+ connector_id: "my-connector",
+ index_name: "search-google-drive",
+ name: "My Connector",
+ description: "My Connector to sync data to Elastic index from Google Drive",
+ service_type: "google_drive",
+ language: "en",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d49474511b236bc89e768c8ee91adf1.asciidoc b/docs/doc_examples/0d49474511b236bc89e768c8ee91adf1.asciidoc
new file mode 100644
index 000000000..1cfc2e11d
--- /dev/null
+++ b/docs/doc_examples/0d49474511b236bc89e768c8ee91adf1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ simple_query_string: {
+ query: '"fried eggs" +(eggplant | potato) -frittata',
+ fields: ["title^5", "body"],
+ default_operator: "and",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d54ddad2bf6f76aa5c35f53ba77748a.asciidoc b/docs/doc_examples/0d54ddad2bf6f76aa5c35f53ba77748a.asciidoc
new file mode 100644
index 000000000..ef4ef2bff
--- /dev/null
+++ b/docs/doc_examples/0d54ddad2bf6f76aa5c35f53ba77748a.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["porter_stem"],
+ text: "the foxes jumping quickly",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d59af9dc556dc526b9394051efa800a.asciidoc b/docs/doc_examples/0d59af9dc556dc526b9394051efa800a.asciidoc
new file mode 100644
index 000000000..19e14ecd5
--- /dev/null
+++ b/docs/doc_examples/0d59af9dc556dc526b9394051efa800a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "logs-foo-bar",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc b/docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc
new file mode 100644
index 000000000..c95b502ca
--- /dev/null
+++ b/docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc
@@ -0,0 +1,57 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ term: {
+ topic: "elastic",
+ },
+ },
+ },
+ },
+ {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query:
+ "(information retrieval) OR (artificial intelligence)",
+ default_field: "text",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ _source: false,
+ size: 1,
+ explain: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc b/docs/doc_examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc
new file mode 100644
index 000000000..47243afad
--- /dev/null
+++ b/docs/doc_examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["foo", "bar"],
+ template: {
+ settings: {
+ number_of_shards: 3,
+ },
+ },
+ _meta: {
+ description: "set number of shards to three",
+ serialization: {
+ class: "MyIndexTemplate",
+ id: 17,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0d94d76b7f00d0459d1f8c962c144dcd.asciidoc b/docs/doc_examples/0d94d76b7f00d0459d1f8c962c144dcd.asciidoc
new file mode 100644
index 000000000..85243323d
--- /dev/null
+++ b/docs/doc_examples/0d94d76b7f00d0459d1f8c962c144dcd.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping8",
+ roles: ["superuser"],
+ enabled: true,
+ rules: {
+ all: [
+ {
+ any: [
+ {
+ field: {
+ dn: "*,ou=admin,dc=example,dc=com",
+ },
+ },
+ {
+ field: {
+ username: ["es-admin", "es-system"],
+ },
+ },
+ ],
+ },
+ {
+ field: {
+ groups: "cn=people,dc=example,dc=com",
+ },
+ },
+ {
+ except: {
+ field: {
+ "metadata.terminated_date": null,
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0da477cb8a7883539ce3ae7ac1e9c5cb.asciidoc b/docs/doc_examples/0da477cb8a7883539ce3ae7ac1e9c5cb.asciidoc
new file mode 100644
index 000000000..f0fba00e2
--- /dev/null
+++ b/docs/doc_examples/0da477cb8a7883539ce3ae7ac1e9c5cb.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ prices: {
+ histogram: {
+ field: "price",
+ interval: 50,
+ min_doc_count: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc b/docs/doc_examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc
new file mode 100644
index 000000000..841b610e1
--- /dev/null
+++ b/docs/doc_examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_s3_repository",
+ repository: {
+ type: "s3",
+ settings: {
+ bucket: "my-bucket",
+ client: "my-alternate-client",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0db06c3cba57cf442ac7fab89966e1e1.asciidoc b/docs/doc_examples/0db06c3cba57cf442ac7fab89966e1e1.asciidoc
new file mode 100644
index 000000000..5530f7f7c
--- /dev/null
+++ b/docs/doc_examples/0db06c3cba57cf442ac7fab89966e1e1.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ my_id: "1",
+ text: "This is a question",
+ my_join_field: "question",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ my_id: "2",
+ text: "This is another question",
+ my_join_field: "question",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/0dd30ffe2f900dde86cc9bb601d5e68e.asciidoc b/docs/doc_examples/0dd30ffe2f900dde86cc9bb601d5e68e.asciidoc
new file mode 100644
index 000000000..0161abb42
--- /dev/null
+++ b/docs/doc_examples/0dd30ffe2f900dde86cc9bb601d5e68e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ h: "id,ip,port,v,m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ddf705317d9c5095b4a1419a2e3bace.asciidoc b/docs/doc_examples/0ddf705317d9c5095b4a1419a2e3bace.asciidoc
new file mode 100644
index 000000000..ba6d119b8
--- /dev/null
+++ b/docs/doc_examples/0ddf705317d9c5095b4a1419a2e3bace.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getPrivileges();
+console.log(response);
+----
diff --git a/docs/doc_examples/0dfa9733c94bc43c6f14c7b6984c98fb.asciidoc b/docs/doc_examples/0dfa9733c94bc43c6f14c7b6984c98fb.asciidoc
new file mode 100644
index 000000000..2724e3a6e
--- /dev/null
+++ b/docs/doc_examples/0dfa9733c94bc43c6f14c7b6984c98fb.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.componentTemplates({
+ name: "my-template-*",
+ v: "true",
+ s: "name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc b/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc
new file mode 100644
index 000000000..3801b625f
--- /dev/null
+++ b/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.renderQuery({
+ name: "my-app",
+ body: {
+ params: {
+ query_string: "my first query",
+ text_fields: [
+ {
+ name: "title",
+ boost: 5,
+ },
+ {
+ name: "description",
+ boost: 1,
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e0d8f652d7d29371b5ea7c7544385eb.asciidoc b/docs/doc_examples/0e0d8f652d7d29371b5ea7c7544385eb.asciidoc
new file mode 100644
index 000000000..f81e78aaf
--- /dev/null
+++ b/docs/doc_examples/0e0d8f652d7d29371b5ea7c7544385eb.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "amazon-bedrock-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "amazon_bedrock_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e118857b815b62118a30c042f079db1.asciidoc b/docs/doc_examples/0e118857b815b62118a30c042f079db1.asciidoc
new file mode 100644
index 000000000..fbc3b97e9
--- /dev/null
+++ b/docs/doc_examples/0e118857b815b62118a30c042f079db1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "quick brown f",
+ type: "phrase_prefix",
+ fields: ["subject", "message"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e31b8ad176b31028becf9500989bcbd.asciidoc b/docs/doc_examples/0e31b8ad176b31028becf9500989bcbd.asciidoc
new file mode 100644
index 000000000..53fcff58d
--- /dev/null
+++ b/docs/doc_examples/0e31b8ad176b31028becf9500989bcbd.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "watsonx-embeddings",
+ inference_config: {
+ service: "watsonxai",
+ service_settings: {
+ api_key: "",
+ url: "",
+ model_id: "ibm/slate-30m-english-rtrvr",
+ project_id: "",
+ api_version: "2024-03-14",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc b/docs/doc_examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc
new file mode 100644
index 000000000..71e7fd206
--- /dev/null
+++ b/docs/doc_examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ hats: {
+ filter: {
+ term: {
+ type: "hat",
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ t_shirts: {
+ filter: {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e5d25c7bb738c42d471020d678e2966.asciidoc b/docs/doc_examples/0e5d25c7bb738c42d471020d678e2966.asciidoc
new file mode 100644
index 000000000..c75941ffe
--- /dev/null
+++ b/docs/doc_examples/0e5d25c7bb738c42d471020d678e2966.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.startTrainedModelDeployment({
+ model_id: "my_model",
+ deployment_id: "my_model_for_ingest",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e71a18d1aac61720cdc6b3f91fe643f.asciidoc b/docs/doc_examples/0e71a18d1aac61720cdc6b3f91fe643f.asciidoc
new file mode 100644
index 000000000..064744d5c
--- /dev/null
+++ b/docs/doc_examples/0e71a18d1aac61720cdc6b3f91fe643f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ simple_query_string: {
+ fields: ["content"],
+ query: "foo bar -baz",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e83f140237d75469a428ff403564bb5.asciidoc b/docs/doc_examples/0e83f140237d75469a428ff403564bb5.asciidoc
new file mode 100644
index 000000000..aac173f77
--- /dev/null
+++ b/docs/doc_examples/0e83f140237d75469a428ff403564bb5.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.disk.watermark.low": "100gb",
+ "cluster.routing.allocation.disk.watermark.high": "50gb",
+ "cluster.routing.allocation.disk.watermark.flood_stage": "10gb",
+ "cluster.info.update.interval": "1m",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0e84bb54b8a9a5387f252eeffeb1098e.asciidoc b/docs/doc_examples/0e84bb54b8a9a5387f252eeffeb1098e.asciidoc
new file mode 100644
index 000000000..5570248b6
--- /dev/null
+++ b/docs/doc_examples/0e84bb54b8a9a5387f252eeffeb1098e.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_error_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: ["logs"],
+ body: {
+ query: {
+ match: {
+ message: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ea146b178561bc8b9002bed8a35641f.asciidoc b/docs/doc_examples/0ea146b178561bc8b9002bed8a35641f.asciidoc
new file mode 100644
index 000000000..a5321db01
--- /dev/null
+++ b/docs/doc_examples/0ea146b178561bc8b9002bed8a35641f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.getAutoscalingPolicy({
+ name: "my_autoscaling_policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ea2167ce7c87d311b20c4f8c698a8d0.asciidoc b/docs/doc_examples/0ea2167ce7c87d311b20c4f8c698a8d0.asciidoc
new file mode 100644
index 000000000..c55280692
--- /dev/null
+++ b/docs/doc_examples/0ea2167ce7c87d311b20c4f8c698a8d0.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ slice: {
+ id: 0,
+ max: 2,
+ },
+ query: {
+ match: {
+ message: "foo",
+ },
+ },
+ pit: {
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ slice: {
+ id: 1,
+ max: 2,
+ },
+ pit: {
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+ },
+ query: {
+ match: {
+ message: "foo",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc b/docs/doc_examples/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc
new file mode 100644
index 000000000..542a15de3
--- /dev/null
+++ b/docs/doc_examples/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.migrateToDataTiers({
+ legacy_template_to_delete: "global-template",
+ node_attribute: "custom_attribute_name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0eb2c1284a9829224913a860190580d8.asciidoc b/docs/doc_examples/0eb2c1284a9829224913a860190580d8.asciidoc
new file mode 100644
index 000000000..6406bb3d7
--- /dev/null
+++ b/docs/doc_examples/0eb2c1284a9829224913a860190580d8.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "fingerprint_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_fingerprint: {
+ tokenizer: "whitespace",
+ filter: ["fingerprint"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0ec2178fb0103862b47cc20bc5885972.asciidoc b/docs/doc_examples/0ec2178fb0103862b47cc20bc5885972.asciidoc
new file mode 100644
index 000000000..0bcba66a8
--- /dev/null
+++ b/docs/doc_examples/0ec2178fb0103862b47cc20bc5885972.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_fs_backup",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "my_fs_backup_location",
+ readonly: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0eccea755bd4f6dd47579a9022690546.asciidoc b/docs/doc_examples/0eccea755bd4f6dd47579a9022690546.asciidoc
new file mode 100644
index 000000000..bbe82e2f4
--- /dev/null
+++ b/docs/doc_examples/0eccea755bd4f6dd47579a9022690546.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ my_remote: {
+ mode: "proxy",
+ proxy_address: "my.remote.cluster.com:9443",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc b/docs/doc_examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc
new file mode 100644
index 000000000..f40987611
--- /dev/null
+++ b/docs/doc_examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ _geo_distance: {
+ "pin.location": [
+ [-70, 40],
+ [-71, 42],
+ ],
+ order: "asc",
+ unit: "km",
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0f3a78296825d507dda6771f7ceb9d61.asciidoc b/docs/doc_examples/0f3a78296825d507dda6771f7ceb9d61.asciidoc
new file mode 100644
index 000000000..89d44803c
--- /dev/null
+++ b/docs/doc_examples/0f3a78296825d507dda6771f7ceb9d61.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.exclude._ip": "10.0.0.1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0f4583c56cfe5bd59eeb35bfba02957c.asciidoc b/docs/doc_examples/0f4583c56cfe5bd59eeb35bfba02957c.asciidoc
new file mode 100644
index 000000000..87f3c4188
--- /dev/null
+++ b/docs/doc_examples/0f4583c56cfe5bd59eeb35bfba02957c.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rankEval({
+ index: "my-index-000001",
+ requests: [
+ {
+ id: "JFK query",
+ request: {
+ query: {
+ match_all: {},
+ },
+ },
+ ratings: [],
+ },
+ ],
+ metric: {
+ recall: {
+ k: 20,
+ relevant_rating_threshold: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0f547926ebf092e19fc5fb433e9ac8c1.asciidoc b/docs/doc_examples/0f547926ebf092e19fc5fb433e9ac8c1.asciidoc
new file mode 100644
index 000000000..7cfd78e19
--- /dev/null
+++ b/docs/doc_examples/0f547926ebf092e19fc5fb433e9ac8c1.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "whitespace",
+ filter: ["lowercase", "porter_stem"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0f7aa40ad26d59a9268630b980a3d594.asciidoc b/docs/doc_examples/0f7aa40ad26d59a9268630b980a3d594.asciidoc
new file mode 100644
index 000000000..4d208c97c
--- /dev/null
+++ b/docs/doc_examples/0f7aa40ad26d59a9268630b980a3d594.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.simulateTemplate({
+ name: "template_1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fa220ee3fb267020382f74aa70eb1e9.asciidoc b/docs/doc_examples/0fa220ee3fb267020382f74aa70eb1e9.asciidoc
new file mode 100644
index 000000000..4b29c0392
--- /dev/null
+++ b/docs/doc_examples/0fa220ee3fb267020382f74aa70eb1e9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ metric: "_all",
+ index: "foo,bar",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fb472645116d58ddef89ca976d15a01.asciidoc b/docs/doc_examples/0fb472645116d58ddef89ca976d15a01.asciidoc
new file mode 100644
index 000000000..921548536
--- /dev/null
+++ b/docs/doc_examples/0fb472645116d58ddef89ca976d15a01.asciidoc
@@ -0,0 +1,73 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516729294000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: 5.2,
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516642894000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: 5.8,
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516556494000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: 5.1,
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516470094000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: 5.6,
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516383694000,
+ model_number: "HG537PU",
+ measures: {
+ voltage: 4.2,
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516297294000,
+ model_number: "HG537PU",
+ measures: {
+ voltage: 4,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc b/docs/doc_examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc
new file mode 100644
index 000000000..77565b1fd
--- /dev/null
+++ b/docs/doc_examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "ledger",
+ size: 0,
+ aggs: {
+ profit: {
+ scripted_metric: {
+ init_script: {
+ id: "my_init_script",
+ },
+ map_script: {
+ id: "my_map_script",
+ },
+ combine_script: {
+ id: "my_combine_script",
+ },
+ params: {
+ field: "amount",
+ },
+ reduce_script: {
+ id: "my_reduce_script",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc b/docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc
new file mode 100644
index 000000000..fadf2814c
--- /dev/null
+++ b/docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "elser-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "sparse_vector",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fc4b589df5388da784c6d981e769e31.asciidoc b/docs/doc_examples/0fc4b589df5388da784c6d981e769e31.asciidoc
new file mode 100644
index 000000000..a052f882c
--- /dev/null
+++ b/docs/doc_examples/0fc4b589df5388da784c6d981e769e31.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putTemplate({
+ name: "template_1",
+ index_patterns: ["te*"],
+ settings: {
+ number_of_shards: 1,
+ },
+ aliases: {
+ alias1: {},
+ alias2: {
+ filter: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ routing: "shard-1",
+ },
+ "{index}-alias": {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fd08e14ad651827be53897a6bdaf0b8.asciidoc b/docs/doc_examples/0fd08e14ad651827be53897a6bdaf0b8.asciidoc
new file mode 100644
index 000000000..ba1afbe36
--- /dev/null
+++ b/docs/doc_examples/0fd08e14ad651827be53897a6bdaf0b8.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_bool_prefix: {
+ message: "quick brown f",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/0fe74ccd098c742619805a7c0bd0fae6.asciidoc b/docs/doc_examples/0fe74ccd098c742619805a7c0bd0fae6.asciidoc
new file mode 100644
index 000000000..4b426ac41
--- /dev/null
+++ b/docs/doc_examples/0fe74ccd098c742619805a7c0bd0fae6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.scheduleNowTransform({
+ transform_id: "ecommerce_transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/100d4e33158069f3caa32e8bfa0eb3d0.asciidoc b/docs/doc_examples/100d4e33158069f3caa32e8bfa0eb3d0.asciidoc
new file mode 100644
index 000000000..0aa38abad
--- /dev/null
+++ b/docs/doc_examples/100d4e33158069f3caa32e8bfa0eb3d0.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic: "runtime",
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/102c7de25d13c87cf28839ada9f63c95.asciidoc b/docs/doc_examples/102c7de25d13c87cf28839ada9f63c95.asciidoc
new file mode 100644
index 000000000..dd86be71b
--- /dev/null
+++ b/docs/doc_examples/102c7de25d13c87cf28839ada9f63c95.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "index",
+ id: 1,
+ document: {
+ my_date: "2016-05-11T16:30:55.328Z",
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "index",
+ query: {
+ constant_score: {
+ filter: {
+ range: {
+ my_date: {
+ gte: "now-1h",
+ lte: "now",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/103296e16b4233926ad1f07360385606.asciidoc b/docs/doc_examples/103296e16b4233926ad1f07360385606.asciidoc
new file mode 100644
index 000000000..06f7bd53e
--- /dev/null
+++ b/docs/doc_examples/103296e16b4233926ad1f07360385606.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "turkish_example",
+ settings: {
+ analysis: {
+ filter: {
+ turkish_stop: {
+ type: "stop",
+ stopwords: "_turkish_",
+ },
+ turkish_lowercase: {
+ type: "lowercase",
+ language: "turkish",
+ },
+ turkish_keywords: {
+ type: "keyword_marker",
+ keywords: ["örnek"],
+ },
+ turkish_stemmer: {
+ type: "stemmer",
+ language: "turkish",
+ },
+ },
+ analyzer: {
+ rebuilt_turkish: {
+ tokenizer: "standard",
+ filter: [
+ "apostrophe",
+ "turkish_lowercase",
+ "turkish_stop",
+ "turkish_keywords",
+ "turkish_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1070e59ba144cdf309fd9b2591612b95.asciidoc b/docs/doc_examples/1070e59ba144cdf309fd9b2591612b95.asciidoc
new file mode 100644
index 000000000..a2b53a448
--- /dev/null
+++ b/docs/doc_examples/1070e59ba144cdf309fd9b2591612b95.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 3,
+ document: {
+ test: "test",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 4,
+ refresh: "false",
+ document: {
+ test: "test",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/10796a4efa3c2a5e9e50b6bdeb08bbb9.asciidoc b/docs/doc_examples/10796a4efa3c2a5e9e50b6bdeb08bbb9.asciidoc
new file mode 100644
index 000000000..7377cbb91
--- /dev/null
+++ b/docs/doc_examples/10796a4efa3c2a5e9e50b6bdeb08bbb9.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_internal/desired_nodes/Ywkh3INLQcuPT49f6kcppA/100",
+ body: {
+ nodes: [
+ {
+ settings: {
+ "node.name": "instance-000187",
+ "node.external_id": "instance-000187",
+ "node.roles": ["data_hot", "master"],
+ "node.attr.data": "hot",
+ "node.attr.logical_availability_zone": "zone-0",
+ },
+ processors: 8,
+ memory: "58gb",
+ storage: "2tb",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/109db8ff7b715aca98de8ef1ab7e44ab.asciidoc b/docs/doc_examples/109db8ff7b715aca98de8ef1ab7e44ab.asciidoc
new file mode 100644
index 000000000..a77dfed0d
--- /dev/null
+++ b/docs/doc_examples/109db8ff7b715aca98de8ef1ab7e44ab.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.resumeFollow({
+ index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc b/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc
new file mode 100644
index 000000000..2520b36c1
--- /dev/null
+++ b/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryUser({
+ with_profile_uid: "true",
+ query: {
+ prefix: {
+ roles: "other",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10b924bf6298aa6157ed00ce12f8edc1.asciidoc b/docs/doc_examples/10b924bf6298aa6157ed00ce12f8edc1.asciidoc
new file mode 100644
index 000000000..4cbd44f94
--- /dev/null
+++ b/docs/doc_examples/10b924bf6298aa6157ed00ce12f8edc1.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ ignore_condition: true,
+ watch: {
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: ["logs"],
+ body: {
+ query: {
+ match: {
+ message: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+ actions: {
+ log_error: {
+ logging: {
+ text: "Found {{ctx.payload.hits.total}} errors in the logs",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10d8b17e73d31dcd907de67327ed78a2.asciidoc b/docs/doc_examples/10d8b17e73d31dcd907de67327ed78a2.asciidoc
new file mode 100644
index 000000000..3cae02031
--- /dev/null
+++ b/docs/doc_examples/10d8b17e73d31dcd907de67327ed78a2.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "dutch_example",
+ settings: {
+ analysis: {
+ filter: {
+ dutch_stop: {
+ type: "stop",
+ stopwords: "_dutch_",
+ },
+ dutch_keywords: {
+ type: "keyword_marker",
+ keywords: ["voorbeeld"],
+ },
+ dutch_stemmer: {
+ type: "stemmer",
+ language: "dutch",
+ },
+ dutch_override: {
+ type: "stemmer_override",
+ rules: [
+ "fiets=>fiets",
+ "bromfiets=>bromfiets",
+ "ei=>eier",
+ "kind=>kinder",
+ ],
+ },
+ },
+ analyzer: {
+ rebuilt_dutch: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "dutch_stop",
+ "dutch_keywords",
+ "dutch_override",
+ "dutch_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10d9da8a3b7061479be908c8c5c76cfb.asciidoc b/docs/doc_examples/10d9da8a3b7061479be908c8c5c76cfb.asciidoc
new file mode 100644
index 000000000..ec93e4938
--- /dev/null
+++ b/docs/doc_examples/10d9da8a3b7061479be908c8c5c76cfb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ realm_name: "native1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10de9fd4a38755020a07c4ec964d44c9.asciidoc b/docs/doc_examples/10de9fd4a38755020a07c4ec964d44c9.asciidoc
new file mode 100644
index 000000000..1803166ae
--- /dev/null
+++ b/docs/doc_examples/10de9fd4a38755020a07c4ec964d44c9.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "oidc-example",
+ roles: ["example_role"],
+ enabled: true,
+ rules: {
+ field: {
+ "realm.name": "oidc1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10e4c1f246ada8c6b500d8ea6c1e335f.asciidoc b/docs/doc_examples/10e4c1f246ada8c6b500d8ea6c1e335f.asciidoc
new file mode 100644
index 000000000..bcb703c37
--- /dev/null
+++ b/docs/doc_examples/10e4c1f246ada8c6b500d8ea6c1e335f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_shingle: {
+ tokenizer: "standard",
+ filter: ["shingle"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10f0c8fed98455c460c374b50ffbb204.asciidoc b/docs/doc_examples/10f0c8fed98455c460c374b50ffbb204.asciidoc
new file mode 100644
index 000000000..9fecf5000
--- /dev/null
+++ b/docs/doc_examples/10f0c8fed98455c460c374b50ffbb204.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "dsl-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/10f7a2c0a952ba3bc3d20b7d5f310f41.asciidoc b/docs/doc_examples/10f7a2c0a952ba3bc3d20b7d5f310f41.asciidoc
new file mode 100644
index 000000000..d43215527
--- /dev/null
+++ b/docs/doc_examples/10f7a2c0a952ba3bc3d20b7d5f310f41.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.list();
+console.log(response);
+----
diff --git a/docs/doc_examples/111c31db1fd29baeaa9964eafaea6789.asciidoc b/docs/doc_examples/111c31db1fd29baeaa9964eafaea6789.asciidoc
new file mode 100644
index 000000000..50c998961
--- /dev/null
+++ b/docs/doc_examples/111c31db1fd29baeaa9964eafaea6789.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "analyst_user",
+ refresh: "true",
+ password: "l0nger-r4nd0mer-p@ssw0rd",
+ roles: ["my_analyst_role"],
+ full_name: "Monday Jaffe",
+ metadata: {
+ innovation: 8,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/111c69ca94162c1523b799a5c14723dd.asciidoc b/docs/doc_examples/111c69ca94162c1523b799a5c14723dd.asciidoc
new file mode 100644
index 000000000..d7a3bc0f3
--- /dev/null
+++ b/docs/doc_examples/111c69ca94162c1523b799a5c14723dd.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ full_text: "Quick Brown Foxes!",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1147a02afa087278e51fa365fb9e06b7.asciidoc b/docs/doc_examples/1147a02afa087278e51fa365fb9e06b7.asciidoc
new file mode 100644
index 000000000..267bf1a6a
--- /dev/null
+++ b/docs/doc_examples/1147a02afa087278e51fa365fb9e06b7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 1000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/114d470e752efa9672ca68d7290fada8.asciidoc b/docs/doc_examples/114d470e752efa9672ca68d7290fada8.asciidoc
new file mode 100644
index 000000000..71741889f
--- /dev/null
+++ b/docs/doc_examples/114d470e752efa9672ca68d7290fada8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putAlias({
+ index: "my-data-stream",
+ name: "my-alias",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1153bd92ca18356db927054958cd95c6.asciidoc b/docs/doc_examples/1153bd92ca18356db927054958cd95c6.asciidoc
new file mode 100644
index 000000000..9b8284bc2
--- /dev/null
+++ b/docs/doc_examples/1153bd92ca18356db927054958cd95c6.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ field_value_factor: {
+ field: "my-int",
+ factor: 1.2,
+ modifier: "sqrt",
+ missing: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/115529722ba30b0b0d51a7ff87e59198.asciidoc b/docs/doc_examples/115529722ba30b0b0d51a7ff87e59198.asciidoc
new file mode 100644
index 000000000..73710c751
--- /dev/null
+++ b/docs/doc_examples/115529722ba30b0b0d51a7ff87e59198.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getRole({
+ name: "my_admin_role",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/118f249a3b26c33416f641b33f2b74f8.asciidoc b/docs/doc_examples/118f249a3b26c33416f641b33f2b74f8.asciidoc
new file mode 100644
index 000000000..0ee01c6b5
--- /dev/null
+++ b/docs/doc_examples/118f249a3b26c33416f641b33f2b74f8.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "pattern",
+ pattern: ",",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "comma,separated,values",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc b/docs/doc_examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc
new file mode 100644
index 000000000..9e732ae71
--- /dev/null
+++ b/docs/doc_examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job",
+ querystring: {
+ connector_id: "my-connector-id",
+ size: "1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/11c395d1649733bcab853fe31ec393b2.asciidoc b/docs/doc_examples/11c395d1649733bcab853fe31ec393b2.asciidoc
new file mode 100644
index 000000000..07cbcf1e4
--- /dev/null
+++ b/docs/doc_examples/11c395d1649733bcab853fe31ec393b2.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.get();
+console.log(response);
+----
diff --git a/docs/doc_examples/11c43c4aa5435f8a99dcc0d1f03c648f.asciidoc b/docs/doc_examples/11c43c4aa5435f8a99dcc0d1f03c648f.asciidoc
new file mode 100644
index 000000000..bdc4978ac
--- /dev/null
+++ b/docs/doc_examples/11c43c4aa5435f8a99dcc0d1f03c648f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ aggs: {
+ grade_max: {
+ max: {
+ field: "grade",
+ missing: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/11d9043d3050a7175069dec7e0adc963.asciidoc b/docs/doc_examples/11d9043d3050a7175069dec7e0adc963.asciidoc
new file mode 100644
index 000000000..6c0308b64
--- /dev/null
+++ b/docs/doc_examples/11d9043d3050a7175069dec7e0adc963.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_field: "a\\b",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/11e772ff5dbb73408ae30a1a367a0d9b.asciidoc b/docs/doc_examples/11e772ff5dbb73408ae30a1a367a0d9b.asciidoc
new file mode 100644
index 000000000..10a9f5129
--- /dev/null
+++ b/docs/doc_examples/11e772ff5dbb73408ae30a1a367a0d9b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.deletePipeline({
+ id: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc b/docs/doc_examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc
new file mode 100644
index 000000000..7af802e6f
--- /dev/null
+++ b/docs/doc_examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ pre_tags: ["", ""],
+ post_tags: [" ", ""],
+ fields: {
+ body: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1233be1d4c9c7ca54126f1a0693b26de.asciidoc b/docs/doc_examples/1233be1d4c9c7ca54126f1a0693b26de.asciidoc
new file mode 100644
index 000000000..47b7b293c
--- /dev/null
+++ b/docs/doc_examples/1233be1d4c9c7ca54126f1a0693b26de.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ routing: 1,
+ refresh: "true",
+ document: {
+ my_id: "3",
+ text: "This is an answer",
+ my_join_field: {
+ name: "answer",
+ parent: "1",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 4,
+ routing: 1,
+ refresh: "true",
+ document: {
+ my_id: "4",
+ text: "This is another answer",
+ my_join_field: {
+ name: "answer",
+ parent: "1",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/123693835b3b85b9a2fa6fd1d3ad89c7.asciidoc b/docs/doc_examples/123693835b3b85b9a2fa6fd1d3ad89c7.asciidoc
new file mode 100644
index 000000000..3f96a5c0c
--- /dev/null
+++ b/docs/doc_examples/123693835b3b85b9a2fa6fd1d3ad89c7.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ routing: "user1",
+ refresh: "true",
+ document: {
+ title: "This is a document",
+ },
+});
+console.log(response);
+
+const response1 = await client.get({
+ index: "my-index-000001",
+ id: 1,
+ routing: "user1",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc b/docs/doc_examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc
new file mode 100644
index 000000000..4471f3a3c
--- /dev/null
+++ b/docs/doc_examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "publications",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc b/docs/doc_examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc
new file mode 100644
index 000000000..70c2bd9ae
--- /dev/null
+++ b/docs/doc_examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ filter_path: "routing_table.indices.**.state",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc b/docs/doc_examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc
new file mode 100644
index 000000000..bd4b4f7ae
--- /dev/null
+++ b/docs/doc_examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/128283698535116931dca9d16a16dca2.asciidoc b/docs/doc_examples/128283698535116931dca9d16a16dca2.asciidoc
new file mode 100644
index 000000000..5f8f9eb6e
--- /dev/null
+++ b/docs/doc_examples/128283698535116931dca9d16a16dca2.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getRole();
+console.log(response);
+----
diff --git a/docs/doc_examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc b/docs/doc_examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc
new file mode 100644
index 000000000..ac47ac1be
--- /dev/null
+++ b/docs/doc_examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ settings: {
+ "index.max_result_window": 5000,
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putSettings({
+ persistent: {
+ "search.max_buckets": 20000,
+ "search.allow_expensive_queries": false,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/12cb446446211f95f651e196a1f059b4.asciidoc b/docs/doc_examples/12cb446446211f95f651e196a1f059b4.asciidoc
new file mode 100644
index 000000000..b35ca9af9
--- /dev/null
+++ b/docs/doc_examples/12cb446446211f95f651e196a1f059b4.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.create({
+ repository: "my_repository",
+ snapshot: "my_snapshot",
+ wait_for_completion: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/12d5ff4b8d3d832b32a7e7e2a520d0bb.asciidoc b/docs/doc_examples/12d5ff4b8d3d832b32a7e7e2a520d0bb.asciidoc
new file mode 100644
index 000000000..2cd793b99
--- /dev/null
+++ b/docs/doc_examples/12d5ff4b8d3d832b32a7e7e2a520d0bb.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getCalendarEvents({
+ calendar_id: "planned-outages",
+ start: 1635638400000,
+ end: 1635724800000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc b/docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc
new file mode 100644
index 000000000..ba95e73e9
--- /dev/null
+++ b/docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: ".elastic-connectors",
+ id: "connector_id",
+ doc: {
+ features: {
+ native_connector_api_keys: {
+ enabled: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/12ec704d62ffedcb03787e6aba69d382.asciidoc b/docs/doc_examples/12ec704d62ffedcb03787e6aba69d382.asciidoc
new file mode 100644
index 000000000..46613023e
--- /dev/null
+++ b/docs/doc_examples/12ec704d62ffedcb03787e6aba69d382.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "stop",
+ stopwords: ["a"],
+ },
+ {
+ type: "shingle",
+ filler_token: "+",
+ },
+ ],
+ text: "fox jumps a lazy dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/12facf3617a41551ce2f0c4d005cb1c7.asciidoc b/docs/doc_examples/12facf3617a41551ce2f0c4d005cb1c7.asciidoc
new file mode 100644
index 000000000..625db81d8
--- /dev/null
+++ b/docs/doc_examples/12facf3617a41551ce2f0c4d005cb1c7.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "movies",
+ mappings: {
+ properties: {
+ name_and_plot: {
+ type: "text",
+ },
+ name: {
+ type: "text",
+ copy_to: "name_and_plot",
+ },
+ plot: {
+ type: "text",
+ copy_to: "name_and_plot",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1302e24b0476e0e9af7a2c890edf9f62.asciidoc b/docs/doc_examples/1302e24b0476e0e9af7a2c890edf9f62.asciidoc
new file mode 100644
index 000000000..457716ba1
--- /dev/null
+++ b/docs/doc_examples/1302e24b0476e0e9af7a2c890edf9f62.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ track_total_hits: false,
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1313c540fef7e7c18a066f07789673fc.asciidoc b/docs/doc_examples/1313c540fef7e7c18a066f07789673fc.asciidoc
new file mode 100644
index 000000000..8e9ede09f
--- /dev/null
+++ b/docs/doc_examples/1313c540fef7e7c18a066f07789673fc.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.getAsync({
+ id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
+ keep_alive: "5d",
+ wait_for_completion_timeout: "2s",
+ format: "json",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/132ea3d5a0ffb6b5203e356e8329f679.asciidoc b/docs/doc_examples/132ea3d5a0ffb6b5203e356e8329f679.asciidoc
new file mode 100644
index 000000000..0f5963660
--- /dev/null
+++ b/docs/doc_examples/132ea3d5a0ffb6b5203e356e8329f679.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/134384b8c63cfbd8d762fb01757bb3f9.asciidoc b/docs/doc_examples/134384b8c63cfbd8d762fb01757bb3f9.asciidoc
new file mode 100644
index 000000000..222bc95f8
--- /dev/null
+++ b/docs/doc_examples/134384b8c63cfbd8d762fb01757bb3f9.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "logs-debug",
+ document: {
+ date: "2019-12-12",
+ message: "Starting up Elasticsearch",
+ level: "debug",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "logs-debug",
+ document: {
+ date: "2019-12-12",
+ message: "Starting up Elasticsearch",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/135819da3a4bde684357c57a49ad8e85.asciidoc b/docs/doc_examples/135819da3a4bde684357c57a49ad8e85.asciidoc
new file mode 100644
index 000000000..c5583614b
--- /dev/null
+++ b/docs/doc_examples/135819da3a4bde684357c57a49ad8e85.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.migration.deprecations();
+console.log(response);
+----
diff --git a/docs/doc_examples/13670d1534125831c2059eebd86d840c.asciidoc b/docs/doc_examples/13670d1534125831c2059eebd86d840c.asciidoc
new file mode 100644
index 000000000..080608e5e
--- /dev/null
+++ b/docs/doc_examples/13670d1534125831c2059eebd86d840c.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "brazilian_example",
+ settings: {
+ analysis: {
+ filter: {
+ brazilian_stop: {
+ type: "stop",
+ stopwords: "_brazilian_",
+ },
+ brazilian_keywords: {
+ type: "keyword_marker",
+ keywords: ["exemplo"],
+ },
+ brazilian_stemmer: {
+ type: "stemmer",
+ language: "brazilian",
+ },
+ },
+ analyzer: {
+ rebuilt_brazilian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "brazilian_stop",
+ "brazilian_keywords",
+ "brazilian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/136ae86b8d497dda799cf1cb583df929.asciidoc b/docs/doc_examples/136ae86b8d497dda799cf1cb583df929.asciidoc
new file mode 100644
index 000000000..0e065a362
--- /dev/null
+++ b/docs/doc_examples/136ae86b8d497dda799cf1cb583df929.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "publications",
+ mappings: {
+ properties: {
+ id: {
+ type: "text",
+ },
+ title: {
+ type: "text",
+ },
+ abstract: {
+ type: "text",
+ },
+ author: {
+ properties: {
+ id: {
+ type: "text",
+ },
+ name: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/137709a0a0dc38d6094291c9fc75b804.asciidoc b/docs/doc_examples/137709a0a0dc38d6094291c9fc75b804.asciidoc
new file mode 100644
index 000000000..47b2e1b27
--- /dev/null
+++ b/docs/doc_examples/137709a0a0dc38d6094291c9fc75b804.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ counter: 1,
+ tags: ["production"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/137c62a4443bdd7d5b95a15022a9dc30.asciidoc b/docs/doc_examples/137c62a4443bdd7d5b95a15022a9dc30.asciidoc
new file mode 100644
index 000000000..3c4e2ec94
--- /dev/null
+++ b/docs/doc_examples/137c62a4443bdd7d5b95a15022a9dc30.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "arabic_example",
+ settings: {
+ analysis: {
+ filter: {
+ arabic_stop: {
+ type: "stop",
+ stopwords: "_arabic_",
+ },
+ arabic_keywords: {
+ type: "keyword_marker",
+ keywords: ["مثال"],
+ },
+ arabic_stemmer: {
+ type: "stemmer",
+ language: "arabic",
+ },
+ },
+ analyzer: {
+ rebuilt_arabic: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "decimal_digit",
+ "arabic_stop",
+ "arabic_normalization",
+ "arabic_keywords",
+ "arabic_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc b/docs/doc_examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc
new file mode 100644
index 000000000..bb8e802e8
--- /dev/null
+++ b/docs/doc_examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ routing: "user1",
+ document: {
+ counter: 1,
+ tags: ["env2"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13917f7cfb6a382c293275ff71134ec4.asciidoc b/docs/doc_examples/13917f7cfb6a382c293275ff71134ec4.asciidoc
new file mode 100644
index 000000000..73c11f5ef
--- /dev/null
+++ b/docs/doc_examples/13917f7cfb6a382c293275ff71134ec4.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ match: {
+ message:
+ "Hello {{#name_exists}}{{query_string}}{{/name_exists}}{{^name_exists}}World{{/name_exists}}",
+ },
+ },
+ },
+ params: {
+ query_string: "Kimchy",
+ name_exists: true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13b02da42d3afe7f0b649e1c98ac9549.asciidoc b/docs/doc_examples/13b02da42d3afe7f0b649e1c98ac9549.asciidoc
new file mode 100644
index 000000000..2418f9714
--- /dev/null
+++ b/docs/doc_examples/13b02da42d3afe7f0b649e1c98ac9549.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "keep_types_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["extract_alpha"],
+ },
+ },
+ filter: {
+ extract_alpha: {
+ type: "keep_types",
+ types: [""],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc b/docs/doc_examples/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc
new file mode 100644
index 000000000..86959a78e
--- /dev/null
+++ b/docs/doc_examples/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.xpack.security.authc": "debug",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc b/docs/doc_examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc
new file mode 100644
index 000000000..e7f6c16c0
--- /dev/null
+++ b/docs/doc_examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ "name.first": {
+ query: "shay",
+ _name: "first",
+ },
+ },
+ },
+ {
+ match: {
+ "name.last": {
+ query: "banon",
+ _name: "last",
+ },
+ },
+ },
+ ],
+ filter: {
+ terms: {
+ "name.last": ["banon", "kimchy"],
+ _name: "test",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13df08eefc9ba98e311793bbca74133b.asciidoc b/docs/doc_examples/13df08eefc9ba98e311793bbca74133b.asciidoc
new file mode 100644
index 000000000..0e818c24a
--- /dev/null
+++ b/docs/doc_examples/13df08eefc9ba98e311793bbca74133b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUserProfile({
+ uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
+ data: "app1.key1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13e3fefbf55f672926aa389d76fc8bea.asciidoc b/docs/doc_examples/13e3fefbf55f672926aa389d76fc8bea.asciidoc
new file mode 100644
index 000000000..eacd1ceab
--- /dev/null
+++ b/docs/doc_examples/13e3fefbf55f672926aa389d76fc8bea.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.changePassword({
+ username: "user1",
+ password: "new-test-password",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13ebcb01ebf1b5d2b5c52739db47e30c.asciidoc b/docs/doc_examples/13ebcb01ebf1b5d2b5c52739db47e30c.asciidoc
new file mode 100644
index 000000000..0d8d85d36
--- /dev/null
+++ b/docs/doc_examples/13ebcb01ebf1b5d2b5c52739db47e30c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.recovery({
+ index: "index1,index2",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc b/docs/doc_examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc
new file mode 100644
index 000000000..01baab9cf
--- /dev/null
+++ b/docs/doc_examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.inference({
+ task_type: "sparse_embedding",
+ inference_id: "my-elser-model",
+ input:
+ "The sky above the port was the color of television tuned to a dead channel.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/13fe12cdb73bc89f07a83f1e6b127511.asciidoc b/docs/doc_examples/13fe12cdb73bc89f07a83f1e6b127511.asciidoc
new file mode 100644
index 000000000..672620810
--- /dev/null
+++ b/docs/doc_examples/13fe12cdb73bc89f07a83f1e6b127511.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "google-vertex-ai-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 768,
+ element_type: "float",
+ similarity: "dot_product",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1420a22aa817c7a996baaed0ad366d6f.asciidoc b/docs/doc_examples/1420a22aa817c7a996baaed0ad366d6f.asciidoc
new file mode 100644
index 000000000..ce7709b43
--- /dev/null
+++ b/docs/doc_examples/1420a22aa817c7a996baaed0ad366d6f.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test-index",
+ query: {
+ nested: {
+ path: "inference_field.inference.chunks",
+ query: {
+ sparse_vector: {
+ field: "inference_field.inference.chunks.embeddings",
+ inference_id: "my-inference-id",
+ query: "mountain lake",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14254a0e725044faedf9370ead76f6ce.asciidoc b/docs/doc_examples/14254a0e725044faedf9370ead76f6ce.asciidoc
new file mode 100644
index 000000000..88f3d5fcc
--- /dev/null
+++ b/docs/doc_examples/14254a0e725044faedf9370ead76f6ce.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ q: "user.id:elkbee",
+ size: 0,
+ terminate_after: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/142de21c40e84e2e2d8d832e5b3b36db.asciidoc b/docs/doc_examples/142de21c40e84e2e2d8d832e5b3b36db.asciidoc
new file mode 100644
index 000000000..0dfc47570
--- /dev/null
+++ b/docs/doc_examples/142de21c40e84e2e2d8d832e5b3b36db.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.migrateToDataTiers();
+console.log(response);
+----
diff --git a/docs/doc_examples/1445ca2e813ed1c25504107b4b11760e.asciidoc b/docs/doc_examples/1445ca2e813ed1c25504107b4b11760e.asciidoc
new file mode 100644
index 000000000..f4e6078f1
--- /dev/null
+++ b/docs/doc_examples/1445ca2e813ed1c25504107b4b11760e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.follow({
+ index: "server-metrics-follower",
+ wait_for_active_shards: 1,
+ remote_cluster: "leader",
+ leader_index: "server-metrics",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1452829804551d2d6acedd4e73b29637.asciidoc b/docs/doc_examples/1452829804551d2d6acedd4e73b29637.asciidoc
new file mode 100644
index 000000000..782e6ffea
--- /dev/null
+++ b/docs/doc_examples/1452829804551d2d6acedd4e73b29637.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.createDataStream({
+ name: "logs-foo-bar",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc b/docs/doc_examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc
new file mode 100644
index 000000000..9924e6b33
--- /dev/null
+++ b/docs/doc_examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.tasks({
+ v: "true",
+ s: "time:desc",
+ h: "type,action,running_time,node,cancellable",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/147d341cb212dcc015c129a9c5dcf9c9.asciidoc b/docs/doc_examples/147d341cb212dcc015c129a9c5dcf9c9.asciidoc
new file mode 100644
index 000000000..8c45eebd2
--- /dev/null
+++ b/docs/doc_examples/147d341cb212dcc015c129a9c5dcf9c9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putTrainedModelAlias({
+ model_id: "flight-delay-prediction-1574775339910",
+ model_alias: "flight_delay_model",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/148edc235fcfbc263561f87f5533e688.asciidoc b/docs/doc_examples/148edc235fcfbc263561f87f5533e688.asciidoc
new file mode 100644
index 000000000..a19fe9d8f
--- /dev/null
+++ b/docs/doc_examples/148edc235fcfbc263561f87f5533e688.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ percolate: {
+ field: "query",
+ documents: [
+ {
+ message: "bonsai tree",
+ },
+ {
+ message: "new tree",
+ },
+ {
+ message: "the office",
+ },
+ {
+ message: "office tree",
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14936b96cfb8ff999a833f615ba75495.asciidoc b/docs/doc_examples/14936b96cfb8ff999a833f615ba75495.asciidoc
new file mode 100644
index 000000000..3bf2abb00
--- /dev/null
+++ b/docs/doc_examples/14936b96cfb8ff999a833f615ba75495.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "bicycles,other_cycles",
+ query: {
+ bool: {
+ must: {
+ match: {
+ description: "dutch",
+ },
+ },
+ filter: {
+ term: {
+ cycle_type: "bicycle",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/149a0eea54cdf6ea3052af6dba2d2a63.asciidoc b/docs/doc_examples/149a0eea54cdf6ea3052af6dba2d2a63.asciidoc
new file mode 100644
index 000000000..3624fa48e
--- /dev/null
+++ b/docs/doc_examples/149a0eea54cdf6ea3052af6dba2d2a63.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ set_priority: {
+ priority: 50,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc b/docs/doc_examples/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc
new file mode 100644
index 000000000..eb061fc6a
--- /dev/null
+++ b/docs/doc_examples/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-data-stream",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-05-06T16:21:15.000Z",
+ message:
+ '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-05-06T16:25:42.000Z",
+ message:
+ '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638',
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14a33c364873c2f930ca83d0a3005389.asciidoc b/docs/doc_examples/14a33c364873c2f930ca83d0a3005389.asciidoc
new file mode 100644
index 000000000..fa4c966b7
--- /dev/null
+++ b/docs/doc_examples/14a33c364873c2f930ca83d0a3005389.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain({
+ index: "my-index",
+ shard: 0,
+ primary: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14af7e2899e64f231068bded6aaf9ec5.asciidoc b/docs/doc_examples/14af7e2899e64f231068bded6aaf9ec5.asciidoc
new file mode 100644
index 000000000..a9bb73e81
--- /dev/null
+++ b/docs/doc_examples/14af7e2899e64f231068bded6aaf9ec5.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ username: "marywhite",
+ email: "mary@white.com",
+ name: {
+ first: "Mary",
+ middle: "Alice",
+ last: "White",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/14afe65afee3d43f27aaaa5b37f26a31.asciidoc b/docs/doc_examples/14afe65afee3d43f27aaaa5b37f26a31.asciidoc
new file mode 100644
index 000000000..c2989f48c
--- /dev/null
+++ b/docs/doc_examples/14afe65afee3d43f27aaaa5b37f26a31.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "Point",
+ coordinates: [-77.03653, 38.897676],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14b81f96297952970b78a3216e059596.asciidoc b/docs/doc_examples/14b81f96297952970b78a3216e059596.asciidoc
new file mode 100644
index 000000000..ad822c276
--- /dev/null
+++ b/docs/doc_examples/14b81f96297952970b78a3216e059596.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.get({
+ id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14f124294a4a0e3a657d1468c36161cd.asciidoc b/docs/doc_examples/14f124294a4a0e3a657d1468c36161cd.asciidoc
new file mode 100644
index 000000000..57cb958e6
--- /dev/null
+++ b/docs/doc_examples/14f124294a4a0e3a657d1468c36161cd.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "stats-index",
+ query: {
+ term: {
+ agg_metric: {
+ value: 702.3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/14f2dab0583c5a9fcc39931d33194872.asciidoc b/docs/doc_examples/14f2dab0583c5a9fcc39931d33194872.asciidoc
new file mode 100644
index 000000000..2c76f8696
--- /dev/null
+++ b/docs/doc_examples/14f2dab0583c5a9fcc39931d33194872.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sample_weblogs_by_clientip",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/150b5fee5678bf8cdf0932da73eada80.asciidoc b/docs/doc_examples/150b5fee5678bf8cdf0932da73eada80.asciidoc
new file mode 100644
index 000000000..f87ba72dc
--- /dev/null
+++ b/docs/doc_examples/150b5fee5678bf8cdf0932da73eada80.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "fielddata",
+ fields: "field1,field2",
+});
+console.log(response);
+
+const response1 = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "fielddata",
+ level: "indices",
+ fields: "field1,field2",
+});
+console.log(response1);
+
+const response2 = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "fielddata",
+ level: "shards",
+ fields: "field1,field2",
+});
+console.log(response2);
+
+const response3 = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "fielddata",
+ fields: "field*",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/151d2b11807ec684b0c01aa89189a801.asciidoc b/docs/doc_examples/151d2b11807ec684b0c01aa89189a801.asciidoc
new file mode 100644
index 000000000..90c13827f
--- /dev/null
+++ b/docs/doc_examples/151d2b11807ec684b0c01aa89189a801.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["title", "content"],
+ query: "this that thus",
+ minimum_should_match: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc b/docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc
new file mode 100644
index 000000000..2dab45f96
--- /dev/null
+++ b/docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateConfiguration({
+ connector_id: "my-connector-id",
+ values: {
+ host: "127.0.0.1",
+ port: 5432,
+ username: "myuser",
+ password: "mypassword",
+ database: "chinook",
+ schema: "public",
+ tables: "album,artist",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/154d703732daf5c5fcd0122e6a50213f.asciidoc b/docs/doc_examples/154d703732daf5c5fcd0122e6a50213f.asciidoc
new file mode 100644
index 000000000..5f79c3ef0
--- /dev/null
+++ b/docs/doc_examples/154d703732daf5c5fcd0122e6a50213f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ "measures.start": {
+ type: "long",
+ },
+ "measures.end": {
+ type: "long",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/156bc64c94f9f3334fbce25165d2286a.asciidoc b/docs/doc_examples/156bc64c94f9f3334fbce25165d2286a.asciidoc
new file mode 100644
index 000000000..84f57ba66
--- /dev/null
+++ b/docs/doc_examples/156bc64c94f9f3334fbce25165d2286a.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "sort.field": "date",
+ "sort.order": "desc",
+ },
+ },
+ mappings: {
+ properties: {
+ date: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1570976f7807b88dc8a046b833be057b.asciidoc b/docs/doc_examples/1570976f7807b88dc8a046b833be057b.asciidoc
new file mode 100644
index 000000000..64b22d4b2
--- /dev/null
+++ b/docs/doc_examples/1570976f7807b88dc8a046b833be057b.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ s: "master,name",
+ h: "name,master,node.role,heap.percent,disk.used_percent,cpu",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1572696b97822d3332be51700e09672f.asciidoc b/docs/doc_examples/1572696b97822d3332be51700e09672f.asciidoc
new file mode 100644
index 000000000..45ae77442
--- /dev/null
+++ b/docs/doc_examples/1572696b97822d3332be51700e09672f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "range_index",
+ query: {
+ range: {
+ time_frame: {
+ gte: "2015-10-31",
+ lte: "2015-11-01",
+ relation: "within",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1598a0fec6b1ca78cadbaba65f465196.asciidoc b/docs/doc_examples/1598a0fec6b1ca78cadbaba65f465196.asciidoc
new file mode 100644
index 000000000..739e06130
--- /dev/null
+++ b/docs/doc_examples/1598a0fec6b1ca78cadbaba65f465196.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "pattern",
+ pattern: '"((?:\\\\"|[^"]|\\\\")+)"',
+ group: 1,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: '"value", "value with embedded \\" quote"',
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/15a34bfe0ef8ef6333c8c7b55c011e5d.asciidoc b/docs/doc_examples/15a34bfe0ef8ef6333c8c7b55c011e5d.asciidoc
new file mode 100644
index 000000000..66c81a93b
--- /dev/null
+++ b/docs/doc_examples/15a34bfe0ef8ef6333c8c7b55c011e5d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ filter: ["lowercase"],
+ text: "BaR",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/15c76cc8a038f686395053a240262929.asciidoc b/docs/doc_examples/15c76cc8a038f686395053a240262929.asciidoc
new file mode 100644
index 000000000..8e3ec71ae
--- /dev/null
+++ b/docs/doc_examples/15c76cc8a038f686395053a240262929.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "classic_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ classic_analyzer: {
+ tokenizer: "classic",
+ filter: ["classic"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/15d4be58359542775f4aff88e6d8adb5.asciidoc b/docs/doc_examples/15d4be58359542775f4aff88e6d8adb5.asciidoc
new file mode 100644
index 000000000..4cc3244aa
--- /dev/null
+++ b/docs/doc_examples/15d4be58359542775f4aff88e6d8adb5.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ id: "my-pipeline",
+ docs: [
+ {
+ _source: {
+ "my-keyword-field": "FOO",
+ },
+ },
+ {
+ _source: {
+ "my-keyword-field": "BAR",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/15d948d593d2624ac5e2b155052048f0.asciidoc b/docs/doc_examples/15d948d593d2624ac5e2b155052048f0.asciidoc
new file mode 100644
index 000000000..882a10ec9
--- /dev/null
+++ b/docs/doc_examples/15d948d593d2624ac5e2b155052048f0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["keyword_repeat", "stemmer"],
+ text: "jumping dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/15e90b82827c8512670820cf856a9c71.asciidoc b/docs/doc_examples/15e90b82827c8512670820cf856a9c71.asciidoc
new file mode 100644
index 000000000..3cfb23d78
--- /dev/null
+++ b/docs/doc_examples/15e90b82827c8512670820cf856a9c71.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "monthlyindex",
+ description: "monthly date-time index naming",
+ processors: [
+ {
+ date_index_name: {
+ field: "date1",
+ index_name_prefix: "my-index-",
+ date_rounding: "M",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc b/docs/doc_examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc
new file mode 100644
index 000000000..0db865fe6
--- /dev/null
+++ b/docs/doc_examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-bit-vectors",
+ query: {
+ script_score: {
+ query: {
+ match_all: {},
+ },
+ script: {
+ source: "dotProduct(params.query_vector, 'my_dense_vector')",
+ params: {
+ query_vector: [
+ 0.23, 1.45, 3.67, 4.89, -0.56, 2.34, 3.21, 1.78, -2.45, 0.98, -0.12,
+ 3.45, 4.56, 2.78, 1.23, 0.67, 3.89, 4.12, -2.34, 1.56, 0.78, 3.21,
+ 4.12, 2.45, -1.67, 0.34, -3.45, 4.56, -2.78, 1.23, -0.67, 3.89,
+ -4.34, 2.12, -1.56, 0.78, -3.21, 4.45, 2.12, 1.67,
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1605be45a5711d1929d6ad2d1ae0f797.asciidoc b/docs/doc_examples/1605be45a5711d1929d6ad2d1ae0f797.asciidoc
new file mode 100644
index 000000000..cd712f029
--- /dev/null
+++ b/docs/doc_examples/1605be45a5711d1929d6ad2d1ae0f797.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ filter_path: "metadata.cluster_coordination.last_committed_config",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/160de80948e0c7db49b1c311848a66a2.asciidoc b/docs/doc_examples/160de80948e0c7db49b1c311848a66a2.asciidoc
new file mode 100644
index 000000000..467ff2e89
--- /dev/null
+++ b/docs/doc_examples/160de80948e0c7db49b1c311848a66a2.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_error_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: ["logs"],
+ body: {
+ query: {
+ match: {
+ message: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+ actions: {
+ log_error: {
+ logging: {
+ text: "Found {{ctx.payload.hits.total}} errors in the logs",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/160f39a50847bad0be4be1529a95e4ce.asciidoc b/docs/doc_examples/160f39a50847bad0be4be1529a95e4ce.asciidoc
new file mode 100644
index 000000000..39f9d4449
--- /dev/null
+++ b/docs/doc_examples/160f39a50847bad0be4be1529a95e4ce.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "irish_example",
+ settings: {
+ analysis: {
+ filter: {
+ irish_hyphenation: {
+ type: "stop",
+ stopwords: ["h", "n", "t"],
+ ignore_case: true,
+ },
+ irish_elision: {
+ type: "elision",
+ articles: ["d", "m", "b"],
+ articles_case: true,
+ },
+ irish_stop: {
+ type: "stop",
+ stopwords: "_irish_",
+ },
+ irish_lowercase: {
+ type: "lowercase",
+ language: "irish",
+ },
+ irish_keywords: {
+ type: "keyword_marker",
+ keywords: ["sampla"],
+ },
+ irish_stemmer: {
+ type: "stemmer",
+ language: "irish",
+ },
+ },
+ analyzer: {
+ rebuilt_irish: {
+ tokenizer: "standard",
+ filter: [
+ "irish_hyphenation",
+ "irish_elision",
+ "irish_lowercase",
+ "irish_stop",
+ "irish_keywords",
+ "irish_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/16239fe9f0b0dcfd5ea64c08c6fed21d.asciidoc b/docs/doc_examples/16239fe9f0b0dcfd5ea64c08c6fed21d.asciidoc
new file mode 100644
index 000000000..f045eced9
--- /dev/null
+++ b/docs/doc_examples/16239fe9f0b0dcfd5ea64c08c6fed21d.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "issues",
+ mappings: {
+ properties: {
+ tags: {
+ type: "keyword",
+ },
+ comments: {
+ type: "nested",
+ properties: {
+ username: {
+ type: "keyword",
+ },
+ comment: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/162b5b693b713f0bfab1209d59443c46.asciidoc b/docs/doc_examples/162b5b693b713f0bfab1209d59443c46.asciidoc
new file mode 100644
index 000000000..be7b89c0b
--- /dev/null
+++ b/docs/doc_examples/162b5b693b713f0bfab1209d59443c46.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ constant_score: {
+ filter: {
+ term: {
+ status: "active",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/16351d99d0608789d04a0bb11a537098.asciidoc b/docs/doc_examples/16351d99d0608789d04a0bb11a537098.asciidoc
new file mode 100644
index 000000000..88500c080
--- /dev/null
+++ b/docs/doc_examples/16351d99d0608789d04a0bb11a537098.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "edge_ngram_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_edge_ngram: {
+ tokenizer: "standard",
+ filter: ["edge_ngram"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc b/docs/doc_examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc
new file mode 100644
index 000000000..da530b1a9
--- /dev/null
+++ b/docs/doc_examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ s: "cpu:desc",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1648dd31d0fef01e7504ebeb687f4f30.asciidoc b/docs/doc_examples/1648dd31d0fef01e7504ebeb687f4f30.asciidoc
new file mode 100644
index 000000000..0176b01af
--- /dev/null
+++ b/docs/doc_examples/1648dd31d0fef01e7504ebeb687f4f30.asciidoc
@@ -0,0 +1,57 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 1,
+ refresh: "true",
+ document: {
+ url: "https://en.wikipedia.org/wiki/2016_Summer_Olympics",
+ content: "Rio 2016",
+ pagerank: 50.3,
+ url_length: 42,
+ topics: {
+ sports: 50,
+ brazil: 30,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 2,
+ refresh: "true",
+ document: {
+ url: "https://en.wikipedia.org/wiki/2016_Brazilian_Grand_Prix",
+ content: "Formula One motor race held on 13 November 2016",
+ pagerank: 50.3,
+ url_length: 47,
+ topics: {
+ sports: 35,
+ "formula one": 65,
+ brazil: 20,
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "test",
+ id: 3,
+ refresh: "true",
+ document: {
+ url: "https://en.wikipedia.org/wiki/Deadpool_(film)",
+ content: "Deadpool is a 2016 American superhero film",
+ pagerank: 50.3,
+ url_length: 37,
+ topics: {
+ movies: 60,
+ "super hero": 65,
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/16535685833419f0033545ffce4fdf00.asciidoc b/docs/doc_examples/16535685833419f0033545ffce4fdf00.asciidoc
new file mode 100644
index 000000000..450c4fb80
--- /dev/null
+++ b/docs/doc_examples/16535685833419f0033545ffce4fdf00.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index2",
+ query: {
+ query_string: {
+ query: "running with scissors",
+ fields: ["comment", "comment.english"],
+ },
+ },
+ highlight: {
+ order: "score",
+ fields: {
+ "comment.english": {
+ type: "fvh",
+ matched_fields: ["comment"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1659420311d907d9fc024b96f4150216.asciidoc b/docs/doc_examples/1659420311d907d9fc024b96f4150216.asciidoc
new file mode 100644
index 000000000..01be05459
--- /dev/null
+++ b/docs/doc_examples/1659420311d907d9fc024b96f4150216.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "length",
+ min: 0,
+ max: 4,
+ },
+ ],
+ text: "the quick brown fox jumps over the lazy dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc b/docs/doc_examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc
new file mode 100644
index 000000000..64aa8e2d1
--- /dev/null
+++ b/docs/doc_examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my-example-app",
+ search_application: {
+ indices: ["example-index"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n \n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
+ params: {
+ query: "",
+ _es_filters: {},
+ _es_aggs: {},
+ _es_sort_fields: {},
+ size: 10,
+ from: 0,
+ },
+ dictionary: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/166bcfc6d5d39defec7ad6aa44d0914b.asciidoc b/docs/doc_examples/166bcfc6d5d39defec7ad6aa44d0914b.asciidoc
new file mode 100644
index 000000000..d8c815fd5
--- /dev/null
+++ b/docs/doc_examples/166bcfc6d5d39defec7ad6aa44d0914b.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list();
+console.log(response);
+
+const response1 = await client.tasks.list({
+ nodes: "nodeId1,nodeId2",
+});
+console.log(response1);
+
+const response2 = await client.tasks.list({
+ nodes: "nodeId1,nodeId2",
+ actions: "cluster:*",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/16985e5b17d2da0955a14fbe02e8dfca.asciidoc b/docs/doc_examples/16985e5b17d2da0955a14fbe02e8dfca.asciidoc
new file mode 100644
index 000000000..5b89ae747
--- /dev/null
+++ b/docs/doc_examples/16985e5b17d2da0955a14fbe02e8dfca.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "my-index-000001",
+ id: 1,
+ fields: ["text"],
+ offsets: true,
+ payloads: true,
+ positions: true,
+ term_statistics: true,
+ field_statistics: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/169b39bb889ecd47541bed3e48725488.asciidoc b/docs/doc_examples/169b39bb889ecd47541bed3e48725488.asciidoc
new file mode 100644
index 000000000..2f62a2605
--- /dev/null
+++ b/docs/doc_examples/169b39bb889ecd47541bed3e48725488.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "bug_reports",
+ query: {
+ term: {
+ labels: "urgent",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc b/docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc
new file mode 100644
index 000000000..72589cd8f
--- /dev/null
+++ b/docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "books",
+});
+console.log(response);
+
+const response1 = await client.indices.delete({
+ index: "my-explicit-mappings-books",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/170c8a3fb81a4e93cd3034a3b5a43ac9.asciidoc b/docs/doc_examples/170c8a3fb81a4e93cd3034a3b5a43ac9.asciidoc
new file mode 100644
index 000000000..e9bbbd34f
--- /dev/null
+++ b/docs/doc_examples/170c8a3fb81a4e93cd3034a3b5a43ac9.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 1,
+ document: {
+ location: {
+ coordinates: [
+ [46.25, 20.14],
+ [47.49, 19.04],
+ ],
+ type: "multipoint",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/172155ca4bf6dfcbd489453f50739396.asciidoc b/docs/doc_examples/172155ca4bf6dfcbd489453f50739396.asciidoc
new file mode 100644
index 000000000..e380107dc
--- /dev/null
+++ b/docs/doc_examples/172155ca4bf6dfcbd489453f50739396.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "snapshot*",
+ size: 2,
+ sort: "name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17266cee5eaaddf08e5534bf580a1910.asciidoc b/docs/doc_examples/17266cee5eaaddf08e5534bf580a1910.asciidoc
new file mode 100644
index 000000000..cf5d15d02
--- /dev/null
+++ b/docs/doc_examples/17266cee5eaaddf08e5534bf580a1910.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.stats();
+console.log(response);
+----
diff --git a/docs/doc_examples/172b18e435c400bed85227624de3acfd.asciidoc b/docs/doc_examples/172b18e435c400bed85227624de3acfd.asciidoc
new file mode 100644
index 000000000..a13d0a955
--- /dev/null
+++ b/docs/doc_examples/172b18e435c400bed85227624de3acfd.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "my_analyst_role",
+ refresh: "true",
+ cluster: ["monitor"],
+ indices: [
+ {
+ names: ["index1", "index2"],
+ privileges: ["manage"],
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["read"],
+ resources: ["*"],
+ },
+ ],
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/172d150e56a225155a62c7b18bf8da67.asciidoc b/docs/doc_examples/172d150e56a225155a62c7b18bf8da67.asciidoc
new file mode 100644
index 000000000..a4d21847f
--- /dev/null
+++ b/docs/doc_examples/172d150e56a225155a62c7b18bf8da67.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query:
+ "SELECT YEAR(release_date) AS year FROM library WHERE page_count > 300 AND author = 'Frank Herbert' GROUP BY year HAVING COUNT(*) > 0",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc b/docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc
new file mode 100644
index 000000000..13415ca5b
--- /dev/null
+++ b/docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-connector-api-key",
+ role_descriptors: {
+ "my-connector-connector-role": {
+ cluster: ["monitor", "manage_connector"],
+ indices: [
+ {
+ names: [
+ "my-index_name",
+ ".search-acl-filter-my-index_name",
+ ".elastic-connectors*",
+ ],
+ privileges: ["all"],
+ allow_restricted_indices: false,
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1736545c8b5674f6d311f3277eb387f1.asciidoc b/docs/doc_examples/1736545c8b5674f6d311f3277eb387f1.asciidoc
new file mode 100644
index 000000000..de3df9694
--- /dev/null
+++ b/docs/doc_examples/1736545c8b5674f6d311f3277eb387f1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putDataLifecycle({
+ name: "my-data-stream",
+ data_retention: "30d",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/173b190078621415a80e851eaf794e8a.asciidoc b/docs/doc_examples/173b190078621415a80e851eaf794e8a.asciidoc
new file mode 100644
index 000000000..f09c6d4ed
--- /dev/null
+++ b/docs/doc_examples/173b190078621415a80e851eaf794e8a.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_english_analyzer: {
+ type: "standard",
+ max_token_length: 5,
+ stopwords: "_english_",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_english_analyzer",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/17566e23c191f1004a2719f2c4242307.asciidoc b/docs/doc_examples/17566e23c191f1004a2719f2c4242307.asciidoc
new file mode 100644
index 000000000..1cd460618
--- /dev/null
+++ b/docs/doc_examples/17566e23c191f1004a2719f2c4242307.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.getAutoscalingCapacity();
+console.log(response);
+----
diff --git a/docs/doc_examples/178be73b74ba9f297429e32267084ac7.asciidoc b/docs/doc_examples/178be73b74ba9f297429e32267084ac7.asciidoc
new file mode 100644
index 000000000..2d564eeb6
--- /dev/null
+++ b/docs/doc_examples/178be73b74ba9f297429e32267084ac7.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_or: {
+ clauses: [
+ {
+ span_term: {
+ field: "value1",
+ },
+ },
+ {
+ span_term: {
+ field: "value2",
+ },
+ },
+ {
+ span_term: {
+ field: "value3",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/178c920d5e8ec0071f77290fa059802c.asciidoc b/docs/doc_examples/178c920d5e8ec0071f77290fa059802c.asciidoc
new file mode 100644
index 000000000..8df29abb5
--- /dev/null
+++ b/docs/doc_examples/178c920d5e8ec0071f77290fa059802c.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ refresh_interval: "1s",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc b/docs/doc_examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc
new file mode 100644
index 000000000..f6c66f74b
--- /dev/null
+++ b/docs/doc_examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "Jon",
+ type: "cross_fields",
+ analyzer: "standard",
+ fields: ["first", "last", "*.edge"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17a1e308761afd3282f13d44d7be008a.asciidoc b/docs/doc_examples/17a1e308761afd3282f13d44d7be008a.asciidoc
new file mode 100644
index 000000000..5ca1e8e58
--- /dev/null
+++ b/docs/doc_examples/17a1e308761afd3282f13d44d7be008a.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example",
+ mappings: {
+ properties: {
+ comment: {
+ type: "text",
+ term_vector: "with_positions_offsets",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc b/docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc
new file mode 100644
index 000000000..e1f4fbd3c
--- /dev/null
+++ b/docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ standard: {
+ query: {
+ match: {
+ text: "How often does the moon hide the sun?",
+ },
+ },
+ },
+ },
+ field: "text",
+ inference_id: "elastic-rerank",
+ inference_text: "How often does the moon hide the sun?",
+ rank_window_size: 100,
+ min_score: 0.5,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17c2b0a6b0305804ff3b7fd3b4a68df3.asciidoc b/docs/doc_examples/17c2b0a6b0305804ff3b7fd3b4a68df3.asciidoc
new file mode 100644
index 000000000..2f461ea4c
--- /dev/null
+++ b/docs/doc_examples/17c2b0a6b0305804ff3b7fd3b4a68df3.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ description: "_description",
+ processors: [
+ {
+ set: {
+ field: "field2",
+ value: "_value",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ foo: "bar",
+ },
+ },
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ foo: "rab",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17dd67a66c49f7eb618dd17430e48dfa.asciidoc b/docs/doc_examples/17dd67a66c49f7eb618dd17430e48dfa.asciidoc
new file mode 100644
index 000000000..69f249727
--- /dev/null
+++ b/docs/doc_examples/17dd67a66c49f7eb618dd17430e48dfa.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ query: {
+ constant_score: {
+ filter: {
+ range: {
+ my_date: {
+ gte: "now-1h/m",
+ lte: "now/m",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17e6f3fac556f08a78f7a876e71acb89.asciidoc b/docs/doc_examples/17e6f3fac556f08a78f7a876e71acb89.asciidoc
new file mode 100644
index 000000000..8661cf147
--- /dev/null
+++ b/docs/doc_examples/17e6f3fac556f08a78f7a876e71acb89.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "_all",
+ settings: {
+ settings: {
+ "index.unassigned.node_left.delayed_timeout": "5m",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17f8a8990b0166befa3bc2b10fd28134.asciidoc b/docs/doc_examples/17f8a8990b0166befa3bc2b10fd28134.asciidoc
new file mode 100644
index 000000000..8c4710ec7
--- /dev/null
+++ b/docs/doc_examples/17f8a8990b0166befa3bc2b10fd28134.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: "match_value",
+ document: {
+ query: {
+ match: {
+ field: "value",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/17fb298fb1e47f7d946a772d68f4e2df.asciidoc b/docs/doc_examples/17fb298fb1e47f7d946a772d68f4e2df.asciidoc
new file mode 100644
index 000000000..064b8e0d0
--- /dev/null
+++ b/docs/doc_examples/17fb298fb1e47f7d946a772d68f4e2df.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-data-stream",
+ query: {
+ match: {
+ "user.id": "vlb44hny",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/182df084f028479ecbe8d7648ddad892.asciidoc b/docs/doc_examples/182df084f028479ecbe8d7648ddad892.asciidoc
new file mode 100644
index 000000000..aca2d7530
--- /dev/null
+++ b/docs/doc_examples/182df084f028479ecbe8d7648ddad892.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.getStatus();
+console.log(response);
+----
diff --git a/docs/doc_examples/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc b/docs/doc_examples/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc
new file mode 100644
index 000000000..1bf5255a3
--- /dev/null
+++ b/docs/doc_examples/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "passage_vectors",
+ mappings: {
+ properties: {
+ full_text: {
+ type: "text",
+ },
+ creation_time: {
+ type: "date",
+ },
+ paragraph: {
+ type: "nested",
+ properties: {
+ vector: {
+ type: "dense_vector",
+ dims: 2,
+ index_options: {
+ type: "hnsw",
+ },
+ },
+ text: {
+ type: "text",
+ index: false,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/187733e50c60350f3f75921bea3b72c2.asciidoc b/docs/doc_examples/187733e50c60350f3f75921bea3b72c2.asciidoc
new file mode 100644
index 000000000..803cd40e1
--- /dev/null
+++ b/docs/doc_examples/187733e50c60350f3f75921bea3b72c2.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ scroll: "1m",
+ slice: {
+ field: "@timestamp",
+ id: 0,
+ max: 10,
+ },
+ query: {
+ match: {
+ message: "foo",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/187e8786e0a90f1f6278cf89b670de0a.asciidoc b/docs/doc_examples/187e8786e0a90f1f6278cf89b670de0a.asciidoc
new file mode 100644
index 000000000..7351ff9ee
--- /dev/null
+++ b/docs/doc_examples/187e8786e0a90f1f6278cf89b670de0a.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "german_example",
+ settings: {
+ analysis: {
+ filter: {
+ german_stop: {
+ type: "stop",
+ stopwords: "_german_",
+ },
+ german_keywords: {
+ type: "keyword_marker",
+ keywords: ["Beispiel"],
+ },
+ german_stemmer: {
+ type: "stemmer",
+ language: "light_german",
+ },
+ },
+ analyzer: {
+ rebuilt_german: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "german_stop",
+ "german_keywords",
+ "german_normalization",
+ "german_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/188e6208cccb13027a5c1c95440841ee.asciidoc b/docs/doc_examples/188e6208cccb13027a5c1c95440841ee.asciidoc
new file mode 100644
index 000000000..8a3fcd943
--- /dev/null
+++ b/docs/doc_examples/188e6208cccb13027a5c1c95440841ee.asciidoc
@@ -0,0 +1,61 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "logs",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ body: "warning: page could not be rendered",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ body: "authentication error",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ body: "warning: connection timed out",
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "logs",
+ size: 0,
+ aggs: {
+ messages: {
+ filters: {
+ filters: {
+ errors: {
+ match: {
+ body: "error",
+ },
+ },
+ warnings: {
+ match: {
+ body: "warning",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/189f0cd1ee2485cf11a2968f01d54e5b.asciidoc b/docs/doc_examples/189f0cd1ee2485cf11a2968f01d54e5b.asciidoc
new file mode 100644
index 000000000..e085fe57c
--- /dev/null
+++ b/docs/doc_examples/189f0cd1ee2485cf11a2968f01d54e5b.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ sales_deriv: {
+ derivative: {
+ buckets_path: "sales",
+ unit: "day",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc b/docs/doc_examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc
new file mode 100644
index 000000000..9d0141379
--- /dev/null
+++ b/docs/doc_examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.cancel({
+ task_id: "r1A2WoRbTwKZ516z6NEs5A:36619",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/190a21e32db2125ddaea0f634e126a84.asciidoc b/docs/doc_examples/190a21e32db2125ddaea0f634e126a84.asciidoc
new file mode 100644
index 000000000..f4a25c0ec
--- /dev/null
+++ b/docs/doc_examples/190a21e32db2125ddaea0f634e126a84.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clone({
+ index: "my_source_index",
+ target: "my_target_index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/19174d872fd1e43cbfb7a96a33d13c96.asciidoc b/docs/doc_examples/19174d872fd1e43cbfb7a96a33d13c96.asciidoc
new file mode 100644
index 000000000..b35d51a2c
--- /dev/null
+++ b/docs/doc_examples/19174d872fd1e43cbfb7a96a33d13c96.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "places",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "places",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ name: "NEMO Science Museum",
+ geometry: "POINT(491.2350 5237.4081)",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ name: "Sportpark De Weeren",
+ geometry: {
+ type: "Polygon",
+ coordinates: [
+ [
+ [496.5305328369141, 5239.347642069457],
+ [496.6979026794433, 5239.172175893484],
+ [496.9425201416015, 5239.238958618537],
+ [496.7944622039794, 5239.420969150824],
+ [496.5305328369141, 5239.347642069457],
+ ],
+ ],
+ },
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "places",
+ size: 0,
+ aggs: {
+ centroid: {
+ cartesian_centroid: {
+ field: "geometry",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc b/docs/doc_examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc
new file mode 100644
index 000000000..1df059288
--- /dev/null
+++ b/docs/doc_examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.retry({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/193234bb5dc6451fd15b584fbefd2446.asciidoc b/docs/doc_examples/193234bb5dc6451fd15b584fbefd2446.asciidoc
new file mode 100644
index 000000000..4adf954e1
--- /dev/null
+++ b/docs/doc_examples/193234bb5dc6451fd15b584fbefd2446.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "example1",
+ indices: [
+ {
+ names: ["my-index-000001"],
+ privileges: ["read"],
+ query: {
+ template: {
+ source: {
+ term: {
+ "acl.username": "{{_user.username}}",
+ },
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/193704020a19714dec390452a4e75e8d.asciidoc b/docs/doc_examples/193704020a19714dec390452a4e75e8d.asciidoc
new file mode 100644
index 000000000..1fcacfbd1
--- /dev/null
+++ b/docs/doc_examples/193704020a19714dec390452a4e75e8d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "books",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/193d86b6cc34e12c2be806d27816a35c.asciidoc b/docs/doc_examples/193d86b6cc34e12c2be806d27816a35c.asciidoc
new file mode 100644
index 000000000..3dae701d0
--- /dev/null
+++ b/docs/doc_examples/193d86b6cc34e12c2be806d27816a35c.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ size: 5,
+ query_string: "mountain climbing",
+ text_fields: [
+ {
+ name: "title",
+ boost: 10,
+ },
+ {
+ name: "description",
+ boost: 2,
+ },
+ {
+ name: "state",
+ boost: 1,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/194bbac15e709174ac85b681f3a3d137.asciidoc b/docs/doc_examples/194bbac15e709174ac85b681f3a3d137.asciidoc
new file mode 100644
index 000000000..2015c6183
--- /dev/null
+++ b/docs/doc_examples/194bbac15e709174ac85b681f3a3d137.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["template*"],
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ aliases: {
+ alias1: {},
+ alias2: {
+ filter: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ routing: "shard-1",
+ },
+ "{index}-alias": {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/196aed02b11def364bab84e455c1a073.asciidoc b/docs/doc_examples/196aed02b11def364bab84e455c1a073.asciidoc
new file mode 100644
index 000000000..4492ff082
--- /dev/null
+++ b/docs/doc_examples/196aed02b11def364bab84e455c1a073.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["logs-*"],
+ data_stream: {},
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/199f5165d876267080046c907e93483f.asciidoc b/docs/doc_examples/199f5165d876267080046c907e93483f.asciidoc
new file mode 100644
index 000000000..d5e492b5a
--- /dev/null
+++ b/docs/doc_examples/199f5165d876267080046c907e93483f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "my-index-000001",
+ field: "my-field",
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc
new file mode 100644
index 000000000..c5453ffaf
--- /dev/null
+++ b/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.simulate.ingest({
+ body: {
+ docs: [
+ {
+ _index: "my-index",
+ _id: "123",
+ _source: {
+ foo: "bar",
+ },
+ },
+ {
+ _index: "my-index",
+ _id: "456",
+ _source: {
+ foo: "rab",
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/19ee488226d357d1576e7d3ae7a4693f.asciidoc b/docs/doc_examples/19ee488226d357d1576e7d3ae7a4693f.asciidoc
new file mode 100644
index 000000000..aa4955985
--- /dev/null
+++ b/docs/doc_examples/19ee488226d357d1576e7d3ae7a4693f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "keyword",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a1f3421717ff744ed83232729289bb0.asciidoc b/docs/doc_examples/1a1f3421717ff744ed83232729289bb0.asciidoc
new file mode 100644
index 000000000..3aff383cc
--- /dev/null
+++ b/docs/doc_examples/1a1f3421717ff744ed83232729289bb0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.deleteLifecycle({
+ policy_id: "daily-snapshots",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a2890b90f3699fc2a4f27f94b145be9.asciidoc b/docs/doc_examples/1a2890b90f3699fc2a4f27f94b145be9.asciidoc
new file mode 100644
index 000000000..f07d50ef1
--- /dev/null
+++ b/docs/doc_examples/1a2890b90f3699fc2a4f27f94b145be9.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "nightly-cluster-state-snapshots",
+ schedule: "0 30 2 * * ?",
+ name: "",
+ repository: "my_secure_repository",
+ config: {
+ include_global_state: true,
+ indices: "-*",
+ },
+ retention: {
+ expire_after: "30d",
+ min_count: 5,
+ max_count: 50,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc b/docs/doc_examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc
new file mode 100644
index 000000000..8ca806885
--- /dev/null
+++ b/docs/doc_examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ level: "shards",
+ human: "true",
+ expand_wildcards: "all",
+ filter_path: "indices.*.total.indexing.index_total",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a3a4b8a4bfee4ab84ddd13d8835f560.asciidoc b/docs/doc_examples/1a3a4b8a4bfee4ab84ddd13d8835f560.asciidoc
new file mode 100644
index 000000000..9ede96eef
--- /dev/null
+++ b/docs/doc_examples/1a3a4b8a4bfee4ab84ddd13d8835f560.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.startDataFrameAnalytics({
+ id: "loganalytics",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a4f8beb6847678880ca113ee6fb75ca.asciidoc b/docs/doc_examples/1a4f8beb6847678880ca113ee6fb75ca.asciidoc
new file mode 100644
index 000000000..cf2015322
--- /dev/null
+++ b/docs/doc_examples/1a4f8beb6847678880ca113ee6fb75ca.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "music",
+ pretty: "true",
+ suggest: {
+ "song-suggest": {
+ regex: "n[ever|i]r",
+ completion: {
+ field: "suggest",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a56df055b94466ca76818e0858752c6.asciidoc b/docs/doc_examples/1a56df055b94466ca76818e0858752c6.asciidoc
new file mode 100644
index 000000000..46718769b
--- /dev/null
+++ b/docs/doc_examples/1a56df055b94466ca76818e0858752c6.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "openai_embeddings",
+ inference_config: {
+ service: "openai",
+ service_settings: {
+ api_key: "",
+ model_id: "text-embedding-ada-002",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a6dbe5df488c4a16e2f1101ba8a25d9.asciidoc b/docs/doc_examples/1a6dbe5df488c4a16e2f1101ba8a25d9.asciidoc
new file mode 100644
index 000000000..8a3b8bda4
--- /dev/null
+++ b/docs/doc_examples/1a6dbe5df488c4a16e2f1101ba8a25d9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "pattern",
+ text: "The foo_bar_size's default is 5.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a7483796087053ba55029d0dc2ab356.asciidoc b/docs/doc_examples/1a7483796087053ba55029d0dc2ab356.asciidoc
new file mode 100644
index 000000000..a5696747c
--- /dev/null
+++ b/docs/doc_examples/1a7483796087053ba55029d0dc2ab356.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "mv",
+ refresh: "true",
+ document: {
+ a: [2, null, 1],
+ },
+});
+console.log(response);
+
+const response1 = await client.esql.query({
+ query: "FROM mv | LIMIT 1",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/1a81fe0186369838531e116e85aa4ccd.asciidoc b/docs/doc_examples/1a81fe0186369838531e116e85aa4ccd.asciidoc
new file mode 100644
index 000000000..ec6bd5524
--- /dev/null
+++ b/docs/doc_examples/1a81fe0186369838531e116e85aa4ccd.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "shirts",
+ mappings: {
+ properties: {
+ brand: {
+ type: "keyword",
+ },
+ color: {
+ type: "keyword",
+ },
+ model: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "shirts",
+ id: 1,
+ refresh: "true",
+ document: {
+ brand: "gucci",
+ color: "red",
+ model: "slim",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/1a8d92e93481c432a91f7c213099800a.asciidoc b/docs/doc_examples/1a8d92e93481c432a91f7c213099800a.asciidoc
new file mode 100644
index 000000000..6e87b1d33
--- /dev/null
+++ b/docs/doc_examples/1a8d92e93481c432a91f7c213099800a.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryApiKeys();
+console.log(response);
+----
diff --git a/docs/doc_examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc b/docs/doc_examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc
new file mode 100644
index 000000000..06c636ead
--- /dev/null
+++ b/docs/doc_examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "google_vertex_ai_rerank",
+ inference_config: {
+ service: "googlevertexai",
+ service_settings: {
+ service_account_json: "",
+ project_id: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc b/docs/doc_examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc
new file mode 100644
index 000000000..1d19dc630
--- /dev/null
+++ b/docs/doc_examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.rollupSearch({
+ index: "sensor-1,sensor_rollup",
+ size: 0,
+ aggregations: {
+ max_temperature: {
+ max: {
+ field: "temperature",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc b/docs/doc_examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc
new file mode 100644
index 000000000..dec1346f8
--- /dev/null
+++ b/docs/doc_examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ operations: [
+ {
+ update: {
+ _id: "5",
+ _index: "index1",
+ },
+ },
+ {
+ doc: {
+ my_field: "foo",
+ },
+ },
+ {
+ update: {
+ _id: "6",
+ _index: "index1",
+ },
+ },
+ {
+ doc: {
+ my_field: "foo",
+ },
+ },
+ {
+ create: {
+ _id: "7",
+ _index: "index1",
+ },
+ },
+ {
+ my_field: "foo",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc b/docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc
new file mode 100644
index 000000000..84fdefbae
--- /dev/null
+++ b/docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000002",
+ mappings: {
+ properties: {
+ metrics: {
+ subobjects: false,
+ properties: {
+ time: {
+ type: "object",
+ properties: {
+ min: {
+ type: "long",
+ },
+ max: {
+ type: "long",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.getMapping({
+ index: "my-index-000002",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/1adee74383e5594e45c937177d75aa2a.asciidoc b/docs/doc_examples/1adee74383e5594e45c937177d75aa2a.asciidoc
new file mode 100644
index 000000000..a3408bfb4
--- /dev/null
+++ b/docs/doc_examples/1adee74383e5594e45c937177d75aa2a.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_index",
+ query: {
+ match_all: {},
+ },
+ sort: {
+ my_counter: "desc",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b076ceb1ead9f6897c2f351f0e45f74.asciidoc b/docs/doc_examples/1b076ceb1ead9f6897c2f351f0e45f74.asciidoc
new file mode 100644
index 000000000..49d0b45e5
--- /dev/null
+++ b/docs/doc_examples/1b076ceb1ead9f6897c2f351f0e45f74.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-restricted-api-key",
+ role_descriptors: {
+ "my-restricted-role-descriptor": {
+ indices: [
+ {
+ names: ["my-search-app"],
+ privileges: ["read"],
+ },
+ ],
+ restriction: {
+ workflows: ["search_application_query"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b0b29e5cd7550c648d0892378e93804.asciidoc b/docs/doc_examples/1b0b29e5cd7550c648d0892378e93804.asciidoc
new file mode 100644
index 000000000..d8d5f1e85
--- /dev/null
+++ b/docs/doc_examples/1b0b29e5cd7550c648d0892378e93804.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteCalendarJob({
+ calendar_id: "planned-outages",
+ job_id: "total-requests",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b0dc9d076bbb58c6a2953ef4323d2fc.asciidoc b/docs/doc_examples/1b0dc9d076bbb58c6a2953ef4323d2fc.asciidoc
new file mode 100644
index 000000000..e490ad820
--- /dev/null
+++ b/docs/doc_examples/1b0dc9d076bbb58c6a2953ef4323d2fc.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.ackWatch({
+ watch_id: "my_watch",
+ action_id: "test_index",
+});
+console.log(response);
+
+const response1 = await client.watcher.getWatch({
+ id: "my_watch",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/1b0f40959a7a4d124372f2bd3f7eac85.asciidoc b/docs/doc_examples/1b0f40959a7a4d124372f2bd3f7eac85.asciidoc
new file mode 100644
index 000000000..fd884d183
--- /dev/null
+++ b/docs/doc_examples/1b0f40959a7a4d124372f2bd3f7eac85.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "custom_fingerprint_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_: {
+ tokenizer: "whitespace",
+ filter: ["fingerprint_plus_concat"],
+ },
+ },
+ filter: {
+ fingerprint_plus_concat: {
+ type: "fingerprint",
+ max_output_size: 100,
+ separator: "+",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b2ab75d3c8064fac6ecc63104396c02.asciidoc b/docs/doc_examples/1b2ab75d3c8064fac6ecc63104396c02.asciidoc
new file mode 100644
index 000000000..1e7e3f102
--- /dev/null
+++ b/docs/doc_examples/1b2ab75d3c8064fac6ecc63104396c02.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putCalendarJob({
+ calendar_id: "planned-outages",
+ job_id: "total-requests",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b3762712c14a19e8c2956b4f530d327.asciidoc b/docs/doc_examples/1b3762712c14a19e8c2956b4f530d327.asciidoc
new file mode 100644
index 000000000..b790c8e30
--- /dev/null
+++ b/docs/doc_examples/1b3762712c14a19e8c2956b4f530d327.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.follow({
+ index: "follower_index",
+ wait_for_active_shards: 1,
+ remote_cluster: "remote_cluster",
+ leader_index: "leader_index",
+ settings: {
+ "index.number_of_replicas": 0,
+ },
+ max_read_request_operation_count: 1024,
+ max_outstanding_read_requests: 16,
+ max_read_request_size: "1024k",
+ max_write_request_operation_count: 32768,
+ max_write_request_size: "16k",
+ max_outstanding_write_requests: 8,
+ max_write_buffer_count: 512,
+ max_write_buffer_size: "512k",
+ max_retry_delay: "10s",
+ read_poll_timeout: "30s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc b/docs/doc_examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc
new file mode 100644
index 000000000..908e50f66
--- /dev/null
+++ b/docs/doc_examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "shrink-index",
+ policy: {
+ phases: {
+ warm: {
+ min_age: "5d",
+ actions: {
+ shrink: {
+ number_of_shards: 4,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b47d988b218ee595430ec91eba91d80.asciidoc b/docs/doc_examples/1b47d988b218ee595430ec91eba91d80.asciidoc
new file mode 100644
index 000000000..d139c002b
--- /dev/null
+++ b/docs/doc_examples/1b47d988b218ee595430ec91eba91d80.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "logs-foo",
+ index_patterns: ["logs-foo-*"],
+ data_stream: {},
+ composed_of: ["logs-foo_component1", "logs-foo_component2"],
+ ignore_missing_component_templates: ["logs-foo_component2"],
+ priority: 500,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc b/docs/doc_examples/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc
new file mode 100644
index 000000000..fcb26b045
--- /dev/null
+++ b/docs/doc_examples/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "manager.name": "Alice White",
+ },
+ },
+ aggs: {
+ Employees: {
+ nested: {
+ path: "employees",
+ },
+ aggs: {
+ "Employee Ages": {
+ histogram: {
+ field: "employees.age",
+ interval: 5,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1b98b60d8e558fcccf9c550bdbf5b5c9.asciidoc b/docs/doc_examples/1b98b60d8e558fcccf9c550bdbf5b5c9.asciidoc
new file mode 100644
index 000000000..8e56b7f06
--- /dev/null
+++ b/docs/doc_examples/1b98b60d8e558fcccf9c550bdbf5b5c9.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "example3",
+ indices: [
+ {
+ names: ["my-index-000001"],
+ privileges: ["read"],
+ query: {
+ template: {
+ source:
+ '{ "terms": { "group.statuses": {{#toJson}}_user.metadata.statuses{{/toJson}} }}',
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc b/docs/doc_examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc
new file mode 100644
index 000000000..44005a3f3
--- /dev/null
+++ b/docs/doc_examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "romanian_example",
+ settings: {
+ analysis: {
+ filter: {
+ romanian_stop: {
+ type: "stop",
+ stopwords: "_romanian_",
+ },
+ romanian_keywords: {
+ type: "keyword_marker",
+ keywords: ["exemplu"],
+ },
+ romanian_stemmer: {
+ type: "stemmer",
+ language: "romanian",
+ },
+ },
+ analyzer: {
+ rebuilt_romanian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "romanian_stop",
+ "romanian_keywords",
+ "romanian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1bceb160ed2bcd51ee040caf21acf780.asciidoc b/docs/doc_examples/1bceb160ed2bcd51ee040caf21acf780.asciidoc
new file mode 100644
index 000000000..25474a42e
--- /dev/null
+++ b/docs/doc_examples/1bceb160ed2bcd51ee040caf21acf780.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my-search-app",
+ search_application: {
+ indices: ["index1"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "retriever": {\n "rrf": {\n "retrievers": [\n {{#text_fields}}\n {\n "standard": {\n "query": {\n "match": {\n "{{.}}": "{{query_string}}"\n }\n }\n }\n },\n {{/text_fields}}\n {{#elser_fields}}\n {\n "standard": {\n "query": {\n "sparse_vector": {\n "field": "ml.inference.{{.}}_expanded.predicted_value",\n "inference_id": "",\n "query": "{{query_string}}"\n }\n }\n }\n },\n {{/elser_fields}}\n ],\n "rank_window_size": {{rrf.rank_window_size}},\n "rank_constant": {{rrf.rank_constant}}\n }\n }\n }\n ',
+ params: {
+ elser_fields: ["title", "meta_description"],
+ text_fields: ["title", "meta_description"],
+ query_string: "",
+ rrf: {
+ rank_window_size: 100,
+ rank_constant: 60,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1c142bc8cac8d9dcb4f60e22902d434f.asciidoc b/docs/doc_examples/1c142bc8cac8d9dcb4f60e22902d434f.asciidoc
new file mode 100644
index 000000000..76ee6237d
--- /dev/null
+++ b/docs/doc_examples/1c142bc8cac8d9dcb4f60e22902d434f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ message_stats: {
+ string_stats: {
+ field: "message.keyword",
+ show_distribution: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1c1f2a6a193d9e64c37242b2824b3031.asciidoc b/docs/doc_examples/1c1f2a6a193d9e64c37242b2824b3031.asciidoc
new file mode 100644
index 000000000..e9198e540
--- /dev/null
+++ b/docs/doc_examples/1c1f2a6a193d9e64c37242b2824b3031.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "source_template",
+ template: {
+ settings: {
+ index: {
+ number_of_replicas: 2,
+ number_of_shards: 2,
+ mode: "time_series",
+ routing_path: ["metricset"],
+ },
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ metricset: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ k8s: {
+ properties: {
+ tx: {
+ type: "long",
+ },
+ rx: {
+ type: "long",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putIndexTemplate({
+ name: 1,
+ index_patterns: ["k8s*"],
+ composed_of: ["source_template"],
+ data_stream: {},
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/1c330f0fc9eac19d0edeb8c4017b9b93.asciidoc b/docs/doc_examples/1c330f0fc9eac19d0edeb8c4017b9b93.asciidoc
new file mode 100644
index 000000000..0c57e6552
--- /dev/null
+++ b/docs/doc_examples/1c330f0fc9eac19d0edeb8c4017b9b93.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "hugging_face_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "hugging_face_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1c3e3c4f2d268f1826a9b417e1868a58.asciidoc b/docs/doc_examples/1c3e3c4f2d268f1826a9b417e1868a58.asciidoc
new file mode 100644
index 000000000..c7c693460
--- /dev/null
+++ b/docs/doc_examples/1c3e3c4f2d268f1826a9b417e1868a58.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "my-index-000001",
+ id: 1,
+ script: {
+ source: "ctx._source.tags.add(params['tag'])",
+ lang: "painless",
+ params: {
+ tag: "blue",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1c87b5bf682bc1e8809a657529e14b07.asciidoc b/docs/doc_examples/1c87b5bf682bc1e8809a657529e14b07.asciidoc
new file mode 100644
index 000000000..f7d5b04ed
--- /dev/null
+++ b/docs/doc_examples/1c87b5bf682bc1e8809a657529e14b07.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "shapes",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "shapes",
+ id: "deu",
+ document: {
+ location: {
+ type: "envelope",
+ coordinates: [
+ [13, 53],
+ [14, 52],
+ ],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "example",
+ query: {
+ bool: {
+ filter: {
+ geo_shape: {
+ location: {
+ indexed_shape: {
+ index: "shapes",
+ id: "deu",
+ path: "location",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/1c8b6768c4eefc76fcb38708152f561b.asciidoc b/docs/doc_examples/1c8b6768c4eefc76fcb38708152f561b.asciidoc
new file mode 100644
index 000000000..f7132ca37
--- /dev/null
+++ b/docs/doc_examples/1c8b6768c4eefc76fcb38708152f561b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteDataFrameAnalytics({
+ id: "loganalytics",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc b/docs/doc_examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc
new file mode 100644
index 000000000..b563e314b
--- /dev/null
+++ b/docs/doc_examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "music",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cab9da122778a95061831265c250cc1.asciidoc b/docs/doc_examples/1cab9da122778a95061831265c250cc1.asciidoc
new file mode 100644
index 000000000..2feadffb8
--- /dev/null
+++ b/docs/doc_examples/1cab9da122778a95061831265c250cc1.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ tags: {
+ type: "keyword",
+ script:
+ "\n emit(doc['type'].value);\n if (doc['promoted'].value) {\n emit('hot');\n }\n ",
+ },
+ },
+ aggs: {
+ tags_count: {
+ value_count: {
+ field: "tags",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cadbcf2cfeb312f73b7f098291356ac.asciidoc b/docs/doc_examples/1cadbcf2cfeb312f73b7f098291356ac.asciidoc
new file mode 100644
index 000000000..591ffd22e
--- /dev/null
+++ b/docs/doc_examples/1cadbcf2cfeb312f73b7f098291356ac.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "MULTIPOINT (102.0 2.0, 103.0 2.0)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cb3b45335ab1b9697c358104d44ea39.asciidoc b/docs/doc_examples/1cb3b45335ab1b9697c358104d44ea39.asciidoc
new file mode 100644
index 000000000..90dc0b24f
--- /dev/null
+++ b/docs/doc_examples/1cb3b45335ab1b9697c358104d44ea39.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "xpack.security.transport.filter.enabled": false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cbecd19be22979aefb45b4f160e77ea.asciidoc b/docs/doc_examples/1cbecd19be22979aefb45b4f160e77ea.asciidoc
new file mode 100644
index 000000000..91636c2e3
--- /dev/null
+++ b/docs/doc_examples/1cbecd19be22979aefb45b4f160e77ea.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "google_vertex_ai_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "google_vertex_ai_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cca4bb2f0ea7e43181be8bd965149d4.asciidoc b/docs/doc_examples/1cca4bb2f0ea7e43181be8bd965149d4.asciidoc
new file mode 100644
index 000000000..6703e293f
--- /dev/null
+++ b/docs/doc_examples/1cca4bb2f0ea7e43181be8bd965149d4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.get({
+ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
+ wait_for_completion_timeout: "2s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cd3b9d65576a9212eef898eb3105758.asciidoc b/docs/doc_examples/1cd3b9d65576a9212eef898eb3105758.asciidoc
new file mode 100644
index 000000000..3aaca987e
--- /dev/null
+++ b/docs/doc_examples/1cd3b9d65576a9212eef898eb3105758.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.enable": "primaries",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cea60c47d5c0e150b4c8fff4cd75ffe.asciidoc b/docs/doc_examples/1cea60c47d5c0e150b4c8fff4cd75ffe.asciidoc
new file mode 100644
index 000000000..b73c6cce1
--- /dev/null
+++ b/docs/doc_examples/1cea60c47d5c0e150b4c8fff4cd75ffe.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ script: {
+ description: "Set index based on `lang` field and `dataset` param",
+ lang: "painless",
+ source:
+ "\n ctx['_index'] = ctx['lang'] + '-' + params['dataset'];\n ",
+ params: {
+ dataset: "catalog",
+ },
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _index: "generic-index",
+ _source: {
+ lang: "fr",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ceaa211756e2db3d48c6bc4b1a861b0.asciidoc b/docs/doc_examples/1ceaa211756e2db3d48c6bc4b1a861b0.asciidoc
new file mode 100644
index 000000000..c7e7c914b
--- /dev/null
+++ b/docs/doc_examples/1ceaa211756e2db3d48c6bc4b1a861b0.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-index*",
+ max_samples_per_key: 2,
+ size: 20,
+ query:
+ "\n sample\n [any where uptime > 0] by host,os\n [any where port > 100] by host,op_sys\n [any where bool == true] by host,os\n ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cecd4d87a92427175157d41859df2af.asciidoc b/docs/doc_examples/1cecd4d87a92427175157d41859df2af.asciidoc
new file mode 100644
index 000000000..c49cfc24d
--- /dev/null
+++ b/docs/doc_examples/1cecd4d87a92427175157d41859df2af.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain({
+ index: "my-index-000001",
+ shard: 0,
+ primary: false,
+ current_node: "my-node",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1cfa04e9654c1484e3d4c75bf439400a.asciidoc b/docs/doc_examples/1cfa04e9654c1484e3d4c75bf439400a.asciidoc
new file mode 100644
index 000000000..2990d47a9
--- /dev/null
+++ b/docs/doc_examples/1cfa04e9654c1484e3d4c75bf439400a.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "polygon",
+ coordinates: [
+ [
+ [1000, -1001],
+ [1001, -1001],
+ [1001, -1000],
+ [1000, -1000],
+ [1000, -1001],
+ ],
+ [
+ [1000.2, -1001.2],
+ [1000.8, -1001.2],
+ [1000.8, -1001.8],
+ [1000.2, -1001.8],
+ [1000.2, -1001.2],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1d252d9217c61c2c1cbe7a92f77b078f.asciidoc b/docs/doc_examples/1d252d9217c61c2c1cbe7a92f77b078f.asciidoc
new file mode 100644
index 000000000..0963fa75c
--- /dev/null
+++ b/docs/doc_examples/1d252d9217c61c2c1cbe7a92f77b078f.asciidoc
@@ -0,0 +1,71 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryApiKeys({
+ size: 0,
+ query: {
+ bool: {
+ must: {
+ term: {
+ invalidated: false,
+ },
+ },
+ should: [
+ {
+ range: {
+ expiration: {
+ gte: "now",
+ },
+ },
+ },
+ {
+ bool: {
+ must_not: {
+ exists: {
+ field: "expiration",
+ },
+ },
+ },
+ },
+ ],
+ minimum_should_match: 1,
+ },
+ },
+ aggs: {
+ keys_by_username: {
+ composite: {
+ sources: [
+ {
+ usernames: {
+ terms: {
+ field: "username",
+ },
+ },
+ },
+ ],
+ },
+ aggs: {
+ expires_soon: {
+ filter: {
+ range: {
+ expiration: {
+ lte: "now+30d/d",
+ },
+ },
+ },
+ aggs: {
+ key_names: {
+ terms: {
+ field: "name",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1d746272a7511bf91302a15b5c58ca0e.asciidoc b/docs/doc_examples/1d746272a7511bf91302a15b5c58ca0e.asciidoc
new file mode 100644
index 000000000..0e8581267
--- /dev/null
+++ b/docs/doc_examples/1d746272a7511bf91302a15b5c58ca0e.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "passage_vectors",
+ fields: ["full_text", "creation_time"],
+ _source: false,
+ knn: {
+ query_vector: [0.45, 45],
+ field: "paragraph.vector",
+ k: 2,
+ num_candidates: 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1d9b695a17cffd910c496c9b03c75d6f.asciidoc b/docs/doc_examples/1d9b695a17cffd910c496c9b03c75d6f.asciidoc
new file mode 100644
index 000000000..4a91620c5
--- /dev/null
+++ b/docs/doc_examples/1d9b695a17cffd910c496c9b03c75d6f.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "pre-dsl-ilm-policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "50gb",
+ },
+ },
+ },
+ delete: {
+ min_age: "7d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc b/docs/doc_examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc
new file mode 100644
index 000000000..a38e95486
--- /dev/null
+++ b/docs/doc_examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "azure_ai_studio_embeddings",
+ inference_config: {
+ service: "azureaistudio",
+ service_settings: {
+ api_key: "",
+ target: "",
+ provider: "",
+ endpoint_type: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1db086021e83205b6eab3b7765911cc2.asciidoc b/docs/doc_examples/1db086021e83205b6eab3b7765911cc2.asciidoc
new file mode 100644
index 000000000..aa9237175
--- /dev/null
+++ b/docs/doc_examples/1db086021e83205b6eab3b7765911cc2.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "parent_example",
+ mappings: {
+ properties: {
+ join: {
+ type: "join",
+ relations: {
+ question: "answer",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1db715eb00832686ecddb6603684fc26.asciidoc b/docs/doc_examples/1db715eb00832686ecddb6603684fc26.asciidoc
new file mode 100644
index 000000000..d1849d8d6
--- /dev/null
+++ b/docs/doc_examples/1db715eb00832686ecddb6603684fc26.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.enrollKibana();
+console.log(response);
+----
diff --git a/docs/doc_examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc b/docs/doc_examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc
new file mode 100644
index 000000000..c1a1fab23
--- /dev/null
+++ b/docs/doc_examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ filter_path: "metadata.indices.*.stat*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e08e054c761353f99211cd18e8ca47b.asciidoc b/docs/doc_examples/1e08e054c761353f99211cd18e8ca47b.asciidoc
new file mode 100644
index 000000000..5f1410788
--- /dev/null
+++ b/docs/doc_examples/1e08e054c761353f99211cd18e8ca47b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteModelSnapshot({
+ job_id: "farequote",
+ snapshot_id: 1491948163,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc b/docs/doc_examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc
new file mode 100644
index 000000000..5afe39c96
--- /dev/null
+++ b/docs/doc_examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: "my-index-000001",
+ only_expunge_deletes: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc b/docs/doc_examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc
new file mode 100644
index 000000000..3e50dd22f
--- /dev/null
+++ b/docs/doc_examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ filter_path: "metadata.indices.*.state,-metadata.indices.logstash-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e26353d546d733634187b8c3a7837a7.asciidoc b/docs/doc_examples/1e26353d546d733634187b8c3a7837a7.asciidoc
new file mode 100644
index 000000000..6e8f3033b
--- /dev/null
+++ b/docs/doc_examples/1e26353d546d733634187b8c3a7837a7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.list({
+ service_type: "sharepoint_online",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e2c5cef7a3f254c71a33865eb4d7569.asciidoc b/docs/doc_examples/1e2c5cef7a3f254c71a33865eb4d7569.asciidoc
new file mode 100644
index 000000000..12ec8e928
--- /dev/null
+++ b/docs/doc_examples/1e2c5cef7a3f254c71a33865eb4d7569.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "items",
+ query: {
+ bool: {
+ must: {
+ match: {
+ name: "chocolate",
+ },
+ },
+ should: {
+ distance_feature: {
+ field: "production_date",
+ pivot: "7d",
+ origin: "now",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e3384bc255729b65a6f0fc8011ff733.asciidoc b/docs/doc_examples/1e3384bc255729b65a6f0fc8011ff733.asciidoc
new file mode 100644
index 000000000..702ce3c67
--- /dev/null
+++ b/docs/doc_examples/1e3384bc255729b65a6f0fc8011ff733.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.segments({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e3553a73da487017f7a95088b6aa957.asciidoc b/docs/doc_examples/1e3553a73da487017f7a95088b6aa957.asciidoc
new file mode 100644
index 000000000..d142fea11
--- /dev/null
+++ b/docs/doc_examples/1e3553a73da487017f7a95088b6aa957.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRoles({
+ name: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e4b17b830ead15087ccd96151a5ebde.asciidoc b/docs/doc_examples/1e4b17b830ead15087ccd96151a5ebde.asciidoc
new file mode 100644
index 000000000..bb1d3322e
--- /dev/null
+++ b/docs/doc_examples/1e4b17b830ead15087ccd96151a5ebde.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ runtime_mappings: {
+ message_and_context: {
+ type: "keyword",
+ script:
+ "\n emit(doc['message.keyword'].value + ' ' + doc['context.keyword'].value)\n ",
+ },
+ },
+ aggs: {
+ message_stats: {
+ string_stats: {
+ field: "message_and_context",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e547696f54582840040b1aa6661760c.asciidoc b/docs/doc_examples/1e547696f54582840040b1aa6661760c.asciidoc
new file mode 100644
index 000000000..4d6375dbb
--- /dev/null
+++ b/docs/doc_examples/1e547696f54582840040b1aa6661760c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e871f060dbe1a5c316ed205278804a8.asciidoc b/docs/doc_examples/1e871f060dbe1a5c316ed205278804a8.asciidoc
new file mode 100644
index 000000000..25aa22960
--- /dev/null
+++ b/docs/doc_examples/1e871f060dbe1a5c316ed205278804a8.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ countries: {
+ terms: {
+ field: "artist.country",
+ order: {
+ "rock>playback_stats.avg": "desc",
+ },
+ },
+ aggs: {
+ rock: {
+ filter: {
+ term: {
+ genre: "rock",
+ },
+ },
+ aggs: {
+ playback_stats: {
+ stats: {
+ field: "play_count",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc b/docs/doc_examples/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc
new file mode 100644
index 000000000..218edbd2c
--- /dev/null
+++ b/docs/doc_examples/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time",
+ tdigest: {
+ execution_hint: "high_accuracy",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1e9cab0b2727624e22e8cf4e7ca498ac.asciidoc b/docs/doc_examples/1e9cab0b2727624e22e8cf4e7ca498ac.asciidoc
new file mode 100644
index 000000000..acfb94c3a
--- /dev/null
+++ b/docs/doc_examples/1e9cab0b2727624e22e8cf4e7ca498ac.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.health({
+ pretty: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ea24f67fbbb6293d53caf2fe0c4b984.asciidoc b/docs/doc_examples/1ea24f67fbbb6293d53caf2fe0c4b984.asciidoc
new file mode 100644
index 000000000..70528bb7e
--- /dev/null
+++ b/docs/doc_examples/1ea24f67fbbb6293d53caf2fe0c4b984.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "simple",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc b/docs/doc_examples/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc
new file mode 100644
index 000000000..979a1f33d
--- /dev/null
+++ b/docs/doc_examples/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ term: {
+ "url.full": "{{#url}}{{host}}/{{page}}{{/url}}",
+ },
+ },
+ },
+ params: {
+ host: "http://example.com",
+ page: "hello-world",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ec66f188f681598cb5d7df700b214e3.asciidoc b/docs/doc_examples/1ec66f188f681598cb5d7df700b214e3.asciidoc
new file mode 100644
index 000000000..e44de075a
--- /dev/null
+++ b/docs/doc_examples/1ec66f188f681598cb5d7df700b214e3.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["my_custom_keyword_marker_filter", "porter_stem"],
+ },
+ },
+ filter: {
+ my_custom_keyword_marker_filter: {
+ type: "keyword_marker",
+ keywords_path: "analysis/example_word_list.txt",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ed26c7b445ab1c167bd9385e1f0066f.asciidoc b/docs/doc_examples/1ed26c7b445ab1c167bd9385e1f0066f.asciidoc
new file mode 100644
index 000000000..68fc1d5ff
--- /dev/null
+++ b/docs/doc_examples/1ed26c7b445ab1c167bd9385e1f0066f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.deleteAsync({
+ id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ed77bf308fa4ab328b36060e412f500.asciidoc b/docs/doc_examples/1ed77bf308fa4ab328b36060e412f500.asciidoc
new file mode 100644
index 000000000..bba203b58
--- /dev/null
+++ b/docs/doc_examples/1ed77bf308fa4ab328b36060e412f500.asciidoc
@@ -0,0 +1,66 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "metrics_index",
+ mappings: {
+ properties: {
+ network: {
+ properties: {
+ name: {
+ type: "keyword",
+ },
+ },
+ },
+ latency_histo: {
+ type: "histogram",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [1, 3, 8, 12, 15],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ refresh: "true",
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [1, 6, 8, 12, 14],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ aggs: {
+ latency_buckets: {
+ histogram: {
+ field: "latency_histo",
+ interval: 5,
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/1eea46b08610972b79fdc4649748455d.asciidoc b/docs/doc_examples/1eea46b08610972b79fdc4649748455d.asciidoc
new file mode 100644
index 000000000..06268c2dd
--- /dev/null
+++ b/docs/doc_examples/1eea46b08610972b79fdc4649748455d.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "published",
+ },
+ },
+ },
+ },
+ script: {
+ source:
+ "cosineSimilarity(params.query_vector, 'my_dense_vector') + 1.0",
+ params: {
+ query_vector: [4, 3.4, -0.2],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc b/docs/doc_examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc
new file mode 100644
index 000000000..3a1fca850
--- /dev/null
+++ b/docs/doc_examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ sort: [
+ {
+ post_date: {
+ format: "strict_date_optional_time_nanos",
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1f00e73c144603e97f6c14ab15fa1913.asciidoc b/docs/doc_examples/1f00e73c144603e97f6c14ab15fa1913.asciidoc
new file mode 100644
index 000000000..09187a87e
--- /dev/null
+++ b/docs/doc_examples/1f00e73c144603e97f6c14ab15fa1913.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "greek_example",
+ settings: {
+ analysis: {
+ filter: {
+ greek_stop: {
+ type: "stop",
+ stopwords: "_greek_",
+ },
+ greek_lowercase: {
+ type: "lowercase",
+ language: "greek",
+ },
+ greek_keywords: {
+ type: "keyword_marker",
+ keywords: ["παράδειγμα"],
+ },
+ greek_stemmer: {
+ type: "stemmer",
+ language: "greek",
+ },
+ },
+ analyzer: {
+ rebuilt_greek: {
+ tokenizer: "standard",
+ filter: [
+ "greek_lowercase",
+ "greek_stop",
+ "greek_keywords",
+ "greek_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1f13c7caef9c2fe0f73fce8795bbc9b0.asciidoc b/docs/doc_examples/1f13c7caef9c2fe0f73fce8795bbc9b0.asciidoc
new file mode 100644
index 000000000..303c74cb4
--- /dev/null
+++ b/docs/doc_examples/1f13c7caef9c2fe0f73fce8795bbc9b0.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ std_folded: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "asciifolding"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_text: {
+ type: "text",
+ analyzer: "std_folded",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "std_folded",
+ text: "Is this déjà vu?",
+});
+console.log(response1);
+
+const response2 = await client.indices.analyze({
+ index: "my-index-000001",
+ field: "my_text",
+ text: "Is this déjà vu?",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/1f3dd84ab11bae09d3f99b1b3536e239.asciidoc b/docs/doc_examples/1f3dd84ab11bae09d3f99b1b3536e239.asciidoc
new file mode 100644
index 000000000..93dc5492a
--- /dev/null
+++ b/docs/doc_examples/1f3dd84ab11bae09d3f99b1b3536e239.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.create({
+ repository: "my_repository",
+ snapshot: "my_snapshot",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1f507659757e2844cefced25848540a0.asciidoc b/docs/doc_examples/1f507659757e2844cefced25848540a0.asciidoc
new file mode 100644
index 000000000..2ff2c4ff7
--- /dev/null
+++ b/docs/doc_examples/1f507659757e2844cefced25848540a0.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "12km",
+ "pin.location": [-70, 40],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1f673e1a0de2970dc648618d5425a994.asciidoc b/docs/doc_examples/1f673e1a0de2970dc648618d5425a994.asciidoc
new file mode 100644
index 000000000..ee01d35bf
--- /dev/null
+++ b/docs/doc_examples/1f673e1a0de2970dc648618d5425a994.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.refresh();
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-new-index-000001",
+ size: 0,
+ filter_path: "hits.total",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/1f6a190fa1aade1fb66680388f184ef9.asciidoc b/docs/doc_examples/1f6a190fa1aade1fb66680388f184ef9.asciidoc
new file mode 100644
index 000000000..d58aa464e
--- /dev/null
+++ b/docs/doc_examples/1f6a190fa1aade1fb66680388f184ef9.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ rewrite: "true",
+ all_shards: "true",
+ query: {
+ match: {
+ "user.id": {
+ query: "kimchy",
+ fuzziness: "auto",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1f8a6d2cc57ed8997a52354aca371aac.asciidoc b/docs/doc_examples/1f8a6d2cc57ed8997a52354aca371aac.asciidoc
new file mode 100644
index 000000000..65d03d532
--- /dev/null
+++ b/docs/doc_examples/1f8a6d2cc57ed8997a52354aca371aac.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "direct_pki_only",
+ roles: ["role_for_pki1_direct"],
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "pki1",
+ },
+ },
+ {
+ field: {
+ "metadata.pki_delegated_by_user": null,
+ },
+ },
+ ],
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1f900f7178e80051e75d4fd04467cf49.asciidoc b/docs/doc_examples/1f900f7178e80051e75d4fd04467cf49.asciidoc
new file mode 100644
index 000000000..79c533e29
--- /dev/null
+++ b/docs/doc_examples/1f900f7178e80051e75d4fd04467cf49.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ pipeline: "pipelineB",
+ document: {
+ field: "value",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc b/docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc
new file mode 100644
index 000000000..aced9c9d6
--- /dev/null
+++ b/docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "john-api-key",
+ expiration: "1d",
+ role_descriptors: {
+ "sharepoint-online-role": {
+ index: [
+ {
+ names: ["sharepoint-search-application"],
+ privileges: ["read"],
+ query: {
+ template: {
+ params: {
+ access_control: ["john@example.co", "Engineering Members"],
+ },
+ source:
+ '\n {\n "bool": {\n "should": [\n {\n "bool": {\n "must_not": {\n "exists": {\n "field": "_allow_access_control"\n }\n }\n }\n },\n {\n "terms": {\n "_allow_access_control.enum": {{#toJson}}access_control{{/toJson}}\n }\n }\n ]\n }\n }\n ',
+ },
+ },
+ },
+ ],
+ restriction: {
+ workflows: ["search_application_query"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1fddbd602a6acf896a393cdb500a2831.asciidoc b/docs/doc_examples/1fddbd602a6acf896a393cdb500a2831.asciidoc
new file mode 100644
index 000000000..79f5ecce5
--- /dev/null
+++ b/docs/doc_examples/1fddbd602a6acf896a393cdb500a2831.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ by_date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ avg_number_of_sales_per_year: {
+ rate: {
+ field: "price",
+ unit: "year",
+ mode: "value_count",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1fe2ed1d65c4774755de44c9b9d6ed67.asciidoc b/docs/doc_examples/1fe2ed1d65c4774755de44c9b9d6ed67.asciidoc
new file mode 100644
index 000000000..674ca8a30
--- /dev/null
+++ b/docs/doc_examples/1fe2ed1d65c4774755de44c9b9d6ed67.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "ingest",
+ filter_path: "nodes.*.ingest",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ff12523efbd59c213c676937757c460.asciidoc b/docs/doc_examples/1ff12523efbd59c213c676937757c460.asciidoc
new file mode 100644
index 000000000..3673a4528
--- /dev/null
+++ b/docs/doc_examples/1ff12523efbd59c213c676937757c460.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ ids: ["VuaCfGcBCdbkQm-e5aOx"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ff296e868635fd102239871a331331b.asciidoc b/docs/doc_examples/1ff296e868635fd102239871a331331b.asciidoc
new file mode 100644
index 000000000..831f54389
--- /dev/null
+++ b/docs/doc_examples/1ff296e868635fd102239871a331331b.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ type_count: {
+ cardinality: {
+ field: "type",
+ precision_threshold: 100,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/1ff9b263b7c3e83278bb6a776a51590a.asciidoc b/docs/doc_examples/1ff9b263b7c3e83278bb6a776a51590a.asciidoc
new file mode 100644
index 000000000..d795b84eb
--- /dev/null
+++ b/docs/doc_examples/1ff9b263b7c3e83278bb6a776a51590a.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ prices: {
+ histogram: {
+ field: "price",
+ interval: 50,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20005d8a6555b259b299d862cd218701.asciidoc b/docs/doc_examples/20005d8a6555b259b299d862cd218701.asciidoc
new file mode 100644
index 000000000..c6a7579d9
--- /dev/null
+++ b/docs/doc_examples/20005d8a6555b259b299d862cd218701.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ query: "this is a test",
+ operator: "and",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2006f577a113bda40905cf7b405bf1cf.asciidoc b/docs/doc_examples/2006f577a113bda40905cf7b405bf1cf.asciidoc
new file mode 100644
index 000000000..cb8115039
--- /dev/null
+++ b/docs/doc_examples/2006f577a113bda40905cf7b405bf1cf.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ description: "If 'url.scheme' is 'http', set 'url.insecure' to true",
+ if: "ctx.url?.scheme =~ /^http[^s]/",
+ field: "url.insecure",
+ value: true,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2009f2d1ba0780a799a0fdce889c9739.asciidoc b/docs/doc_examples/2009f2d1ba0780a799a0fdce889c9739.asciidoc
new file mode 100644
index 000000000..2bf348f71
--- /dev/null
+++ b/docs/doc_examples/2009f2d1ba0780a799a0fdce889c9739.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "passage_vectors",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ full_text: "first paragraph another paragraph",
+ creation_time: "2019-05-04",
+ paragraph: [
+ {
+ vector: [0.45, 45],
+ text: "first paragraph",
+ paragraph_id: "1",
+ },
+ {
+ vector: [0.8, 0.6],
+ text: "another paragraph",
+ paragraph_id: "2",
+ },
+ ],
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ full_text: "number one paragraph number two paragraph",
+ creation_time: "2020-05-04",
+ paragraph: [
+ {
+ vector: [1.2, 4.5],
+ text: "number one paragraph",
+ paragraph_id: "1",
+ },
+ {
+ vector: [-1, 42],
+ text: "number two paragraph",
+ paragraph_id: "2",
+ },
+ ],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/200f6d4cc7b9c300b8962a119e03873f.asciidoc b/docs/doc_examples/200f6d4cc7b9c300b8962a119e03873f.asciidoc
new file mode 100644
index 000000000..536cf6cba
--- /dev/null
+++ b/docs/doc_examples/200f6d4cc7b9c300b8962a119e03873f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataStream({
+ name: "my-data-stream*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20162e1dac807a7604f58dad814d1bc5.asciidoc b/docs/doc_examples/20162e1dac807a7604f58dad814d1bc5.asciidoc
new file mode 100644
index 000000000..3b4eb8d29
--- /dev/null
+++ b/docs/doc_examples/20162e1dac807a7604f58dad814d1bc5.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ en: {
+ tokenizer: "standard",
+ filter: ["my_en_US_dict_stemmer"],
+ },
+ },
+ filter: {
+ my_en_US_dict_stemmer: {
+ type: "hunspell",
+ locale: "en_US",
+ dedup: false,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20179a8889e949d6a8ee5fbf2ba35c96.asciidoc b/docs/doc_examples/20179a8889e949d6a8ee5fbf2ba35c96.asciidoc
new file mode 100644
index 000000000..3a746ae88
--- /dev/null
+++ b/docs/doc_examples/20179a8889e949d6a8ee5fbf2ba35c96.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "google-vertex-ai-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "google_vertex_ai_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/203c3bb334384bdfb11ff1101ccfba25.asciidoc b/docs/doc_examples/203c3bb334384bdfb11ff1101ccfba25.asciidoc
new file mode 100644
index 000000000..45ad3be18
--- /dev/null
+++ b/docs/doc_examples/203c3bb334384bdfb11ff1101ccfba25.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ suggest: {
+ text: "obel prize",
+ simple_phrase: {
+ phrase: {
+ field: "title.trigram",
+ size: 1,
+ smoothing: {
+ laplace: {
+ alpha: 0.7,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20407c847adb8393ce41dc656384afc4.asciidoc b/docs/doc_examples/20407c847adb8393ce41dc656384afc4.asciidoc
new file mode 100644
index 000000000..ce827a730
--- /dev/null
+++ b/docs/doc_examples/20407c847adb8393ce41dc656384afc4.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "passage_vectors",
+ fields: ["creation_time", "full_text"],
+ _source: false,
+ knn: {
+ query_vector: [0.45, 45],
+ field: "paragraph.vector",
+ k: 2,
+ num_candidates: 2,
+ filter: {
+ bool: {
+ filter: [
+ {
+ range: {
+ creation_time: {
+ gte: "2019-05-01",
+ lte: "2019-05-05",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2051ffe025550ab6645bfd525eaed3c4.asciidoc b/docs/doc_examples/2051ffe025550ab6645bfd525eaed3c4.asciidoc
new file mode 100644
index 000000000..1b42fb168
--- /dev/null
+++ b/docs/doc_examples/2051ffe025550ab6645bfd525eaed3c4.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: "POINT (-74.1 40.73)",
+ bottom_right: "POINT (-71.12 40.01)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2063713516847eef5d1dbf4ca1e877b0.asciidoc b/docs/doc_examples/2063713516847eef5d1dbf4ca1e877b0.asciidoc
new file mode 100644
index 000000000..c9405986c
--- /dev/null
+++ b/docs/doc_examples/2063713516847eef5d1dbf4ca1e877b0.asciidoc
@@ -0,0 +1,93 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (4.405200 51.222900)",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (2.336389 48.861111)",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (2.327000 48.860000)",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "large-grid": {
+ geohex_grid: {
+ field: "location",
+ precision: 4,
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/206c723296be8ef8d58aef3ee01f5ba2.asciidoc b/docs/doc_examples/206c723296be8ef8d58aef3ee01f5ba2.asciidoc
new file mode 100644
index 000000000..f33acb605
--- /dev/null
+++ b/docs/doc_examples/206c723296be8ef8d58aef3ee01f5ba2.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "day",
+ },
+ aggs: {
+ the_deriv: {
+ derivative: {
+ buckets_path: "_count",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/206d57bf0cb022c8229894e7753eca83.asciidoc b/docs/doc_examples/206d57bf0cb022c8229894e7753eca83.asciidoc
new file mode 100644
index 000000000..f739baea2
--- /dev/null
+++ b/docs/doc_examples/206d57bf0cb022c8229894e7753eca83.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "example",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_shape: {
+ location: {
+ shape: {
+ type: "envelope",
+ coordinates: [
+ [13, 53],
+ [14, 52],
+ ],
+ },
+ relation: "within",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2081739da0c69de8af6f5bf9e94433e6.asciidoc b/docs/doc_examples/2081739da0c69de8af6f5bf9e94433e6.asciidoc
new file mode 100644
index 000000000..2730d46b0
--- /dev/null
+++ b/docs/doc_examples/2081739da0c69de8af6f5bf9e94433e6.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/208c2b41bd1659aae8f02fa3e3b7378a.asciidoc b/docs/doc_examples/208c2b41bd1659aae8f02fa3e3b7378a.asciidoc
new file mode 100644
index 000000000..e782bce3f
--- /dev/null
+++ b/docs/doc_examples/208c2b41bd1659aae8f02fa3e3b7378a.asciidoc
@@ -0,0 +1,48 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ first_name: {
+ type: "text",
+ copy_to: "full_name",
+ },
+ last_name: {
+ type: "text",
+ copy_to: "full_name",
+ },
+ full_name: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ first_name: "John",
+ last_name: "Smith",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ full_name: {
+ query: "John Smith",
+ operator: "and",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/209a9190082498f0b7daa26f8834846b.asciidoc b/docs/doc_examples/209a9190082498f0b7daa26f8834846b.asciidoc
new file mode 100644
index 000000000..4b01230ea
--- /dev/null
+++ b/docs/doc_examples/209a9190082498f0b7daa26f8834846b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ title: {
+ type: "text",
+ norms: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20bc71cc5bbe04184e27827f3777a406.asciidoc b/docs/doc_examples/20bc71cc5bbe04184e27827f3777a406.asciidoc
new file mode 100644
index 000000000..d94a2c5aa
--- /dev/null
+++ b/docs/doc_examples/20bc71cc5bbe04184e27827f3777a406.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ fields: ["@timestamp", "day_of_week"],
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20c595907b4afbf26bd60e816a6ddf6a.asciidoc b/docs/doc_examples/20c595907b4afbf26bd60e816a6ddf6a.asciidoc
new file mode 100644
index 000000000..0ffd26450
--- /dev/null
+++ b/docs/doc_examples/20c595907b4afbf26bd60e816a6ddf6a.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ query_string: "kayaking",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20e3b181114e00c943a27a9bbcf85f15.asciidoc b/docs/doc_examples/20e3b181114e00c943a27a9bbcf85f15.asciidoc
new file mode 100644
index 000000000..970d578eb
--- /dev/null
+++ b/docs/doc_examples/20e3b181114e00c943a27a9bbcf85f15.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getRecords({
+ job_id: "low_request_rate",
+ sort: "record_score",
+ desc: true,
+ start: 1454944100000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/20f62d0540bf6261549bd286416eae28.asciidoc b/docs/doc_examples/20f62d0540bf6261549bd286416eae28.asciidoc
new file mode 100644
index 000000000..2f0f9c3a6
--- /dev/null
+++ b/docs/doc_examples/20f62d0540bf6261549bd286416eae28.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.putPolicy({
+ name: "my-policy",
+ match: {
+ indices: "users",
+ match_field: "email",
+ enrich_fields: ["first_name", "last_name", "city", "zip", "state"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2105f2d1d81977054a93163a175793ce.asciidoc b/docs/doc_examples/2105f2d1d81977054a93163a175793ce.asciidoc
new file mode 100644
index 000000000..8f1c83690
--- /dev/null
+++ b/docs/doc_examples/2105f2d1d81977054a93163a175793ce.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.status();
+console.log(response);
+----
diff --git a/docs/doc_examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc b/docs/doc_examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc
new file mode 100644
index 000000000..516c7c90c
--- /dev/null
+++ b/docs/doc_examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ text_expansion: {
+ "": {
+ model_id: "the model to produce the token weights",
+ model_text: "the query string",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/21565b72da426776e445b1a166f6e104.asciidoc b/docs/doc_examples/21565b72da426776e445b1a166f6e104.asciidoc
new file mode 100644
index 000000000..04fba14ee
--- /dev/null
+++ b/docs/doc_examples/21565b72da426776e445b1a166f6e104.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ "my-join-field": {
+ type: "join",
+ relations: {
+ parent: "child",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/216848930c2d344fe0bed0daa70c35b9.asciidoc b/docs/doc_examples/216848930c2d344fe0bed0daa70c35b9.asciidoc
new file mode 100644
index 000000000..3e6ff2d49
--- /dev/null
+++ b/docs/doc_examples/216848930c2d344fe0bed0daa70c35b9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ detailed: "true",
+ actions: "*/delete/byquery",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/216a6573ab4ab023e5dcac4eaa08c3c8.asciidoc b/docs/doc_examples/216a6573ab4ab023e5dcac4eaa08c3c8.asciidoc
new file mode 100644
index 000000000..2b66cb86d
--- /dev/null
+++ b/docs/doc_examples/216a6573ab4ab023e5dcac4eaa08c3c8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.verifyRepository({
+ name: "my_unverified_backup",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc b/docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc
new file mode 100644
index 000000000..dbaac1815
--- /dev/null
+++ b/docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "geoip",
+ description: "Add ip geolocation info",
+ processors: [
+ {
+ geoip: {
+ field: "ip",
+ target_field: "geo",
+ database_file: "GeoLite2-Country.mmdb",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "geoip",
+ document: {
+ ip: "89.160.20.128",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/21715c32c140feeab04b38ff6d6de111.asciidoc b/docs/doc_examples/21715c32c140feeab04b38ff6d6de111.asciidoc
new file mode 100644
index 000000000..c37e742e2
--- /dev/null
+++ b/docs/doc_examples/21715c32c140feeab04b38ff6d6de111.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2185c9dfc62a59313df1702ec1c3513e.asciidoc b/docs/doc_examples/2185c9dfc62a59313df1702ec1c3513e.asciidoc
new file mode 100644
index 000000000..c268c702d
--- /dev/null
+++ b/docs/doc_examples/2185c9dfc62a59313df1702ec1c3513e.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time",
+ percents: [95, 99, 99.9],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/218b9009f120e8ad33f710e019179562.asciidoc b/docs/doc_examples/218b9009f120e8ad33f710e019179562.asciidoc
new file mode 100644
index 000000000..0ac6636b6
--- /dev/null
+++ b/docs/doc_examples/218b9009f120e8ad33f710e019179562.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.getRepository({
+ name: "my_repository",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/21a226d91d8edd209f6a821064e83918.asciidoc b/docs/doc_examples/21a226d91d8edd209f6a821064e83918.asciidoc
new file mode 100644
index 000000000..44d76f5ca
--- /dev/null
+++ b/docs/doc_examples/21a226d91d8edd209f6a821064e83918.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ query: {
+ match: {
+ type: "t-shirt",
+ },
+ },
+ aggs: {
+ all_products: {
+ global: {},
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ t_shirts: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/21bb03ca9123de3237c1c76934f9f172.asciidoc b/docs/doc_examples/21bb03ca9123de3237c1c76934f9f172.asciidoc
new file mode 100644
index 000000000..b791b1658
--- /dev/null
+++ b/docs/doc_examples/21bb03ca9123de3237c1c76934f9f172.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "logs",
+ id: 4,
+ refresh: "true",
+ document: {
+ body: "info: user Bob logged out",
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "logs",
+ size: 0,
+ aggs: {
+ messages: {
+ filters: {
+ other_bucket_key: "other_messages",
+ filters: {
+ errors: {
+ match: {
+ body: "error",
+ },
+ },
+ warnings: {
+ match: {
+ body: "warning",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/21c1e6ee886140ce0cd67184dd19b981.asciidoc b/docs/doc_examples/21c1e6ee886140ce0cd67184dd19b981.asciidoc
new file mode 100644
index 000000000..eb6345b43
--- /dev/null
+++ b/docs/doc_examples/21c1e6ee886140ce0cd67184dd19b981.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.danglingIndices.listDanglingIndices();
+console.log(response);
+----
diff --git a/docs/doc_examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc b/docs/doc_examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc
new file mode 100644
index 000000000..295b4ed6c
--- /dev/null
+++ b/docs/doc_examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "azure_ai_studio_embeddings",
+ inference_config: {
+ service: "azureaistudio",
+ service_settings: {
+ api_key: "",
+ target: "",
+ provider: "",
+ endpoint_type: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc b/docs/doc_examples/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc
new file mode 100644
index 000000000..1e800bb8e
--- /dev/null
+++ b/docs/doc_examples/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "reviews",
+ filter_path: "aggregations",
+ size: 0,
+ runtime_mappings: {
+ "rating.out_of_ten": {
+ type: "long",
+ script: {
+ source: "emit(doc['rating'].value * params.scaleFactor)",
+ params: {
+ scaleFactor: 2,
+ },
+ },
+ },
+ },
+ aggs: {
+ review_average: {
+ avg: {
+ field: "rating.out_of_ten",
+ },
+ },
+ review_variability: {
+ median_absolute_deviation: {
+ field: "rating.out_of_ten",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc b/docs/doc_examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc
new file mode 100644
index 000000000..01d52961a
--- /dev/null
+++ b/docs/doc_examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ card: {
+ type: "wildcard",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ card: ["king", "ace", "ace", "jack"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/21d5fe55ca32b10b118224ea1a8a2e04.asciidoc b/docs/doc_examples/21d5fe55ca32b10b118224ea1a8a2e04.asciidoc
new file mode 100644
index 000000000..2540558a2
--- /dev/null
+++ b/docs/doc_examples/21d5fe55ca32b10b118224ea1a8a2e04.asciidoc
@@ -0,0 +1,77 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "correlate_latency",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ buckets: {
+ terms: {
+ field: "version",
+ size: 2,
+ },
+ aggs: {
+ latency_ranges: {
+ range: {
+ field: "latency",
+ ranges: [
+ {
+ to: 0,
+ },
+ {
+ from: 0,
+ to: 105,
+ },
+ {
+ from: 105,
+ to: 225,
+ },
+ {
+ from: 225,
+ to: 445,
+ },
+ {
+ from: 445,
+ to: 665,
+ },
+ {
+ from: 665,
+ to: 885,
+ },
+ {
+ from: 885,
+ to: 1115,
+ },
+ {
+ from: 1115,
+ to: 1335,
+ },
+ {
+ from: 1335,
+ to: 1555,
+ },
+ {
+ from: 1555,
+ to: 1775,
+ },
+ {
+ from: 1775,
+ },
+ ],
+ },
+ },
+ ks_test: {
+ bucket_count_ks_test: {
+ buckets_path: "latency_ranges>_count",
+ alternative: ["less", "greater", "two_sided"],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/21e95d29bc37deb5689a654aa323b4ba.asciidoc b/docs/doc_examples/21e95d29bc37deb5689a654aa323b4ba.asciidoc
new file mode 100644
index 000000000..48dedaf2a
--- /dev/null
+++ b/docs/doc_examples/21e95d29bc37deb5689a654aa323b4ba.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "admins",
+ roles: ["monitoring", "user"],
+ rules: {
+ field: {
+ groups: "cn=admins,dc=example,dc=com",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/221e9b14567f950008459af77757750e.asciidoc b/docs/doc_examples/221e9b14567f950008459af77757750e.asciidoc
new file mode 100644
index 000000000..9fe26fa18
--- /dev/null
+++ b/docs/doc_examples/221e9b14567f950008459af77757750e.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "cluster_health_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ http: {
+ request: {
+ host: "localhost",
+ port: 9200,
+ path: "/_cluster/health",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc b/docs/doc_examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc
new file mode 100644
index 000000000..7fdf65e5f
--- /dev/null
+++ b/docs/doc_examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ bool: {
+ must_not: [
+ {
+ nested: {
+ path: "comments",
+ query: {
+ term: {
+ "comments.author": "nik9000",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/222e49c924ca8bac7b41bc952a39261c.asciidoc b/docs/doc_examples/222e49c924ca8bac7b41bc952a39261c.asciidoc
new file mode 100644
index 000000000..b4bcd4bbb
--- /dev/null
+++ b/docs/doc_examples/222e49c924ca8bac7b41bc952a39261c.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ size: 3,
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ title: {
+ query: "mountain lake",
+ boost: 1,
+ },
+ },
+ },
+ {
+ semantic: {
+ field: "title_semantic",
+ query: "mountain lake",
+ boost: 2,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc b/docs/doc_examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc
new file mode 100644
index 000000000..36c63a01a
--- /dev/null
+++ b/docs/doc_examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc
@@ -0,0 +1,61 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ nested: {
+ path: "parent",
+ query: {
+ bool: {
+ must: {
+ range: {
+ "parent.age": {
+ gte: 21,
+ },
+ },
+ },
+ filter: {
+ nested: {
+ path: "parent.child",
+ query: {
+ match: {
+ "parent.child.name": "matt",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ sort: [
+ {
+ "parent.child.age": {
+ mode: "min",
+ order: "asc",
+ nested: {
+ path: "parent",
+ filter: {
+ range: {
+ "parent.age": {
+ gte: 21,
+ },
+ },
+ },
+ nested: {
+ path: "parent.child",
+ filter: {
+ match: {
+ "parent.child.name": "matt",
+ },
+ },
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2238ac4170275f6cfc2af49c3f014cbc.asciidoc b/docs/doc_examples/2238ac4170275f6cfc2af49c3f014cbc.asciidoc
new file mode 100644
index 000000000..4955d26be
--- /dev/null
+++ b/docs/doc_examples/2238ac4170275f6cfc2af49c3f014cbc.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ runtime_mappings: {
+ "grade.corrected": {
+ type: "double",
+ script: {
+ source: "emit(Math.min(100, doc['grade'].value * params.correction))",
+ params: {
+ correction: 1.2,
+ },
+ },
+ },
+ },
+ aggs: {
+ grades_stats: {
+ extended_stats: {
+ field: "grade.corrected",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22619a4111f66e1b7231693b8f8d069a.asciidoc b/docs/doc_examples/22619a4111f66e1b7231693b8f8d069a.asciidoc
new file mode 100644
index 000000000..99cef9cd2
--- /dev/null
+++ b/docs/doc_examples/22619a4111f66e1b7231693b8f8d069a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.queryWatches({
+ size: 100,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22882d4eb8b99f44c8e0d3a2c893fc4b.asciidoc b/docs/doc_examples/22882d4eb8b99f44c8e0d3a2c893fc4b.asciidoc
new file mode 100644
index 000000000..9ec51573d
--- /dev/null
+++ b/docs/doc_examples/22882d4eb8b99f44c8e0d3a2c893fc4b.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ "my-small": {
+ type: "keyword",
+ ignore_above: 2,
+ },
+ "my-large": {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ "my-small": ["ok", "bad"],
+ "my-large": "ok content",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ fields: ["my-*"],
+ _source: false,
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/229b83cbcd8efa1b0288a728a2abacb4.asciidoc b/docs/doc_examples/229b83cbcd8efa1b0288a728a2abacb4.asciidoc
new file mode 100644
index 000000000..43d8b3d9a
--- /dev/null
+++ b/docs/doc_examples/229b83cbcd8efa1b0288a728a2abacb4.asciidoc
@@ -0,0 +1,73 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ location: {
+ type: "point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Point as an object using GeoJSON format",
+ location: {
+ type: "Point",
+ coordinates: [-71.34, 41.12],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ text: "Point as a WKT POINT primitive",
+ location: "POINT (-71.34 41.12)",
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ document: {
+ text: "Point as an object with 'x' and 'y' keys",
+ location: {
+ x: -71.34,
+ y: 41.12,
+ },
+ },
+});
+console.log(response3);
+
+const response4 = await client.index({
+ index: "my-index-000001",
+ id: 4,
+ document: {
+ text: "Point as an array",
+ location: [-71.34, 41.12],
+ },
+});
+console.log(response4);
+
+const response5 = await client.index({
+ index: "my-index-000001",
+ id: 5,
+ document: {
+ text: "Point as a string",
+ location: "-71.34,41.12",
+ },
+});
+console.log(response5);
+----
diff --git a/docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc b/docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc
new file mode 100644
index 000000000..a0c450d19
--- /dev/null
+++ b/docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "datastream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22cb99d4e6ba3101a2d9f59764a90877.asciidoc b/docs/doc_examples/22cb99d4e6ba3101a2d9f59764a90877.asciidoc
new file mode 100644
index 000000000..27b5e33c7
--- /dev/null
+++ b/docs/doc_examples/22cb99d4e6ba3101a2d9f59764a90877.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "POINT (-77.03653 38.897676)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22d8e92b4100f8e4f52260ef8d3aa2b2.asciidoc b/docs/doc_examples/22d8e92b4100f8e4f52260ef8d3aa2b2.asciidoc
new file mode 100644
index 000000000..064052311
--- /dev/null
+++ b/docs/doc_examples/22d8e92b4100f8e4f52260ef8d3aa2b2.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ name: {
+ type: "text",
+ },
+ blob: {
+ type: "binary",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ name: "Some binary blob",
+ blob: "U29tZSBiaW5hcnkgYmxvYg==",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/22dd833336fa22c8a8f67bb754ffba9a.asciidoc b/docs/doc_examples/22dd833336fa22c8a8f67bb754ffba9a.asciidoc
new file mode 100644
index 000000000..852e26c4a
--- /dev/null
+++ b/docs/doc_examples/22dd833336fa22c8a8f67bb754ffba9a.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "azure-openai-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "azure_openai_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22dde5fe7ac5d85d52115641a68b3c55.asciidoc b/docs/doc_examples/22dde5fe7ac5d85d52115641a68b3c55.asciidoc
new file mode 100644
index 000000000..64ba4366e
--- /dev/null
+++ b/docs/doc_examples/22dde5fe7ac5d85d52115641a68b3c55.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ "lowercase",
+ {
+ type: "stop",
+ stopwords: ["a", "is", "this"],
+ },
+ ],
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/22ef90a7fb057728d2115f0c6f551819.asciidoc b/docs/doc_examples/22ef90a7fb057728d2115f0c6f551819.asciidoc
new file mode 100644
index 000000000..bb51df733
--- /dev/null
+++ b/docs/doc_examples/22ef90a7fb057728d2115f0c6f551819.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ aggs: {
+ price_ranges: {
+ range: {
+ field: "price",
+ ranges: [
+ {
+ to: 100,
+ },
+ {
+ from: 100,
+ to: 200,
+ },
+ {
+ from: 200,
+ },
+ ],
+ },
+ aggs: {
+ price_stats: {
+ stats: {
+ field: "price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/23074748d6c978176df5b04265e88938.asciidoc b/docs/doc_examples/23074748d6c978176df5b04265e88938.asciidoc
new file mode 100644
index 000000000..a7648d1a2
--- /dev/null
+++ b/docs/doc_examples/23074748d6c978176df5b04265e88938.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ name: "index.routing.allocation.include._tier_preference",
+ flat_settings: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2308c9948cbebd2092eec03b11281005.asciidoc b/docs/doc_examples/2308c9948cbebd2092eec03b11281005.asciidoc
new file mode 100644
index 000000000..84f81083d
--- /dev/null
+++ b/docs/doc_examples/2308c9948cbebd2092eec03b11281005.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_fs_backup",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "E:\\Mount\\Backups\\My_fs_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc b/docs/doc_examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc
new file mode 100644
index 000000000..60e82f591
--- /dev/null
+++ b/docs/doc_examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ text_expansion: {
+ "ml.tokens": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2342a56279106ea643026df657bf7f88.asciidoc b/docs/doc_examples/2342a56279106ea643026df657bf7f88.asciidoc
new file mode 100644
index 000000000..2369e4df7
--- /dev/null
+++ b/docs/doc_examples/2342a56279106ea643026df657bf7f88.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ index: {
+ similarity: {
+ my_similarity: {
+ type: "DFR",
+ basic_model: "g",
+ after_effect: "l",
+ normalization: "h2",
+ "normalization.h2.c": "3.0",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/234cec3ead32d7ed71afbe1edfea23df.asciidoc b/docs/doc_examples/234cec3ead32d7ed71afbe1edfea23df.asciidoc
new file mode 100644
index 000000000..8997d01a6
--- /dev/null
+++ b/docs/doc_examples/234cec3ead32d7ed71afbe1edfea23df.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ has_parent: {
+ parent_type: "parent",
+ score: true,
+ query: {
+ function_score: {
+ script_score: {
+ script: "_score * doc['view_count'].value",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/236f50d89a07b83119af72e367e685da.asciidoc b/docs/doc_examples/236f50d89a07b83119af72e367e685da.asciidoc
new file mode 100644
index 000000000..b79fd83ff
--- /dev/null
+++ b/docs/doc_examples/236f50d89a07b83119af72e367e685da.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "50gb",
+ max_age: "30d",
+ min_primary_shard_size: "1gb",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/239f615e0009c5cb1dc4e82ec4c0dab5.asciidoc b/docs/doc_examples/239f615e0009c5cb1dc4e82ec4c0dab5.asciidoc
new file mode 100644
index 000000000..abeca2dfd
--- /dev/null
+++ b/docs/doc_examples/239f615e0009c5cb1dc4e82ec4c0dab5.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "cluster_health_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ http: {
+ request: {
+ host: "localhost",
+ port: 9200,
+ path: "/_cluster/health",
+ auth: {
+ basic: {
+ username: "elastic",
+ password: "x-pack-test-password",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/23af230e824f48b9cd56a4cf973d788c.asciidoc b/docs/doc_examples/23af230e824f48b9cd56a4cf973d788c.asciidoc
new file mode 100644
index 000000000..693b70a4f
--- /dev/null
+++ b/docs/doc_examples/23af230e824f48b9cd56a4cf973d788c.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ "index.search.slowlog.threshold.query.warn": "10s",
+ "index.search.slowlog.threshold.query.info": "5s",
+ "index.search.slowlog.threshold.query.debug": "2s",
+ "index.search.slowlog.threshold.query.trace": "500ms",
+ "index.search.slowlog.threshold.fetch.warn": "1s",
+ "index.search.slowlog.threshold.fetch.info": "800ms",
+ "index.search.slowlog.threshold.fetch.debug": "500ms",
+ "index.search.slowlog.threshold.fetch.trace": "200ms",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/23b062c157235246d7c347b9047b2435.asciidoc b/docs/doc_examples/23b062c157235246d7c347b9047b2435.asciidoc
new file mode 100644
index 000000000..93cb410f7
--- /dev/null
+++ b/docs/doc_examples/23b062c157235246d7c347b9047b2435.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping1",
+ roles: ["user"],
+ enabled: true,
+ rules: {
+ field: {
+ username: "*",
+ },
+ },
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/23c4ae62f7035f2796e0ac3c7c4c20a9.asciidoc b/docs/doc_examples/23c4ae62f7035f2796e0ac3c7c4c20a9.asciidoc
new file mode 100644
index 000000000..1709625f7
--- /dev/null
+++ b/docs/doc_examples/23c4ae62f7035f2796e0ac3c7c4c20a9.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ migrate: {},
+ allocate: {
+ number_of_replicas: 1,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2408020186af569a76a30eccadaed0d5.asciidoc b/docs/doc_examples/2408020186af569a76a30eccadaed0d5.asciidoc
new file mode 100644
index 000000000..3b2bfd706
--- /dev/null
+++ b/docs/doc_examples/2408020186af569a76a30eccadaed0d5.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ script: {
+ description: "Extract 'tags' from 'env' field",
+ lang: "painless",
+ source:
+ "\n String[] envSplit = ctx['env'].splitOnToken(params['delimiter']);\n ArrayList tags = new ArrayList();\n tags.add(envSplit[params['position']].trim());\n ctx['tags'] = tags;\n ",
+ params: {
+ delimiter: "-",
+ position: 1,
+ },
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ env: "es01-prod",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24275847128b68da6e14233aa1259fb9.asciidoc b/docs/doc_examples/24275847128b68da6e14233aa1259fb9.asciidoc
new file mode 100644
index 000000000..b556c6936
--- /dev/null
+++ b/docs/doc_examples/24275847128b68da6e14233aa1259fb9.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "GET /search",
+ },
+ },
+ collapse: {
+ field: "user.id",
+ inner_hits: [
+ {
+ name: "largest_responses",
+ size: 3,
+ sort: [
+ {
+ "http.response.bytes": {
+ order: "desc",
+ },
+ },
+ ],
+ },
+ {
+ name: "most_recent",
+ size: 3,
+ sort: [
+ {
+ "@timestamp": {
+ order: "desc",
+ },
+ },
+ ],
+ },
+ ],
+ },
+ sort: ["http.response.bytes"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/242a26ced0e5706e48dcda19a4003094.asciidoc b/docs/doc_examples/242a26ced0e5706e48dcda19a4003094.asciidoc
new file mode 100644
index 000000000..4542b8481
--- /dev/null
+++ b/docs/doc_examples/242a26ced0e5706e48dcda19a4003094.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ remote: {
+ host: "http://otherhost:9200",
+ username: "user",
+ password: "pass",
+ },
+ index: "my-index-000001",
+ query: {
+ match: {
+ test: "data",
+ },
+ },
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2493c25e1ef944bc4de0f726470bcdec.asciidoc b/docs/doc_examples/2493c25e1ef944bc4de0f726470bcdec.asciidoc
new file mode 100644
index 000000000..3496eecab
--- /dev/null
+++ b/docs/doc_examples/2493c25e1ef944bc4de0f726470bcdec.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index: "kibana_sample_data_ecommerce",
+ size: 0,
+ aggs: {
+ my_agg: {
+ frequent_item_sets: {
+ minimum_set_size: 3,
+ fields: [
+ {
+ field: "category.keyword",
+ },
+ {
+ field: "geoip.city_name",
+ exclude: "other",
+ },
+ ],
+ size: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/249bf48252c8cea47ef872541c8a884c.asciidoc b/docs/doc_examples/249bf48252c8cea47ef872541c8a884c.asciidoc
new file mode 100644
index 000000000..53430547f
--- /dev/null
+++ b/docs/doc_examples/249bf48252c8cea47ef872541c8a884c.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.grantApiKey({
+ grant_type: "password",
+ username: "test_admin",
+ password: "x-pack-test-password",
+ api_key: {
+ name: "my-api-key",
+ expiration: "1d",
+ role_descriptors: {
+ "role-a": {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index-a*"],
+ privileges: ["read"],
+ },
+ ],
+ },
+ "role-b": {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index-b*"],
+ privileges: ["all"],
+ },
+ ],
+ },
+ },
+ metadata: {
+ application: "my-application",
+ environment: {
+ level: 1,
+ trusted: true,
+ tags: ["dev", "staging"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24a037008e0fc2550ecb6a5d36c04a93.asciidoc b/docs/doc_examples/24a037008e0fc2550ecb6a5d36c04a93.asciidoc
new file mode 100644
index 000000000..6972b07c9
--- /dev/null
+++ b/docs/doc_examples/24a037008e0fc2550ecb6a5d36c04a93.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ "date.day_of_week": {
+ type: "keyword",
+ script:
+ "emit(doc['date'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
+ },
+ },
+ aggs: {
+ day_of_week: {
+ terms: {
+ field: "date.day_of_week",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24ad3c234f69f55a3fbe2d488e70178a.asciidoc b/docs/doc_examples/24ad3c234f69f55a3fbe2d488e70178a.asciidoc
new file mode 100644
index 000000000..a18387f52
--- /dev/null
+++ b/docs/doc_examples/24ad3c234f69f55a3fbe2d488e70178a.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.evaluateDataFrame({
+ index: "student_performance_mathematics_reg",
+ query: {
+ term: {
+ "ml.is_training": {
+ value: true,
+ },
+ },
+ },
+ evaluation: {
+ regression: {
+ actual_field: "G3",
+ predicted_field: "ml.G3_prediction",
+ metrics: {
+ r_squared: {},
+ mse: {},
+ msle: {},
+ huber: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24aee6033bf77a68ced74e3fd9d34283.asciidoc b/docs/doc_examples/24aee6033bf77a68ced74e3fd9d34283.asciidoc
new file mode 100644
index 000000000..d00bf24fb
--- /dev/null
+++ b/docs/doc_examples/24aee6033bf77a68ced74e3fd9d34283.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getTemplate({
+ name: "template_1,template_2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24bdccb07bba7e7e6ff45d3d4cd83064.asciidoc b/docs/doc_examples/24bdccb07bba7e7e6ff45d3d4cd83064.asciidoc
new file mode 100644
index 000000000..2dfb3e83e
--- /dev/null
+++ b/docs/doc_examples/24bdccb07bba7e7e6ff45d3d4cd83064.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-data-stream",
+ pipeline: "my-pipeline",
+});
+console.log(response);
+
+const response1 = await client.reindex({
+ source: {
+ index: "my-data-stream",
+ },
+ dest: {
+ index: "my-new-data-stream",
+ op_type: "create",
+ pipeline: "my-pipeline",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/24d66b2ebdf662d8b03e17214e65c825.asciidoc b/docs/doc_examples/24d66b2ebdf662d8b03e17214e65c825.asciidoc
new file mode 100644
index 000000000..a20bfd230
--- /dev/null
+++ b/docs/doc_examples/24d66b2ebdf662d8b03e17214e65c825.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "xpack.profiling.templates.enabled": false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24d806d1803158dacd4dda73c4204d3e.asciidoc b/docs/doc_examples/24d806d1803158dacd4dda73c4204d3e.asciidoc
new file mode 100644
index 000000000..741ebc94c
--- /dev/null
+++ b/docs/doc_examples/24d806d1803158dacd4dda73c4204d3e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_query_rules/my-ruleset/_rule/my-rule1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/24f4dfdf9922d5aa79151675b7767742.asciidoc b/docs/doc_examples/24f4dfdf9922d5aa79151675b7767742.asciidoc
new file mode 100644
index 000000000..a340d8afe
--- /dev/null
+++ b/docs/doc_examples/24f4dfdf9922d5aa79151675b7767742.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ scroll: "1m",
+ size: 100,
+ query: {
+ match: {
+ message: "foo",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/253140cb1e270e5ee23e15dbaeaaa0ea.asciidoc b/docs/doc_examples/253140cb1e270e5ee23e15dbaeaaa0ea.asciidoc
new file mode 100644
index 000000000..651e42711
--- /dev/null
+++ b/docs/doc_examples/253140cb1e270e5ee23e15dbaeaaa0ea.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.dataStreamsStats({
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25576b6773322f0929d4c635a940dba0.asciidoc b/docs/doc_examples/25576b6773322f0929d4c635a940dba0.asciidoc
new file mode 100644
index 000000000..5752db18f
--- /dev/null
+++ b/docs/doc_examples/25576b6773322f0929d4c635a940dba0.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["title", "content"],
+ query: "this OR that OR thus",
+ type: "cross_fields",
+ minimum_should_match: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/256eba7a77c8890a43afeda8ce8a3225.asciidoc b/docs/doc_examples/256eba7a77c8890a43afeda8ce8a3225.asciidoc
new file mode 100644
index 000000000..4a308455d
--- /dev/null
+++ b/docs/doc_examples/256eba7a77c8890a43afeda8ce8a3225.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-text-embeddings-pipeline",
+ description: "Text embedding pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "sentence-transformers__msmarco-minilm-l-12-v3",
+ target_field: "my_embeddings",
+ field_map: {
+ my_text_field: "text_field",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25737fd456fd317cc4cc2db76b6cf28e.asciidoc b/docs/doc_examples/25737fd456fd317cc4cc2db76b6cf28e.asciidoc
new file mode 100644
index 000000000..f621c76df
--- /dev/null
+++ b/docs/doc_examples/25737fd456fd317cc4cc2db76b6cf28e.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test-000001",
+ aliases: {
+ "test-alias": {
+ is_write_index: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2592e5361f7ea3b3dd1840f63d760dae.asciidoc b/docs/doc_examples/2592e5361f7ea3b3dd1840f63d760dae.asciidoc
new file mode 100644
index 000000000..2803a9d85
--- /dev/null
+++ b/docs/doc_examples/2592e5361f7ea3b3dd1840f63d760dae.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ more_like_this: {
+ fields: ["name.first", "name.last"],
+ like: [
+ {
+ _index: "marvel",
+ doc: {
+ name: {
+ first: "Ben",
+ last: "Grimm",
+ },
+ _doc: "You got no idea what I'd... what I'd give to be invisible.",
+ },
+ },
+ {
+ _index: "marvel",
+ _id: "2",
+ },
+ ],
+ min_term_freq: 1,
+ max_query_terms: 12,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25981b7b3d55b87e1484586d57b695b1.asciidoc b/docs/doc_examples/25981b7b3d55b87e1484586d57b695b1.asciidoc
new file mode 100644
index 000000000..53895bd8a
--- /dev/null
+++ b/docs/doc_examples/25981b7b3d55b87e1484586d57b695b1.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "products",
+ id: 1567,
+ document: {
+ product: "r2d2",
+ details: "A resourceful astromech droid",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25a0dad6547d432f5a3d394528f1c138.asciidoc b/docs/doc_examples/25a0dad6547d432f5a3d394528f1c138.asciidoc
new file mode 100644
index 000000000..2c1e36514
--- /dev/null
+++ b/docs/doc_examples/25a0dad6547d432f5a3d394528f1c138.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 2,
+ routing: "user1",
+ stored_fields: "tags,counter",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25ae1a698f867ba5139605cc952436c0.asciidoc b/docs/doc_examples/25ae1a698f867ba5139605cc952436c0.asciidoc
new file mode 100644
index 000000000..69d44a527
--- /dev/null
+++ b/docs/doc_examples/25ae1a698f867ba5139605cc952436c0.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "place",
+ pretty: "true",
+ suggest: {
+ place_suggestion: {
+ prefix: "tim",
+ completion: {
+ field: "suggest",
+ size: 10,
+ contexts: {
+ place_type: [
+ {
+ context: "cafe",
+ },
+ {
+ context: "restaurants",
+ boost: 2,
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25c0e66a433a0cd596e0641b752ff6d7.asciidoc b/docs/doc_examples/25c0e66a433a0cd596e0641b752ff6d7.asciidoc
new file mode 100644
index 000000000..455f478b2
--- /dev/null
+++ b/docs/doc_examples/25c0e66a433a0cd596e0641b752ff6d7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ h: "index,shard,prirep,state,unassigned.reason",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25cb9e1da00dfd971065ce182467434d.asciidoc b/docs/doc_examples/25cb9e1da00dfd971065ce182467434d.asciidoc
new file mode 100644
index 000000000..d3c98e64c
--- /dev/null
+++ b/docs/doc_examples/25cb9e1da00dfd971065ce182467434d.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.deleteVotingConfigExclusions();
+console.log(response);
+----
diff --git a/docs/doc_examples/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc b/docs/doc_examples/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc
new file mode 100644
index 000000000..03cd13b25
--- /dev/null
+++ b/docs/doc_examples/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "_all",
+ settings: {
+ settings: {
+ "index.unassigned.node_left.delayed_timeout": "0",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/25ecfe423548ac1d7cc86de4a18c48c6.asciidoc b/docs/doc_examples/25ecfe423548ac1d7cc86de4a18c48c6.asciidoc
new file mode 100644
index 000000000..ed4157ca2
--- /dev/null
+++ b/docs/doc_examples/25ecfe423548ac1d7cc86de4a18c48c6.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ char_filter: ["my_char_filter"],
+ },
+ },
+ char_filter: {
+ my_char_filter: {
+ type: "pattern_replace",
+ pattern: "(\\d+)-(?=\\d)",
+ replacement: "$1_",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "My credit card is 123-456-789",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/25ed47fcb890fcf8d8518ae067362d18.asciidoc b/docs/doc_examples/25ed47fcb890fcf8d8518ae067362d18.asciidoc
new file mode 100644
index 000000000..cb23e8e5b
--- /dev/null
+++ b/docs/doc_examples/25ed47fcb890fcf8d8518ae067362d18.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "reviews",
+ size: 0,
+ aggs: {
+ review_average: {
+ avg: {
+ field: "rating",
+ },
+ },
+ review_variability: {
+ median_absolute_deviation: {
+ field: "rating",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/261480571394632db40e88fbb6c59c2f.asciidoc b/docs/doc_examples/261480571394632db40e88fbb6c59c2f.asciidoc
new file mode 100644
index 000000000..003b37404
--- /dev/null
+++ b/docs/doc_examples/261480571394632db40e88fbb6c59c2f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.deleteRoleMapping({
+ name: "mapping1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/26168987f799cdc4ee4151c85ba7afc5.asciidoc b/docs/doc_examples/26168987f799cdc4ee4151c85ba7afc5.asciidoc
new file mode 100644
index 000000000..c6e55f91d
--- /dev/null
+++ b/docs/doc_examples/26168987f799cdc4ee4151c85ba7afc5.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ filter_path: "aggregations",
+ aggs: {
+ "my-num-field-stats": {
+ stats: {
+ field: "my-num-field",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/262196e4323dfc1f8e6daf77d7ba3b6a.asciidoc b/docs/doc_examples/262196e4323dfc1f8e6daf77d7ba3b6a.asciidoc
new file mode 100644
index 000000000..2dab9854b
--- /dev/null
+++ b/docs/doc_examples/262196e4323dfc1f8e6daf77d7ba3b6a.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_gcs_repository",
+ repository: {
+ type: "gcs",
+ settings: {
+ bucket: "my_other_bucket",
+ base_path: "dev",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2623eb122cc0299b42fc9eca6e7f5e56.asciidoc b/docs/doc_examples/2623eb122cc0299b42fc9eca6e7f5e56.asciidoc
new file mode 100644
index 000000000..240f9faa0
--- /dev/null
+++ b/docs/doc_examples/2623eb122cc0299b42fc9eca6e7f5e56.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getBuiltinPrivileges();
+console.log(response);
+----
diff --git a/docs/doc_examples/262a778d754add491fbc9c721ac25bf0.asciidoc b/docs/doc_examples/262a778d754add491fbc9c721ac25bf0.asciidoc
new file mode 100644
index 000000000..225854c1a
--- /dev/null
+++ b/docs/doc_examples/262a778d754add491fbc9c721ac25bf0.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "whitespace",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/26419320085434680142567d5fda9c35.asciidoc b/docs/doc_examples/26419320085434680142567d5fda9c35.asciidoc
new file mode 100644
index 000000000..533c239b2
--- /dev/null
+++ b/docs/doc_examples/26419320085434680142567d5fda9c35.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "network-traffic",
+ size: 0,
+ aggs: {
+ "ipv4-subnets": {
+ ip_prefix: {
+ field: "ipv4",
+ prefix_length: 24,
+ min_doc_count: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2643b8c512cb3f3449259cdf498c6ab5.asciidoc b/docs/doc_examples/2643b8c512cb3f3449259cdf498c6ab5.asciidoc
new file mode 100644
index 000000000..b01e6d6b0
--- /dev/null
+++ b/docs/doc_examples/2643b8c512cb3f3449259cdf498c6ab5.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ },
+ },
+ },
+ {
+ product: {
+ terms: {
+ field: "product",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2646710ece0c4c843aebeacd370d0396.asciidoc b/docs/doc_examples/2646710ece0c4c843aebeacd370d0396.asciidoc
new file mode 100644
index 000000000..0c73b9820
--- /dev/null
+++ b/docs/doc_examples/2646710ece0c4c843aebeacd370d0396.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-byte-quantized-index",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 3,
+ index: true,
+ index_options: {
+ type: "int8_hnsw",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/268151ed1f0e12586e66e614b61d7981.asciidoc b/docs/doc_examples/268151ed1f0e12586e66e614b61d7981.asciidoc
new file mode 100644
index 000000000..e80c1d982
--- /dev/null
+++ b/docs/doc_examples/268151ed1f0e12586e66e614b61d7981.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_polygon: {
+ "person.location": {
+ points: ["drn5x1g8cu2y", "30, -80", "20, -90"],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/26abfc49c238c2b5d259983ac38dbcee.asciidoc b/docs/doc_examples/26abfc49c238c2b5d259983ac38dbcee.asciidoc
new file mode 100644
index 000000000..d6c0ddfef
--- /dev/null
+++ b/docs/doc_examples/26abfc49c238c2b5d259983ac38dbcee.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ query: {
+ simple_query_string: {
+ fields: ["body"],
+ quote_field_suffix: ".exact",
+ query: '"ski"',
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/26bd8c027c82cd72c007c10fa66dc97f.asciidoc b/docs/doc_examples/26bd8c027c82cd72c007c10fa66dc97f.asciidoc
new file mode 100644
index 000000000..79dc2c50d
--- /dev/null
+++ b/docs/doc_examples/26bd8c027c82cd72c007c10fa66dc97f.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+ indices: "*",
+ include_global_state: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/26d3ab748a855eb383e992eb1ff79662.asciidoc b/docs/doc_examples/26d3ab748a855eb383e992eb1ff79662.asciidoc
new file mode 100644
index 000000000..151eb6f26
--- /dev/null
+++ b/docs/doc_examples/26d3ab748a855eb383e992eb1ff79662.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.delete({
+ id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/26f237f9bf14e8b972cc33ff6aebefa2.asciidoc b/docs/doc_examples/26f237f9bf14e8b972cc33ff6aebefa2.asciidoc
new file mode 100644
index 000000000..5982da74d
--- /dev/null
+++ b/docs/doc_examples/26f237f9bf14e8b972cc33ff6aebefa2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["stemmer"],
+ text: "fox running and jumping",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/270549e6b062228312c4e7a54a2c2209.asciidoc b/docs/doc_examples/270549e6b062228312c4e7a54a2c2209.asciidoc
new file mode 100644
index 000000000..5aec6e804
--- /dev/null
+++ b/docs/doc_examples/270549e6b062228312c4e7a54a2c2209.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.hotThreads();
+console.log(response);
+----
diff --git a/docs/doc_examples/2716453454dbf9c6dde2ea6850a62214.asciidoc b/docs/doc_examples/2716453454dbf9c6dde2ea6850a62214.asciidoc
new file mode 100644
index 000000000..925eec77b
--- /dev/null
+++ b/docs/doc_examples/2716453454dbf9c6dde2ea6850a62214.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "trips",
+ mappings: {
+ properties: {
+ distance: {
+ type: "long",
+ },
+ route_length_miles: {
+ type: "alias",
+ path: "distance",
+ },
+ transit_mode: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ query: {
+ range: {
+ route_length_miles: {
+ gte: 39,
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/271fe0b452b62189505ce4a1d6f8bde1.asciidoc b/docs/doc_examples/271fe0b452b62189505ce4a1d6f8bde1.asciidoc
new file mode 100644
index 000000000..449a9a930
--- /dev/null
+++ b/docs/doc_examples/271fe0b452b62189505ce4a1d6f8bde1.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time",
+ keyed: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2720e613d520ce352b62e990c2d283f7.asciidoc b/docs/doc_examples/2720e613d520ce352b62e990c2d283f7.asciidoc
new file mode 100644
index 000000000..0f57c9f94
--- /dev/null
+++ b/docs/doc_examples/2720e613d520ce352b62e990c2d283f7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.removePolicy({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2731a8577ad734a732d784c5dcb1225d.asciidoc b/docs/doc_examples/2731a8577ad734a732d784c5dcb1225d.asciidoc
new file mode 100644
index 000000000..db47f4d61
--- /dev/null
+++ b/docs/doc_examples/2731a8577ad734a732d784c5dcb1225d.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "norwegian_example",
+ settings: {
+ analysis: {
+ filter: {
+ norwegian_stop: {
+ type: "stop",
+ stopwords: "_norwegian_",
+ },
+ norwegian_keywords: {
+ type: "keyword_marker",
+ keywords: ["eksempel"],
+ },
+ norwegian_stemmer: {
+ type: "stemmer",
+ language: "norwegian",
+ },
+ },
+ analyzer: {
+ rebuilt_norwegian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "norwegian_stop",
+ "norwegian_keywords",
+ "norwegian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/27384266370152add76471dd0332a2f1.asciidoc b/docs/doc_examples/27384266370152add76471dd0332a2f1.asciidoc
new file mode 100644
index 000000000..4f87cfbc8
--- /dev/null
+++ b/docs/doc_examples/27384266370152add76471dd0332a2f1.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.updateTransform({
+ transform_id: "simple-kibana-ecomm-pivot",
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ query: {
+ term: {
+ "geoip.continent_name": {
+ value: "Asia",
+ },
+ },
+ },
+ },
+ description: "Maximum priced ecommerce data by customer_id in Asia",
+ dest: {
+ index: "kibana_sample_data_ecommerce_transform_v2",
+ pipeline: "add_timestamp_pipeline",
+ },
+ frequency: "15m",
+ sync: {
+ time: {
+ field: "order_date",
+ delay: "120s",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2740b69e7246ac6d1ad249382f21d534.asciidoc b/docs/doc_examples/2740b69e7246ac6d1ad249382f21d534.asciidoc
new file mode 100644
index 000000000..4c09df81b
--- /dev/null
+++ b/docs/doc_examples/2740b69e7246ac6d1ad249382f21d534.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ "my-agg-metric-field": {
+ type: "aggregate_metric_double",
+ metrics: ["min", "max", "sum", "value_count"],
+ default_metric: "max",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/274feaaa727e0ddf61b3c0f093182839.asciidoc b/docs/doc_examples/274feaaa727e0ddf61b3c0f093182839.asciidoc
new file mode 100644
index 000000000..322ec637b
--- /dev/null
+++ b/docs/doc_examples/274feaaa727e0ddf61b3c0f093182839.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ runtime_mappings: {
+ duration: {
+ type: "long",
+ script: {
+ source:
+ "\n emit(doc['measures.end'].value - doc['measures.start'].value);\n ",
+ },
+ },
+ },
+ aggs: {
+ duration_stats: {
+ stats: {
+ field: "duration",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/275ec358d5d1e4b9ff06cb4ae7e47650.asciidoc b/docs/doc_examples/275ec358d5d1e4b9ff06cb4ae7e47650.asciidoc
new file mode 100644
index 000000000..f6b5783c4
--- /dev/null
+++ b/docs/doc_examples/275ec358d5d1e4b9ff06cb4ae7e47650.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getIndexTemplate({
+ name: "temp*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/27600d6a78623b69689d4218618e4278.asciidoc b/docs/doc_examples/27600d6a78623b69689d4218618e4278.asciidoc
new file mode 100644
index 000000000..7565a7fce
--- /dev/null
+++ b/docs/doc_examples/27600d6a78623b69689d4218618e4278.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_index",
+ query: {
+ term: {
+ my_counter: 18446744073709552000,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/276e5b71ff5c6879a9b819076ad82301.asciidoc b/docs/doc_examples/276e5b71ff5c6879a9b819076ad82301.asciidoc
new file mode 100644
index 000000000..40494f10d
--- /dev/null
+++ b/docs/doc_examples/276e5b71ff5c6879a9b819076ad82301.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_dense_vector: {
+ type: "dense_vector",
+ index: false,
+ dims: 3,
+ },
+ my_byte_dense_vector: {
+ type: "dense_vector",
+ index: false,
+ dims: 3,
+ element_type: "byte",
+ },
+ status: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_dense_vector: [0.5, 10, 6],
+ my_byte_dense_vector: [0, 10, 6],
+ status: "published",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ my_dense_vector: [-0.5, 10, 10],
+ my_byte_dense_vector: [0, 10, 10],
+ status: "published",
+ },
+});
+console.log(response2);
+
+const response3 = await client.indices.refresh({
+ index: "my-index-000001",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/277fefe2b623af61f8274f73efc97aed.asciidoc b/docs/doc_examples/277fefe2b623af61f8274f73efc97aed.asciidoc
new file mode 100644
index 000000000..93632b514
--- /dev/null
+++ b/docs/doc_examples/277fefe2b623af61f8274f73efc97aed.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.scriptsPainlessExecute({
+ script: {
+ source:
+ '\n String response=dissect(\'%{clientip} %{ident} %{auth} [%{@timestamp}] "%{verb} %{request} HTTP/%{httpversion}" %{response} %{size}\').extract(doc["message"].value)?.response;\n if (response != null) emit(Integer.parseInt(response)); \n ',
+ },
+ context: "long_field",
+ context_setup: {
+ index: "my-index",
+ document: {
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0',
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/278d5bfa1a01f91d5c84679ef1bca390.asciidoc b/docs/doc_examples/278d5bfa1a01f91d5c84679ef1bca390.asciidoc
new file mode 100644
index 000000000..a8cdb26df
--- /dev/null
+++ b/docs/doc_examples/278d5bfa1a01f91d5c84679ef1bca390.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "products",
+ id: 1567,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2793fa53b7d269852aa74f6bf57e34dc.asciidoc b/docs/doc_examples/2793fa53b7d269852aa74f6bf57e34dc.asciidoc
new file mode 100644
index 000000000..bce452553
--- /dev/null
+++ b/docs/doc_examples/2793fa53b7d269852aa74f6bf57e34dc.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "ngram_custom_example",
+ settings: {
+ index: {
+ max_ngram_diff: 2,
+ },
+ analysis: {
+ analyzer: {
+ default: {
+ tokenizer: "whitespace",
+ filter: ["3_5_grams"],
+ },
+ },
+ filter: {
+ "3_5_grams": {
+ type: "ngram",
+ min_gram: 3,
+ max_gram: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/279e2b29261971999923fdc658bba8ff.asciidoc b/docs/doc_examples/279e2b29261971999923fdc658bba8ff.asciidoc
new file mode 100644
index 000000000..830bae7cd
--- /dev/null
+++ b/docs/doc_examples/279e2b29261971999923fdc658bba8ff.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ _source: {
+ includes: ["obj1.*", "obj2.*"],
+ excludes: ["*.description"],
+ },
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/27f9f604e7a48799fa30529cbc0ff619.asciidoc b/docs/doc_examples/27f9f604e7a48799fa30529cbc0ff619.asciidoc
new file mode 100644
index 000000000..74236de4d
--- /dev/null
+++ b/docs/doc_examples/27f9f604e7a48799fa30529cbc0ff619.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "delimited_payload_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_plus_delimited: {
+ tokenizer: "whitespace",
+ filter: ["plus_delimited"],
+ },
+ },
+ filter: {
+ plus_delimited: {
+ type: "delimited_payload",
+ delimiter: "+",
+ encoding: "int",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/282e9e845b606f29a5bba174ae4c4c4d.asciidoc b/docs/doc_examples/282e9e845b606f29a5bba174ae4c4c4d.asciidoc
new file mode 100644
index 000000000..749b74ca4
--- /dev/null
+++ b/docs/doc_examples/282e9e845b606f29a5bba174ae4c4c4d.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-restricted-api-key",
+ expiration: "7d",
+ role_descriptors: {
+ "my-restricted-role-descriptor": {
+ indices: [
+ {
+ names: ["website-product-search"],
+ privileges: ["read"],
+ },
+ ],
+ restriction: {
+ workflows: ["search_application_query"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/28415647fced5f983b42f8435332a625.asciidoc b/docs/doc_examples/28415647fced5f983b42f8435332a625.asciidoc
new file mode 100644
index 000000000..bc11f9997
--- /dev/null
+++ b/docs/doc_examples/28415647fced5f983b42f8435332a625.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ lowercase: {
+ field: "my-keyword-field",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ "my-keyword-field": "FOO",
+ },
+ },
+ {
+ _source: {
+ "my-keyword-field": "BAR",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/28543836b62b5622a402e6f7731d68f0.asciidoc b/docs/doc_examples/28543836b62b5622a402e6f7731d68f0.asciidoc
new file mode 100644
index 000000000..c8cd51511
--- /dev/null
+++ b/docs/doc_examples/28543836b62b5622a402e6f7731d68f0.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.downsample({
+ index: ".ds-my-data-stream-2023.07.26-000001",
+ target_index: ".ds-my-data-stream-2023.07.26-000001-downsample",
+ config: {
+ fixed_interval: "1h",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2856a5ceff1861aa9a78099f1c517fe7.asciidoc b/docs/doc_examples/2856a5ceff1861aa9a78099f1c517fe7.asciidoc
new file mode 100644
index 000000000..85471c3a9
--- /dev/null
+++ b/docs/doc_examples/2856a5ceff1861aa9a78099f1c517fe7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: ".watches",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2864a24608b3ac59d21f604f8a31d131.asciidoc b/docs/doc_examples/2864a24608b3ac59d21f604f8a31d131.asciidoc
new file mode 100644
index 000000000..7e2ac94ce
--- /dev/null
+++ b/docs/doc_examples/2864a24608b3ac59d21f604f8a31d131.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "jwt_role1",
+ refresh: "true",
+ cluster: ["manage"],
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ },
+ ],
+ run_as: ["user123_runas"],
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2864d04bf99860ed5dbe1458f1ab5f78.asciidoc b/docs/doc_examples/2864d04bf99860ed5dbe1458f1ab5f78.asciidoc
new file mode 100644
index 000000000..4463693d5
--- /dev/null
+++ b/docs/doc_examples/2864d04bf99860ed5dbe1458f1ab5f78.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.putAutoscalingPolicy({
+ name: "",
+ policy: {
+ roles: [],
+ deciders: {
+ fixed: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2879d7bf4167194b102bf97117327164.asciidoc b/docs/doc_examples/2879d7bf4167194b102bf97117327164.asciidoc
new file mode 100644
index 000000000..c26a84b6d
--- /dev/null
+++ b/docs/doc_examples/2879d7bf4167194b102bf97117327164.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ char_filter: ["html_strip"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2884eacac3ad05ff794f5296ec7427e7.asciidoc b/docs/doc_examples/2884eacac3ad05ff794f5296ec7427e7.asciidoc
new file mode 100644
index 000000000..a9a3ee25f
--- /dev/null
+++ b/docs/doc_examples/2884eacac3ad05ff794f5296ec7427e7.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-image-index",
+ size: 3,
+ query: {
+ knn: {
+ field: "image-vector",
+ query_vector: [-5, 9, -12],
+ k: 10,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2891aa10ee9d474780adf94d5607f2db.asciidoc b/docs/doc_examples/2891aa10ee9d474780adf94d5607f2db.asciidoc
new file mode 100644
index 000000000..ccbd72aca
--- /dev/null
+++ b/docs/doc_examples/2891aa10ee9d474780adf94d5607f2db.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index_long,index_double",
+ sort: [
+ {
+ field: {
+ numeric_type: "double",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc b/docs/doc_examples/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc
new file mode 100644
index 000000000..d1ba94ce5
--- /dev/null
+++ b/docs/doc_examples/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.get({
+ id: "FklQYndoTDJ2VEFlMEVBTzFJMGhJVFEaLVlKYndBWWZSMUdicUc4WVlEaFl4ZzoxNTU=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2898cf033b5bdefdbe3723af850b25c5.asciidoc b/docs/doc_examples/2898cf033b5bdefdbe3723af850b25c5.asciidoc
new file mode 100644
index 000000000..fdf8b3f45
--- /dev/null
+++ b/docs/doc_examples/2898cf033b5bdefdbe3723af850b25c5.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "GET /search",
+ },
+ },
+ collapse: {
+ field: "user.id",
+ inner_hits: {
+ name: "most_recent",
+ size: 5,
+ sort: [
+ {
+ "@timestamp": "desc",
+ },
+ ],
+ },
+ max_concurrent_group_searches: 4,
+ },
+ sort: [
+ {
+ "http.response.bytes": {
+ order: "desc",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/28ac880057135e46b3b00c7f3976538c.asciidoc b/docs/doc_examples/28ac880057135e46b3b00c7f3976538c.asciidoc
new file mode 100644
index 000000000..326307582
--- /dev/null
+++ b/docs/doc_examples/28ac880057135e46b3b00c7f3976538c.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "test",
+ settings: {
+ "index.routing.allocation.include._ip": "192.168.2.*",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/291110f4cac02f4610d0853f5800a70d.asciidoc b/docs/doc_examples/291110f4cac02f4610d0853f5800a70d.asciidoc
new file mode 100644
index 000000000..bf8fdb708
--- /dev/null
+++ b/docs/doc_examples/291110f4cac02f4610d0853f5800a70d.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ weighted_grade: {
+ weighted_avg: {
+ value: {
+ field: "grade",
+ missing: 2,
+ },
+ weight: {
+ field: "weight",
+ missing: 3,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc b/docs/doc_examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc
new file mode 100644
index 000000000..e8724553d
--- /dev/null
+++ b/docs/doc_examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ slices: 5,
+ refresh: "true",
+ source: {
+ index: "my-index-000001",
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/295b3aaeb223612afdd991744dc9c873.asciidoc b/docs/doc_examples/295b3aaeb223612afdd991744dc9c873.asciidoc
new file mode 100644
index 000000000..efdcdd845
--- /dev/null
+++ b/docs/doc_examples/295b3aaeb223612afdd991744dc9c873.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my_test_scores_pipeline",
+ description: "Calculates the total test score",
+ processors: [
+ {
+ script: {
+ source: "ctx.total_score = (ctx.math_score + ctx.verbal_score)",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2968ffb8135f77ba3a9b876dd4918119.asciidoc b/docs/doc_examples/2968ffb8135f77ba3a9b876dd4918119.asciidoc
new file mode 100644
index 000000000..7a6220c32
--- /dev/null
+++ b/docs/doc_examples/2968ffb8135f77ba3a9b876dd4918119.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "azure-ai-studio-embeddings",
+ pipeline: "azure_ai_studio_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/29783e5de3a5f3c985cbf11094cf49a0.asciidoc b/docs/doc_examples/29783e5de3a5f3c985cbf11094cf49a0.asciidoc
new file mode 100644
index 000000000..5a876f211
--- /dev/null
+++ b/docs/doc_examples/29783e5de3a5f3c985cbf11094cf49a0.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["keyword_repeat", "stemmer", "remove_duplicates"],
+ text: "fox running and jumping",
+ explain: true,
+ attributes: "keyword",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/29824032d7d64512d17458fdd687b1f6.asciidoc b/docs/doc_examples/29824032d7d64512d17458fdd687b1f6.asciidoc
new file mode 100644
index 000000000..2baa04ac3
--- /dev/null
+++ b/docs/doc_examples/29824032d7d64512d17458fdd687b1f6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ parent_task_id: "oTUltX4IQMOUUVeiohTt8A:123",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/29953082744b7a36e437b392a6391c81.asciidoc b/docs/doc_examples/29953082744b7a36e437b392a6391c81.asciidoc
new file mode 100644
index 000000000..42b500db9
--- /dev/null
+++ b/docs/doc_examples/29953082744b7a36e437b392a6391c81.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ id: "my-search-template",
+ params: {
+ from: 20,
+ size: 10,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/299900fb08da80fe455cf3f1bb7d62ee.asciidoc b/docs/doc_examples/299900fb08da80fe455cf3f1bb7d62ee.asciidoc
new file mode 100644
index 000000000..2ace94737
--- /dev/null
+++ b/docs/doc_examples/299900fb08da80fe455cf3f1bb7d62ee.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "publications",
+ fields: "title",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/29d9df958de292cec50daaf31844b573.asciidoc b/docs/doc_examples/29d9df958de292cec50daaf31844b573.asciidoc
new file mode 100644
index 000000000..d0e279e5b
--- /dev/null
+++ b/docs/doc_examples/29d9df958de292cec50daaf31844b573.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "my-index-000001,my-index-000002",
+ fields: "message",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/29e002ab596bae58712eb048ac1768d1.asciidoc b/docs/doc_examples/29e002ab596bae58712eb048ac1768d1.asciidoc
new file mode 100644
index 000000000..351d18c99
--- /dev/null
+++ b/docs/doc_examples/29e002ab596bae58712eb048ac1768d1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ routing: "xyz",
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "You know for search!",
+ "user.id": "xyz",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc b/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc
new file mode 100644
index 000000000..4853ab9a3
--- /dev/null
+++ b/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.oidcLogout({
+ body: {
+ token:
+ "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
+ refresh_token: "vLBPvmAB6KvwvJZr27cS",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc b/docs/doc_examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc
new file mode 100644
index 000000000..c4260ab6c
--- /dev/null
+++ b/docs/doc_examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ routing: "kimchy",
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a287d213a812b98d8353c563a058cfc.asciidoc b/docs/doc_examples/2a287d213a812b98d8353c563a058cfc.asciidoc
new file mode 100644
index 000000000..cf586f9f0
--- /dev/null
+++ b/docs/doc_examples/2a287d213a812b98d8353c563a058cfc.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_boxplot: {
+ boxplot: {
+ field: "load_time",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a44d254e6e32abe97515fd2eb34705d.asciidoc b/docs/doc_examples/2a44d254e6e32abe97515fd2eb34705d.asciidoc
new file mode 100644
index 000000000..a7fd770cf
--- /dev/null
+++ b/docs/doc_examples/2a44d254e6e32abe97515fd2eb34705d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.getAsync({
+ id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
+ wait_for_completion_timeout: "2s",
+ format: "json",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a47d11c6e19c9da5104e738359ea8a8.asciidoc b/docs/doc_examples/2a47d11c6e19c9da5104e738359ea8a8.asciidoc
new file mode 100644
index 000000000..186d8540d
--- /dev/null
+++ b/docs/doc_examples/2a47d11c6e19c9da5104e738359ea8a8.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.start();
+console.log(response);
+----
diff --git a/docs/doc_examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc b/docs/doc_examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc
new file mode 100644
index 000000000..c51f168fc
--- /dev/null
+++ b/docs/doc_examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ id: "index_compare",
+ source: {
+ index: ["index1", "index2"],
+ query: {
+ match_all: {},
+ },
+ },
+ dest: {
+ index: "compare",
+ },
+ pivot: {
+ group_by: {
+ "unique-id": {
+ terms: {
+ field: "",
+ },
+ },
+ },
+ aggregations: {
+ compare: {
+ scripted_metric: {
+ map_script: "state.doc = new HashMap(params['_source'])",
+ combine_script: "return state",
+ reduce_script:
+ ' \n if (states.size() != 2) {\n return "count_mismatch"\n }\n if (states.get(0).equals(states.get(1))) {\n return "match"\n } else {\n return "mismatch"\n }\n ',
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc b/docs/doc_examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc
new file mode 100644
index 000000000..93ccfa9d8
--- /dev/null
+++ b/docs/doc_examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "attachment",
+ description: "Extract attachment information including original binary",
+ processors: [
+ {
+ attachment: {
+ field: "data",
+ remove_binary: false,
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "attachment",
+ document: {
+ data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/2a70194ebd2f01a3229a5092513676b3.asciidoc b/docs/doc_examples/2a70194ebd2f01a3229a5092513676b3.asciidoc
new file mode 100644
index 000000000..27d8630e1
--- /dev/null
+++ b/docs/doc_examples/2a70194ebd2f01a3229a5092513676b3.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ char_filter: ["my_custom_html_strip_char_filter"],
+ },
+ },
+ char_filter: {
+ my_custom_html_strip_char_filter: {
+ type: "html_strip",
+ escaped_tags: ["b"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a71e2d7f7179dd76183d30789046808.asciidoc b/docs/doc_examples/2a71e2d7f7179dd76183d30789046808.asciidoc
new file mode 100644
index 000000000..d83750efc
--- /dev/null
+++ b/docs/doc_examples/2a71e2d7f7179dd76183d30789046808.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "mv",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ a: 1,
+ b: [2, 1],
+ },
+ {
+ index: {},
+ },
+ {
+ a: 2,
+ b: 3,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc b/docs/doc_examples/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc
new file mode 100644
index 000000000..4a364d79c
--- /dev/null
+++ b/docs/doc_examples/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc
@@ -0,0 +1,53 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ comments: {
+ type: "nested",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 1,
+ refresh: "true",
+ document: {
+ title: "Test title",
+ comments: [
+ {
+ author: "kimchy",
+ number: 1,
+ },
+ {
+ author: "nik9000",
+ number: 2,
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "test",
+ query: {
+ nested: {
+ path: "comments",
+ query: {
+ match: {
+ "comments.number": 2,
+ },
+ },
+ inner_hits: {},
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc b/docs/doc_examples/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc
new file mode 100644
index 000000000..bf26b94bf
--- /dev/null
+++ b/docs/doc_examples/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ query: "(new york city) OR (big apple)",
+ default_field: "content",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2a9d3119a9e26e29220be436b9382955.asciidoc b/docs/doc_examples/2a9d3119a9e26e29220be436b9382955.asciidoc
new file mode 100644
index 000000000..e32079ad0
--- /dev/null
+++ b/docs/doc_examples/2a9d3119a9e26e29220be436b9382955.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "mistral-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1024,
+ element_type: "float",
+ similarity: "dot_product",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2aa548b692fc2fe7b6f0d90eb8b2ae29.asciidoc b/docs/doc_examples/2aa548b692fc2fe7b6f0d90eb8b2ae29.asciidoc
new file mode 100644
index 000000000..649f56d45
--- /dev/null
+++ b/docs/doc_examples/2aa548b692fc2fe7b6f0d90eb8b2ae29.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.deleteWatch({
+ id: "my_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2abfe0d3f5593d23d2dfa608b1e2532a.asciidoc b/docs/doc_examples/2abfe0d3f5593d23d2dfa608b1e2532a.asciidoc
new file mode 100644
index 000000000..3c45e67f9
--- /dev/null
+++ b/docs/doc_examples/2abfe0d3f5593d23d2dfa608b1e2532a.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ user_name: {
+ terms: {
+ field: "user_name",
+ },
+ },
+ },
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ order: "desc",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ac37c3c572170ded67f1d5a0c8151ab.asciidoc b/docs/doc_examples/2ac37c3c572170ded67f1d5a0c8151ab.asciidoc
new file mode 100644
index 000000000..f3d8511aa
--- /dev/null
+++ b/docs/doc_examples/2ac37c3c572170ded67f1d5a0c8151ab.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ tiebreaker_field: "event.sequence",
+ query:
+ '\n process where process.name == "cmd.exe" and stringContains(process.executable, "System32")\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ac7efe3919ee0c7971f5d502f482662.asciidoc b/docs/doc_examples/2ac7efe3919ee0c7971f5d502f482662.asciidoc
new file mode 100644
index 000000000..22b4c7525
--- /dev/null
+++ b/docs/doc_examples/2ac7efe3919ee0c7971f5d502f482662.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "published",
+ },
+ },
+ },
+ },
+ script: {
+ source: "1 / (1 + l1norm(params.queryVector, 'my_dense_vector'))",
+ params: {
+ queryVector: [4, 3.4, -0.2],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc b/docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc
new file mode 100644
index 000000000..d5715eeeb
--- /dev/null
+++ b/docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkDeleteRole({
+ names: ["my_admin_role", "superuser"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ad35a13262f98574a48f88b4a838512.asciidoc b/docs/doc_examples/2ad35a13262f98574a48f88b4a838512.asciidoc
new file mode 100644
index 000000000..b774c6457
--- /dev/null
+++ b/docs/doc_examples/2ad35a13262f98574a48f88b4a838512.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "current_year",
+ id: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ade05fb3fb06a67df25e097dfadb045.asciidoc b/docs/doc_examples/2ade05fb3fb06a67df25e097dfadb045.asciidoc
new file mode 100644
index 000000000..02eb444d9
--- /dev/null
+++ b/docs/doc_examples/2ade05fb3fb06a67df25e097dfadb045.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2aec92bc31bc24bce58d983738f9e0fe.asciidoc b/docs/doc_examples/2aec92bc31bc24bce58d983738f9e0fe.asciidoc
new file mode 100644
index 000000000..a2acce444
--- /dev/null
+++ b/docs/doc_examples/2aec92bc31bc24bce58d983738f9e0fe.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ matrixstats: {
+ matrix_stats: {
+ fields: ["poverty", "income"],
+ missing: {
+ income: 50000,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2afc1231679898bd864d06679d9e951b.asciidoc b/docs/doc_examples/2afc1231679898bd864d06679d9e951b.asciidoc
new file mode 100644
index 000000000..61ad3f6d7
--- /dev/null
+++ b/docs/doc_examples/2afc1231679898bd864d06679d9e951b.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "day",
+ },
+ aggs: {
+ categories: {
+ terms: {
+ field: "category",
+ },
+ },
+ min_bucket_selector: {
+ bucket_selector: {
+ buckets_path: {
+ count: "categories._bucket_count",
+ },
+ script: {
+ source: "params.count != 0",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc
new file mode 100644
index 000000000..44648b27c
--- /dev/null
+++ b/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.asyncQueryGet({
+ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
+ wait_for_completion_timeout: "30s",
+ body: null,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc b/docs/doc_examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc
new file mode 100644
index 000000000..3e9c8d773
--- /dev/null
+++ b/docs/doc_examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job",
+ querystring: {
+ job_type: "full,incremental",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2b47be4b712147a429102aef386470ee.asciidoc b/docs/doc_examples/2b47be4b712147a429102aef386470ee.asciidoc
new file mode 100644
index 000000000..87f348ef1
--- /dev/null
+++ b/docs/doc_examples/2b47be4b712147a429102aef386470ee.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence by process.pid\n [process where process.name == "regsvr32.exe"]\n [library where dll.name == "scrobj.dll"]\n [network where true]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2b59b014349d45bf894aca90b2b1fbe0.asciidoc b/docs/doc_examples/2b59b014349d45bf894aca90b2b1fbe0.asciidoc
new file mode 100644
index 000000000..e5501b1a8
--- /dev/null
+++ b/docs/doc_examples/2b59b014349d45bf894aca90b2b1fbe0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2b5a5f8689f04d095fa86570130ee4d4.asciidoc b/docs/doc_examples/2b5a5f8689f04d095fa86570130ee4d4.asciidoc
new file mode 100644
index 000000000..94216bc5f
--- /dev/null
+++ b/docs/doc_examples/2b5a5f8689f04d095fa86570130ee4d4.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_id: {
+ type: "keyword",
+ },
+ my_join_field: {
+ type: "join",
+ relations: {
+ question: "answer",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2b5c69778eb3daba9fbd7242bcc2daf9.asciidoc b/docs/doc_examples/2b5c69778eb3daba9fbd7242bcc2daf9.asciidoc
new file mode 100644
index 000000000..bb81adede
--- /dev/null
+++ b/docs/doc_examples/2b5c69778eb3daba9fbd7242bcc2daf9.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryApiKeys({
+ size: 0,
+ query: {
+ bool: {
+ filter: {
+ term: {
+ invalidated: true,
+ },
+ },
+ },
+ },
+ aggs: {
+ invalidated_keys: {
+ composite: {
+ sources: [
+ {
+ username: {
+ terms: {
+ field: "username",
+ },
+ },
+ },
+ {
+ key_name: {
+ terms: {
+ field: "name",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2b7687e3d7c06824950e00618c297864.asciidoc b/docs/doc_examples/2b7687e3d7c06824950e00618c297864.asciidoc
new file mode 100644
index 000000000..10757782b
--- /dev/null
+++ b/docs/doc_examples/2b7687e3d7c06824950e00618c297864.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.resolveCluster({
+ name: "my-index*,clust*:my-index*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ba15c066d55a9b26d49b09471151cb4.asciidoc b/docs/doc_examples/2ba15c066d55a9b26d49b09471151cb4.asciidoc
new file mode 100644
index 000000000..792e02cbe
--- /dev/null
+++ b/docs/doc_examples/2ba15c066d55a9b26d49b09471151cb4.asciidoc
@@ -0,0 +1,66 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "emails",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ accounts: ["hillary", "sidney"],
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ accounts: ["hillary", "donald"],
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ accounts: ["vladimir", "donald"],
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "emails",
+ size: 0,
+ aggs: {
+ interactions: {
+ adjacency_matrix: {
+ filters: {
+ grpA: {
+ terms: {
+ accounts: ["hillary", "sidney"],
+ },
+ },
+ grpB: {
+ terms: {
+ accounts: ["donald", "mitt"],
+ },
+ },
+ grpC: {
+ terms: {
+ accounts: ["vladimir", "nigel"],
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc b/docs/doc_examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc
new file mode 100644
index 000000000..ae2742968
--- /dev/null
+++ b/docs/doc_examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ sort: [
+ {
+ post_date: {
+ order: "asc",
+ format: "strict_date_optional_time_nanos",
+ },
+ },
+ "user",
+ {
+ name: "desc",
+ },
+ {
+ age: "desc",
+ },
+ "_score",
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc b/docs/doc_examples/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc
new file mode 100644
index 000000000..18da0ad1c
--- /dev/null
+++ b/docs/doc_examples/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_boxplot: {
+ boxplot: {
+ field: "load_time",
+ execution_hint: "high_accuracy",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2bc57cd3f32b59b0b44ca63b19cdfcc0.asciidoc b/docs/doc_examples/2bc57cd3f32b59b0b44ca63b19cdfcc0.asciidoc
new file mode 100644
index 000000000..96f64fa4d
--- /dev/null
+++ b/docs/doc_examples/2bc57cd3f32b59b0b44ca63b19cdfcc0.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "image-index",
+ knn: {
+ field: "image-vector",
+ query_vector: [1, 5, -20],
+ k: 5,
+ num_candidates: 50,
+ similarity: 36,
+ filter: {
+ term: {
+ "file-type": "png",
+ },
+ },
+ },
+ fields: ["title"],
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc b/docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc
new file mode 100644
index 000000000..9e9cb47ce
--- /dev/null
+++ b/docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc
@@ -0,0 +1,77 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ attributes: {
+ type: "passthrough",
+ priority: 10,
+ properties: {
+ id: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ attributes: {
+ id: "foo",
+ zone: 10,
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ id: "foo",
+ },
+ },
+ {
+ match: {
+ zone: 10,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "attributes.id": "foo",
+ },
+ },
+ {
+ match: {
+ "attributes.zone": 10,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc b/docs/doc_examples/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc
new file mode 100644
index 000000000..edd0fc3cd
--- /dev/null
+++ b/docs/doc_examples/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ metric: "fielddata",
+ human: "true",
+ fields: "my_join_field",
+});
+console.log(response);
+
+const response1 = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "fielddata",
+ human: "true",
+ fields: "my_join_field",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/2c0dbdcf400cde5d36f7c9e6c1101011.asciidoc b/docs/doc_examples/2c0dbdcf400cde5d36f7c9e6c1101011.asciidoc
new file mode 100644
index 000000000..02df5c874
--- /dev/null
+++ b/docs/doc_examples/2c0dbdcf400cde5d36f7c9e6c1101011.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.health({
+ v: "true",
+ ts: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc b/docs/doc_examples/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc
new file mode 100644
index 000000000..be41e40e4
--- /dev/null
+++ b/docs/doc_examples/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.putSynonymRule({
+ set_id: "my-synonyms-set",
+ rule_id: "test-1",
+ synonyms: "hello, hi, howdy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c27a8eb6528126f37a843d434cd88b6.asciidoc b/docs/doc_examples/2c27a8eb6528126f37a843d434cd88b6.asciidoc
new file mode 100644
index 000000000..a3ecc0a0d
--- /dev/null
+++ b/docs/doc_examples/2c27a8eb6528126f37a843d434cd88b6.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "synonym_graph",
+ synonyms: ["dns, domain name system"],
+ },
+ ],
+ text: "domain name system is fragile",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c3207c0c985d253b2ecccc14e69e25a.asciidoc b/docs/doc_examples/2c3207c0c985d253b2ecccc14e69e25a.asciidoc
new file mode 100644
index 000000000..914a06153
--- /dev/null
+++ b/docs/doc_examples/2c3207c0c985d253b2ecccc14e69e25a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.addBlock({
+ index: ".ds-my-data-stream-2023.07.26-000001",
+ block: "write",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc b/docs/doc_examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc
new file mode 100644
index 000000000..b4a13111d
--- /dev/null
+++ b/docs/doc_examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ max_docs: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c44657adf550b8ade5cf5334106d38b.asciidoc b/docs/doc_examples/2c44657adf550b8ade5cf5334106d38b.asciidoc
new file mode 100644
index 000000000..60ba299c3
--- /dev/null
+++ b/docs/doc_examples/2c44657adf550b8ade5cf5334106d38b.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ runtime_mappings: {
+ "http.clientip": {
+ type: "ip",
+ script:
+ "\n String clientip=grok('%{COMMONAPACHELOG}').extract(doc[\"message\"].value)?.clientip;\n if (clientip != null) emit(clientip);\n ",
+ },
+ },
+ query: {
+ match: {
+ "http.clientip": "40.135.0.0",
+ },
+ },
+ fields: ["http.clientip"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2c602b4ee8f22cda2cdf19bad31da0af.asciidoc b/docs/doc_examples/2c602b4ee8f22cda2cdf19bad31da0af.asciidoc
new file mode 100644
index 000000000..8289c7259
--- /dev/null
+++ b/docs/doc_examples/2c602b4ee8f22cda2cdf19bad31da0af.asciidoc
@@ -0,0 +1,78 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.info();
+console.log(response);
+
+const response1 = await client.nodes.info({
+ node_id: "_all",
+});
+console.log(response1);
+
+const response2 = await client.nodes.info({
+ node_id: "_local",
+});
+console.log(response2);
+
+const response3 = await client.nodes.info({
+ node_id: "_master",
+});
+console.log(response3);
+
+const response4 = await client.nodes.info({
+ node_id: "node_name_goes_here",
+});
+console.log(response4);
+
+const response5 = await client.nodes.info({
+ node_id: "node_name_goes_*",
+});
+console.log(response5);
+
+const response6 = await client.nodes.info({
+ node_id: "10.0.0.3,10.0.0.4",
+});
+console.log(response6);
+
+const response7 = await client.nodes.info({
+ node_id: "10.0.0.*",
+});
+console.log(response7);
+
+const response8 = await client.nodes.info({
+ node_id: "_all,master:false",
+});
+console.log(response8);
+
+const response9 = await client.nodes.info({
+ node_id: "data:true,ingest:true",
+});
+console.log(response9);
+
+const response10 = await client.nodes.info({
+ node_id: "coordinating_only:true",
+});
+console.log(response10);
+
+const response11 = await client.nodes.info({
+ node_id: "master:true,voting_only:false",
+});
+console.log(response11);
+
+const response12 = await client.nodes.info({
+ node_id: "rack:2",
+});
+console.log(response12);
+
+const response13 = await client.nodes.info({
+ node_id: "ra*:2",
+});
+console.log(response13);
+
+const response14 = await client.nodes.info({
+ node_id: "ra*:2*",
+});
+console.log(response14);
+----
diff --git a/docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc b/docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc
new file mode 100644
index 000000000..3bda37c4b
--- /dev/null
+++ b/docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-explicit-mappings-books",
+ mappings: {
+ dynamic: false,
+ properties: {
+ name: {
+ type: "text",
+ },
+ author: {
+ type: "text",
+ },
+ release_date: {
+ type: "date",
+ format: "yyyy-MM-dd",
+ },
+ page_count: {
+ type: "integer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ceded6ee764adf1aaaac0a1cd25ed5f.asciidoc b/docs/doc_examples/2ceded6ee764adf1aaaac0a1cd25ed5f.asciidoc
new file mode 100644
index 000000000..dd5e94075
--- /dev/null
+++ b/docs/doc_examples/2ceded6ee764adf1aaaac0a1cd25ed5f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.indices({
+ v: "true",
+ health: "red",
+ h: "index,status,health",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc b/docs/doc_examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc
new file mode 100644
index 000000000..865aa0e5d
--- /dev/null
+++ b/docs/doc_examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ timeout: "5m",
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc b/docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc
new file mode 100644
index 000000000..e7a2117c4
--- /dev/null
+++ b/docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "idx_keep",
+ id: 1,
+ document: {
+ path: {
+ to: [
+ {
+ foo: [3, 2, 1],
+ },
+ {
+ foo: [30, 20, 10],
+ },
+ ],
+ bar: "baz",
+ },
+ ids: [200, 100, 300, 100],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc b/docs/doc_examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc
new file mode 100644
index 000000000..4deb98ab1
--- /dev/null
+++ b/docs/doc_examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_phrase: {
+ message: {
+ query: "this is a test",
+ analyzer: "my_analyzer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d2f5ec97aa34ff7822a6a1ed08ef335.asciidoc b/docs/doc_examples/2d2f5ec97aa34ff7822a6a1ed08ef335.asciidoc
new file mode 100644
index 000000000..4a0b8c958
--- /dev/null
+++ b/docs/doc_examples/2d2f5ec97aa34ff7822a6a1ed08ef335.asciidoc
@@ -0,0 +1,58 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "test",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _index: "test1",
+ },
+ },
+ {
+ s: 1,
+ m: 3.1415,
+ },
+ {
+ index: {
+ _index: "test1",
+ },
+ },
+ {
+ s: 2,
+ m: 1,
+ },
+ {
+ index: {
+ _index: "test2",
+ },
+ },
+ {
+ s: 3.1,
+ m: 2.71828,
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "test*",
+ filter_path: "aggregations",
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ s: "asc",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/2d37b02cbf6d30ae11bf239a54ec9423.asciidoc b/docs/doc_examples/2d37b02cbf6d30ae11bf239a54ec9423.asciidoc
new file mode 100644
index 000000000..3c73b9c1a
--- /dev/null
+++ b/docs/doc_examples/2d37b02cbf6d30ae11bf239a54ec9423.asciidoc
@@ -0,0 +1,85 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516729294000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: "5.2",
+ start: "300",
+ end: "8675309",
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516642894000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: "5.8",
+ start: "300",
+ end: "8675309",
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516556494000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: "5.1",
+ start: "300",
+ end: "8675309",
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516470094000,
+ model_number: "QVKC92Q",
+ measures: {
+ voltage: "5.6",
+ start: "300",
+ end: "8675309",
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516383694000,
+ model_number: "HG537PU",
+ measures: {
+ voltage: "4.2",
+ start: "400",
+ end: "8625309",
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": 1516297294000,
+ model_number: "HG537PU",
+ measures: {
+ voltage: "4.0",
+ start: "400",
+ end: "8625309",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d60e3bdfee7afbddee149f40450b8b5.asciidoc b/docs/doc_examples/2d60e3bdfee7afbddee149f40450b8b5.asciidoc
new file mode 100644
index 000000000..6beaa8b94
--- /dev/null
+++ b/docs/doc_examples/2d60e3bdfee7afbddee149f40450b8b5.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ query: {
+ query_string: {
+ query: "@timestamp:foo",
+ lenient: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d8fcb03de417a71e7888bbdd948a692.asciidoc b/docs/doc_examples/2d8fcb03de417a71e7888bbdd948a692.asciidoc
new file mode 100644
index 000000000..fbb1460ce
--- /dev/null
+++ b/docs/doc_examples/2d8fcb03de417a71e7888bbdd948a692.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.transforms({
+ v: "true",
+ format: "json",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2d9b30acd6b5683f39d53494c0dd779c.asciidoc b/docs/doc_examples/2d9b30acd6b5683f39d53494c0dd779c.asciidoc
new file mode 100644
index 000000000..df4dd09ce
--- /dev/null
+++ b/docs/doc_examples/2d9b30acd6b5683f39d53494c0dd779c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.health();
+console.log(response);
+
+const response1 = await client.cat.recovery();
+console.log(response1);
+----
diff --git a/docs/doc_examples/2dad2b0c8ba503228f4b11cecca0b348.asciidoc b/docs/doc_examples/2dad2b0c8ba503228f4b11cecca0b348.asciidoc
new file mode 100644
index 000000000..48f3e7445
--- /dev/null
+++ b/docs/doc_examples/2dad2b0c8ba503228f4b11cecca0b348.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putDataLifecycle({
+ name: "dsl-data-stream",
+ data_retention: "7d",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc b/docs/doc_examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc
new file mode 100644
index 000000000..fdb1ef5bf
--- /dev/null
+++ b/docs/doc_examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ intervals: {
+ my_text: {
+ match: {
+ query: "hot porridge",
+ filter: {
+ script: {
+ source:
+ "interval.start > 10 && interval.end < 20 && interval.gaps == 0",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e09666d3ad5ad9afc22763ee6e97a2b.asciidoc b/docs/doc_examples/2e09666d3ad5ad9afc22763ee6e97a2b.asciidoc
new file mode 100644
index 000000000..eb4f6acad
--- /dev/null
+++ b/docs/doc_examples/2e09666d3ad5ad9afc22763ee6e97a2b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "hourly-snapshots",
+ schedule: "1h",
+ name: "",
+ repository: "my_repository",
+ config: {
+ indices: ["data-*", "important"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e364833626c9790c042c8f006fcc999.asciidoc b/docs/doc_examples/2e364833626c9790c042c8f006fcc999.asciidoc
new file mode 100644
index 000000000..b791428b4
--- /dev/null
+++ b/docs/doc_examples/2e364833626c9790c042c8f006fcc999.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "multiplexer_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["my_multiplexer"],
+ },
+ },
+ filter: {
+ my_multiplexer: {
+ type: "multiplexer",
+ filters: ["lowercase", "lowercase, porter_stem"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e36fe22051a47e052e349854d9948b9.asciidoc b/docs/doc_examples/2e36fe22051a47e052e349854d9948b9.asciidoc
new file mode 100644
index 000000000..e29c93a48
--- /dev/null
+++ b/docs/doc_examples/2e36fe22051a47e052e349854d9948b9.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.explain({
+ index: "my-index-000001",
+ id: 0,
+ q: "message:search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc b/docs/doc_examples/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc
new file mode 100644
index 000000000..b4e87a4e8
--- /dev/null
+++ b/docs/doc_examples/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc
@@ -0,0 +1,154 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ template: {
+ settings: {
+ index: {
+ mode: "time_series",
+ routing_path: [
+ "kubernetes.namespace",
+ "kubernetes.host",
+ "kubernetes.node",
+ "kubernetes.pod",
+ ],
+ number_of_replicas: 0,
+ number_of_shards: 2,
+ },
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ kubernetes: {
+ properties: {
+ container: {
+ properties: {
+ cpu: {
+ properties: {
+ usage: {
+ properties: {
+ core: {
+ properties: {
+ ns: {
+ type: "long",
+ },
+ },
+ },
+ limit: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ nanocores: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ node: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ memory: {
+ properties: {
+ available: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ majorpagefaults: {
+ type: "long",
+ },
+ pagefaults: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ rss: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ usage: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ limit: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ node: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ },
+ },
+ workingset: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ },
+ },
+ name: {
+ type: "keyword",
+ },
+ start_time: {
+ type: "date",
+ },
+ },
+ },
+ host: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ namespace: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ node: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ pod: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc b/docs/doc_examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc
new file mode 100644
index 000000000..e19fb83da
--- /dev/null
+++ b/docs/doc_examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ retriever: {
+ rule: {
+ match_criteria: {
+ query_string: "puggles",
+ user_country: "us",
+ },
+ ruleset_ids: ["my-ruleset"],
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "pugs",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "puggles",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e796e5ca59768d4426abbf9a049db3e.asciidoc b/docs/doc_examples/2e796e5ca59768d4426abbf9a049db3e.asciidoc
new file mode 100644
index 000000000..ab5a2cc20
--- /dev/null
+++ b/docs/doc_examples/2e796e5ca59768d4426abbf9a049db3e.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.split({
+ index: "my_source_index",
+ target: "my_target_index",
+ settings: {
+ "index.number_of_shards": 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e7f4b9be999422a12abb680572b13c8.asciidoc b/docs/doc_examples/2e7f4b9be999422a12abb680572b13c8.asciidoc
new file mode 100644
index 000000000..c7cafa2e2
--- /dev/null
+++ b/docs/doc_examples/2e7f4b9be999422a12abb680572b13c8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.getLifecycle({
+ name: "my_policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e847378ba26aa64d40186b6e3e6a1da.asciidoc b/docs/doc_examples/2e847378ba26aa64d40186b6e3e6a1da.asciidoc
new file mode 100644
index 000000000..4109e8fef
--- /dev/null
+++ b/docs/doc_examples/2e847378ba26aa64d40186b6e3e6a1da.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_index",
+ query: {
+ script_score: {
+ query: {
+ match_all: {},
+ },
+ script: {
+ source:
+ "field('my_counter').asBigInteger(BigInteger.ZERO).floatValue()",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc b/docs/doc_examples/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc
new file mode 100644
index 000000000..b75698f7e
--- /dev/null
+++ b/docs/doc_examples/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ mappings: {
+ properties: {
+ message: {
+ type: "text",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc b/docs/doc_examples/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc
new file mode 100644
index 000000000..6689c3417
--- /dev/null
+++ b/docs/doc_examples/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "linestring",
+ coordinates: [
+ [-377.03653, 389.897676],
+ [-377.009051, 389.889939],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ec8d757188349a4630e120ba2c98c3b.asciidoc b/docs/doc_examples/2ec8d757188349a4630e120ba2c98c3b.asciidoc
new file mode 100644
index 000000000..a11d42c1f
--- /dev/null
+++ b/docs/doc_examples/2ec8d757188349a4630e120ba2c98c3b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "pattern_replace",
+ pattern: "(dog)",
+ replacement: "watch$1",
+ },
+ ],
+ text: "foxes jump lazy dogs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc b/docs/doc_examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc
new file mode 100644
index 000000000..26c954c49
--- /dev/null
+++ b/docs/doc_examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "my-index-2099.05.06-000001",
+ alias: "my-alias",
+ routing: "1",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ee239df3243c98418f7d9a5c7be4cfd.asciidoc b/docs/doc_examples/2ee239df3243c98418f7d9a5c7be4cfd.asciidoc
new file mode 100644
index 000000000..1ac2d8ecb
--- /dev/null
+++ b/docs/doc_examples/2ee239df3243c98418f7d9a5c7be4cfd.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_index_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["my_custom_word_delimiter_graph_filter", "flatten_graph"],
+ },
+ },
+ filter: {
+ my_custom_word_delimiter_graph_filter: {
+ type: "word_delimiter_graph",
+ catenate_all: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2eebaeb3983a04ef7a9201c1f4d40dc1.asciidoc b/docs/doc_examples/2eebaeb3983a04ef7a9201c1f4d40dc1.asciidoc
new file mode 100644
index 000000000..380d5aa17
--- /dev/null
+++ b/docs/doc_examples/2eebaeb3983a04ef7a9201c1f4d40dc1.asciidoc
@@ -0,0 +1,68 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:30:17-05:00",
+ message:
+ '40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:30:53-05:00",
+ message:
+ '232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:12-05:00",
+ message:
+ '26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:19-05:00",
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:22-05:00",
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:27-05:00",
+ message:
+ '252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:28-05:00",
+ message: "not a valid apache log",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc b/docs/doc_examples/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc
new file mode 100644
index 000000000..d2f122662
--- /dev/null
+++ b/docs/doc_examples/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ "index.indexing.slowlog.include.user": true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f0b2181c434a879a23b4643bdd92575.asciidoc b/docs/doc_examples/2f0b2181c434a879a23b4643bdd92575.asciidoc
new file mode 100644
index 000000000..a3d808bf4
--- /dev/null
+++ b/docs/doc_examples/2f0b2181c434a879a23b4643bdd92575.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+
+const response1 = await client.indices.getSettings({
+ index: "_all",
+});
+console.log(response1);
+
+const response2 = await client.indices.getSettings({
+ index: "log_2099_*",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/2f195eeb93229e40c4d8f1a6ab4a358c.asciidoc b/docs/doc_examples/2f195eeb93229e40c4d8f1a6ab4a358c.asciidoc
new file mode 100644
index 000000000..dbc53e814
--- /dev/null
+++ b/docs/doc_examples/2f195eeb93229e40c4d8f1a6ab4a358c.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ fingerprint: {
+ fields: ["user"],
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ user: {
+ last_name: "Smith",
+ first_name: "John",
+ date_of_birth: "1980-01-15",
+ is_active: true,
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f2580ea420e1836d922fe48fa8ada97.asciidoc b/docs/doc_examples/2f2580ea420e1836d922fe48fa8ada97.asciidoc
new file mode 100644
index 000000000..3fa52a230
--- /dev/null
+++ b/docs/doc_examples/2f2580ea420e1836d922fe48fa8ada97.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.deleteAutoFollowPattern({
+ name: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc b/docs/doc_examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc
new file mode 100644
index 000000000..c37e742e2
--- /dev/null
+++ b/docs/doc_examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc b/docs/doc_examples/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc
new file mode 100644
index 000000000..f5fb24488
--- /dev/null
+++ b/docs/doc_examples/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "bug_reports",
+ query: {
+ term: {
+ "labels.release": "v1.3.0",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f4e28c81db47547ad39d0926babab12.asciidoc b/docs/doc_examples/2f4e28c81db47547ad39d0926babab12.asciidoc
new file mode 100644
index 000000000..6313ca3ea
--- /dev/null
+++ b/docs/doc_examples/2f4e28c81db47547ad39d0926babab12.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "estonian_example",
+ settings: {
+ analysis: {
+ filter: {
+ estonian_stop: {
+ type: "stop",
+ stopwords: "_estonian_",
+ },
+ estonian_keywords: {
+ type: "keyword_marker",
+ keywords: ["näide"],
+ },
+ estonian_stemmer: {
+ type: "stemmer",
+ language: "estonian",
+ },
+ },
+ analyzer: {
+ rebuilt_estonian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "estonian_stop",
+ "estonian_keywords",
+ "estonian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f9574fee2ebecd6f7d917ee99b26bcc.asciidoc b/docs/doc_examples/2f9574fee2ebecd6f7d917ee99b26bcc.asciidoc
new file mode 100644
index 000000000..e2201ac00
--- /dev/null
+++ b/docs/doc_examples/2f9574fee2ebecd6f7d917ee99b26bcc.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ status_code: {
+ type: "keyword",
+ },
+ session_id: {
+ type: "keyword",
+ doc_values: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc b/docs/doc_examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc
new file mode 100644
index 000000000..79d2f713b
--- /dev/null
+++ b/docs/doc_examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2fa45d74ba9933188c4728f8a9e5372c.asciidoc b/docs/doc_examples/2fa45d74ba9933188c4728f8a9e5372c.asciidoc
new file mode 100644
index 000000000..c9f316a8c
--- /dev/null
+++ b/docs/doc_examples/2fa45d74ba9933188c4728f8a9e5372c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "action.auto_create_index": "my-index-000001,index10,-index1*,+ind*",
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putSettings({
+ persistent: {
+ "action.auto_create_index": "false",
+ },
+});
+console.log(response1);
+
+const response2 = await client.cluster.putSettings({
+ persistent: {
+ "action.auto_create_index": "true",
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/2fa7ded8515b32f26c54394ea598f573.asciidoc b/docs/doc_examples/2fa7ded8515b32f26c54394ea598f573.asciidoc
new file mode 100644
index 000000000..de58c2dc4
--- /dev/null
+++ b/docs/doc_examples/2fa7ded8515b32f26c54394ea598f573.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["te*", "bar*"],
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ mappings: {
+ _source: {
+ enabled: true,
+ },
+ properties: {
+ host_name: {
+ type: "keyword",
+ },
+ created_at: {
+ type: "date",
+ format: "EEE MMM dd HH:mm:ss Z yyyy",
+ },
+ },
+ },
+ aliases: {
+ mydata: {},
+ },
+ },
+ priority: 500,
+ composed_of: ["component_template1", "runtime_component_template"],
+ version: 3,
+ _meta: {
+ description: "my custom",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2fc2c790a85be29bbcba50bdde1493f4.asciidoc b/docs/doc_examples/2fc2c790a85be29bbcba50bdde1493f4.asciidoc
new file mode 100644
index 000000000..e46f4517b
--- /dev/null
+++ b/docs/doc_examples/2fc2c790a85be29bbcba50bdde1493f4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2fc80a2ad1ca8b2dcb13ed1895b8e861.asciidoc b/docs/doc_examples/2fc80a2ad1ca8b2dcb13ed1895b8e861.asciidoc
new file mode 100644
index 000000000..9235b4fab
--- /dev/null
+++ b/docs/doc_examples/2fc80a2ad1ca8b2dcb13ed1895b8e861.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ transient: {
+ "indices.recovery.*": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2fd0b3c132b46aa34cc9d92dd2d4bc85.asciidoc b/docs/doc_examples/2fd0b3c132b46aa34cc9d92dd2d4bc85.asciidoc
new file mode 100644
index 000000000..b952b6ef8
--- /dev/null
+++ b/docs/doc_examples/2fd0b3c132b46aa34cc9d92dd2d4bc85.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "common_grams",
+ common_words: ["is", "the"],
+ },
+ ],
+ text: "the quick fox is brown",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc b/docs/doc_examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc
new file mode 100644
index 000000000..b0e232648
--- /dev/null
+++ b/docs/doc_examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ dynamic: false,
+ properties: {
+ text: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ refresh: "true",
+ document: {
+ text: "words words",
+ flag: "bar",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "test",
+ refresh: "true",
+ document: {
+ text: "words words",
+ flag: "foo",
+ },
+});
+console.log(response2);
+
+const response3 = await client.indices.putMapping({
+ index: "test",
+ properties: {
+ text: {
+ type: "text",
+ },
+ flag: {
+ type: "text",
+ analyzer: "keyword",
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/2fea3e324939cc7e9c396964aeee7111.asciidoc b/docs/doc_examples/2fea3e324939cc7e9c396964aeee7111.asciidoc
new file mode 100644
index 000000000..f92d041ea
--- /dev/null
+++ b/docs/doc_examples/2fea3e324939cc7e9c396964aeee7111.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ query: "to be or not to be",
+ operator: "and",
+ zero_terms_query: "all",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2fee452baff92b409cbfc8d71eb5fc0e.asciidoc b/docs/doc_examples/2fee452baff92b409cbfc8d71eb5fc0e.asciidoc
new file mode 100644
index 000000000..83ce4807d
--- /dev/null
+++ b/docs/doc_examples/2fee452baff92b409cbfc8d71eb5fc0e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/2ffa953b29ed0156c9e610daf66b8e48.asciidoc b/docs/doc_examples/2ffa953b29ed0156c9e610daf66b8e48.asciidoc
new file mode 100644
index 000000000..2f048f0a9
--- /dev/null
+++ b/docs/doc_examples/2ffa953b29ed0156c9e610daf66b8e48.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.explainLifecycle({
+ index: "timeseries-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/300576666769b78fa6fa26b232837f81.asciidoc b/docs/doc_examples/300576666769b78fa6fa26b232837f81.asciidoc
new file mode 100644
index 000000000..1cd460618
--- /dev/null
+++ b/docs/doc_examples/300576666769b78fa6fa26b232837f81.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.getAutoscalingCapacity();
+console.log(response);
+----
diff --git a/docs/doc_examples/305c4cfb2ad4b58b4c319ffbf32336cc.asciidoc b/docs/doc_examples/305c4cfb2ad4b58b4c319ffbf32336cc.asciidoc
new file mode 100644
index 000000000..ab2ae2bdc
--- /dev/null
+++ b/docs/doc_examples/305c4cfb2ad4b58b4c319ffbf32336cc.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ script_fields: {
+ my_doubled_field: {
+ script: {
+ lang: "painless",
+ source: "doc['my_field'].value * params.get('multiplier');",
+ params: {
+ multiplier: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3082ae0c3ecdc61808103214631b40c6.asciidoc b/docs/doc_examples/3082ae0c3ecdc61808103214631b40c6.asciidoc
new file mode 100644
index 000000000..22c1eb540
--- /dev/null
+++ b/docs/doc_examples/3082ae0c3ecdc61808103214631b40c6.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ avg_monthly_sales: {
+ avg_bucket: {
+ buckets_path: "sales_per_month>sales",
+ gap_policy: "skip",
+ format: "#,##0.00;(#,##0.00)",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/309f0721145b5c656338a02459c3ff1e.asciidoc b/docs/doc_examples/309f0721145b5c656338a02459c3ff1e.asciidoc
new file mode 100644
index 000000000..1c5d0dca3
--- /dev/null
+++ b/docs/doc_examples/309f0721145b5c656338a02459c3ff1e.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ query: {
+ rank_feature: {
+ field: "pagerank",
+ saturation: {
+ pivot: 8,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/30abc76a39e551f4b52c65002bb6405d.asciidoc b/docs/doc_examples/30abc76a39e551f4b52c65002bb6405d.asciidoc
new file mode 100644
index 000000000..0b8fe7b56
--- /dev/null
+++ b/docs/doc_examples/30abc76a39e551f4b52c65002bb6405d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ username: "myuser",
+ realm_name: "native1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/30bd3c0785f3df4795684754adeb5ecb.asciidoc b/docs/doc_examples/30bd3c0785f3df4795684754adeb5ecb.asciidoc
new file mode 100644
index 000000000..96086e079
--- /dev/null
+++ b/docs/doc_examples/30bd3c0785f3df4795684754adeb5ecb.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ match: {
+ message: "{{query_string}}",
+ },
+ },
+ from: "{{from}}",
+ size: "{{size}}",
+ },
+ params: {
+ query_string: "hello world",
+ from: 20,
+ size: 10,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc b/docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc
new file mode 100644
index 000000000..0ea31b07a
--- /dev/null
+++ b/docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "my-elastic-rerank",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ model_id: ".rerank-v1",
+ num_threads: 1,
+ adaptive_allocations: {
+ enabled: true,
+ min_number_of_allocations: 1,
+ max_number_of_allocations: 4,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/30db2702dd0071c72a090b8311d0db09.asciidoc b/docs/doc_examples/30db2702dd0071c72a090b8311d0db09.asciidoc
new file mode 100644
index 000000000..153beae37
--- /dev/null
+++ b/docs/doc_examples/30db2702dd0071c72a090b8311d0db09.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ query: {
+ match: {
+ body: "elections",
+ },
+ },
+ aggs: {
+ top_sites: {
+ terms: {
+ field: "domain",
+ order: {
+ top_hit: "desc",
+ },
+ },
+ aggs: {
+ top_tags_hits: {
+ top_hits: {},
+ },
+ top_hit: {
+ max: {
+ script: {
+ source: "_score",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc b/docs/doc_examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc
new file mode 100644
index 000000000..12da5e39e
--- /dev/null
+++ b/docs/doc_examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+});
+console.log(response);
+
+const response1 = await client.indices.create({
+ index: "my-index-000002",
+});
+console.log(response1);
+
+const response2 = await client.indices.putMapping({
+ index: "my-index-000001,my-index-000002",
+ properties: {
+ user: {
+ properties: {
+ name: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc b/docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc
new file mode 100644
index 000000000..04f772fe1
--- /dev/null
+++ b/docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "bad_example_index",
+ mappings: {
+ properties: {
+ field_1: {
+ type: "text",
+ copy_to: "field_2",
+ },
+ field_2: {
+ type: "text",
+ copy_to: "field_3",
+ },
+ field_3: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/310bdfb0d0d75bac7bff036a3fe51d4d.asciidoc b/docs/doc_examples/310bdfb0d0d75bac7bff036a3fe51d4d.asciidoc
new file mode 100644
index 000000000..34cfe5d2f
--- /dev/null
+++ b/docs/doc_examples/310bdfb0d0d75bac7bff036a3fe51d4d.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "azure_ai_studio_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "azure_ai_studio_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3166455372f2d96622caff076e91ebe7.asciidoc b/docs/doc_examples/3166455372f2d96622caff076e91ebe7.asciidoc
new file mode 100644
index 000000000..01c9127eb
--- /dev/null
+++ b/docs/doc_examples/3166455372f2d96622caff076e91ebe7.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ percolate: {
+ field: "query",
+ index: "my-index-000001",
+ id: "2",
+ version: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/316cd43feb3b86396483903af1a048b1.asciidoc b/docs/doc_examples/316cd43feb3b86396483903af1a048b1.asciidoc
new file mode 100644
index 000000000..524e00979
--- /dev/null
+++ b/docs/doc_examples/316cd43feb3b86396483903af1a048b1.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sale_date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "year",
+ missing: "2000/01/01",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3182f26c61fbe5cf89400804533d5ed2.asciidoc b/docs/doc_examples/3182f26c61fbe5cf89400804533d5ed2.asciidoc
new file mode 100644
index 000000000..321f477e4
--- /dev/null
+++ b/docs/doc_examples/3182f26c61fbe5cf89400804533d5ed2.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ id: "my-search-template",
+ params: {
+ query_string: "My string",
+ text_fields: [
+ {
+ user_name: "John",
+ },
+ {
+ user_name: "kimchy",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/318e209cc4d6f306e65cb2f5598a50b1.asciidoc b/docs/doc_examples/318e209cc4d6f306e65cb2f5598a50b1.asciidoc
new file mode 100644
index 000000000..0e2f4d81e
--- /dev/null
+++ b/docs/doc_examples/318e209cc4d6f306e65cb2f5598a50b1.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "LineString",
+ coordinates: [
+ [-77.03653, 38.897676],
+ [-77.009051, 38.889939],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/31a79a57b242713edec6795599ba0d5d.asciidoc b/docs/doc_examples/31a79a57b242713edec6795599ba0d5d.asciidoc
new file mode 100644
index 000000000..7d8fdd9e4
--- /dev/null
+++ b/docs/doc_examples/31a79a57b242713edec6795599ba0d5d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ my_tokens: {
+ type: "sparse_vector",
+ },
+ my_text_field: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/31ab4ec26176857280af630bf84a2823.asciidoc b/docs/doc_examples/31ab4ec26176857280af630bf84a2823.asciidoc
new file mode 100644
index 000000000..77c3e3ee3
--- /dev/null
+++ b/docs/doc_examples/31ab4ec26176857280af630bf84a2823.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlServiceProviderMetadata({
+ realm_name: "saml1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/31ac1b68dc7c26a1d37350be47ae9381.asciidoc b/docs/doc_examples/31ac1b68dc7c26a1d37350be47ae9381.asciidoc
new file mode 100644
index 000000000..cf057e9c6
--- /dev/null
+++ b/docs/doc_examples/31ac1b68dc7c26a1d37350be47ae9381.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "music",
+ mappings: {
+ properties: {
+ suggest: {
+ type: "completion",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/31aed390c30bd4f42a5c56253695e53f.asciidoc b/docs/doc_examples/31aed390c30bd4f42a5c56253695e53f.asciidoc
new file mode 100644
index 000000000..4d03f9146
--- /dev/null
+++ b/docs/doc_examples/31aed390c30bd4f42a5c56253695e53f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "whitespace_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ rebuilt_whitespace: {
+ tokenizer: "whitespace",
+ filter: [],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/31bc93e429ad0de11dd2dd231e8f2c5e.asciidoc b/docs/doc_examples/31bc93e429ad0de11dd2dd231e8f2c5e.asciidoc
new file mode 100644
index 000000000..36c1c5a79
--- /dev/null
+++ b/docs/doc_examples/31bc93e429ad0de11dd2dd231e8f2c5e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.unfreeze({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/31f4400716500149cccbc19aa06bff66.asciidoc b/docs/doc_examples/31f4400716500149cccbc19aa06bff66.asciidoc
new file mode 100644
index 000000000..4cd289777
--- /dev/null
+++ b/docs/doc_examples/31f4400716500149cccbc19aa06bff66.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.danglingIndices.deleteDanglingIndex({
+ index_uuid: "",
+ accept_data_loss: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/320645d771e952af2a67bb7445c3688d.asciidoc b/docs/doc_examples/320645d771e952af2a67bb7445c3688d.asciidoc
new file mode 100644
index 000000000..3dbe450ee
--- /dev/null
+++ b/docs/doc_examples/320645d771e952af2a67bb7445c3688d.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "sorani_example",
+ settings: {
+ analysis: {
+ filter: {
+ sorani_stop: {
+ type: "stop",
+ stopwords: "_sorani_",
+ },
+ sorani_keywords: {
+ type: "keyword_marker",
+ keywords: ["mînak"],
+ },
+ sorani_stemmer: {
+ type: "stemmer",
+ language: "sorani",
+ },
+ },
+ analyzer: {
+ rebuilt_sorani: {
+ tokenizer: "standard",
+ filter: [
+ "sorani_normalization",
+ "lowercase",
+ "decimal_digit",
+ "sorani_stop",
+ "sorani_keywords",
+ "sorani_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32123981430e5a8b34fe14314fc48429.asciidoc b/docs/doc_examples/32123981430e5a8b34fe14314fc48429.asciidoc
new file mode 100644
index 000000000..0e3687fe2
--- /dev/null
+++ b/docs/doc_examples/32123981430e5a8b34fe14314fc48429.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001,my-index-000002",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3218f8ccd59c8c90349816e0428e8fb8.asciidoc b/docs/doc_examples/3218f8ccd59c8c90349816e0428e8fb8.asciidoc
new file mode 100644
index 000000000..2725863d8
--- /dev/null
+++ b/docs/doc_examples/3218f8ccd59c8c90349816e0428e8fb8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache({
+ fielddata: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3250a8d2d2a9619035040e55a03620b9.asciidoc b/docs/doc_examples/3250a8d2d2a9619035040e55a03620b9.asciidoc
new file mode 100644
index 000000000..a90140c98
--- /dev/null
+++ b/docs/doc_examples/3250a8d2d2a9619035040e55a03620b9.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.http.HttpTracer": "TRACE",
+ "logger.org.elasticsearch.http.HttpBodyTracer": "TRACE",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/327466380bcd55361973b4a96c6dccb2.asciidoc b/docs/doc_examples/327466380bcd55361973b4a96c6dccb2.asciidoc
new file mode 100644
index 000000000..b8aa8a2e9
--- /dev/null
+++ b/docs/doc_examples/327466380bcd55361973b4a96c6dccb2.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "spanish_example",
+ settings: {
+ analysis: {
+ filter: {
+ spanish_stop: {
+ type: "stop",
+ stopwords: "_spanish_",
+ },
+ spanish_keywords: {
+ type: "keyword_marker",
+ keywords: ["ejemplo"],
+ },
+ spanish_stemmer: {
+ type: "stemmer",
+ language: "light_spanish",
+ },
+ },
+ analyzer: {
+ rebuilt_spanish: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "spanish_stop",
+ "spanish_keywords",
+ "spanish_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32a7acdfb7046966b28f394476c99126.asciidoc b/docs/doc_examples/32a7acdfb7046966b28f394476c99126.asciidoc
new file mode 100644
index 000000000..faffd3f29
--- /dev/null
+++ b/docs/doc_examples/32a7acdfb7046966b28f394476c99126.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "POINT (-377.03653 389.897676)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32af23a4b0fea6c81c4688ce5fe4ac35.asciidoc b/docs/doc_examples/32af23a4b0fea6c81c4688ce5fe4ac35.asciidoc
new file mode 100644
index 000000000..d304a1bdc
--- /dev/null
+++ b/docs/doc_examples/32af23a4b0fea6c81c4688ce5fe4ac35.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_ranks: {
+ percentile_ranks: {
+ field: "load_time",
+ values: [500, 600],
+ hdr: {
+ number_of_significant_value_digits: 3,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32b7963c5cabbe9cc7d15da62f5edda9.asciidoc b/docs/doc_examples/32b7963c5cabbe9cc7d15da62f5edda9.asciidoc
new file mode 100644
index 000000000..b0fd0f6e4
--- /dev/null
+++ b/docs/doc_examples/32b7963c5cabbe9cc7d15da62f5edda9.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.updateUserProfileData({
+ uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0",
+ labels: {
+ direction: "west",
+ },
+ data: {
+ app1: {
+ font: "large",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32b8a5152b47930f2e16c40c8615c7bb.asciidoc b/docs/doc_examples/32b8a5152b47930f2e16c40c8615c7bb.asciidoc
new file mode 100644
index 000000000..86a4d3e28
--- /dev/null
+++ b/docs/doc_examples/32b8a5152b47930f2e16c40c8615c7bb.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my-example-app",
+ search_application: {
+ indices: ["example-index"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n {\n "multi_match" : {\n "query": "{{query}}",\n "fields": [ "title^4", "plot", "actors", "directors" ]\n }\n },\n {\n "multi_match" : {\n "query": "{{query}}",\n "type": "phrase_prefix",\n "fields": [ "title^4", "plot"]\n }\n },\n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
+ params: {
+ query: "",
+ _es_filters: {},
+ _es_aggs: {},
+ _es_sort_fields: {},
+ size: 10,
+ from: 0,
+ },
+ dictionary: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32cd57666bc80b8cf793d06fa1086669.asciidoc b/docs/doc_examples/32cd57666bc80b8cf793d06fa1086669.asciidoc
new file mode 100644
index 000000000..91db8be03
--- /dev/null
+++ b/docs/doc_examples/32cd57666bc80b8cf793d06fa1086669.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "tsv",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32ce26b8af95f7ccc2a7bd5e77a39d6c.asciidoc b/docs/doc_examples/32ce26b8af95f7ccc2a7bd5e77a39d6c.asciidoc
new file mode 100644
index 000000000..948af1175
--- /dev/null
+++ b/docs/doc_examples/32ce26b8af95f7ccc2a7bd5e77a39d6c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.recovery({
+ index: "my-index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/32de5dd306bd014d67053d2f175defcd.asciidoc b/docs/doc_examples/32de5dd306bd014d67053d2f175defcd.asciidoc
new file mode 100644
index 000000000..0e47d6710
--- /dev/null
+++ b/docs/doc_examples/32de5dd306bd014d67053d2f175defcd.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.xpack.security.authc.saml": "debug",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/331caebf810a923644eb6de26e5a97f4.asciidoc b/docs/doc_examples/331caebf810a923644eb6de26e5a97f4.asciidoc
new file mode 100644
index 000000000..b98c10d2e
--- /dev/null
+++ b/docs/doc_examples/331caebf810a923644eb6de26e5a97f4.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_join_field: {
+ type: "join",
+ relations: {
+ question: ["answer", "comment"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3337c817ebd438254505a31e91c91724.asciidoc b/docs/doc_examples/3337c817ebd438254505a31e91c91724.asciidoc
new file mode 100644
index 000000000..cdd215727
--- /dev/null
+++ b/docs/doc_examples/3337c817ebd438254505a31e91c91724.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3341d3bbb53052447a37c92a04c14b70.asciidoc b/docs/doc_examples/3341d3bbb53052447a37c92a04c14b70.asciidoc
new file mode 100644
index 000000000..dac17132e
--- /dev/null
+++ b/docs/doc_examples/3341d3bbb53052447a37c92a04c14b70.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "my-index-000001",
+ id: 1,
+ script: "ctx._source.new_field = 'value_of_new_field'",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3343a4cf559060c422d86c786a95e535.asciidoc b/docs/doc_examples/3343a4cf559060c422d86c786a95e535.asciidoc
new file mode 100644
index 000000000..7f260292c
--- /dev/null
+++ b/docs/doc_examples/3343a4cf559060c422d86c786a95e535.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["apostrophe"],
+ text: "Istanbul'a veya Istanbul'dan",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc b/docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc
new file mode 100644
index 000000000..1e3f14f12
--- /dev/null
+++ b/docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "geoip",
+ description: "Add ip geolocation info",
+ processors: [
+ {
+ geoip: {
+ field: "ip",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "geoip",
+ document: {
+ ip: "80.231.5.0",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/33610800d9de3c3e6d6b3c611ace7330.asciidoc b/docs/doc_examples/33610800d9de3c3e6d6b3c611ace7330.asciidoc
new file mode 100644
index 000000000..9c31f8a68
--- /dev/null
+++ b/docs/doc_examples/33610800d9de3c3e6d6b3c611ace7330.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.get({
+ task_id: "oTUltX4IQMOUUVeiohTt8A:124",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/336613f48dd95ea993dd3bcce264fd0e.asciidoc b/docs/doc_examples/336613f48dd95ea993dd3bcce264fd0e.asciidoc
new file mode 100644
index 000000000..fe4d11b4c
--- /dev/null
+++ b/docs/doc_examples/336613f48dd95ea993dd3bcce264fd0e.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ cold: {
+ actions: {
+ allocate: {
+ require: {
+ box_type: "cold",
+ storage: "high",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/33732208fc6e6fe1e8d278299681932e.asciidoc b/docs/doc_examples/33732208fc6e6fe1e8d278299681932e.asciidoc
new file mode 100644
index 000000000..f864a2ef1
--- /dev/null
+++ b/docs/doc_examples/33732208fc6e6fe1e8d278299681932e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "LINESTRING (-377.03653 389.897676, -377.009051 389.889939)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc b/docs/doc_examples/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc
new file mode 100644
index 000000000..03dd504ab
--- /dev/null
+++ b/docs/doc_examples/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.deleteSynonym({
+ id: "my-synonyms-set",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/339c4e5af9f9069ad9912aa574488b59.asciidoc b/docs/doc_examples/339c4e5af9f9069ad9912aa574488b59.asciidoc
new file mode 100644
index 000000000..905e21821
--- /dev/null
+++ b/docs/doc_examples/339c4e5af9f9069ad9912aa574488b59.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-bit-vectors",
+ mappings: {
+ properties: {
+ my_dense_vector: {
+ type: "dense_vector",
+ index: false,
+ element_type: "bit",
+ dims: 40,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-bit-vectors",
+ id: 1,
+ document: {
+ my_dense_vector: [8, 5, -15, 1, -7],
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-bit-vectors",
+ id: 2,
+ document: {
+ my_dense_vector: [-1, 115, -3, 4, -128],
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my-index-bit-vectors",
+ id: 3,
+ document: {
+ my_dense_vector: [2, 18, -5, 0, -124],
+ },
+});
+console.log(response3);
+
+const response4 = await client.indices.refresh({
+ index: "my-index-bit-vectors",
+});
+console.log(response4);
+----
diff --git a/docs/doc_examples/33b732bb301e99d2161bd2246494f487.asciidoc b/docs/doc_examples/33b732bb301e99d2161bd2246494f487.asciidoc
new file mode 100644
index 000000000..6a2a72cc9
--- /dev/null
+++ b/docs/doc_examples/33b732bb301e99d2161bd2246494f487.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "postal_lookup",
+ processors: [
+ {
+ enrich: {
+ description: "Add 'geo_data' based on 'geo_location'",
+ policy_name: "postal_policy",
+ field: "geo_location",
+ target_field: "geo_data",
+ shape_relation: "INTERSECTS",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/33d480fc6812ada75756cf5337bc9092.asciidoc b/docs/doc_examples/33d480fc6812ada75756cf5337bc9092.asciidoc
new file mode 100644
index 000000000..88753c964
--- /dev/null
+++ b/docs/doc_examples/33d480fc6812ada75756cf5337bc9092.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job",
+ querystring: {
+ from: "0",
+ size: "2",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/33f148e3d8676de6cc52f58749898a13.asciidoc b/docs/doc_examples/33f148e3d8676de6cc52f58749898a13.asciidoc
new file mode 100644
index 000000000..75a1ad5bb
--- /dev/null
+++ b/docs/doc_examples/33f148e3d8676de6cc52f58749898a13.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ dis_max: {
+ queries: [
+ {
+ match_phrase_prefix: {
+ subject: "quick brown f",
+ },
+ },
+ {
+ match_phrase_prefix: {
+ message: "quick brown f",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/342ddf9121aeddd82fea2464665e25da.asciidoc b/docs/doc_examples/342ddf9121aeddd82fea2464665e25da.asciidoc
new file mode 100644
index 000000000..0b2b04c09
--- /dev/null
+++ b/docs/doc_examples/342ddf9121aeddd82fea2464665e25da.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.put({
+ connector_id: "my-connector",
+ index_name: "search-google-drive",
+ name: "My Connector",
+ service_type: "google_drive",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/343dd09a8c76987e586858be3bdc51eb.asciidoc b/docs/doc_examples/343dd09a8c76987e586858be3bdc51eb.asciidoc
new file mode 100644
index 000000000..816461ead
--- /dev/null
+++ b/docs/doc_examples/343dd09a8c76987e586858be3bdc51eb.asciidoc
@@ -0,0 +1,50 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_queries2",
+ settings: {
+ analysis: {
+ analyzer: {
+ wildcard_suffix: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "reverse", "wildcard_edge_ngram"],
+ },
+ wildcard_suffix_search_time: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "reverse"],
+ },
+ },
+ filter: {
+ wildcard_edge_ngram: {
+ type: "edge_ngram",
+ min_gram: 1,
+ max_gram: 32,
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ query: {
+ type: "percolator",
+ },
+ my_field: {
+ type: "text",
+ fields: {
+ suffix: {
+ type: "text",
+ analyzer: "wildcard_suffix",
+ search_analyzer: "wildcard_suffix_search_time",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/344b4144244d57f87c6aa4652b100b25.asciidoc b/docs/doc_examples/344b4144244d57f87c6aa4652b100b25.asciidoc
new file mode 100644
index 000000000..04b448afc
--- /dev/null
+++ b/docs/doc_examples/344b4144244d57f87c6aa4652b100b25.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ color: "blue",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/346f28d82acb5427c304aa574fea0008.asciidoc b/docs/doc_examples/346f28d82acb5427c304aa574fea0008.asciidoc
new file mode 100644
index 000000000..84f239166
--- /dev/null
+++ b/docs/doc_examples/346f28d82acb5427c304aa574fea0008.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "thai_example",
+ settings: {
+ analysis: {
+ filter: {
+ thai_stop: {
+ type: "stop",
+ stopwords: "_thai_",
+ },
+ },
+ analyzer: {
+ rebuilt_thai: {
+ tokenizer: "thai",
+ filter: ["lowercase", "decimal_digit", "thai_stop"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3477a89d869b1f7f72d50c2ca86c4679.asciidoc b/docs/doc_examples/3477a89d869b1f7f72d50c2ca86c4679.asciidoc
new file mode 100644
index 000000000..acb89c3e8
--- /dev/null
+++ b/docs/doc_examples/3477a89d869b1f7f72d50c2ca86c4679.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.activateWatch({
+ watch_id: "my_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3487e60e1ae9d4925ce540cd63574385.asciidoc b/docs/doc_examples/3487e60e1ae9d4925ce540cd63574385.asciidoc
new file mode 100644
index 000000000..0e0e4838b
--- /dev/null
+++ b/docs/doc_examples/3487e60e1ae9d4925ce540cd63574385.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ boosting: {
+ positive: {
+ term: {
+ text: "apple",
+ },
+ },
+ negative: {
+ term: {
+ text: "pie tart fruit crumble tree",
+ },
+ },
+ negative_boost: 0.5,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/34be27141e3a476c138546190101c8bc.asciidoc b/docs/doc_examples/34be27141e3a476c138546190101c8bc.asciidoc
new file mode 100644
index 000000000..62b8de4d2
--- /dev/null
+++ b/docs/doc_examples/34be27141e3a476c138546190101c8bc.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchMvt({
+ index: "my-index",
+ field: "my-geo-field",
+ zoom: 15,
+ x: 5271,
+ y: 12710,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc b/docs/doc_examples/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc
new file mode 100644
index 000000000..9537a8386
--- /dev/null
+++ b/docs/doc_examples/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ "index.search.slowlog.include.user": true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/34d51c54b62e9a160c0ddacc10134bb0.asciidoc b/docs/doc_examples/34d51c54b62e9a160c0ddacc10134bb0.asciidoc
new file mode 100644
index 000000000..a0aef5244
--- /dev/null
+++ b/docs/doc_examples/34d51c54b62e9a160c0ddacc10134bb0.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_first: {
+ match: {
+ span_term: {
+ "user.id": "kimchy",
+ },
+ },
+ end: 3,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/34d63740b58209a3d031212909743925.asciidoc b/docs/doc_examples/34d63740b58209a3d031212909743925.asciidoc
new file mode 100644
index 000000000..134309249
--- /dev/null
+++ b/docs/doc_examples/34d63740b58209a3d031212909743925.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "openai-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "openai_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35260b615d0b5628c95d7cc814c39bd3.asciidoc b/docs/doc_examples/35260b615d0b5628c95d7cc814c39bd3.asciidoc
new file mode 100644
index 000000000..da118f577
--- /dev/null
+++ b/docs/doc_examples/35260b615d0b5628c95d7cc814c39bd3.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ has_child: {
+ type: "child",
+ query: {
+ function_score: {
+ script_score: {
+ script: "_score * doc['click_count'].value",
+ },
+ },
+ },
+ score_mode: "max",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/353020cb30a885ee7f5ce2b141ba574a.asciidoc b/docs/doc_examples/353020cb30a885ee7f5ce2b141ba574a.asciidoc
new file mode 100644
index 000000000..73a931778
--- /dev/null
+++ b/docs/doc_examples/353020cb30a885ee7f5ce2b141ba574a.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ prefix: {
+ user: "ki",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc b/docs/doc_examples/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc
new file mode 100644
index 000000000..d5f33f225
--- /dev/null
+++ b/docs/doc_examples/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.healthReport({
+ verbose: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3544f17cb97b613a2f733707c676f759.asciidoc b/docs/doc_examples/3544f17cb97b613a2f733707c676f759.asciidoc
new file mode 100644
index 000000000..0d38c0dcc
--- /dev/null
+++ b/docs/doc_examples/3544f17cb97b613a2f733707c676f759.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ f: {
+ filters: {
+ filters: {
+ hats: {
+ term: {
+ type: "hat",
+ },
+ },
+ t_shirts: {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3545261682af72f4bee57f2bac0a9590.asciidoc b/docs/doc_examples/3545261682af72f4bee57f2bac0a9590.asciidoc
new file mode 100644
index 000000000..0cfae998e
--- /dev/null
+++ b/docs/doc_examples/3545261682af72f4bee57f2bac0a9590.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shardStores({
+ status: "green",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35563ef92dddef9d83906d9c43c60d0f.asciidoc b/docs/doc_examples/35563ef92dddef9d83906d9c43c60d0f.asciidoc
new file mode 100644
index 000000000..9bb6c2042
--- /dev/null
+++ b/docs/doc_examples/35563ef92dddef9d83906d9c43c60d0f.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mtermvectors({
+ docs: [
+ {
+ _index: "my-index-000001",
+ _id: "2",
+ term_statistics: true,
+ },
+ {
+ _index: "my-index-000001",
+ _id: "1",
+ fields: ["message"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc b/docs/doc_examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc
new file mode 100644
index 000000000..8f37b6bd1
--- /dev/null
+++ b/docs/doc_examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: ["my-index-000001", "my-index-000002"],
+ },
+ dest: {
+ index: "my-new-index-000002",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/357edc9d10e98ed776401c7a439a1a55.asciidoc b/docs/doc_examples/357edc9d10e98ed776401c7a439a1a55.asciidoc
new file mode 100644
index 000000000..088bda3bc
--- /dev/null
+++ b/docs/doc_examples/357edc9d10e98ed776401c7a439a1a55.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.resolveCluster({
+ name: "not-present,clust*:my-index*,oldcluster:*",
+ ignore_unavailable: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35a272df8c919a12d7c3106a18245748.asciidoc b/docs/doc_examples/35a272df8c919a12d7c3106a18245748.asciidoc
new file mode 100644
index 000000000..40e01fb68
--- /dev/null
+++ b/docs/doc_examples/35a272df8c919a12d7c3106a18245748.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "lang_ident_model_1",
+ docs: [
+ {
+ text: "The fool doth think he is wise, but the wise man knows himself to be a fool.",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35be136ba9df7474a5521631e2a385b1.asciidoc b/docs/doc_examples/35be136ba9df7474a5521631e2a385b1.asciidoc
new file mode 100644
index 000000000..ddd6e37f7
--- /dev/null
+++ b/docs/doc_examples/35be136ba9df7474a5521631e2a385b1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.explainDataLifecycle({
+ index: ".ds-metrics-2023.03.22-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35c33ef48cf8a4ee368874141622f9d5.asciidoc b/docs/doc_examples/35c33ef48cf8a4ee368874141622f9d5.asciidoc
new file mode 100644
index 000000000..efd76c619
--- /dev/null
+++ b/docs/doc_examples/35c33ef48cf8a4ee368874141622f9d5.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ strings_as_text: {
+ match_mapping_type: "string",
+ mapping: {
+ type: "text",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35c664285f2e8b7d5d50ca37ae3ba794.asciidoc b/docs/doc_examples/35c664285f2e8b7d5d50ca37ae3ba794.asciidoc
new file mode 100644
index 000000000..dc4c0d608
--- /dev/null
+++ b/docs/doc_examples/35c664285f2e8b7d5d50ca37ae3ba794.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "GET /search",
+ },
+ },
+ collapse: {
+ field: "user.id",
+ },
+ sort: ["user.id"],
+ search_after: ["dd5ce1ad"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35eef1765e9a5991d77592a0c7490fe0.asciidoc b/docs/doc_examples/35eef1765e9a5991d77592a0c7490fe0.asciidoc
new file mode 100644
index 000000000..2fe9e17b4
--- /dev/null
+++ b/docs/doc_examples/35eef1765e9a5991d77592a0c7490fe0.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ aggs: {
+ grade_min: {
+ min: {
+ field: "grade",
+ missing: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35f892b475a1770f18328158be7039fd.asciidoc b/docs/doc_examples/35f892b475a1770f18328158be7039fd.asciidoc
new file mode 100644
index 000000000..49bcef2d6
--- /dev/null
+++ b/docs/doc_examples/35f892b475a1770f18328158be7039fd.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-2",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 3,
+ similarity: "dot_product",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/35fc63cbefce7bc131ad467b5ba209ef.asciidoc b/docs/doc_examples/35fc63cbefce7bc131ad467b5ba209ef.asciidoc
new file mode 100644
index 000000000..037812101
--- /dev/null
+++ b/docs/doc_examples/35fc63cbefce7bc131ad467b5ba209ef.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.allocation({
+ v: "true",
+ s: "disk.avail",
+ h: "node,disk.percent,disk.avail,disk.total,disk.used,disk.indices,shards",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3608e4fcd17dd8d5f88ec9a3db2f5d89.asciidoc b/docs/doc_examples/3608e4fcd17dd8d5f88ec9a3db2f5d89.asciidoc
new file mode 100644
index 000000000..1e2416525
--- /dev/null
+++ b/docs/doc_examples/3608e4fcd17dd8d5f88ec9a3db2f5d89.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.putSynonym({
+ id: "my-synonyms-set",
+ synonyms_set: [
+ {
+ synonyms: "hello => hi => howdy",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/360b3cef34bbddc5d9579ca95f0cb061.asciidoc b/docs/doc_examples/360b3cef34bbddc5d9579ca95f0cb061.asciidoc
new file mode 100644
index 000000000..271b3580b
--- /dev/null
+++ b/docs/doc_examples/360b3cef34bbddc5d9579ca95f0cb061.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-data-stream",
+ write_index_only: "true",
+ properties: {
+ message: {
+ type: "text",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/360c4f373e72ba861584ee85bd218124.asciidoc b/docs/doc_examples/360c4f373e72ba861584ee85bd218124.asciidoc
new file mode 100644
index 000000000..0c46ff5ce
--- /dev/null
+++ b/docs/doc_examples/360c4f373e72ba861584ee85bd218124.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test_index",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["lowercase", "porter_stem"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ query: {
+ type: "percolator",
+ },
+ body: {
+ type: "text",
+ analyzer: "my_analyzer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3613f402ee63f0efb6b8d9c6a919b410.asciidoc b/docs/doc_examples/3613f402ee63f0efb6b8d9c6a919b410.asciidoc
new file mode 100644
index 000000000..6b6a75b25
--- /dev/null
+++ b/docs/doc_examples/3613f402ee63f0efb6b8d9c6a919b410.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ format: "txt",
+ query:
+ "\n FROM library\n | KEEP author, name, page_count, release_date\n | SORT page_count DESC\n | LIMIT 5\n ",
+ filter: {
+ range: {
+ page_count: {
+ gte: 100,
+ lte: 200,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/362dfccdb6f7933b22c909542e0b4e0a.asciidoc b/docs/doc_examples/362dfccdb6f7933b22c909542e0b4e0a.asciidoc
new file mode 100644
index 000000000..0b499febe
--- /dev/null
+++ b/docs/doc_examples/362dfccdb6f7933b22c909542e0b4e0a.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-data-stream",
+ query: {
+ match: {
+ "user.id": "l7gk7f82",
+ },
+ },
+ script: {
+ source: "ctx._source.user.id = params.new_id",
+ params: {
+ new_id: "XgdX0NoX",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/365256ebdfa47b449780771d9beba8d9.asciidoc b/docs/doc_examples/365256ebdfa47b449780771d9beba8d9.asciidoc
new file mode 100644
index 000000000..d2e864a8d
--- /dev/null
+++ b/docs/doc_examples/365256ebdfa47b449780771d9beba8d9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/_sync_job/my-connector-sync-job/_check_in",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36962727b806315b221e8a63e05caddc.asciidoc b/docs/doc_examples/36962727b806315b221e8a63e05caddc.asciidoc
new file mode 100644
index 000000000..f50a6c52c
--- /dev/null
+++ b/docs/doc_examples/36962727b806315b221e8a63e05caddc.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ "employee-id": {
+ type: "keyword",
+ index: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36ac0ef9ea63efc431580f7ade8ad53c.asciidoc b/docs/doc_examples/36ac0ef9ea63efc431580f7ade8ad53c.asciidoc
new file mode 100644
index 000000000..eead102c5
--- /dev/null
+++ b/docs/doc_examples/36ac0ef9ea63efc431580f7ade8ad53c.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "openai-embeddings",
+ pipeline: "openai_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36b26905c5f96d0b785c3267fb63838d.asciidoc b/docs/doc_examples/36b26905c5f96d0b785c3267fb63838d.asciidoc
new file mode 100644
index 000000000..8cea96414
--- /dev/null
+++ b/docs/doc_examples/36b26905c5f96d0b785c3267fb63838d.asciidoc
@@ -0,0 +1,609 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ ip: {
+ type: "ip",
+ },
+ version: {
+ type: "version",
+ },
+ missing_keyword: {
+ type: "keyword",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ type_test: {
+ type: "keyword",
+ },
+ "@timestamp_pretty": {
+ type: "date",
+ format: "dd-MM-yyyy",
+ },
+ event_type: {
+ type: "keyword",
+ },
+ event: {
+ properties: {
+ category: {
+ type: "alias",
+ path: "event_type",
+ },
+ },
+ },
+ host: {
+ type: "keyword",
+ },
+ os: {
+ type: "keyword",
+ },
+ bool: {
+ type: "boolean",
+ },
+ uptime: {
+ type: "long",
+ },
+ port: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.create({
+ index: "my-index-000002",
+ mappings: {
+ properties: {
+ ip: {
+ type: "ip",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ "@timestamp_pretty": {
+ type: "date",
+ format: "yyyy-MM-dd",
+ },
+ type_test: {
+ type: "keyword",
+ },
+ event_type: {
+ type: "keyword",
+ },
+ event: {
+ properties: {
+ category: {
+ type: "alias",
+ path: "event_type",
+ },
+ },
+ },
+ host: {
+ type: "keyword",
+ },
+ op_sys: {
+ type: "keyword",
+ },
+ bool: {
+ type: "boolean",
+ },
+ uptime: {
+ type: "long",
+ },
+ port: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.create({
+ index: "my-index-000003",
+ mappings: {
+ properties: {
+ host_ip: {
+ type: "ip",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ date: {
+ type: "date",
+ },
+ event_type: {
+ type: "keyword",
+ },
+ event: {
+ properties: {
+ category: {
+ type: "alias",
+ path: "event_type",
+ },
+ },
+ },
+ missing_keyword: {
+ type: "keyword",
+ },
+ host: {
+ type: "keyword",
+ },
+ os: {
+ type: "keyword",
+ },
+ bool: {
+ type: "boolean",
+ },
+ uptime: {
+ type: "long",
+ },
+ port: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ "@timestamp": "1234567891",
+ "@timestamp_pretty": "12-12-2022",
+ missing_keyword: "test",
+ type_test: "abc",
+ ip: "10.0.0.1",
+ event_type: "alert",
+ host: "doom",
+ uptime: 0,
+ port: 1234,
+ os: "win10",
+ version: "1.0.0",
+ id: 11,
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ "@timestamp": "1234567892",
+ "@timestamp_pretty": "13-12-2022",
+ event_type: "alert",
+ type_test: "abc",
+ host: "CS",
+ uptime: 5,
+ port: 1,
+ os: "win10",
+ version: "1.2.0",
+ id: 12,
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ "@timestamp": "1234567893",
+ "@timestamp_pretty": "12-12-2022",
+ event_type: "alert",
+ type_test: "abc",
+ host: "farcry",
+ uptime: 1,
+ port: 1234,
+ bool: false,
+ os: "win10",
+ version: "2.0.0",
+ id: 13,
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ "@timestamp": "1234567894",
+ "@timestamp_pretty": "13-12-2022",
+ event_type: "alert",
+ type_test: "abc",
+ host: "GTA",
+ uptime: 3,
+ port: 12,
+ os: "slack",
+ version: "10.0.0",
+ id: 14,
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ "@timestamp": "1234567895",
+ "@timestamp_pretty": "17-12-2022",
+ event_type: "alert",
+ host: "sniper 3d",
+ uptime: 6,
+ port: 1234,
+ os: "fedora",
+ version: "20.1.0",
+ id: 15,
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ "@timestamp": "1234568896",
+ "@timestamp_pretty": "17-12-2022",
+ event_type: "alert",
+ host: "doom",
+ port: 65123,
+ bool: true,
+ os: "redhat",
+ version: "20.10.0",
+ id: 16,
+ },
+ {
+ index: {
+ _id: 7,
+ },
+ },
+ {
+ "@timestamp": "1234567897",
+ "@timestamp_pretty": "17-12-2022",
+ missing_keyword: "yyy",
+ event_type: "failure",
+ host: "doom",
+ uptime: 15,
+ port: 1234,
+ bool: true,
+ os: "redhat",
+ version: "20.2.0",
+ id: 17,
+ },
+ {
+ index: {
+ _id: 8,
+ },
+ },
+ {
+ "@timestamp": "1234567898",
+ "@timestamp_pretty": "12-12-2022",
+ missing_keyword: "test",
+ event_type: "success",
+ host: "doom",
+ uptime: 16,
+ port: 512,
+ os: "win10",
+ version: "1.2.3",
+ id: 18,
+ },
+ {
+ index: {
+ _id: 9,
+ },
+ },
+ {
+ "@timestamp": "1234567899",
+ "@timestamp_pretty": "15-12-2022",
+ missing_keyword: "test",
+ event_type: "success",
+ host: "GTA",
+ port: 12,
+ bool: true,
+ os: "win10",
+ version: "1.2.3",
+ id: 19,
+ },
+ {
+ index: {
+ _id: 10,
+ },
+ },
+ {
+ "@timestamp": "1234567893",
+ missing_keyword: null,
+ ip: "10.0.0.5",
+ event_type: "alert",
+ host: "farcry",
+ uptime: 1,
+ port: 1234,
+ bool: true,
+ os: "win10",
+ version: "1.2.3",
+ id: 110,
+ },
+ ],
+});
+console.log(response3);
+
+const response4 = await client.bulk({
+ index: "my-index-000002",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ "@timestamp": "1234567991",
+ type_test: "abc",
+ ip: "10.0.0.1",
+ event_type: "alert",
+ host: "doom",
+ uptime: 0,
+ port: 1234,
+ op_sys: "win10",
+ id: 21,
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ "@timestamp": "1234567992",
+ type_test: "abc",
+ event_type: "alert",
+ host: "CS",
+ uptime: 5,
+ port: 1,
+ op_sys: "win10",
+ id: 22,
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ "@timestamp": "1234567993",
+ type_test: "abc",
+ "@timestamp_pretty": "2022-12-17",
+ event_type: "alert",
+ host: "farcry",
+ uptime: 1,
+ port: 1234,
+ bool: false,
+ op_sys: "win10",
+ id: 23,
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ "@timestamp": "1234567994",
+ event_type: "alert",
+ host: "GTA",
+ uptime: 3,
+ port: 12,
+ op_sys: "slack",
+ id: 24,
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ "@timestamp": "1234567995",
+ event_type: "alert",
+ host: "sniper 3d",
+ uptime: 6,
+ port: 1234,
+ op_sys: "fedora",
+ id: 25,
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ "@timestamp": "1234568996",
+ "@timestamp_pretty": "2022-12-17",
+ ip: "10.0.0.5",
+ event_type: "alert",
+ host: "doom",
+ port: 65123,
+ bool: true,
+ op_sys: "redhat",
+ id: 26,
+ },
+ {
+ index: {
+ _id: 7,
+ },
+ },
+ {
+ "@timestamp": "1234567997",
+ "@timestamp_pretty": "2022-12-17",
+ event_type: "failure",
+ host: "doom",
+ uptime: 15,
+ port: 1234,
+ bool: true,
+ op_sys: "redhat",
+ id: 27,
+ },
+ {
+ index: {
+ _id: 8,
+ },
+ },
+ {
+ "@timestamp": "1234567998",
+ ip: "10.0.0.1",
+ event_type: "success",
+ host: "doom",
+ uptime: 16,
+ port: 512,
+ op_sys: "win10",
+ id: 28,
+ },
+ {
+ index: {
+ _id: 9,
+ },
+ },
+ {
+ "@timestamp": "1234567999",
+ ip: "10.0.0.1",
+ event_type: "success",
+ host: "GTA",
+ port: 12,
+ bool: false,
+ op_sys: "win10",
+ id: 29,
+ },
+ ],
+});
+console.log(response4);
+
+const response5 = await client.bulk({
+ index: "my-index-000003",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ "@timestamp": "1334567891",
+ host_ip: "10.0.0.1",
+ event_type: "alert",
+ host: "doom",
+ uptime: 0,
+ port: 12,
+ os: "win10",
+ id: 31,
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ "@timestamp": "1334567892",
+ event_type: "alert",
+ host: "CS",
+ os: "win10",
+ id: 32,
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ "@timestamp": "1334567893",
+ event_type: "alert",
+ host: "farcry",
+ bool: true,
+ os: "win10",
+ id: 33,
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ "@timestamp": "1334567894",
+ event_type: "alert",
+ host: "GTA",
+ os: "slack",
+ bool: true,
+ id: 34,
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ "@timestamp": "1234567895",
+ event_type: "alert",
+ host: "sniper 3d",
+ os: "fedora",
+ id: 35,
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ "@timestamp": "1234578896",
+ host_ip: "10.0.0.1",
+ event_type: "alert",
+ host: "doom",
+ bool: true,
+ os: "redhat",
+ id: 36,
+ },
+ {
+ index: {
+ _id: 7,
+ },
+ },
+ {
+ "@timestamp": "1234567897",
+ event_type: "failure",
+ missing_keyword: "test",
+ host: "doom",
+ bool: true,
+ os: "redhat",
+ id: 37,
+ },
+ {
+ index: {
+ _id: 8,
+ },
+ },
+ {
+ "@timestamp": "1234577898",
+ event_type: "success",
+ host: "doom",
+ os: "win10",
+ id: 38,
+ date: "1671235200000",
+ },
+ {
+ index: {
+ _id: 9,
+ },
+ },
+ {
+ "@timestamp": "1234577899",
+ host_ip: "10.0.0.5",
+ event_type: "success",
+ host: "GTA",
+ bool: true,
+ os: "win10",
+ id: 39,
+ },
+ ],
+});
+console.log(response5);
+----
diff --git a/docs/doc_examples/36b86b97feedcf5632824eefc251d6ed.asciidoc b/docs/doc_examples/36b86b97feedcf5632824eefc251d6ed.asciidoc
new file mode 100644
index 000000000..c55cad6ae
--- /dev/null
+++ b/docs/doc_examples/36b86b97feedcf5632824eefc251d6ed.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "books",
+ query: {
+ match: {
+ name: "brave",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36d229f734adcdab00be266a7ce038b1.asciidoc b/docs/doc_examples/36d229f734adcdab00be266a7ce038b1.asciidoc
new file mode 100644
index 000000000..771d1a09d
--- /dev/null
+++ b/docs/doc_examples/36d229f734adcdab00be266a7ce038b1.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-bit-vectors",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 40,
+ element_type: "bit",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36da9668fef56910370f16bfb772cc40.asciidoc b/docs/doc_examples/36da9668fef56910370f16bfb772cc40.asciidoc
new file mode 100644
index 000000000..910f8a458
--- /dev/null
+++ b/docs/doc_examples/36da9668fef56910370f16bfb772cc40.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ metric: "request_cache",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36e09bbd5896498ede0f5d37a18eae2c.asciidoc b/docs/doc_examples/36e09bbd5896498ede0f5d37a18eae2c.asciidoc
new file mode 100644
index 000000000..c8fd4c771
--- /dev/null
+++ b/docs/doc_examples/36e09bbd5896498ede0f5d37a18eae2c.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ routing: 1,
+ refresh: "true",
+ document: {
+ text: "This is a child document.",
+ "my-join-field": {
+ name: "my-child",
+ parent: "1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/36fae9dfc0b815546b45745bac054b67.asciidoc b/docs/doc_examples/36fae9dfc0b815546b45745bac054b67.asciidoc
new file mode 100644
index 000000000..782d9bf5e
--- /dev/null
+++ b/docs/doc_examples/36fae9dfc0b815546b45745bac054b67.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ model_number: "HG537PU",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/370b297ed3433577adf53e64f572d89d.asciidoc b/docs/doc_examples/370b297ed3433577adf53e64f572d89d.asciidoc
new file mode 100644
index 000000000..4e76cc905
--- /dev/null
+++ b/docs/doc_examples/370b297ed3433577adf53e64f572d89d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "DELETE",
+ path: "/_connector/_sync_job/my-connector-sync-job-id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/371962cf63e65c10026177c6a1bad0b6.asciidoc b/docs/doc_examples/371962cf63e65c10026177c6a1bad0b6.asciidoc
new file mode 100644
index 000000000..633073dea
--- /dev/null
+++ b/docs/doc_examples/371962cf63e65c10026177c6a1bad0b6.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.start();
+console.log(response);
+----
diff --git a/docs/doc_examples/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc b/docs/doc_examples/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc
new file mode 100644
index 000000000..98875ead3
--- /dev/null
+++ b/docs/doc_examples/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ actors: {
+ terms: {
+ field: "actors",
+ size: 10,
+ collect_mode: "breadth_first",
+ },
+ aggs: {
+ costars: {
+ terms: {
+ field: "actors",
+ size: 5,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3758b8f2ab9f6f28a764ee6c42c85766.asciidoc b/docs/doc_examples/3758b8f2ab9f6f28a764ee6c42c85766.asciidoc
new file mode 100644
index 000000000..7e3581418
--- /dev/null
+++ b/docs/doc_examples/3758b8f2ab9f6f28a764ee6c42c85766.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ scroll: "1m",
+ slice: {
+ id: 0,
+ max: 2,
+ },
+ query: {
+ match: {
+ message: "foo",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-index-000001",
+ scroll: "1m",
+ slice: {
+ id: 1,
+ max: 2,
+ },
+ query: {
+ match: {
+ message: "foo",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/3759ca688c4bd3c838780a9aad63258b.asciidoc b/docs/doc_examples/3759ca688c4bd3c838780a9aad63258b.asciidoc
new file mode 100644
index 000000000..1b4c9b4a6
--- /dev/null
+++ b/docs/doc_examples/3759ca688c4bd3c838780a9aad63258b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getIndexTemplate({
+ name: "template_1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/375bf2c51ce6cc386f9d4d635d5e84a7.asciidoc b/docs/doc_examples/375bf2c51ce6cc386f9d4d635d5e84a7.asciidoc
new file mode 100644
index 000000000..4da50d7f2
--- /dev/null
+++ b/docs/doc_examples/375bf2c51ce6cc386f9d4d635d5e84a7.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ geo_grid: {
+ location: {
+ geohex: "811fbffffffffff",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/376fbc965e1b093f6dbc198a94c83aa9.asciidoc b/docs/doc_examples/376fbc965e1b093f6dbc198a94c83aa9.asciidoc
new file mode 100644
index 000000000..201aa0674
--- /dev/null
+++ b/docs/doc_examples/376fbc965e1b093f6dbc198a94c83aa9.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ gc: "[2021-04-27T16:16:34.699+0000][82460][gc,heap,exit] class space used 266K, capacity 384K, committed 384K, reserved 1048576K",
+ },
+ {
+ index: {},
+ },
+ {
+ gc: "[2021-03-24T20:27:24.184+0000][90239][gc,heap,exit] class space used 15255K, capacity 16726K, committed 16844K, reserved 1048576K",
+ },
+ {
+ index: {},
+ },
+ {
+ gc: "[2021-03-24T20:27:24.184+0000][90239][gc,heap,exit] Metaspace used 115409K, capacity 119541K, committed 120248K, reserved 1153024K",
+ },
+ {
+ index: {},
+ },
+ {
+ gc: "[2021-04-19T15:03:21.735+0000][84408][gc,heap,exit] class space used 14503K, capacity 15894K, committed 15948K, reserved 1048576K",
+ },
+ {
+ index: {},
+ },
+ {
+ gc: "[2021-04-19T15:03:21.735+0000][84408][gc,heap,exit] Metaspace used 107719K, capacity 111775K, committed 112724K, reserved 1146880K",
+ },
+ {
+ index: {},
+ },
+ {
+ gc: "[2021-04-27T16:16:34.699+0000][82460][gc,heap,exit] class space used 266K, capacity 367K, committed 384K, reserved 1048576K",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/376ff4b2b5f657481af78a778aaab57f.asciidoc b/docs/doc_examples/376ff4b2b5f657481af78a778aaab57f.asciidoc
new file mode 100644
index 000000000..8f9731735
--- /dev/null
+++ b/docs/doc_examples/376ff4b2b5f657481af78a778aaab57f.asciidoc
@@ -0,0 +1,74 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ nr: {
+ type: "integer",
+ },
+ state: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "my-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ nr: 1,
+ state: "started",
+ },
+ {
+ index: {},
+ },
+ {
+ nr: 2,
+ state: "stopped",
+ },
+ {
+ index: {},
+ },
+ {
+ nr: 3,
+ state: "N/A",
+ },
+ {
+ index: {},
+ },
+ {
+ nr: 4,
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index",
+ filter_path: "aggregations",
+ aggs: {
+ my_top_metrics: {
+ top_metrics: {
+ metrics: {
+ field: "state",
+ missing: "N/A",
+ },
+ sort: {
+ nr: "desc",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/377af0ea9b19c113f224d8150890b41b.asciidoc b/docs/doc_examples/377af0ea9b19c113f224d8150890b41b.asciidoc
new file mode 100644
index 000000000..9b5a9864f
--- /dev/null
+++ b/docs/doc_examples/377af0ea9b19c113f224d8150890b41b.asciidoc
@@ -0,0 +1,74 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ "event.outcome": "failure",
+ },
+ },
+ {
+ range: {
+ "@timestamp": {
+ gte: "2021-02-01",
+ lt: "2021-02-04",
+ },
+ },
+ },
+ {
+ term: {
+ "service.name": {
+ value: "frontend-node",
+ },
+ },
+ },
+ ],
+ },
+ },
+ aggs: {
+ failure_p_value: {
+ significant_terms: {
+ field: "user_agent.version",
+ background_filter: {
+ bool: {
+ must_not: [
+ {
+ term: {
+ "event.outcome": "failure",
+ },
+ },
+ ],
+ filter: [
+ {
+ range: {
+ "@timestamp": {
+ gte: "2021-02-01",
+ lt: "2021-02-04",
+ },
+ },
+ },
+ {
+ term: {
+ "service.name": {
+ value: "frontend-node",
+ },
+ },
+ },
+ ],
+ },
+ },
+ p_value: {
+ background_is_superset: false,
+ normalize_above: 1000,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/378e55f78fa13578a1302bae8d479765.asciidoc b/docs/doc_examples/378e55f78fa13578a1302bae8d479765.asciidoc
new file mode 100644
index 000000000..dc69a09f6
--- /dev/null
+++ b/docs/doc_examples/378e55f78fa13578a1302bae8d479765.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ color: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/37983daac3d9c8582583a507b3adb7f2.asciidoc b/docs/doc_examples/37983daac3d9c8582583a507b3adb7f2.asciidoc
new file mode 100644
index 000000000..9eee60e5d
--- /dev/null
+++ b/docs/doc_examples/37983daac3d9c8582583a507b3adb7f2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.shutdown.putNode({
+ node_id: "USpTGYaBSIKbgSUJR2Z9lg",
+ type: "restart",
+ reason: "Demonstrating how the node shutdown API works",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/37ae7c3e4d6d954487ec4185fe7d9ec8.asciidoc b/docs/doc_examples/37ae7c3e4d6d954487ec4185fe7d9ec8.asciidoc
new file mode 100644
index 000000000..523c79f6d
--- /dev/null
+++ b/docs/doc_examples/37ae7c3e4d6d954487ec4185fe7d9ec8.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggregations: {
+ forces: {
+ terms: {
+ field: "force",
+ },
+ aggregations: {
+ significant_crime_types: {
+ significant_terms: {
+ field: "crime_type",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/37b84f2ab7c2f6b4fe0e14cc7e018b1f.asciidoc b/docs/doc_examples/37b84f2ab7c2f6b4fe0e14cc7e018b1f.asciidoc
new file mode 100644
index 000000000..7d06f09f6
--- /dev/null
+++ b/docs/doc_examples/37b84f2ab7c2f6b4fe0e14cc7e018b1f.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ clusterB: {
+ mode: "proxy",
+ skip_unavailable: true,
+ server_name: "clusterb.es.region-b.gcp.elastic-cloud.com",
+ proxy_socket_connections: 18,
+ proxy_address: "clusterb.es.region-b.gcp.elastic-cloud.com:9400",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ clusterA: {
+ mode: "proxy",
+ skip_unavailable: true,
+ server_name: "clustera.es.region-a.gcp.elastic-cloud.com",
+ proxy_socket_connections: 18,
+ proxy_address: "clustera.es.region-a.gcp.elastic-cloud.com:9400",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/37c73410bf13429279cbc61a413957d8.asciidoc b/docs/doc_examples/37c73410bf13429279cbc61a413957d8.asciidoc
new file mode 100644
index 000000000..62a84cd43
--- /dev/null
+++ b/docs/doc_examples/37c73410bf13429279cbc61a413957d8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.stats({
+ filter_path: "indices.shards.total",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/37eaab0630976d3dee90a52011342883.asciidoc b/docs/doc_examples/37eaab0630976d3dee90a52011342883.asciidoc
new file mode 100644
index 000000000..722466b4d
--- /dev/null
+++ b/docs/doc_examples/37eaab0630976d3dee90a52011342883.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "whitespace",
+ filter: ["stop"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/37f1f2e75ed95308ae436bbbb8d5645e.asciidoc b/docs/doc_examples/37f1f2e75ed95308ae436bbbb8d5645e.asciidoc
new file mode 100644
index 000000000..40d543a28
--- /dev/null
+++ b/docs/doc_examples/37f1f2e75ed95308ae436bbbb8d5645e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.postStartTrial({
+ acknowledge: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3819d0a5c2eed635c88e9e7bf2e81584.asciidoc b/docs/doc_examples/3819d0a5c2eed635c88e9e7bf2e81584.asciidoc
new file mode 100644
index 000000000..456a47a30
--- /dev/null
+++ b/docs/doc_examples/3819d0a5c2eed635c88e9e7bf2e81584.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.revertModelSnapshot({
+ job_id: "low_request_rate",
+ snapshot_id: 1637092688,
+ delete_intervening_results: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/386eb7dcd3149db82605bf22c5d851bf.asciidoc b/docs/doc_examples/386eb7dcd3149db82605bf22c5d851bf.asciidoc
new file mode 100644
index 000000000..4f60f6d2d
--- /dev/null
+++ b/docs/doc_examples/386eb7dcd3149db82605bf22c5d851bf.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "application-key-1",
+ metadata: {
+ application: "my-application",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/388d3eda4f792d3fce044777739217e6.asciidoc b/docs/doc_examples/388d3eda4f792d3fce044777739217e6.asciidoc
new file mode 100644
index 000000000..5ec9ee4b3
--- /dev/null
+++ b/docs/doc_examples/388d3eda4f792d3fce044777739217e6.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.evaluateDataFrame({
+ index: "animal_classification",
+ evaluation: {
+ classification: {
+ actual_field: "animal_class",
+ predicted_field: "ml.animal_class_prediction",
+ metrics: {
+ multiclass_confusion_matrix: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc b/docs/doc_examples/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc
new file mode 100644
index 000000000..4052bc3ed
--- /dev/null
+++ b/docs/doc_examples/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_near: {
+ clauses: [
+ {
+ span_term: {
+ text: "quick brown",
+ },
+ },
+ {
+ span_field_masking: {
+ query: {
+ span_term: {
+ "text.stems": "fox",
+ },
+ },
+ field: "text",
+ },
+ },
+ ],
+ slop: 5,
+ in_order: false,
+ },
+ },
+ highlight: {
+ require_field_match: false,
+ fields: {
+ "*": {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/38af4a55c1ea0f908dc7b06d680d2789.asciidoc b/docs/doc_examples/38af4a55c1ea0f908dc7b06d680d2789.asciidoc
new file mode 100644
index 000000000..95db11a5b
--- /dev/null
+++ b/docs/doc_examples/38af4a55c1ea0f908dc7b06d680d2789.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.createDataStream({
+ name: "new-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/38b20fe981605e80a41517e9aa13134a.asciidoc b/docs/doc_examples/38b20fe981605e80a41517e9aa13134a.asciidoc
new file mode 100644
index 000000000..0260866f4
--- /dev/null
+++ b/docs/doc_examples/38b20fe981605e80a41517e9aa13134a.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ total_sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ sales_bucket_filter: {
+ bucket_selector: {
+ buckets_path: {
+ totalSales: "total_sales",
+ },
+ script: "params.totalSales > 200",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/38ba93890494bfa7beece58dffa44f98.asciidoc b/docs/doc_examples/38ba93890494bfa7beece58dffa44f98.asciidoc
new file mode 100644
index 000000000..f9dca64fb
--- /dev/null
+++ b/docs/doc_examples/38ba93890494bfa7beece58dffa44f98.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "test-index",
+ operations: [
+ {
+ update: {
+ _id: "1",
+ },
+ },
+ {
+ doc: {
+ infer_field: "updated inference field",
+ source_field: "updated source field",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/38eed000de433b540116928681c520d3.asciidoc b/docs/doc_examples/38eed000de433b540116928681c520d3.asciidoc
new file mode 100644
index 000000000..4807c0f30
--- /dev/null
+++ b/docs/doc_examples/38eed000de433b540116928681c520d3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.previewDatafeed({
+ datafeed_id: "datafeed-high_sum_total_sales",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/38f7739f750f1411bccf511a0abaaea3.asciidoc b/docs/doc_examples/38f7739f750f1411bccf511a0abaaea3.asciidoc
new file mode 100644
index 000000000..671550520
--- /dev/null
+++ b/docs/doc_examples/38f7739f750f1411bccf511a0abaaea3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ fields: "rating",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/38ffa96674b5fd4042589af0ebb0437b.asciidoc b/docs/doc_examples/38ffa96674b5fd4042589af0ebb0437b.asciidoc
new file mode 100644
index 000000000..4a6e0dbd6
--- /dev/null
+++ b/docs/doc_examples/38ffa96674b5fd4042589af0ebb0437b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "basic_users",
+ roles: ["user"],
+ rules: {
+ field: {
+ groups: "cn=users,dc=example,dc=com",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3924ee252581ebb96ac0e60046125ae8.asciidoc b/docs/doc_examples/3924ee252581ebb96ac0e60046125ae8.asciidoc
new file mode 100644
index 000000000..a440d8210
--- /dev/null
+++ b/docs/doc_examples/3924ee252581ebb96ac0e60046125ae8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUser({
+ username: "jacknich",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3951d7fcd7f849fa278daf342872125a.asciidoc b/docs/doc_examples/3951d7fcd7f849fa278daf342872125a.asciidoc
new file mode 100644
index 000000000..6357296cf
--- /dev/null
+++ b/docs/doc_examples/3951d7fcd7f849fa278daf342872125a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "analyze_sample",
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/39760996f94ad34aaceaa16a5cc97993.asciidoc b/docs/doc_examples/39760996f94ad34aaceaa16a5cc97993.asciidoc
new file mode 100644
index 000000000..77a80d74b
--- /dev/null
+++ b/docs/doc_examples/39760996f94ad34aaceaa16a5cc97993.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.shutdown.getNode({
+ node_id: "USpTGYaBSIKbgSUJR2Z9lg",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc b/docs/doc_examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc
new file mode 100644
index 000000000..38335e2c1
--- /dev/null
+++ b/docs/doc_examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.dataStreamsStats({
+ name: "datastream",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/397bdb40d0146102f1f4c6a35675e16a.asciidoc b/docs/doc_examples/397bdb40d0146102f1f4c6a35675e16a.asciidoc
new file mode 100644
index 000000000..cb5ab8825
--- /dev/null
+++ b/docs/doc_examples/397bdb40d0146102f1f4c6a35675e16a.asciidoc
@@ -0,0 +1,57 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ analysis: {
+ analyzer: {
+ english_exact: {
+ tokenizer: "standard",
+ filter: ["lowercase"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ body: {
+ type: "text",
+ analyzer: "english",
+ fields: {
+ exact: {
+ type: "text",
+ analyzer: "english_exact",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "index",
+ id: 1,
+ document: {
+ body: "Ski resort",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "index",
+ id: 2,
+ document: {
+ body: "A pair of skis",
+ },
+});
+console.log(response2);
+
+const response3 = await client.indices.refresh({
+ index: "index",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc b/docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc
new file mode 100644
index 000000000..cfbe8ea75
--- /dev/null
+++ b/docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "anthropic_completion",
+ inference_config: {
+ service: "anthropic",
+ service_settings: {
+ api_key: "",
+ model_id: "",
+ },
+ task_settings: {
+ max_tokens: 1024,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/39963032d423e2f20f53c4621b6ca3c6.asciidoc b/docs/doc_examples/39963032d423e2f20f53c4621b6ca3c6.asciidoc
new file mode 100644
index 000000000..233d15c49
--- /dev/null
+++ b/docs/doc_examples/39963032d423e2f20f53c4621b6ca3c6.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "ngram",
+ text: "Quick Fox",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc b/docs/doc_examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc
new file mode 100644
index 000000000..3ab16d3e4
--- /dev/null
+++ b/docs/doc_examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ include_named_queries_score: "true",
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ "name.first": {
+ query: "shay",
+ _name: "first",
+ },
+ },
+ },
+ {
+ match: {
+ "name.last": {
+ query: "banon",
+ _name: "last",
+ },
+ },
+ },
+ ],
+ filter: {
+ terms: {
+ "name.last": ["banon", "kimchy"],
+ _name: "test",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/39d6f575c9458d9c941364dfd0493fa0.asciidoc b/docs/doc_examples/39d6f575c9458d9c941364dfd0493fa0.asciidoc
new file mode 100644
index 000000000..2152c1f8e
--- /dev/null
+++ b/docs/doc_examples/39d6f575c9458d9c941364dfd0493fa0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getCalendarEvents({
+ calendar_id: "planned-outages",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a12feb0de224bfaaf518d95b9f516ff.asciidoc b/docs/doc_examples/3a12feb0de224bfaaf518d95b9f516ff.asciidoc
new file mode 100644
index 000000000..ab9097f4d
--- /dev/null
+++ b/docs/doc_examples/3a12feb0de224bfaaf518d95b9f516ff.asciidoc
@@ -0,0 +1,56 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "my-watch",
+ trigger: {
+ schedule: {
+ cron: "0 0/1 * * * ?",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: ["logstash*"],
+ body: {
+ query: {
+ bool: {
+ must: {
+ match: {
+ response: 404,
+ },
+ },
+ filter: {
+ range: {
+ "@timestamp": {
+ from: "{{ctx.trigger.scheduled_time}}||-5m",
+ to: "{{ctx.trigger.triggered_time}}",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+ actions: {
+ email_admin: {
+ email: {
+ to: "admin@domain.host.com",
+ subject: "404 recently encountered",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a2953fd81d65118a776c87a81530e15.asciidoc b/docs/doc_examples/3a2953fd81d65118a776c87a81530e15.asciidoc
new file mode 100644
index 000000000..cf4bd65a7
--- /dev/null
+++ b/docs/doc_examples/3a2953fd81d65118a776c87a81530e15.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ order: "score",
+ fields: {
+ comment: {
+ fragment_size: 150,
+ number_of_fragments: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc b/docs/doc_examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc
new file mode 100644
index 000000000..597e9e13d
--- /dev/null
+++ b/docs/doc_examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ mode: "standard",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc b/docs/doc_examples/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc
new file mode 100644
index 000000000..46049d94d
--- /dev/null
+++ b/docs/doc_examples/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "quantized-image-index",
+ knn: {
+ field: "image-vector",
+ query_vector: [0.1, -2],
+ k: 15,
+ num_candidates: 100,
+ },
+ fields: ["title"],
+ rescore: {
+ window_size: 10,
+ query: {
+ rescore_query: {
+ script_score: {
+ query: {
+ match_all: {},
+ },
+ script: {
+ source:
+ "cosineSimilarity(params.query_vector, 'image-vector') + 1.0",
+ params: {
+ query_vector: [0.1, -2],
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a3e6e2627cafa08e4402a0de95785cc.asciidoc b/docs/doc_examples/3a3e6e2627cafa08e4402a0de95785cc.asciidoc
new file mode 100644
index 000000000..493323793
--- /dev/null
+++ b/docs/doc_examples/3a3e6e2627cafa08e4402a0de95785cc.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "you know for search",
+ },
+ },
+ collapse: {
+ field: "user.id",
+ },
+ rescore: {
+ window_size: 50,
+ query: {
+ rescore_query: {
+ match_phrase: {
+ message: "you know for search",
+ },
+ },
+ query_weight: 0.3,
+ rescore_query_weight: 1.4,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a489743e49902df38e3368cae00717a.asciidoc b/docs/doc_examples/3a489743e49902df38e3368cae00717a.asciidoc
new file mode 100644
index 000000000..5aec6e804
--- /dev/null
+++ b/docs/doc_examples/3a489743e49902df38e3368cae00717a.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.hotThreads();
+console.log(response);
+----
diff --git a/docs/doc_examples/3a4953663a5a3809b692c27446e16b7f.asciidoc b/docs/doc_examples/3a4953663a5a3809b692c27446e16b7f.asciidoc
new file mode 100644
index 000000000..1d6946015
--- /dev/null
+++ b/docs/doc_examples/3a4953663a5a3809b692c27446e16b7f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "amazon-bedrock-embeddings",
+ pipeline: "amazon_bedrock_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a5f2e2313614ea9693545edee22ac43.asciidoc b/docs/doc_examples/3a5f2e2313614ea9693545edee22ac43.asciidoc
new file mode 100644
index 000000000..1ed8c9d64
--- /dev/null
+++ b/docs/doc_examples/3a5f2e2313614ea9693545edee22ac43.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.deleteServiceToken({
+ namespace: "elastic",
+ service: "fleet-server",
+ name: "token42",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc b/docs/doc_examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc
new file mode 100644
index 000000000..d68abb0d9
--- /dev/null
+++ b/docs/doc_examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ post_date: {
+ type: "date",
+ },
+ user: {
+ type: "keyword",
+ },
+ name: {
+ type: "keyword",
+ },
+ age: {
+ type: "integer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3a64ae799cc03fadbb802794730c23da.asciidoc b/docs/doc_examples/3a64ae799cc03fadbb802794730c23da.asciidoc
new file mode 100644
index 000000000..4869ca8f6
--- /dev/null
+++ b/docs/doc_examples/3a64ae799cc03fadbb802794730c23da.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example_points",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "example_points",
+ id: 1,
+ refresh: "true",
+ document: {
+ name: "Wind & Wetter, Berlin, Germany",
+ location: [13.400544, 52.530286],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/3aa0e2d25a51bf5f3f0bda7fd8403bf2.asciidoc b/docs/doc_examples/3aa0e2d25a51bf5f3f0bda7fd8403bf2.asciidoc
new file mode 100644
index 000000000..1c6af827d
--- /dev/null
+++ b/docs/doc_examples/3aa0e2d25a51bf5f3f0bda7fd8403bf2.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ default: {
+ tokenizer: "whitespace",
+ filter: ["my_custom_stop_words_filter"],
+ },
+ },
+ filter: {
+ my_custom_stop_words_filter: {
+ type: "stop",
+ ignore_case: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc b/docs/doc_examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc
new file mode 100644
index 000000000..e498feff3
--- /dev/null
+++ b/docs/doc_examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "persian_example",
+ settings: {
+ analysis: {
+ char_filter: {
+ zero_width_spaces: {
+ type: "mapping",
+ mappings: ["\\u200C=>\\u0020"],
+ },
+ },
+ filter: {
+ persian_stop: {
+ type: "stop",
+ stopwords: "_persian_",
+ },
+ },
+ analyzer: {
+ rebuilt_persian: {
+ tokenizer: "standard",
+ char_filter: ["zero_width_spaces"],
+ filter: [
+ "lowercase",
+ "decimal_digit",
+ "arabic_normalization",
+ "persian_normalization",
+ "persian_stop",
+ "persian_stem",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3abedc1d68fe1d20621157406b2b1de0.asciidoc b/docs/doc_examples/3abedc1d68fe1d20621157406b2b1de0.asciidoc
new file mode 100644
index 000000000..df7a51c73
--- /dev/null
+++ b/docs/doc_examples/3abedc1d68fe1d20621157406b2b1de0.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ filter: ["my_custom_word_delimiter_filter"],
+ },
+ },
+ filter: {
+ my_custom_word_delimiter_filter: {
+ type: "word_delimiter",
+ type_table: ["- => ALPHA"],
+ split_on_case_change: false,
+ split_on_numerics: false,
+ stem_english_possessive: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ac075c5b5bbe648d40d06cce3061367.asciidoc b/docs/doc_examples/3ac075c5b5bbe648d40d06cce3061367.asciidoc
new file mode 100644
index 000000000..c8b4bd9b1
--- /dev/null
+++ b/docs/doc_examples/3ac075c5b5bbe648d40d06cce3061367.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source:
+ '{ "query": { "bool": { "filter": [ {{#year_scope}} { "range": { "@timestamp": { "gte": "now-1y/d", "lt": "now/d" } } }, {{/year_scope}} { "term": { "user.id": "{{user_id}}" }}]}}}',
+ params: {
+ year_scope: false,
+ user_id: "kimchy",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ac8b5234e9d53859245cf8ab0094ca5.asciidoc b/docs/doc_examples/3ac8b5234e9d53859245cf8ab0094ca5.asciidoc
new file mode 100644
index 000000000..790356725
--- /dev/null
+++ b/docs/doc_examples/3ac8b5234e9d53859245cf8ab0094ca5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteJob({
+ job_id: "total-requests",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3af10fde8138d9d95df127d39d9a0ed2.asciidoc b/docs/doc_examples/3af10fde8138d9d95df127d39d9a0ed2.asciidoc
new file mode 100644
index 000000000..423dd5ba8
--- /dev/null
+++ b/docs/doc_examples/3af10fde8138d9d95df127d39d9a0ed2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.max_shards_per_node": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc b/docs/doc_examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc
new file mode 100644
index 000000000..de00013ae
--- /dev/null
+++ b/docs/doc_examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "serbian_example",
+ settings: {
+ analysis: {
+ filter: {
+ serbian_stop: {
+ type: "stop",
+ stopwords: "_serbian_",
+ },
+ serbian_keywords: {
+ type: "keyword_marker",
+ keywords: ["пример"],
+ },
+ serbian_stemmer: {
+ type: "stemmer",
+ language: "serbian",
+ },
+ },
+ analyzer: {
+ rebuilt_serbian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "serbian_stop",
+ "serbian_keywords",
+ "serbian_stemmer",
+ "serbian_normalization",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b0475515ee692a2d9850c2bd7cdb895.asciidoc b/docs/doc_examples/3b0475515ee692a2d9850c2bd7cdb895.asciidoc
new file mode 100644
index 000000000..0db0a8821
--- /dev/null
+++ b/docs/doc_examples/3b0475515ee692a2d9850c2bd7cdb895.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ unindexed_longs: {
+ match_mapping_type: "long",
+ mapping: {
+ type: "long",
+ index: false,
+ },
+ },
+ },
+ {
+ unindexed_doubles: {
+ match_mapping_type: "double",
+ mapping: {
+ type: "float",
+ index: false,
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b04cc894e6a47d57983484010feac0c.asciidoc b/docs/doc_examples/3b04cc894e6a47d57983484010feac0c.asciidoc
new file mode 100644
index 000000000..fbb6caf31
--- /dev/null
+++ b/docs/doc_examples/3b04cc894e6a47d57983484010feac0c.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "metricbeat-2016.05.30-1",
+ id: 1,
+});
+console.log(response);
+
+const response1 = await client.get({
+ index: "metricbeat-2016.05.31-1",
+ id: 1,
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/3b05128cba6852e79a905bcdd5a8ebc0.asciidoc b/docs/doc_examples/3b05128cba6852e79a905bcdd5a8ebc0.asciidoc
new file mode 100644
index 000000000..55b52a825
--- /dev/null
+++ b/docs/doc_examples/3b05128cba6852e79a905bcdd5a8ebc0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: "surprise_me",
+ error_trace: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b162509ed14eda44a9681cd1108fa39.asciidoc b/docs/doc_examples/3b162509ed14eda44a9681cd1108fa39.asciidoc
new file mode 100644
index 000000000..e6170cfad
--- /dev/null
+++ b/docs/doc_examples/3b162509ed14eda44a9681cd1108fa39.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ suggest: {
+ text: "noble prize",
+ simple_phrase: {
+ phrase: {
+ field: "title.trigram",
+ size: 1,
+ gram_size: 3,
+ direct_generator: [
+ {
+ field: "title.trigram",
+ suggest_mode: "always",
+ },
+ ],
+ highlight: {
+ pre_tag: "",
+ post_tag: " ",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b18e9de638ff0b1c7a1f1f6bf1c24f3.asciidoc b/docs/doc_examples/3b18e9de638ff0b1c7a1f1f6bf1c24f3.asciidoc
new file mode 100644
index 000000000..1902fe423
--- /dev/null
+++ b/docs/doc_examples/3b18e9de638ff0b1c7a1f1f6bf1c24f3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getPrivileges({
+ application: "myapp",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b1ff884f3bab390ae357e622c0544a9.asciidoc b/docs/doc_examples/3b1ff884f3bab390ae357e622c0544a9.asciidoc
new file mode 100644
index 000000000..d24d0f706
--- /dev/null
+++ b/docs/doc_examples/3b1ff884f3bab390ae357e622c0544a9.asciidoc
@@ -0,0 +1,87 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example-index",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ },
+ vector: {
+ type: "dense_vector",
+ dims: 1,
+ index: true,
+ similarity: "l2_norm",
+ index_options: {
+ type: "hnsw",
+ },
+ },
+ integer: {
+ type: "integer",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "example-index",
+ id: 1,
+ document: {
+ text: "rrf",
+ vector: [5],
+ integer: 1,
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "example-index",
+ id: 2,
+ document: {
+ text: "rrf rrf",
+ vector: [4],
+ integer: 2,
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "example-index",
+ id: 3,
+ document: {
+ text: "rrf rrf rrf",
+ vector: [3],
+ integer: 1,
+ },
+});
+console.log(response3);
+
+const response4 = await client.index({
+ index: "example-index",
+ id: 4,
+ document: {
+ text: "rrf rrf rrf rrf",
+ integer: 2,
+ },
+});
+console.log(response4);
+
+const response5 = await client.index({
+ index: "example-index",
+ id: 5,
+ document: {
+ vector: [0],
+ integer: 1,
+ },
+});
+console.log(response5);
+
+const response6 = await client.indices.refresh({
+ index: "example-index",
+});
+console.log(response6);
+----
diff --git a/docs/doc_examples/3b40db1c5c6b36f087d7a09a4ce285c6.asciidoc b/docs/doc_examples/3b40db1c5c6b36f087d7a09a4ce285c6.asciidoc
new file mode 100644
index 000000000..3760c9f46
--- /dev/null
+++ b/docs/doc_examples/3b40db1c5c6b36f087d7a09a4ce285c6.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getIndexTemplate();
+console.log(response);
+----
diff --git a/docs/doc_examples/3b606631284877f9bca15051630995ad.asciidoc b/docs/doc_examples/3b606631284877f9bca15051630995ad.asciidoc
new file mode 100644
index 000000000..e355ac371
--- /dev/null
+++ b/docs/doc_examples/3b606631284877f9bca15051630995ad.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_test_scores",
+ query: {
+ term: {
+ grad_year: "2099",
+ },
+ },
+ sort: [
+ {
+ _script: {
+ type: "number",
+ script: {
+ source: "doc['math_score'].value + doc['verbal_score'].value",
+ },
+ order: "desc",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b64821fe9db73eb03860c60d775d7ff.asciidoc b/docs/doc_examples/3b64821fe9db73eb03860c60d775d7ff.asciidoc
new file mode 100644
index 000000000..e27e26bb2
--- /dev/null
+++ b/docs/doc_examples/3b64821fe9db73eb03860c60d775d7ff.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx",
+ body: {
+ access: {
+ replication: [
+ {
+ names: ["archive"],
+ },
+ ],
+ },
+ metadata: {
+ application: "replication",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc b/docs/doc_examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc
new file mode 100644
index 000000000..2170911ae
--- /dev/null
+++ b/docs/doc_examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3b9c54604535d97e8368d47148aecc6f.asciidoc b/docs/doc_examples/3b9c54604535d97e8368d47148aecc6f.asciidoc
new file mode 100644
index 000000000..819faa5c7
--- /dev/null
+++ b/docs/doc_examples/3b9c54604535d97e8368d47148aecc6f.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateModelSnapshot({
+ job_id: "it_ops_new_logs",
+ snapshot_id: 1491852978,
+ description: "Snapshot 1",
+ retain: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ba2896bcc724c27be8f0decf6f81813.asciidoc b/docs/doc_examples/3ba2896bcc724c27be8f0decf6f81813.asciidoc
new file mode 100644
index 000000000..453fb5d54
--- /dev/null
+++ b/docs/doc_examples/3ba2896bcc724c27be8f0decf6f81813.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putTemplate({
+ name: "custom_monitoring",
+ index_patterns: [
+ ".monitoring-beats-7-*",
+ ".monitoring-es-7-*",
+ ".monitoring-kibana-7-*",
+ ".monitoring-logstash-7-*",
+ ],
+ order: 1,
+ settings: {
+ number_of_shards: 5,
+ number_of_replicas: 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc b/docs/doc_examples/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc
new file mode 100644
index 000000000..93e5127ef
--- /dev/null
+++ b/docs/doc_examples/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+ script: {
+ source: 'ctx._source.tag = ctx._source.remove("flag")',
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3bb5951a9e1186af5d154f56ffc13502.asciidoc b/docs/doc_examples/3bb5951a9e1186af5d154f56ffc13502.asciidoc
new file mode 100644
index 000000000..75cd3cb43
--- /dev/null
+++ b/docs/doc_examples/3bb5951a9e1186af5d154f56ffc13502.asciidoc
@@ -0,0 +1,48 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ message: {
+ type: "keyword",
+ ignore_above: 20,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ message: "Syntax error",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ message: "Syntax error with some long stacktrace",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ messages: {
+ terms: {
+ field: "message",
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc b/docs/doc_examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc
new file mode 100644
index 000000000..d1794a5b7
--- /dev/null
+++ b/docs/doc_examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index_double",
+ mappings: {
+ properties: {
+ field: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3bfa2362add163802fc2210cc2f37ba2.asciidoc b/docs/doc_examples/3bfa2362add163802fc2210cc2f37ba2.asciidoc
new file mode 100644
index 000000000..d31648cf2
--- /dev/null
+++ b/docs/doc_examples/3bfa2362add163802fc2210cc2f37ba2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.clone({
+ repository: "my_repository",
+ snapshot: "source_snapshot",
+ target_snapshot: "target_snapshot",
+ indices: "index_a,index_b",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c04f75bcbb07125d51b21b9b2c9f6f0.asciidoc b/docs/doc_examples/3c04f75bcbb07125d51b21b9b2c9f6f0.asciidoc
new file mode 100644
index 000000000..0a22cb911
--- /dev/null
+++ b/docs/doc_examples/3c04f75bcbb07125d51b21b9b2c9f6f0.asciidoc
@@ -0,0 +1,57 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "index_1",
+ id: 1,
+ document: {
+ text: "Document in index 1",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "index_2",
+ id: 2,
+ refresh: "true",
+ document: {
+ text: "Document in index 2",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "index_1,index_2",
+ query: {
+ terms: {
+ _index: ["index_1", "index_2"],
+ },
+ },
+ aggs: {
+ indices: {
+ terms: {
+ field: "_index",
+ size: 10,
+ },
+ },
+ },
+ sort: [
+ {
+ _index: {
+ order: "asc",
+ },
+ },
+ ],
+ script_fields: {
+ index_name: {
+ script: {
+ lang: "painless",
+ source: "doc['_index']",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/3c09ca91057216125ed0e3856a91ff95.asciidoc b/docs/doc_examples/3c09ca91057216125ed0e3856a91ff95.asciidoc
new file mode 100644
index 000000000..1d1a318d3
--- /dev/null
+++ b/docs/doc_examples/3c09ca91057216125ed0e3856a91ff95.asciidoc
@@ -0,0 +1,149 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "datastream_template",
+ index_patterns: ["datastream*"],
+ data_stream: {},
+ template: {
+ settings: {
+ index: {
+ mode: "time_series",
+ number_of_replicas: 0,
+ number_of_shards: 2,
+ },
+ "index.lifecycle.name": "datastream_policy",
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ kubernetes: {
+ properties: {
+ container: {
+ properties: {
+ cpu: {
+ properties: {
+ usage: {
+ properties: {
+ core: {
+ properties: {
+ ns: {
+ type: "long",
+ },
+ },
+ },
+ limit: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ nanocores: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ node: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ memory: {
+ properties: {
+ available: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ majorpagefaults: {
+ type: "long",
+ },
+ pagefaults: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ rss: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ usage: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ limit: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ node: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ },
+ },
+ workingset: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ },
+ },
+ name: {
+ type: "keyword",
+ },
+ start_time: {
+ type: "date",
+ },
+ },
+ },
+ host: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ namespace: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ node: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ pod: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc b/docs/doc_examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc
new file mode 100644
index 000000000..d2b00a583
--- /dev/null
+++ b/docs/doc_examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "alibabacloud_ai_search_embeddings",
+ inference_config: {
+ service: "alibabacloud-ai-search",
+ service_settings: {
+ api_key: "",
+ service_id: "",
+ host: "",
+ workspace: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc b/docs/doc_examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc
new file mode 100644
index 000000000..0a5371ecb
--- /dev/null
+++ b/docs/doc_examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "model2",
+ docs: [
+ {
+ text_field: "",
+ },
+ ],
+ inference_config: {
+ question_answering: {
+ question: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c36dc17359c6b6b6a40d04da9293fa7.asciidoc b/docs/doc_examples/3c36dc17359c6b6b6a40d04da9293fa7.asciidoc
new file mode 100644
index 000000000..e10137efc
--- /dev/null
+++ b/docs/doc_examples/3c36dc17359c6b6b6a40d04da9293fa7.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movavg: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.unweightedAvg(values)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c5d5a5c34a62724942329658c688f5e.asciidoc b/docs/doc_examples/3c5d5a5c34a62724942329658c688f5e.asciidoc
new file mode 100644
index 000000000..8c8e80a33
--- /dev/null
+++ b/docs/doc_examples/3c5d5a5c34a62724942329658c688f5e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.setUpgradeMode({
+ enabled: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c65cb58e131ef46f4dd081683b970ac.asciidoc b/docs/doc_examples/3c65cb58e131ef46f4dd081683b970ac.asciidoc
new file mode 100644
index 000000000..49abf03b9
--- /dev/null
+++ b/docs/doc_examples/3c65cb58e131ef46f4dd081683b970ac.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations,my_geoshapes",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "200km",
+ "pin.location": {
+ lat: 40,
+ lon: -70,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c6abb9885cb1a997fcdd16f7fa4f673.asciidoc b/docs/doc_examples/3c6abb9885cb1a997fcdd16f7fa4f673.asciidoc
new file mode 100644
index 000000000..5ee49acac
--- /dev/null
+++ b/docs/doc_examples/3c6abb9885cb1a997fcdd16f7fa4f673.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shrink({
+ index: "my-index-000001",
+ target: "shrunk-my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3c7621a81fa982b79f040a6d2611530e.asciidoc b/docs/doc_examples/3c7621a81fa982b79f040a6d2611530e.asciidoc
new file mode 100644
index 000000000..b299375ef
--- /dev/null
+++ b/docs/doc_examples/3c7621a81fa982b79f040a6d2611530e.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "ct1",
+ template: {
+ settings: {
+ "index.number_of_shards": 2,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putComponentTemplate({
+ name: "ct2",
+ template: {
+ settings: {
+ "index.number_of_replicas": 0,
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.putIndexTemplate({
+ name: "final-template",
+ index_patterns: ["my-index-*"],
+ composed_of: ["ct1", "ct2"],
+ priority: 5,
+});
+console.log(response2);
+
+const response3 = await client.indices.simulateTemplate({
+ name: "final-template",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/3cd2f7f9096a8e8180f27b6c30e71840.asciidoc b/docs/doc_examples/3cd2f7f9096a8e8180f27b6c30e71840.asciidoc
new file mode 100644
index 000000000..a6a7c4806
--- /dev/null
+++ b/docs/doc_examples/3cd2f7f9096a8e8180f27b6c30e71840.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "logs",
+ size: 0,
+ aggs: {
+ messages: {
+ filters: {
+ filters: [
+ {
+ match: {
+ body: "error",
+ },
+ },
+ {
+ match: {
+ body: "warning",
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3cd93a48906069709b76420c66930c01.asciidoc b/docs/doc_examples/3cd93a48906069709b76420c66930c01.asciidoc
new file mode 100644
index 000000000..ab7d04c7b
--- /dev/null
+++ b/docs/doc_examples/3cd93a48906069709b76420c66930c01.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["lowercase", "my_stemmer"],
+ },
+ },
+ filter: {
+ my_stemmer: {
+ type: "stemmer",
+ language: "light_german",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3d05fa99ba8e1f2c3f3dfe59e4ee60f6.asciidoc b/docs/doc_examples/3d05fa99ba8e1f2c3f3dfe59e4ee60f6.asciidoc
new file mode 100644
index 000000000..c538c58f4
--- /dev/null
+++ b/docs/doc_examples/3d05fa99ba8e1f2c3f3dfe59e4ee60f6.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ content: "kimchy",
+ },
+ },
+ highlight: {
+ fields: {
+ content: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3d1a0e1dc5310544d032108ae0b3f099.asciidoc b/docs/doc_examples/3d1a0e1dc5310544d032108ae0b3f099.asciidoc
new file mode 100644
index 000000000..4d3535af2
--- /dev/null
+++ b/docs/doc_examples/3d1a0e1dc5310544d032108ae0b3f099.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_all: {
+ boost: 1.2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc b/docs/doc_examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc
new file mode 100644
index 000000000..db267ffc5
--- /dev/null
+++ b/docs/doc_examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.info();
+console.log(response);
+----
diff --git a/docs/doc_examples/3d316bddd8503a6cc10566630a4155d3.asciidoc b/docs/doc_examples/3d316bddd8503a6cc10566630a4155d3.asciidoc
new file mode 100644
index 000000000..44e3eb04e
--- /dev/null
+++ b/docs/doc_examples/3d316bddd8503a6cc10566630a4155d3.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_watcher/settings",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3d48d1ba49f680aac32177d653944623.asciidoc b/docs/doc_examples/3d48d1ba49f680aac32177d653944623.asciidoc
new file mode 100644
index 000000000..c3efc69f2
--- /dev/null
+++ b/docs/doc_examples/3d48d1ba49f680aac32177d653944623.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.ackWatch({
+ watch_id: "",
+ action_id: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3d6935e04de21ab2f103e5b61cfd7a5b.asciidoc b/docs/doc_examples/3d6935e04de21ab2f103e5b61cfd7a5b.asciidoc
new file mode 100644
index 000000000..df578de4c
--- /dev/null
+++ b/docs/doc_examples/3d6935e04de21ab2f103e5b61cfd7a5b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ rename: {
+ description: "Rename 'provider' to 'cloud.provider'",
+ field: "provider",
+ target_field: "cloud.provider",
+ ignore_failure: true,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3d6a56dd3d93ece0e3da3fb66b4696d3.asciidoc b/docs/doc_examples/3d6a56dd3d93ece0e3da3fb66b4696d3.asciidoc
new file mode 100644
index 000000000..1984895ae
--- /dev/null
+++ b/docs/doc_examples/3d6a56dd3d93ece0e3da3fb66b4696d3.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.usage();
+console.log(response);
+----
diff --git a/docs/doc_examples/3d82257167e8a14a7f474848b32da128.asciidoc b/docs/doc_examples/3d82257167e8a14a7f474848b32da128.asciidoc
new file mode 100644
index 000000000..c350ee339
--- /dev/null
+++ b/docs/doc_examples/3d82257167e8a14a7f474848b32da128.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "set_bar",
+ description: "sets the value of bar from the field foo",
+ processors: [
+ {
+ set: {
+ field: "bar",
+ copy_from: "foo",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.ingest.simulate({
+ id: "set_bar",
+ docs: [
+ {
+ _source: {
+ foo: ["foo1", "foo2"],
+ },
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc b/docs/doc_examples/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc
new file mode 100644
index 000000000..bc5509871
--- /dev/null
+++ b/docs/doc_examples/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.exclude._name": "target-node-name",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc b/docs/doc_examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc
new file mode 100644
index 000000000..d0263a6ed
--- /dev/null
+++ b/docs/doc_examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.delete({
+ index: "my-index-000001",
+ id: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3dd45f65e7bfe207e8d796118f25613c.asciidoc b/docs/doc_examples/3dd45f65e7bfe207e8d796118f25613c.asciidoc
new file mode 100644
index 000000000..0ba906074
--- /dev/null
+++ b/docs/doc_examples/3dd45f65e7bfe207e8d796118f25613c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings({
+ flat_settings: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e121b43773cbb6dffa9b483c86a1f8d.asciidoc b/docs/doc_examples/3e121b43773cbb6dffa9b483c86a1f8d.asciidoc
new file mode 100644
index 000000000..507bb9271
--- /dev/null
+++ b/docs/doc_examples/3e121b43773cbb6dffa9b483c86a1f8d.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-api-key",
+ role_descriptors: {
+ "role-a": {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index-a*"],
+ privileges: ["read"],
+ },
+ ],
+ },
+ },
+ metadata: {
+ application: "my-application",
+ environment: {
+ level: 1,
+ trusted: true,
+ tags: ["dev", "staging"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e13c8a81f40a537eddc0b57633b45f8.asciidoc b/docs/doc_examples/3e13c8a81f40a537eddc0b57633b45f8.asciidoc
new file mode 100644
index 000000000..b200ad760
--- /dev/null
+++ b/docs/doc_examples/3e13c8a81f40a537eddc0b57633b45f8.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "test_index",
+ analyzer: "my_analyzer",
+ text: "missing bicycles",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e1cb34fd6e510c79c2fff2126ac1c61.asciidoc b/docs/doc_examples/3e1cb34fd6e510c79c2fff2126ac1c61.asciidoc
new file mode 100644
index 000000000..c8090df78
--- /dev/null
+++ b/docs/doc_examples/3e1cb34fd6e510c79c2fff2126ac1c61.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ _meta: {
+ class: "MyApp::User",
+ version: {
+ min: "1.0",
+ max: "1.3",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc b/docs/doc_examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc
new file mode 100644
index 000000000..efcd814b2
--- /dev/null
+++ b/docs/doc_examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ fields: {
+ comment: {
+ fragment_size: 150,
+ number_of_fragments: 3,
+ no_match_size: 150,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e33c1a4298ea6a0dec65a3ebf9ba973.asciidoc b/docs/doc_examples/3e33c1a4298ea6a0dec65a3ebf9ba973.asciidoc
new file mode 100644
index 000000000..0c54623e0
--- /dev/null
+++ b/docs/doc_examples/3e33c1a4298ea6a0dec65a3ebf9ba973.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "my-index-000001",
+ doc: {
+ fullname: "John Doe",
+ text: "test test test",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e4227250d49e81df48773f8ba803ea7.asciidoc b/docs/doc_examples/3e4227250d49e81df48773f8ba803ea7.asciidoc
new file mode 100644
index 000000000..1cc732f90
--- /dev/null
+++ b/docs/doc_examples/3e4227250d49e81df48773f8ba803ea7.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-data-stream",
+ properties: {
+ message: {
+ type: "text",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc b/docs/doc_examples/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc
new file mode 100644
index 000000000..d1a11e0fb
--- /dev/null
+++ b/docs/doc_examples/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ id: "my-search-template",
+ params: {
+ query_string: "hello world",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3e8ed6ae016eb823cb00d9035b8ac459.asciidoc b/docs/doc_examples/3e8ed6ae016eb823cb00d9035b8ac459.asciidoc
new file mode 100644
index 000000000..2d1bd3666
--- /dev/null
+++ b/docs/doc_examples/3e8ed6ae016eb823cb00d9035b8ac459.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ea33023474e77d73ac0540e3a02b0b2.asciidoc b/docs/doc_examples/3ea33023474e77d73ac0540e3a02b0b2.asciidoc
new file mode 100644
index 000000000..6b705d888
--- /dev/null
+++ b/docs/doc_examples/3ea33023474e77d73ac0540e3a02b0b2.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "basic_users",
+ roles: ["user"],
+ rules: {
+ any: [
+ {
+ field: {
+ dn: "cn=John Doe,cn=contractors,dc=example,dc=com",
+ },
+ },
+ {
+ field: {
+ groups: "cn=users,dc=example,dc=com",
+ },
+ },
+ ],
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc b/docs/doc_examples/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc
new file mode 100644
index 000000000..b934334fb
--- /dev/null
+++ b/docs/doc_examples/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ mappings: {
+ properties: {
+ query: {
+ type: "percolator",
+ },
+ body: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "index",
+ alias: "queries",
+ },
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "queries",
+ id: 1,
+ refresh: "true",
+ document: {
+ query: {
+ match: {
+ body: "quick brown fox",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/3ec95ba697ff97ee2d1a721a393b5926.asciidoc b/docs/doc_examples/3ec95ba697ff97ee2d1a721a393b5926.asciidoc
new file mode 100644
index 000000000..136b2aead
--- /dev/null
+++ b/docs/doc_examples/3ec95ba697ff97ee2d1a721a393b5926.asciidoc
@@ -0,0 +1,70 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase"],
+ },
+ my_stop_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "english_stop"],
+ },
+ },
+ filter: {
+ english_stop: {
+ type: "stop",
+ stopwords: "_english_",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ analyzer: "my_analyzer",
+ search_analyzer: "my_stop_analyzer",
+ search_quote_analyzer: "my_analyzer",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ title: "The Quick Brown Fox",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ title: "A Quick Brown Fox",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ query_string: {
+ query: '"the quick brown fox"',
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/3eca58ef7592b3a857ea3a9898de5997.asciidoc b/docs/doc_examples/3eca58ef7592b3a857ea3a9898de5997.asciidoc
new file mode 100644
index 000000000..59b02055a
--- /dev/null
+++ b/docs/doc_examples/3eca58ef7592b3a857ea3a9898de5997.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "zoomed-in": {
+ filter: {
+ geo_bounding_box: {
+ location: {
+ top_left: "POINT (4.9 52.4)",
+ bottom_right: "POINT (5.0 52.3)",
+ },
+ },
+ },
+ aggregations: {
+ zoom1: {
+ geohash_grid: {
+ field: "location",
+ precision: 8,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc b/docs/doc_examples/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc
new file mode 100644
index 000000000..df4254b01
--- /dev/null
+++ b/docs/doc_examples/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "200km",
+ "pin.location": {
+ lat: 40,
+ lon: -70,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ed79871d956bfb2d6d2721d7272520c.asciidoc b/docs/doc_examples/3ed79871d956bfb2d6d2721d7272520c.asciidoc
new file mode 100644
index 000000000..710fd7bb1
--- /dev/null
+++ b/docs/doc_examples/3ed79871d956bfb2d6d2721d7272520c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.stats({
+ metric: "current_watches",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ee232bcb2281a12b33cd9764ee4081a.asciidoc b/docs/doc_examples/3ee232bcb2281a12b33cd9764ee4081a.asciidoc
new file mode 100644
index 000000000..cca5fd082
--- /dev/null
+++ b/docs/doc_examples/3ee232bcb2281a12b33cd9764ee4081a.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "geohex2shape",
+ description: "translate H3 cell to polygon with enriched fields",
+ processors: [
+ {
+ geo_grid: {
+ description:
+ "Ingest H3 cells like '811fbffffffffff' and create polygons",
+ field: "geocell",
+ tile_type: "geohex",
+ target_format: "wkt",
+ target_field: "shape",
+ parent_field: "parent",
+ children_field: "children",
+ non_children_field: "nonChildren",
+ precision_field: "precision",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc b/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc
new file mode 100644
index 000000000..b8e2ede87
--- /dev/null
+++ b/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.asyncQuery({
+ body: {
+ query:
+ "\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
+ wait_for_completion_timeout: "2s",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f20459d358611793272f63dc596e889.asciidoc b/docs/doc_examples/3f20459d358611793272f63dc596e889.asciidoc
new file mode 100644
index 000000000..c952456cb
--- /dev/null
+++ b/docs/doc_examples/3f20459d358611793272f63dc596e889.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "news",
+ query: {
+ match: {
+ custom_all: "elasticsearch",
+ },
+ },
+ aggs: {
+ tags: {
+ significant_text: {
+ field: "custom_all",
+ source_fields: ["content", "title"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f292a5f67e20f91bf18f5c2412a07bf.asciidoc b/docs/doc_examples/3f292a5f67e20f91bf18f5c2412a07bf.asciidoc
new file mode 100644
index 000000000..7b90f06cb
--- /dev/null
+++ b/docs/doc_examples/3f292a5f67e20f91bf18f5c2412a07bf.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "user_lookup",
+ processors: [
+ {
+ enrich: {
+ description: "Add 'user' data based on 'email'",
+ policy_name: "users-policy",
+ field: "email",
+ target_field: "user",
+ max_matches: "1",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc b/docs/doc_examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc
new file mode 100644
index 000000000..cf6730b6b
--- /dev/null
+++ b/docs/doc_examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ cold: {
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "backing_repo",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f30310cc6d0adae6b0f61705624a695.asciidoc b/docs/doc_examples/3f30310cc6d0adae6b0f61705624a695.asciidoc
new file mode 100644
index 000000000..3852f54b1
--- /dev/null
+++ b/docs/doc_examples/3f30310cc6d0adae6b0f61705624a695.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.create({
+ repository: "my_repository",
+ snapshot: "snapshot_2",
+ wait_for_completion: "true",
+ indices: "index_1,index_2",
+ ignore_unavailable: true,
+ include_global_state: false,
+ metadata: {
+ taken_by: "user123",
+ taken_because: "backup before upgrading",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f5b5bee692e7d4b0992dc0a64e95a60.asciidoc b/docs/doc_examples/3f5b5bee692e7d4b0992dc0a64e95a60.asciidoc
new file mode 100644
index 000000000..5ba9a4ede
--- /dev/null
+++ b/docs/doc_examples/3f5b5bee692e7d4b0992dc0a64e95a60.asciidoc
@@ -0,0 +1,62 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ my_join_field: {
+ type: "join",
+ relations: {
+ my_parent: "my_child",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 1,
+ refresh: "true",
+ document: {
+ number: 1,
+ my_join_field: "my_parent",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "test",
+ id: 2,
+ routing: 1,
+ refresh: "true",
+ document: {
+ number: 1,
+ my_join_field: {
+ name: "my_child",
+ parent: "1",
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "test",
+ query: {
+ has_child: {
+ type: "my_child",
+ query: {
+ match: {
+ number: 1,
+ },
+ },
+ inner_hits: {},
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/3f60a892bed18151b7baac6cc712576a.asciidoc b/docs/doc_examples/3f60a892bed18151b7baac6cc712576a.asciidoc
new file mode 100644
index 000000000..09d1caed1
--- /dev/null
+++ b/docs/doc_examples/3f60a892bed18151b7baac6cc712576a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "whitespace",
+ filter: ["lowercase", "kstem"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f669878713a14dfba251c7ce74dd5c4.asciidoc b/docs/doc_examples/3f669878713a14dfba251c7ce74dd5c4.asciidoc
new file mode 100644
index 000000000..0644c5101
--- /dev/null
+++ b/docs/doc_examples/3f669878713a14dfba251c7ce74dd5c4.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ },
+ pivot: {
+ group_by: {
+ customer_id: {
+ terms: {
+ field: "customer_id",
+ },
+ },
+ },
+ aggregations: {
+ last: {
+ top_metrics: {
+ metrics: [
+ {
+ field: "email",
+ },
+ {
+ field: "customer_first_name.keyword",
+ },
+ {
+ field: "customer_last_name.keyword",
+ },
+ ],
+ sort: {
+ order_date: "desc",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f8dc309b63fa0437898107b0d964217.asciidoc b/docs/doc_examples/3f8dc309b63fa0437898107b0d964217.asciidoc
new file mode 100644
index 000000000..8fe654c50
--- /dev/null
+++ b/docs/doc_examples/3f8dc309b63fa0437898107b0d964217.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.mlJobs({
+ h: "id,s,dpr,mb",
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3f94ed945ae6416a0eb372c2db14d7e0.asciidoc b/docs/doc_examples/3f94ed945ae6416a0eb372c2db14d7e0.asciidoc
new file mode 100644
index 000000000..319fc75e4
--- /dev/null
+++ b/docs/doc_examples/3f94ed945ae6416a0eb372c2db14d7e0.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ query: {
+ simple_query_string: {
+ fields: ["body.exact"],
+ query: "ski",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3faec4ca15d8c2fbbd16781b1c8693d6.asciidoc b/docs/doc_examples/3faec4ca15d8c2fbbd16781b1c8693d6.asciidoc
new file mode 100644
index 000000000..5399ba1e1
--- /dev/null
+++ b/docs/doc_examples/3faec4ca15d8c2fbbd16781b1c8693d6.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "mistral-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "mistral_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3faf5e2873de340acfe0a617017db784.asciidoc b/docs/doc_examples/3faf5e2873de340acfe0a617017db784.asciidoc
new file mode 100644
index 000000000..682d5836d
--- /dev/null
+++ b/docs/doc_examples/3faf5e2873de340acfe0a617017db784.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ query: "(content:this OR name:this) AND (content:that OR name:that)",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fb1289c80a354da66693bfb25d7b412.asciidoc b/docs/doc_examples/3fb1289c80a354da66693bfb25d7b412.asciidoc
new file mode 100644
index 000000000..d79d59283
--- /dev/null
+++ b/docs/doc_examples/3fb1289c80a354da66693bfb25d7b412.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "nightly-snapshots",
+ schedule: "0 30 2 * * ?",
+ name: "",
+ repository: "my_repository",
+ config: {
+ include_global_state: false,
+ indices: "*",
+ },
+ retention: {
+ expire_after: "30d",
+ min_count: 5,
+ max_count: 50,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc b/docs/doc_examples/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc
new file mode 100644
index 000000000..46d564862
--- /dev/null
+++ b/docs/doc_examples/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ timeout: "2s",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fe0fb38f75d2a34fb1e6ac9bedbcdbc.asciidoc b/docs/doc_examples/3fe0fb38f75d2a34fb1e6ac9bedbcdbc.asciidoc
new file mode 100644
index 000000000..19244f327
--- /dev/null
+++ b/docs/doc_examples/3fe0fb38f75d2a34fb1e6ac9bedbcdbc.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ exists: {
+ field: "_ignored",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fe4264ace04405989141c43aadfff81.asciidoc b/docs/doc_examples/3fe4264ace04405989141c43aadfff81.asciidoc
new file mode 100644
index 000000000..f98271d62
--- /dev/null
+++ b/docs/doc_examples/3fe4264ace04405989141c43aadfff81.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "cli_or_drivers_minimal",
+ cluster: ["cluster:monitor/main"],
+ indices: [
+ {
+ names: ["test"],
+ privileges: ["read", "indices:admin/get"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fe5e6c0d5ea4586aa04f989ae54b72e.asciidoc b/docs/doc_examples/3fe5e6c0d5ea4586aa04f989ae54b72e.asciidoc
new file mode 100644
index 000000000..c554ea9ec
--- /dev/null
+++ b/docs/doc_examples/3fe5e6c0d5ea4586aa04f989ae54b72e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.verifyRepository({
+ name: "my_repository",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fe79ed63195c5f8018648a5a6d645f6.asciidoc b/docs/doc_examples/3fe79ed63195c5f8018648a5a6d645f6.asciidoc
new file mode 100644
index 000000000..9636d7cba
--- /dev/null
+++ b/docs/doc_examples/3fe79ed63195c5f8018648a5a6d645f6.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000002",
+ mappings: {
+ _routing: {
+ required: true,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000002",
+ id: 1,
+ document: {
+ text: "No routing value provided",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/3fe9006f6c7faea162e43fb250f4da38.asciidoc b/docs/doc_examples/3fe9006f6c7faea162e43fb250f4da38.asciidoc
new file mode 100644
index 000000000..b37e62340
--- /dev/null
+++ b/docs/doc_examples/3fe9006f6c7faea162e43fb250f4da38.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ field: "_source.my-long-field",
+ value: 10,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3fecd5c6d0c172566da4a54320e1cff3.asciidoc b/docs/doc_examples/3fecd5c6d0c172566da4a54320e1cff3.asciidoc
new file mode 100644
index 000000000..64898ae51
--- /dev/null
+++ b/docs/doc_examples/3fecd5c6d0c172566da4a54320e1cff3.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "dictionary_decompounder",
+ word_list: ["Donau", "dampf", "meer", "schiff"],
+ },
+ ],
+ text: "Donaudampfschiff",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/3ffe9952786ab258bb6ab928b03148a2.asciidoc b/docs/doc_examples/3ffe9952786ab258bb6ab928b03148a2.asciidoc
new file mode 100644
index 000000000..85740bdd2
--- /dev/null
+++ b/docs/doc_examples/3ffe9952786ab258bb6ab928b03148a2.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ rare_terms: {
+ field: "genre",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc b/docs/doc_examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc
new file mode 100644
index 000000000..22dea0b19
--- /dev/null
+++ b/docs/doc_examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "source",
+ size: 100,
+ },
+ dest: {
+ index: "dest",
+ routing: "=cat",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/402092585940953420404c2884a47e59.asciidoc b/docs/doc_examples/402092585940953420404c2884a47e59.asciidoc
new file mode 100644
index 000000000..3fb2ef01d
--- /dev/null
+++ b/docs/doc_examples/402092585940953420404c2884a47e59.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ order: "desc",
+ },
+ },
+ },
+ {
+ product: {
+ terms: {
+ field: "product",
+ },
+ },
+ },
+ ],
+ },
+ aggregations: {
+ the_avg: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4029af36cb3f8202549017f7378803b4.asciidoc b/docs/doc_examples/4029af36cb3f8202549017f7378803b4.asciidoc
new file mode 100644
index 000000000..8f8803735
--- /dev/null
+++ b/docs/doc_examples/4029af36cb3f8202549017f7378803b4.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings();
+console.log(response);
+----
diff --git a/docs/doc_examples/4053de806dfd9172167999ce098107c4.asciidoc b/docs/doc_examples/4053de806dfd9172167999ce098107c4.asciidoc
new file mode 100644
index 000000000..5ee22552e
--- /dev/null
+++ b/docs/doc_examples/4053de806dfd9172167999ce098107c4.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ constant_score: {
+ filter: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ boost: 1.2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc b/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc
new file mode 100644
index 000000000..ab0617ea6
--- /dev/null
+++ b/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.asyncQueryGet({
+ id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
+ body: null,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/405ac843a9156d3cab374e199cac87fb.asciidoc b/docs/doc_examples/405ac843a9156d3cab374e199cac87fb.asciidoc
new file mode 100644
index 000000000..dc52c27a2
--- /dev/null
+++ b/docs/doc_examples/405ac843a9156d3cab374e199cac87fb.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_connector/_sync_job",
+ body: {
+ id: "connector-id",
+ job_type: "full",
+ trigger_method: "on_demand",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/405db6f3a01eceacfaa8b0ed3e4b3ac2.asciidoc b/docs/doc_examples/405db6f3a01eceacfaa8b0ed3e4b3ac2.asciidoc
new file mode 100644
index 000000000..fd7235c82
--- /dev/null
+++ b/docs/doc_examples/405db6f3a01eceacfaa8b0ed3e4b3ac2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getOverallBuckets({
+ job_id: "job-*",
+ top_n: 2,
+ overall_score: 50,
+ start: 1403532000000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4061fd5ba7221ca85805ed14d59a6bc5.asciidoc b/docs/doc_examples/4061fd5ba7221ca85805ed14d59a6bc5.asciidoc
new file mode 100644
index 000000000..e8aad642f
--- /dev/null
+++ b/docs/doc_examples/4061fd5ba7221ca85805ed14d59a6bc5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteScript({
+ id: "calculate-score",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/406a0f1c1aac947bcee58f86b6d036c1.asciidoc b/docs/doc_examples/406a0f1c1aac947bcee58f86b6d036c1.asciidoc
new file mode 100644
index 000000000..5edb2eea3
--- /dev/null
+++ b/docs/doc_examples/406a0f1c1aac947bcee58f86b6d036c1.asciidoc
@@ -0,0 +1,64 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_event_watch",
+ trigger: {
+ schedule: {
+ interval: "5m",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: "log-events",
+ body: {
+ size: 0,
+ query: {
+ match: {
+ status: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 5,
+ },
+ },
+ },
+ throttle_period: "15m",
+ actions: {
+ email_administrator: {
+ email: {
+ to: "sys.admino@host.domain",
+ subject: "Encountered {{ctx.payload.hits.total}} errors",
+ body: "Too many error in the system, see attached data",
+ attachments: {
+ attached_data: {
+ data: {
+ format: "json",
+ },
+ },
+ },
+ priority: "high",
+ },
+ },
+ notify_pager: {
+ webhook: {
+ method: "POST",
+ host: "pager.service.domain",
+ port: 1234,
+ path: "/{{watch_id}}",
+ body: "Encountered {{ctx.payload.hits.total}} errors",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/408060f0c52300588a6dee774f4fd6a5.asciidoc b/docs/doc_examples/408060f0c52300588a6dee774f4fd6a5.asciidoc
new file mode 100644
index 000000000..0b94860f6
--- /dev/null
+++ b/docs/doc_examples/408060f0c52300588a6dee774f4fd6a5.asciidoc
@@ -0,0 +1,533 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "datastream",
+ refresh: "true",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:49:00Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 91153,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 463314616,
+ },
+ usage: {
+ bytes: 307007078,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 585236,
+ },
+ rss: {
+ bytes: 102728,
+ },
+ pagefaults: 120901,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:45:50Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 124501,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 982546514,
+ },
+ usage: {
+ bytes: 360035574,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1339884,
+ },
+ rss: {
+ bytes: 381174,
+ },
+ pagefaults: 178473,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:44:50Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 38907,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 862723768,
+ },
+ usage: {
+ bytes: 379572388,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 431227,
+ },
+ rss: {
+ bytes: 386580,
+ },
+ pagefaults: 233166,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:44:40Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 86706,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 567160996,
+ },
+ usage: {
+ bytes: 103266017,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1724908,
+ },
+ rss: {
+ bytes: 105431,
+ },
+ pagefaults: 233166,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:44:00Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 150069,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 639054643,
+ },
+ usage: {
+ bytes: 265142477,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1786511,
+ },
+ rss: {
+ bytes: 189235,
+ },
+ pagefaults: 138172,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:42:40Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 82260,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 854735585,
+ },
+ usage: {
+ bytes: 309798052,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 924058,
+ },
+ rss: {
+ bytes: 110838,
+ },
+ pagefaults: 259073,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:42:10Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 153404,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 279586406,
+ },
+ usage: {
+ bytes: 214904955,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1047265,
+ },
+ rss: {
+ bytes: 91914,
+ },
+ pagefaults: 302252,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:40:20Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 125613,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 822782853,
+ },
+ usage: {
+ bytes: 100475044,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 2109932,
+ },
+ rss: {
+ bytes: 278446,
+ },
+ pagefaults: 74843,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:40:10Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 100046,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 567160996,
+ },
+ usage: {
+ bytes: 362826547,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1986724,
+ },
+ rss: {
+ bytes: 402801,
+ },
+ pagefaults: 296495,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:38:30Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 40018,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 1062428344,
+ },
+ usage: {
+ bytes: 265142477,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 2294743,
+ },
+ rss: {
+ bytes: 340623,
+ },
+ pagefaults: 224530,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40a42f005144cfed3dd1dcf2638e8211.asciidoc b/docs/doc_examples/40a42f005144cfed3dd1dcf2638e8211.asciidoc
new file mode 100644
index 000000000..d74f6fdc4
--- /dev/null
+++ b/docs/doc_examples/40a42f005144cfed3dd1dcf2638e8211.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ field: "price",
+ operator: "gte",
+ value: 500,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40b73b5c7ca144dc3f63f5b741f33d80.asciidoc b/docs/doc_examples/40b73b5c7ca144dc3f63f5b741f33d80.asciidoc
new file mode 100644
index 000000000..9d9b27d2f
--- /dev/null
+++ b/docs/doc_examples/40b73b5c7ca144dc3f63f5b741f33d80.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ constant_score: {
+ filter: {
+ percolate: {
+ field: "query",
+ document: {
+ message: "A new bonsai tree in the office",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc b/docs/doc_examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc
new file mode 100644
index 000000000..739a8c008
--- /dev/null
+++ b/docs/doc_examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.stats({
+ human: "true",
+ filter_path: "indices.mappings.total_deduplicated_mapping_size*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc b/docs/doc_examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc
new file mode 100644
index 000000000..c40e72a18
--- /dev/null
+++ b/docs/doc_examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "mv",
+ mappings: {
+ properties: {
+ b: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "mv",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ a: 1,
+ b: [2, 2, 1],
+ },
+ {
+ index: {},
+ },
+ {
+ a: 2,
+ b: [1, 1],
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.esql.query({
+ query: "FROM mv | EVAL b=TO_STRING(b) | LIMIT 2",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/40d88d4f53343ef663c89ba488ab8001.asciidoc b/docs/doc_examples/40d88d4f53343ef663c89ba488ab8001.asciidoc
new file mode 100644
index 000000000..3cc09a3de
--- /dev/null
+++ b/docs/doc_examples/40d88d4f53343ef663c89ba488ab8001.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "envelope",
+ coordinates: [
+ [1000, 100],
+ [1001, 100],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40d90d9dc6f4942bf92d88bfc5a34672.asciidoc b/docs/doc_examples/40d90d9dc6f4942bf92d88bfc5a34672.asciidoc
new file mode 100644
index 000000000..3cf2017ee
--- /dev/null
+++ b/docs/doc_examples/40d90d9dc6f4942bf92d88bfc5a34672.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_bool_prefix: {
+ message: {
+ query: "quick brown f",
+ analyzer: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc b/docs/doc_examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc
new file mode 100644
index 000000000..5b94aaeb7
--- /dev/null
+++ b/docs/doc_examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "amazon-reviews",
+ id: 1,
+ document: {
+ review_text:
+ "This product is lifechanging! I'm telling all my friends about it.",
+ review_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc b/docs/doc_examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc
new file mode 100644
index 000000000..b1664b187
--- /dev/null
+++ b/docs/doc_examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ human: "true",
+ filter_path:
+ "nodes.*.name,nodes.*.indices.mappings.total_estimated_overhead*,nodes.*.jvm.mem.heap_max*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4113c57384aa37c58d11579e20c00760.asciidoc b/docs/doc_examples/4113c57384aa37c58d11579e20c00760.asciidoc
new file mode 100644
index 000000000..349bd2277
--- /dev/null
+++ b/docs/doc_examples/4113c57384aa37c58d11579e20c00760.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 0,
+ _source: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/41175d304e660da2931764f9a4418fd3.asciidoc b/docs/doc_examples/41175d304e660da2931764f9a4418fd3.asciidoc
new file mode 100644
index 000000000..81079be09
--- /dev/null
+++ b/docs/doc_examples/41175d304e660da2931764f9a4418fd3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updatePipeline({
+ connector_id: "my-connector",
+ pipeline: {
+ extract_binary_content: true,
+ name: "my-connector-pipeline",
+ reduce_whitespace: true,
+ run_ml_inference: true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/41195ef13af0465cdee1ae18f6c00fde.asciidoc b/docs/doc_examples/41195ef13af0465cdee1ae18f6c00fde.asciidoc
new file mode 100644
index 000000000..3d9e94a58
--- /dev/null
+++ b/docs/doc_examples/41195ef13af0465cdee1ae18f6c00fde.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.stop();
+console.log(response);
+----
diff --git a/docs/doc_examples/412f8238ab5182678f1d8f6383031b11.asciidoc b/docs/doc_examples/412f8238ab5182678f1d8f6383031b11.asciidoc
new file mode 100644
index 000000000..242c7984d
--- /dev/null
+++ b/docs/doc_examples/412f8238ab5182678f1d8f6383031b11.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getAlias({
+ index: "my-data-stream",
+ name: "my-alias",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc b/docs/doc_examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc
new file mode 100644
index 000000000..0d0213521
--- /dev/null
+++ b/docs/doc_examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ "http.client.ip": {
+ type: "ip",
+ script:
+ '\n String clientip=dissect(\'%{clientip} %{ident} %{auth} [%{@timestamp}] "%{verb} %{request} HTTP/%{httpversion}" %{status} %{size}\').extract(doc["message"].value)?.clientip;\n if (clientip != null) emit(clientip);\n ',
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/415b46bc2b7a7b4dcf9a73ac67ea20e9.asciidoc b/docs/doc_examples/415b46bc2b7a7b4dcf9a73ac67ea20e9.asciidoc
new file mode 100644
index 000000000..687bf0527
--- /dev/null
+++ b/docs/doc_examples/415b46bc2b7a7b4dcf9a73ac67ea20e9.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "circles",
+ id: 2,
+ pipeline: "polygonize_circles",
+ document: {
+ circle: {
+ type: "circle",
+ radius: "40m",
+ coordinates: [30, 10],
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.get({
+ index: "circles",
+ id: 2,
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/416a3ba11232d3c078c1c31340cf356f.asciidoc b/docs/doc_examples/416a3ba11232d3c078c1c31340cf356f.asciidoc
new file mode 100644
index 000000000..eb2c98ce7
--- /dev/null
+++ b/docs/doc_examples/416a3ba11232d3c078c1c31340cf356f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ tags_schema: "styled",
+ fields: {
+ comment: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc b/docs/doc_examples/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc
new file mode 100644
index 000000000..f6aaab8ed
--- /dev/null
+++ b/docs/doc_examples/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ date: {
+ type: "date",
+ format: "yyyy-MM-dd",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/41dbd79f624b998d01c10921e9a35c4b.asciidoc b/docs/doc_examples/41dbd79f624b998d01c10921e9a35c4b.asciidoc
new file mode 100644
index 000000000..401ace1c2
--- /dev/null
+++ b/docs/doc_examples/41dbd79f624b998d01c10921e9a35c4b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ doc: {
+ name: "new_name",
+ },
+ detect_noop: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/41fd33a293a575bd71a1fac7bcc8b47c.asciidoc b/docs/doc_examples/41fd33a293a575bd71a1fac7bcc8b47c.asciidoc
new file mode 100644
index 000000000..b1a830762
--- /dev/null
+++ b/docs/doc_examples/41fd33a293a575bd71a1fac7bcc8b47c.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my-app",
+ search_application: {
+ indices: ["index1", "index2"],
+ template: {
+ script: {
+ source: {
+ query: {
+ query_string: {
+ query: "{{query_string}}",
+ default_field: "{{default_field}}",
+ },
+ },
+ },
+ params: {
+ query_string: "*",
+ default_field: "*",
+ },
+ },
+ dictionary: {
+ properties: {
+ query_string: {
+ type: "string",
+ },
+ default_field: {
+ type: "string",
+ enum: ["title", "description"],
+ },
+ additionalProperties: false,
+ },
+ required: ["query_string"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4207219a892339e8f3abe0df8723dd27.asciidoc b/docs/doc_examples/4207219a892339e8f3abe0df8723dd27.asciidoc
new file mode 100644
index 000000000..210aca690
--- /dev/null
+++ b/docs/doc_examples/4207219a892339e8f3abe0df8723dd27.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.metadata.administrator": "sysadmin@example.com",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/421e68e2b9789f0e8c08760d9e685d1c.asciidoc b/docs/doc_examples/421e68e2b9789f0e8c08760d9e685d1c.asciidoc
new file mode 100644
index 000000000..4ae947494
--- /dev/null
+++ b/docs/doc_examples/421e68e2b9789f0e8c08760d9e685d1c.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateJob({
+ job_id: "low_request_rate",
+ description: "An updated job",
+ detectors: {
+ detector_index: 0,
+ description: "An updated detector description",
+ },
+ groups: ["kibana_sample_data", "kibana_sample_web_logs"],
+ model_plot_config: {
+ enabled: true,
+ },
+ renormalization_window_days: 30,
+ background_persist_interval: "2h",
+ model_snapshot_retention_days: 7,
+ results_retention_days: 60,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/424fbf082cd4affb84439abfc916b597.asciidoc b/docs/doc_examples/424fbf082cd4affb84439abfc916b597.asciidoc
new file mode 100644
index 000000000..e5488b55b
--- /dev/null
+++ b/docs/doc_examples/424fbf082cd4affb84439abfc916b597.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.downsample({
+ index: "my-time-series-index",
+ target_index: "my-downsampled-time-series-index",
+ config: {
+ fixed_interval: "1d",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc b/docs/doc_examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc
new file mode 100644
index 000000000..4987afa62
--- /dev/null
+++ b/docs/doc_examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.threadPool({
+ v: "true",
+ s: "t,n",
+ h: "type,name,node_name,active,queue,rejected,completed",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4275ecbe4aa68d43a8a7139866610a27.asciidoc b/docs/doc_examples/4275ecbe4aa68d43a8a7139866610a27.asciidoc
new file mode 100644
index 000000000..27f37bc36
--- /dev/null
+++ b/docs/doc_examples/4275ecbe4aa68d43a8a7139866610a27.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ weighted_grade: {
+ weighted_avg: {
+ value: {
+ field: "grade",
+ },
+ weight: {
+ field: "weight",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc b/docs/doc_examples/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc
new file mode 100644
index 000000000..c45e9cde5
--- /dev/null
+++ b/docs/doc_examples/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-data-stream",
+ lazy: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/42bc7608bb675dd6238e2fecbb758d06.asciidoc b/docs/doc_examples/42bc7608bb675dd6238e2fecbb758d06.asciidoc
new file mode 100644
index 000000000..25619920d
--- /dev/null
+++ b/docs/doc_examples/42bc7608bb675dd6238e2fecbb758d06.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "postal_codes",
+ id: 1,
+ refresh: "wait_for",
+ document: {
+ location: {
+ type: "envelope",
+ coordinates: [
+ [13, 53],
+ [14, 52],
+ ],
+ },
+ postal_code: "96598",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/42d02087f1c8ab0452ef373079a76843.asciidoc b/docs/doc_examples/42d02087f1c8ab0452ef373079a76843.asciidoc
new file mode 100644
index 000000000..5290c3b81
--- /dev/null
+++ b/docs/doc_examples/42d02087f1c8ab0452ef373079a76843.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "stop",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/42deb4fe32afbe0f94185e256a79c447.asciidoc b/docs/doc_examples/42deb4fe32afbe0f94185e256a79c447.asciidoc
new file mode 100644
index 000000000..5c7b26d50
--- /dev/null
+++ b/docs/doc_examples/42deb4fe32afbe0f94185e256a79c447.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "stop_example",
+ settings: {
+ analysis: {
+ filter: {
+ english_stop: {
+ type: "stop",
+ stopwords: "_english_",
+ },
+ },
+ analyzer: {
+ rebuilt_stop: {
+ tokenizer: "lowercase",
+ filter: ["english_stop"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc b/docs/doc_examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc
new file mode 100644
index 000000000..141b7eb25
--- /dev/null
+++ b/docs/doc_examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "logs-nginx.access-prod",
+ alias: "logs",
+ },
+ },
+ {
+ add: {
+ index: "logs-my_app-default",
+ alias: "logs",
+ is_write_index: true,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/430705509f8367aef92be413f702520b.asciidoc b/docs/doc_examples/430705509f8367aef92be413f702520b.asciidoc
new file mode 100644
index 000000000..c95b05eac
--- /dev/null
+++ b/docs/doc_examples/430705509f8367aef92be413f702520b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateStatus({
+ connector_id: "my-connector",
+ status: "needs_configuration",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4310869b97d4224acaa6d66b1e196048.asciidoc b/docs/doc_examples/4310869b97d4224acaa6d66b1e196048.asciidoc
new file mode 100644
index 000000000..6eb4a744d
--- /dev/null
+++ b/docs/doc_examples/4310869b97d4224acaa6d66b1e196048.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ sparse_vector: {
+ field: "content_embedding",
+ inference_id: "my-elser-endpoint",
+ query: "How to avoid muscle soreness after running?",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4323f6d224847eccdce59c23e33fda0a.asciidoc b/docs/doc_examples/4323f6d224847eccdce59c23e33fda0a.asciidoc
new file mode 100644
index 000000000..e5c3d639c
--- /dev/null
+++ b/docs/doc_examples/4323f6d224847eccdce59c23e33fda0a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "cjk_bigram_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_cjk_bigram: {
+ tokenizer: "standard",
+ filter: ["cjk_bigram"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc b/docs/doc_examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc
new file mode 100644
index 000000000..a7ccd0173
--- /dev/null
+++ b/docs/doc_examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "my-index-2099.05.06-000001",
+ alias: "my-alias",
+ search_routing: "1",
+ index_routing: "2",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4342ccf6cc24fd80bd3cd1f9a4c2ef8e.asciidoc b/docs/doc_examples/4342ccf6cc24fd80bd3cd1f9a4c2ef8e.asciidoc
new file mode 100644
index 000000000..318e76153
--- /dev/null
+++ b/docs/doc_examples/4342ccf6cc24fd80bd3cd1f9a4c2ef8e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.clearScroll({
+ scroll_id: [
+ "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
+ "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB",
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/435e0d6a7d86e074d572d9671b7b9676.asciidoc b/docs/doc_examples/435e0d6a7d86e074d572d9671b7b9676.asciidoc
new file mode 100644
index 000000000..30012027c
--- /dev/null
+++ b/docs/doc_examples/435e0d6a7d86e074d572d9671b7b9676.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "Polygon",
+ coordinates: [
+ [
+ [100, 0],
+ [101, 0],
+ [101, 1],
+ [100, 1],
+ [100, 0],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/436d50b85fc8f0977d02059eec00719b.asciidoc b/docs/doc_examples/436d50b85fc8f0977d02059eec00719b.asciidoc
new file mode 100644
index 000000000..d1a2f84de
--- /dev/null
+++ b/docs/doc_examples/436d50b85fc8f0977d02059eec00719b.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: {
+ source: "ctx._source.counter += params.count",
+ lang: "painless",
+ params: {
+ count: 4,
+ },
+ },
+ upsert: {
+ counter: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/43854be6aae61edbea5f9ab988cb4ce5.asciidoc b/docs/doc_examples/43854be6aae61edbea5f9ab988cb4ce5.asciidoc
new file mode 100644
index 000000000..b76a70ba1
--- /dev/null
+++ b/docs/doc_examples/43854be6aae61edbea5f9ab988cb4ce5.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "xpack.security.transport.filter.allow": "172.16.0.0/24",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc b/docs/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc
new file mode 100644
index 000000000..bccc8d81f
--- /dev/null
+++ b/docs/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "restaurants",
+ retriever: {
+ knn: {
+ field: "vector",
+ query_vector: [10, 22, 77],
+ k: 10,
+ num_candidates: 10,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/43e86fbaeed068dcc981214338559b5a.asciidoc b/docs/doc_examples/43e86fbaeed068dcc981214338559b5a.asciidoc
new file mode 100644
index 000000000..e4327570f
--- /dev/null
+++ b/docs/doc_examples/43e86fbaeed068dcc981214338559b5a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.resolveCluster({
+ name: "my-index-*,cluster*:my-index-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/43f77ddf1ed8106d4f47a12d39df8e3b.asciidoc b/docs/doc_examples/43f77ddf1ed8106d4f47a12d39df8e3b.asciidoc
new file mode 100644
index 000000000..e3d7b4c0a
--- /dev/null
+++ b/docs/doc_examples/43f77ddf1ed8106d4f47a12d39df8e3b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "networks_lookup",
+ document: {
+ ip: "10.100.34.1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/43fe75fa9f3fca846598fdad58fd98cb.asciidoc b/docs/doc_examples/43fe75fa9f3fca846598fdad58fd98cb.asciidoc
new file mode 100644
index 000000000..c8b3ac2eb
--- /dev/null
+++ b/docs/doc_examples/43fe75fa9f3fca846598fdad58fd98cb.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.xpack.usage();
+console.log(response);
+----
diff --git a/docs/doc_examples/44198781d164a15be633d4469485a544.asciidoc b/docs/doc_examples/44198781d164a15be633d4469485a544.asciidoc
new file mode 100644
index 000000000..f3125224a
--- /dev/null
+++ b/docs/doc_examples/44198781d164a15be633d4469485a544.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-bit-vectors",
+ query: {
+ script_score: {
+ query: {
+ match_all: {},
+ },
+ script: {
+ source: "dotProduct(params.query_vector, 'my_dense_vector')",
+ params: {
+ query_vector: [8, 5, -15, 1, -7],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/441be98c597698bb2809372abf086c3e.asciidoc b/docs/doc_examples/441be98c597698bb2809372abf086c3e.asciidoc
new file mode 100644
index 000000000..07491e972
--- /dev/null
+++ b/docs/doc_examples/441be98c597698bb2809372abf086c3e.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ histogram_titles: {
+ terms: {
+ field: "my_text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/441f330f6872f995769db1ce2b9627e2.asciidoc b/docs/doc_examples/441f330f6872f995769db1ce2b9627e2.asciidoc
new file mode 100644
index 000000000..7c0193b54
--- /dev/null
+++ b/docs/doc_examples/441f330f6872f995769db1ce2b9627e2.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ stored_fields: [],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44231f7cdd5c3a21025861cdef31e355.asciidoc b/docs/doc_examples/44231f7cdd5c3a21025861cdef31e355.asciidoc
new file mode 100644
index 000000000..694e5ee8e
--- /dev/null
+++ b/docs/doc_examples/44231f7cdd5c3a21025861cdef31e355.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shrink({
+ index: "my-index",
+ target: "my-shrunken-index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4427517dcd8ec9997541150cdc11a0de.asciidoc b/docs/doc_examples/4427517dcd8ec9997541150cdc11a0de.asciidoc
new file mode 100644
index 000000000..c98321130
--- /dev/null
+++ b/docs/doc_examples/4427517dcd8ec9997541150cdc11a0de.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.deleteRepository({
+ name: "my-repo",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4435b654994b575ba181ea679871c78c.asciidoc b/docs/doc_examples/4435b654994b575ba181ea679871c78c.asciidoc
new file mode 100644
index 000000000..54a3e4134
--- /dev/null
+++ b/docs/doc_examples/4435b654994b575ba181ea679871c78c.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc b/docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc
new file mode 100644
index 000000000..fc102c343
--- /dev/null
+++ b/docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkDeleteRole({
+ names: ["my_admin_role", "my_user_role"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/443dd902f64b3217505c9595839c3b2d.asciidoc b/docs/doc_examples/443dd902f64b3217505c9595839c3b2d.asciidoc
new file mode 100644
index 000000000..eb32eb4b5
--- /dev/null
+++ b/docs/doc_examples/443dd902f64b3217505c9595839c3b2d.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ indices_boost: [
+ {
+ "my-alias": 1.4,
+ },
+ {
+ "my-index*": 1.3,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc b/docs/doc_examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc
new file mode 100644
index 000000000..057b4dad6
--- /dev/null
+++ b/docs/doc_examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-weather-sensor-index-template",
+ index_patterns: ["metrics-weather_sensors-*"],
+ data_stream: {},
+ template: {
+ settings: {
+ "index.mode": "time_series",
+ "index.lifecycle.name": "my-lifecycle-policy",
+ },
+ mappings: {
+ properties: {
+ sensor_id: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ location: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ temperature: {
+ type: "half_float",
+ time_series_metric: "gauge",
+ },
+ humidity: {
+ type: "half_float",
+ time_series_metric: "gauge",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ },
+ priority: 500,
+ _meta: {
+ description: "Template for my weather sensor data",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc b/docs/doc_examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc
new file mode 100644
index 000000000..c582b4fd4
--- /dev/null
+++ b/docs/doc_examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "http.responses": "304",
+ },
+ },
+ fields: ["http.client_ip", "timestamp", "http.verb"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/446e8fc8ccfb13bb5ec64e32a5676d18.asciidoc b/docs/doc_examples/446e8fc8ccfb13bb5ec64e32a5676d18.asciidoc
new file mode 100644
index 000000000..706cf1e73
--- /dev/null
+++ b/docs/doc_examples/446e8fc8ccfb13bb5ec64e32a5676d18.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["elision"],
+ text: "j’examine près du wharf",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4479e8c63a04fa22207a6a8803eadcad.asciidoc b/docs/doc_examples/4479e8c63a04fa22207a6a8803eadcad.asciidoc
new file mode 100644
index 000000000..11cb7a2ee
--- /dev/null
+++ b/docs/doc_examples/4479e8c63a04fa22207a6a8803eadcad.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.awareness.attributes": "rack_id",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44939997b0f2601f82a93585a879f65a.asciidoc b/docs/doc_examples/44939997b0f2601f82a93585a879f65a.asciidoc
new file mode 100644
index 000000000..71cbc6b0b
--- /dev/null
+++ b/docs/doc_examples/44939997b0f2601f82a93585a879f65a.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "simple_pattern_split",
+ pattern: "_",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "an_underscored_phrase",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc b/docs/doc_examples/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc
new file mode 100644
index 000000000..36dcdadb5
--- /dev/null
+++ b/docs/doc_examples/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.requests.cache.enable": false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44b8a236d7cfb31c43c6d066ae16d8cd.asciidoc b/docs/doc_examples/44b8a236d7cfb31c43c6d066ae16d8cd.asciidoc
new file mode 100644
index 000000000..f6a9a9d5c
--- /dev/null
+++ b/docs/doc_examples/44b8a236d7cfb31c43c6d066ae16d8cd.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ profile: true,
+ query: {
+ match: {
+ message: "GET /search",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44bca3f17d403517af3616754dc795bb.asciidoc b/docs/doc_examples/44bca3f17d403517af3616754dc795bb.asciidoc
new file mode 100644
index 000000000..16f58b881
--- /dev/null
+++ b/docs/doc_examples/44bca3f17d403517af3616754dc795bb.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.explain({
+ index: "my-index-000001",
+ id: 0,
+ query: {
+ script_score: {
+ query: {
+ match: {
+ message: "elasticsearch",
+ },
+ },
+ script: {
+ source:
+ "\n long count = doc['count'].value;\n double normalizedCount = count / 10;\n if (explanation != null) {\n explanation.set('normalized count = count / 10 = ' + count + ' / 10 = ' + normalizedCount);\n }\n return normalizedCount;\n ",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc b/docs/doc_examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc
new file mode 100644
index 000000000..19c75356f
--- /dev/null
+++ b/docs/doc_examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ script: {
+ source: "ctx._source.count++",
+ lang: "painless",
+ },
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44db41b8465af951e366da97ade63bc1.asciidoc b/docs/doc_examples/44db41b8465af951e366da97ade63bc1.asciidoc
new file mode 100644
index 000000000..7dbba3532
--- /dev/null
+++ b/docs/doc_examples/44db41b8465af951e366da97ade63bc1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.reloadSearchAnalyzers({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44dd65d69267017fa2fb2cffadef40bb.asciidoc b/docs/doc_examples/44dd65d69267017fa2fb2cffadef40bb.asciidoc
new file mode 100644
index 000000000..3236cc23f
--- /dev/null
+++ b/docs/doc_examples/44dd65d69267017fa2fb2cffadef40bb.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ type_and_promoted: {
+ type: "keyword",
+ script: "emit(doc['type'].value + ' ' + doc['promoted'].value)",
+ },
+ },
+ aggs: {
+ type_promoted_count: {
+ cardinality: {
+ field: "type_and_promoted",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc b/docs/doc_examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc
new file mode 100644
index 000000000..22116d55c
--- /dev/null
+++ b/docs/doc_examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index_double",
+ mappings: {
+ properties: {
+ field: {
+ type: "double",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/451b441c3311103d0d2bdbab771b26d2.asciidoc b/docs/doc_examples/451b441c3311103d0d2bdbab771b26d2.asciidoc
new file mode 100644
index 000000000..7d5446de3
--- /dev/null
+++ b/docs/doc_examples/451b441c3311103d0d2bdbab771b26d2.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "my-search-template",
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "match": {\n {{=( )=}}\n "message": "(query_string)"\n (={{ }}=)\n }\n }\n }\n ',
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/451e7c29b2cf738cfc822f7c175bef56.asciidoc b/docs/doc_examples/451e7c29b2cf738cfc822f7c175bef56.asciidoc
new file mode 100644
index 000000000..9e46b4e15
--- /dev/null
+++ b/docs/doc_examples/451e7c29b2cf738cfc822f7c175bef56.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-index-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ lifecycle: {
+ data_retention: "7d",
+ },
+ },
+ _meta: {
+ description: "Template with data stream lifecycle",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4527d9bb12cf738111a188af235d5d4c.asciidoc b/docs/doc_examples/4527d9bb12cf738111a188af235d5d4c.asciidoc
new file mode 100644
index 000000000..16cc82185
--- /dev/null
+++ b/docs/doc_examples/4527d9bb12cf738111a188af235d5d4c.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ runtime_mappings: {
+ "http.clientip": {
+ type: "ip",
+ script:
+ "\n String clientip=grok('%{COMMONAPACHELOG}').extract(doc[\"message\"].value)?.clientip;\n if (clientip != null) emit(clientip);\n ",
+ },
+ },
+ query: {
+ match: {
+ "http.clientip": "40.135.0.0",
+ },
+ },
+ fields: ["http.clientip"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/45499ed1824d1d7cb59972580d2344cb.asciidoc b/docs/doc_examples/45499ed1824d1d7cb59972580d2344cb.asciidoc
new file mode 100644
index 000000000..d81463bae
--- /dev/null
+++ b/docs/doc_examples/45499ed1824d1d7cb59972580d2344cb.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_index",
+ query: {
+ range: {
+ my_counter: {
+ gte: "9223372036854775808",
+ lte: "18446744073709551615",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/455029c3d66306ad5d48f6dbddaf7324.asciidoc b/docs/doc_examples/455029c3d66306ad5d48f6dbddaf7324.asciidoc
new file mode 100644
index 000000000..ead1639ea
--- /dev/null
+++ b/docs/doc_examples/455029c3d66306ad5d48f6dbddaf7324.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "metrics_index",
+ mappings: {
+ properties: {
+ latency_histo: {
+ type: "histogram",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ refresh: "true",
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ total_latency: {
+ sum: {
+ field: "latency_histo",
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/4553e0acb6336687d61eaecc73f517b7.asciidoc b/docs/doc_examples/4553e0acb6336687d61eaecc73f517b7.asciidoc
new file mode 100644
index 000000000..803f24081
--- /dev/null
+++ b/docs/doc_examples/4553e0acb6336687d61eaecc73f517b7.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ char_filter: ["my_mappings_char_filter"],
+ },
+ },
+ char_filter: {
+ my_mappings_char_filter: {
+ type: "mapping",
+ mappings: [":) => _happy_", ":( => _sad_"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/45813d971bfa890ffa2f51f3f480cce5.asciidoc b/docs/doc_examples/45813d971bfa890ffa2f51f3f480cce5.asciidoc
new file mode 100644
index 000000000..892f6073f
--- /dev/null
+++ b/docs/doc_examples/45813d971bfa890ffa2f51f3f480cce5.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test_index",
+ query: {
+ percolate: {
+ field: "query",
+ document: {
+ body: "Bycicles are missing",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/458b2228aed7464d915a5d73cb6b98f6.asciidoc b/docs/doc_examples/458b2228aed7464d915a5d73cb6b98f6.asciidoc
new file mode 100644
index 000000000..1773a1bdc
--- /dev/null
+++ b/docs/doc_examples/458b2228aed7464d915a5d73cb6b98f6.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.snapshots({
+ repository: "repo1",
+ v: "true",
+ s: "id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/45b74f1904533fdb37a5a6f3c8f4ec9b.asciidoc b/docs/doc_examples/45b74f1904533fdb37a5a6f3c8f4ec9b.asciidoc
new file mode 100644
index 000000000..f992abc2d
--- /dev/null
+++ b/docs/doc_examples/45b74f1904533fdb37a5a6f3c8f4ec9b.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "edge_ngram",
+ min_gram: 2,
+ max_gram: 10,
+ token_chars: ["letter", "digit"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "2 Quick Foxes.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/45c6e54a9c9e08623af96752b4bde346.asciidoc b/docs/doc_examples/45c6e54a9c9e08623af96752b4bde346.asciidoc
new file mode 100644
index 000000000..2ab19e442
--- /dev/null
+++ b/docs/doc_examples/45c6e54a9c9e08623af96752b4bde346.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "12km",
+ "pin.location": "POINT (-70 40)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc b/docs/doc_examples/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc
new file mode 100644
index 000000000..b7156b497
--- /dev/null
+++ b/docs/doc_examples/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.enable": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/46064e81620162a23e75002a7eeb8b10.asciidoc b/docs/doc_examples/46064e81620162a23e75002a7eeb8b10.asciidoc
new file mode 100644
index 000000000..3f6243b38
--- /dev/null
+++ b/docs/doc_examples/46064e81620162a23e75002a7eeb8b10.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.moveToStep({
+ index: "my-index-000001",
+ current_step: {
+ phase: "hot",
+ action: "complete",
+ name: "complete",
+ },
+ next_step: {
+ phase: "warm",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/46103fee3cd5f53dc75123def82d52ad.asciidoc b/docs/doc_examples/46103fee3cd5f53dc75123def82d52ad.asciidoc
new file mode 100644
index 000000000..9830c6bf9
--- /dev/null
+++ b/docs/doc_examples/46103fee3cd5f53dc75123def82d52ad.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ settings: {
+ "index.refresh_interval": "30s",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/464dffb6a6e24a860223d1c32b232f95.asciidoc b/docs/doc_examples/464dffb6a6e24a860223d1c32b232f95.asciidoc
new file mode 100644
index 000000000..617c0423c
--- /dev/null
+++ b/docs/doc_examples/464dffb6a6e24a860223d1c32b232f95.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ filter: {
+ my_shingle_filter: {
+ type: "shingle",
+ min_shingle_size: 5,
+ max_shingle_size: 5,
+ output_unigrams: false,
+ },
+ my_minhash_filter: {
+ type: "min_hash",
+ hash_count: 1,
+ bucket_count: 512,
+ hash_set_size: 1,
+ with_rotation: true,
+ },
+ },
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["my_shingle_filter", "my_minhash_filter"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ fingerprint: {
+ type: "text",
+ analyzer: "my_analyzer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4659f639d71a54df571260ee5798dbb3.asciidoc b/docs/doc_examples/4659f639d71a54df571260ee5798dbb3.asciidoc
new file mode 100644
index 000000000..a5bcaeefe
--- /dev/null
+++ b/docs/doc_examples/4659f639d71a54df571260ee5798dbb3.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "zoomed-in": {
+ filter: {
+ geo_bounding_box: {
+ location: {
+ top_left: "POINT (4.9 52.4)",
+ bottom_right: "POINT (5.0 52.3)",
+ },
+ },
+ },
+ aggregations: {
+ zoom1: {
+ geotile_grid: {
+ field: "location",
+ precision: 22,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/46658f00edc4865dfe472a392374cd0f.asciidoc b/docs/doc_examples/46658f00edc4865dfe472a392374cd0f.asciidoc
new file mode 100644
index 000000000..5c8453711
--- /dev/null
+++ b/docs/doc_examples/46658f00edc4865dfe472a392374cd0f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getTemplate({
+ name: "template_1",
+ filter_path: "*.version",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4670dd81a9865e07ae74ae8b0266e384.asciidoc b/docs/doc_examples/4670dd81a9865e07ae74ae8b0266e384.asciidoc
new file mode 100644
index 000000000..399823687
--- /dev/null
+++ b/docs/doc_examples/4670dd81a9865e07ae74ae8b0266e384.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "node_upgrade",
+ size: 0,
+ runtime_mappings: {
+ "startup_time_before.adjusted": {
+ type: "long",
+ script: {
+ source: "emit(doc['startup_time_before'].value - params.adjustment)",
+ params: {
+ adjustment: 10,
+ },
+ },
+ },
+ },
+ aggs: {
+ startup_time_ttest: {
+ t_test: {
+ a: {
+ field: "startup_time_before.adjusted",
+ },
+ b: {
+ field: "startup_time_after",
+ },
+ type: "paired",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/467833bd44b35a89a7fe0d7df5f253f1.asciidoc b/docs/doc_examples/467833bd44b35a89a7fe0d7df5f253f1.asciidoc
new file mode 100644
index 000000000..d2335b434
--- /dev/null
+++ b/docs/doc_examples/467833bd44b35a89a7fe0d7df5f253f1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "pattern",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/468f7ec42cdd8287cdea3ec1cea4a514.asciidoc b/docs/doc_examples/468f7ec42cdd8287cdea3ec1cea4a514.asciidoc
new file mode 100644
index 000000000..f62702896
--- /dev/null
+++ b/docs/doc_examples/468f7ec42cdd8287cdea3ec1cea4a514.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "my-index-000001",
+ id: 1,
+ script: {
+ source:
+ "if (ctx._source.tags.contains(params['tag'])) { ctx._source.tags.remove(ctx._source.tags.indexOf(params['tag'])) }",
+ lang: "painless",
+ params: {
+ tag: "blue",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/46a0eaaf5c881f1ba716d1812b36c724.asciidoc b/docs/doc_examples/46a0eaaf5c881f1ba716d1812b36c724.asciidoc
new file mode 100644
index 000000000..f830179d0
--- /dev/null
+++ b/docs/doc_examples/46a0eaaf5c881f1ba716d1812b36c724.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.putAutoFollowPattern({
+ name: "logs-generic-default",
+ remote_cluster: "clusterB",
+ leader_index_patterns: [".ds-logs-generic-default-20*"],
+ leader_index_exclusion_patterns: "*-replicated_from_clustera",
+ follow_index_pattern: "{{leader_index}}-replicated_from_clusterb",
+});
+console.log(response);
+
+const response1 = await client.ccr.putAutoFollowPattern({
+ name: "logs-generic-default",
+ remote_cluster: "clusterA",
+ leader_index_patterns: [".ds-logs-generic-default-20*"],
+ leader_index_exclusion_patterns: "*-replicated_from_clusterb",
+ follow_index_pattern: "{{leader_index}}-replicated_from_clustera",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/46b1c1f6e0c86528be84c373eeb8d425.asciidoc b/docs/doc_examples/46b1c1f6e0c86528be84c373eeb8d425.asciidoc
new file mode 100644
index 000000000..56d7ce9fd
--- /dev/null
+++ b/docs/doc_examples/46b1c1f6e0c86528be84c373eeb8d425.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.post({
+ acknowledge: "true",
+ licenses: [
+ {
+ uid: "893361dc-9749-4997-93cb-802e3d7fa4xx",
+ type: "basic",
+ issue_date_in_millis: 1411948800000,
+ expiry_date_in_millis: 1914278399999,
+ max_nodes: 1,
+ issued_to: "issuedTo",
+ issuer: "issuer",
+ signature: "xx",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/46c5c14f20118dcf519ff6ef21360209.asciidoc b/docs/doc_examples/46c5c14f20118dcf519ff6ef21360209.asciidoc
new file mode 100644
index 000000000..af98ccc6c
--- /dev/null
+++ b/docs/doc_examples/46c5c14f20118dcf519ff6ef21360209.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "datastream_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_docs: 1,
+ },
+ downsample: {
+ fixed_interval: "1h",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/46ce40227fa60aa6ba435f366b3a1f5f.asciidoc b/docs/doc_examples/46ce40227fa60aa6ba435f366b3a1f5f.asciidoc
new file mode 100644
index 000000000..7b9aa0f1b
--- /dev/null
+++ b/docs/doc_examples/46ce40227fa60aa6ba435f366b3a1f5f.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.pauseFollow({
+ index: "kibana_sample_data_ecommerce2",
+});
+console.log(response);
+
+const response1 = await client.indices.close({
+ index: "kibana_sample_data_ecommerce2",
+});
+console.log(response1);
+
+const response2 = await client.ccr.unfollow({
+ index: "kibana_sample_data_ecommerce2",
+});
+console.log(response2);
+
+const response3 = await client.indices.open({
+ index: "kibana_sample_data_ecommerce2",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/46ebd468c3f132a4978088964466c5cd.asciidoc b/docs/doc_examples/46ebd468c3f132a4978088964466c5cd.asciidoc
new file mode 100644
index 000000000..731bf1009
--- /dev/null
+++ b/docs/doc_examples/46ebd468c3f132a4978088964466c5cd.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "apostrophe_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_apostrophe: {
+ tokenizer: "standard",
+ filter: ["apostrophe"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc b/docs/doc_examples/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc
new file mode 100644
index 000000000..6d000e16c
--- /dev/null
+++ b/docs/doc_examples/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["title"],
+ query: "this that thus",
+ minimum_should_match: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc b/docs/doc_examples/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc
new file mode 100644
index 000000000..e294a84c8
--- /dev/null
+++ b/docs/doc_examples/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.cancel({
+ task_id: "2j8UKw1bRO283PMwDugNNg:5326",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4752f82fec8b46e5a4b3788b76e3041f.asciidoc b/docs/doc_examples/4752f82fec8b46e5a4b3788b76e3041f.asciidoc
new file mode 100644
index 000000000..35aa486ba
--- /dev/null
+++ b/docs/doc_examples/4752f82fec8b46e5a4b3788b76e3041f.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ migrate: {
+ enabled: false,
+ },
+ allocate: {
+ include: {
+ rack_id: "one,two",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/47909e194d10743093f4a22c27a85925.asciidoc b/docs/doc_examples/47909e194d10743093f4a22c27a85925.asciidoc
new file mode 100644
index 000000000..2a78ec314
--- /dev/null
+++ b/docs/doc_examples/47909e194d10743093f4a22c27a85925.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 10000,
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+ pit: {
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+ keep_alive: "1m",
+ },
+ sort: [
+ {
+ "@timestamp": {
+ order: "asc",
+ format: "strict_date_optional_time_nanos",
+ numeric_type: "date_nanos",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/47e6dfb5b09d954c9c0c33fda2b6c66d.asciidoc b/docs/doc_examples/47e6dfb5b09d954c9c0c33fda2b6c66d.asciidoc
new file mode 100644
index 000000000..dd6d26ed1
--- /dev/null
+++ b/docs/doc_examples/47e6dfb5b09d954c9c0c33fda2b6c66d.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "jacknich",
+ password: "l0ng-r4nd0m-p@ssw0rd",
+ roles: ["admin", "other_role1"],
+ full_name: "Jack Nicholson",
+ email: "jacknich@example.com",
+ metadata: {
+ intelligence: 7,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/47fde7874e15a37242993fd69c62063b.asciidoc b/docs/doc_examples/47fde7874e15a37242993fd69c62063b.asciidoc
new file mode 100644
index 000000000..4dba02a58
--- /dev/null
+++ b/docs/doc_examples/47fde7874e15a37242993fd69c62063b.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_ranks: {
+ percentile_ranks: {
+ field: "load_time",
+ values: [500, 600],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/480e531db799c4c909afd8e2a73a8d0b.asciidoc b/docs/doc_examples/480e531db799c4c909afd8e2a73a8d0b.asciidoc
new file mode 100644
index 000000000..f3ae3f5f4
--- /dev/null
+++ b/docs/doc_examples/480e531db799c4c909afd8e2a73a8d0b.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge();
+console.log(response);
+----
diff --git a/docs/doc_examples/4818a1288ac24a56d6d6a4130ee70202.asciidoc b/docs/doc_examples/4818a1288ac24a56d6d6a4130ee70202.asciidoc
new file mode 100644
index 000000000..492d8778a
--- /dev/null
+++ b/docs/doc_examples/4818a1288ac24a56d6d6a4130ee70202.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getScript({
+ id: "my-search-template",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4824a823a830a2a5d990eacfd783ac22.asciidoc b/docs/doc_examples/4824a823a830a2a5d990eacfd783ac22.asciidoc
new file mode 100644
index 000000000..e74b54883
--- /dev/null
+++ b/docs/doc_examples/4824a823a830a2a5d990eacfd783ac22.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ slice: {
+ id: 0,
+ max: 2,
+ },
+ query: {
+ range: {
+ "http.response.bytes": {
+ lt: 2000000,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.deleteByQuery({
+ index: "my-index-000001",
+ slice: {
+ id: 1,
+ max: 2,
+ },
+ query: {
+ range: {
+ "http.response.bytes": {
+ lt: 2000000,
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/48313f620c2871b6f4019b66be730109.asciidoc b/docs/doc_examples/48313f620c2871b6f4019b66be730109.asciidoc
new file mode 100644
index 000000000..0d8ee0190
--- /dev/null
+++ b/docs/doc_examples/48313f620c2871b6f4019b66be730109.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "shirts",
+ query: {
+ bool: {
+ filter: {
+ term: {
+ brand: "gucci",
+ },
+ },
+ },
+ },
+ aggs: {
+ colors: {
+ terms: {
+ field: "color",
+ },
+ },
+ color_red: {
+ filter: {
+ term: {
+ color: "red",
+ },
+ },
+ aggs: {
+ models: {
+ terms: {
+ field: "model",
+ },
+ },
+ },
+ },
+ },
+ post_filter: {
+ term: {
+ color: "red",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/483d669ec0768bc4e275a568c6164704.asciidoc b/docs/doc_examples/483d669ec0768bc4e275a568c6164704.asciidoc
new file mode 100644
index 000000000..44e105ea9
--- /dev/null
+++ b/docs/doc_examples/483d669ec0768bc4e275a568c6164704.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.pauseFollow({
+ index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/484e24d1ed1a154ba9753e6090d38d78.asciidoc b/docs/doc_examples/484e24d1ed1a154ba9753e6090d38d78.asciidoc
new file mode 100644
index 000000000..ce94875dd
--- /dev/null
+++ b/docs/doc_examples/484e24d1ed1a154ba9753e6090d38d78.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "point",
+ coordinates: [-377.03653, 389.897676],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/487f0e07fd83c05f9763e0795c525e2e.asciidoc b/docs/doc_examples/487f0e07fd83c05f9763e0795c525e2e.asciidoc
new file mode 100644
index 000000000..4d59de169
--- /dev/null
+++ b/docs/doc_examples/487f0e07fd83c05f9763e0795c525e2e.asciidoc
@@ -0,0 +1,99 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ my_location: {
+ type: "geo_point",
+ },
+ group: {
+ type: "keyword",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "test",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ my_location: {
+ lat: 52.373184,
+ lon: 4.889187,
+ },
+ "@timestamp": "2023-01-02T09:00:00Z",
+ },
+ {
+ index: {},
+ },
+ {
+ my_location: {
+ lat: 52.370159,
+ lon: 4.885057,
+ },
+ "@timestamp": "2023-01-02T10:00:00Z",
+ },
+ {
+ index: {},
+ },
+ {
+ my_location: {
+ lat: 52.369219,
+ lon: 4.901618,
+ },
+ "@timestamp": "2023-01-02T13:00:00Z",
+ },
+ {
+ index: {},
+ },
+ {
+ my_location: {
+ lat: 52.374081,
+ lon: 4.91235,
+ },
+ "@timestamp": "2023-01-02T16:00:00Z",
+ },
+ {
+ index: {},
+ },
+ {
+ my_location: {
+ lat: 52.371667,
+ lon: 4.914722,
+ },
+ "@timestamp": "2023-01-03T12:00:00Z",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "test",
+ filter_path: "aggregations",
+ aggs: {
+ line: {
+ geo_line: {
+ point: {
+ field: "my_location",
+ },
+ sort: {
+ field: "@timestamp",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/488f6df1df71972392b670ce557f7ff3.asciidoc b/docs/doc_examples/488f6df1df71972392b670ce557f7ff3.asciidoc
new file mode 100644
index 000000000..0aabaf773
--- /dev/null
+++ b/docs/doc_examples/488f6df1df71972392b670ce557f7ff3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putTemplate({
+ name: "template_1",
+ index_patterns: ["my-index-*"],
+ order: 0,
+ settings: {
+ number_of_shards: 1,
+ },
+ version: 123,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/48d9697a14dfe131325521f48a7adc84.asciidoc b/docs/doc_examples/48d9697a14dfe131325521f48a7adc84.asciidoc
new file mode 100644
index 000000000..1798f2fb9
--- /dev/null
+++ b/docs/doc_examples/48d9697a14dfe131325521f48a7adc84.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ id: "my-search-template",
+ params: {
+ query_string: "My string",
+ text_fields: [
+ {
+ user_name: "John",
+ last: false,
+ },
+ {
+ user_name: "kimchy",
+ last: true,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/48de51de87a8ad9fd8b8db1ca25b85c1.asciidoc b/docs/doc_examples/48de51de87a8ad9fd8b8db1ca25b85c1.asciidoc
new file mode 100644
index 000000000..f367f00be
--- /dev/null
+++ b/docs/doc_examples/48de51de87a8ad9fd8b8db1ca25b85c1.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.close({
+ index: "index",
+});
+console.log(response);
+
+const response1 = await client.indices.putSettings({
+ index: "index",
+ settings: {
+ index: {
+ similarity: {
+ default: {
+ type: "boolean",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.open({
+ index: "index",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/48e142e6c69014e0509d4c9251749d77.asciidoc b/docs/doc_examples/48e142e6c69014e0509d4c9251749d77.asciidoc
new file mode 100644
index 000000000..7c4401c7d
--- /dev/null
+++ b/docs/doc_examples/48e142e6c69014e0509d4c9251749d77.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "openai-embeddings",
+ inference_config: {
+ service: "openai",
+ service_settings: {
+ api_key: "",
+ model_id: "text-embedding-3-small",
+ dimensions: 128,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49100a4f53c0ba345fadacdc4f2f86e4.asciidoc b/docs/doc_examples/49100a4f53c0ba345fadacdc4f2f86e4.asciidoc
new file mode 100644
index 000000000..f72955f38
--- /dev/null
+++ b/docs/doc_examples/49100a4f53c0ba345fadacdc4f2f86e4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ q: "kimchy",
+ filter_path: "took,hits.hits._id,hits.hits._score",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4955bae30f265b9e436f82b015de6d7e.asciidoc b/docs/doc_examples/4955bae30f265b9e436f82b015de6d7e.asciidoc
new file mode 100644
index 000000000..400ff437c
--- /dev/null
+++ b/docs/doc_examples/4955bae30f265b9e436f82b015de6d7e.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ pretty: "true",
+ query: {
+ terms: {
+ color: {
+ index: "my-index-000001",
+ id: "2",
+ path: "color",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/496d35c89dc991a1509f7e8fb93ade45.asciidoc b/docs/doc_examples/496d35c89dc991a1509f7e8fb93ade45.asciidoc
new file mode 100644
index 000000000..04eff1a93
--- /dev/null
+++ b/docs/doc_examples/496d35c89dc991a1509f7e8fb93ade45.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "bengali_example",
+ settings: {
+ analysis: {
+ filter: {
+ bengali_stop: {
+ type: "stop",
+ stopwords: "_bengali_",
+ },
+ bengali_keywords: {
+ type: "keyword_marker",
+ keywords: ["উদাহরণ"],
+ },
+ bengali_stemmer: {
+ type: "stemmer",
+ language: "bengali",
+ },
+ },
+ analyzer: {
+ rebuilt_bengali: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "decimal_digit",
+ "bengali_keywords",
+ "indic_normalization",
+ "bengali_normalization",
+ "bengali_stop",
+ "bengali_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4980d6fcb369692b0b29ddc6767d4324.asciidoc b/docs/doc_examples/4980d6fcb369692b0b29ddc6767d4324.asciidoc
new file mode 100644
index 000000000..520c175f2
--- /dev/null
+++ b/docs/doc_examples/4980d6fcb369692b0b29ddc6767d4324.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain({
+ index: "my-index-000001",
+ shard: 0,
+ primary: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc b/docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc
new file mode 100644
index 000000000..b5d5d91f8
--- /dev/null
+++ b/docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.startTrainedModelDeployment({
+ model_id: "my_model",
+ deployment_id: "my_model_for_search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4989cc97ce1c8fff634a10d343031bd0.asciidoc b/docs/doc_examples/4989cc97ce1c8fff634a10d343031bd0.asciidoc
new file mode 100644
index 000000000..6b446681f
--- /dev/null
+++ b/docs/doc_examples/4989cc97ce1c8fff634a10d343031bd0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ v: "true",
+ h: "state,node",
+ s: "state",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc b/docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
new file mode 100644
index 000000000..0c497534a
--- /dev/null
+++ b/docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ text: "quick brown fox",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ text: "quick fox",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ match: {
+ text: "quick brown fox",
+ },
+ },
+ script: {
+ source: "_termStats.termFreq().getAverage()",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/49c052a748c943180db78fee8e144239.asciidoc b/docs/doc_examples/49c052a748c943180db78fee8e144239.asciidoc
new file mode 100644
index 000000000..f4bcb9fdb
--- /dev/null
+++ b/docs/doc_examples/49c052a748c943180db78fee8e144239.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearApiKeyCache({
+ ids: "yVGMr3QByxdh1MSaicYx,YoiMaqREw0YVpjn40iMg",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc b/docs/doc_examples/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc
new file mode 100644
index 000000000..c1278b3f1
--- /dev/null
+++ b/docs/doc_examples/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ pretty: "true",
+ detailed: "true",
+ group_by: "parents",
+ human: "true",
+ actions: "*data/read/esql",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49cb3f48a0097bfc597c52fa51c6d379.asciidoc b/docs/doc_examples/49cb3f48a0097bfc597c52fa51c6d379.asciidoc
new file mode 100644
index 000000000..c7d0ad054
--- /dev/null
+++ b/docs/doc_examples/49cb3f48a0097bfc597c52fa51c6d379.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "saml-service-role",
+ cluster: ["manage_saml", "manage_token"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49d87c2eb7314ed34221c5fb4f21dfcc.asciidoc b/docs/doc_examples/49d87c2eb7314ed34221c5fb4f21dfcc.asciidoc
new file mode 100644
index 000000000..8c7811081
--- /dev/null
+++ b/docs/doc_examples/49d87c2eb7314ed34221c5fb4f21dfcc.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "analyze_sample",
+ normalizer: "my_normalizer",
+ text: "BaR",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49e8773a34fcbf825de38426cff5509c.asciidoc b/docs/doc_examples/49e8773a34fcbf825de38426cff5509c.asciidoc
new file mode 100644
index 000000000..db9a6bca1
--- /dev/null
+++ b/docs/doc_examples/49e8773a34fcbf825de38426cff5509c.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-knn-index",
+ profile: true,
+ knn: {
+ field: "my-vector",
+ query_vector: [-5, 9, -12],
+ k: 3,
+ num_candidates: 100,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/49f4d2a461536d150e16b1e0a3148678.asciidoc b/docs/doc_examples/49f4d2a461536d150e16b1e0a3148678.asciidoc
new file mode 100644
index 000000000..ddfea5d4b
--- /dev/null
+++ b/docs/doc_examples/49f4d2a461536d150e16b1e0a3148678.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache({
+ index: "my-index-000001",
+ fielddata: "true",
+});
+console.log(response);
+
+const response1 = await client.indices.clearCache({
+ index: "my-index-000001",
+ query: "true",
+});
+console.log(response1);
+
+const response2 = await client.indices.clearCache({
+ index: "my-index-000001",
+ request: "true",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/4a1951844bd39f26961bfc965f3432b1.asciidoc b/docs/doc_examples/4a1951844bd39f26961bfc965f3432b1.asciidoc
new file mode 100644
index 000000000..bfdaca2d6
--- /dev/null
+++ b/docs/doc_examples/4a1951844bd39f26961bfc965f3432b1.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ index: "my-index-000001",
+ docs: [
+ {
+ _id: "1",
+ },
+ {
+ _id: "2",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4a2080ae55d931eb0643cc3eb91ec524.asciidoc b/docs/doc_examples/4a2080ae55d931eb0643cc3eb91ec524.asciidoc
new file mode 100644
index 000000000..8b68c5966
--- /dev/null
+++ b/docs/doc_examples/4a2080ae55d931eb0643cc3eb91ec524.asciidoc
@@ -0,0 +1,53 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ fields: {
+ english: {
+ type: "text",
+ analyzer: "english",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "quick brown fox",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ text: "quick brown foxes",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ multi_match: {
+ query: "quick brown foxes",
+ fields: ["text", "text.english"],
+ type: "most_fields",
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/4a4b8a406681584a91c0e614c1fa4344.asciidoc b/docs/doc_examples/4a4b8a406681584a91c0e614c1fa4344.asciidoc
new file mode 100644
index 000000000..55a3cfae9
--- /dev/null
+++ b/docs/doc_examples/4a4b8a406681584a91c0e614c1fa4344.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-api-key",
+ expiration: "1d",
+ role_descriptors: {
+ "role-a": {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index-a*"],
+ privileges: ["read"],
+ },
+ ],
+ },
+ "role-b": {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index-b*"],
+ privileges: ["all"],
+ },
+ ],
+ },
+ },
+ metadata: {
+ application: "my-application",
+ environment: {
+ level: 1,
+ trusted: true,
+ tags: ["dev", "staging"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4a72c68b96f44e80463084dfc0449d51.asciidoc b/docs/doc_examples/4a72c68b96f44e80463084dfc0449d51.asciidoc
new file mode 100644
index 000000000..002ca35ca
--- /dev/null
+++ b/docs/doc_examples/4a72c68b96f44e80463084dfc0449d51.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ runtime_mappings: {
+ day_of_week: {
+ type: "keyword",
+ script: {
+ source:
+ "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
+ },
+ },
+ },
+ aggs: {
+ day_of_week: {
+ terms: {
+ field: "day_of_week",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4a7510a9c0468303658383c00796dad2.asciidoc b/docs/doc_examples/4a7510a9c0468303658383c00796dad2.asciidoc
new file mode 100644
index 000000000..f71abdb74
--- /dev/null
+++ b/docs/doc_examples/4a7510a9c0468303658383c00796dad2.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.mapping.ignore_malformed": true,
+ },
+ mappings: {
+ properties: {
+ number_one: {
+ type: "byte",
+ },
+ number_two: {
+ type: "integer",
+ ignore_malformed: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4aa81a694266fb634904224d14cd9a87.asciidoc b/docs/doc_examples/4aa81a694266fb634904224d14cd9a87.asciidoc
new file mode 100644
index 000000000..54bc674f6
--- /dev/null
+++ b/docs/doc_examples/4aa81a694266fb634904224d14cd9a87.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_queries2",
+ query: {
+ percolate: {
+ field: "query",
+ document: {
+ my_field: "wxyz",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ae494d1e62231e832fc0436b04e2014.asciidoc b/docs/doc_examples/4ae494d1e62231e832fc0436b04e2014.asciidoc
new file mode 100644
index 000000000..2593e595a
--- /dev/null
+++ b/docs/doc_examples/4ae494d1e62231e832fc0436b04e2014.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ query: {
+ bool: {
+ must: {
+ query_string: {
+ query: "*:*",
+ },
+ },
+ filter: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4af15c4f26ddefb9c350e7a246a66a15.asciidoc b/docs/doc_examples/4af15c4f26ddefb9c350e7a246a66a15.asciidoc
new file mode 100644
index 000000000..9b0f9cbc8
--- /dev/null
+++ b/docs/doc_examples/4af15c4f26ddefb9c350e7a246a66a15.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "node",
+ filter_path: "aggregations",
+ aggs: {
+ ip: {
+ terms: {
+ field: "ip",
+ order: {
+ "tm.m": "desc",
+ },
+ },
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ date: "desc",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4b1044259a6d777d87529eae25675005.asciidoc b/docs/doc_examples/4b1044259a6d777d87529eae25675005.asciidoc
new file mode 100644
index 000000000..de6386e18
--- /dev/null
+++ b/docs/doc_examples/4b1044259a6d777d87529eae25675005.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "set-foo",
+ description: "sets foo",
+ processors: [
+ {
+ set: {
+ field: "foo",
+ value: "bar",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.updateByQuery({
+ index: "my-index-000001",
+ pipeline: "set-foo",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/4b3a49710fafa35d6d41a8ec12434515.asciidoc b/docs/doc_examples/4b3a49710fafa35d6d41a8ec12434515.asciidoc
new file mode 100644
index 000000000..d64246fd4
--- /dev/null
+++ b/docs/doc_examples/4b3a49710fafa35d6d41a8ec12434515.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ percolate: {
+ field: "query",
+ documents: [
+ {
+ message: "bonsai tree",
+ },
+ {
+ message: "new tree",
+ },
+ {
+ message: "the office",
+ },
+ {
+ message: "office tree",
+ },
+ ],
+ },
+ },
+ highlight: {
+ fields: {
+ message: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4b5110a21676cc0e26e050a4b4552235.asciidoc b/docs/doc_examples/4b5110a21676cc0e26e050a4b4552235.asciidoc
new file mode 100644
index 000000000..4366d9a73
--- /dev/null
+++ b/docs/doc_examples/4b5110a21676cc0e26e050a4b4552235.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.getSynonym({
+ id: "my-synonyms-set",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc b/docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc
new file mode 100644
index 000000000..5f31b1de6
--- /dev/null
+++ b/docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.streamInference({
+ task_type: "completion",
+ inference_id: "openai-completion",
+ body: {
+ input: "What is Elastic?",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ba86373e13e106de044f190343be328.asciidoc b/docs/doc_examples/4ba86373e13e106de044f190343be328.asciidoc
new file mode 100644
index 000000000..cc51c372c
--- /dev/null
+++ b/docs/doc_examples/4ba86373e13e106de044f190343be328.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ countries: {
+ terms: {
+ field: "artist.country",
+ order: [
+ {
+ "rock>playback_stats.avg": "desc",
+ },
+ {
+ _count: "desc",
+ },
+ ],
+ },
+ aggs: {
+ rock: {
+ filter: {
+ term: {
+ genre: "rock",
+ },
+ },
+ aggs: {
+ playback_stats: {
+ stats: {
+ field: "play_count",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bb4a64cf04e3feb133b0221d29beaa9.asciidoc b/docs/doc_examples/4bb4a64cf04e3feb133b0221d29beaa9.asciidoc
new file mode 100644
index 000000000..1030165fb
--- /dev/null
+++ b/docs/doc_examples/4bb4a64cf04e3feb133b0221d29beaa9.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+ indices: "my-index,logs-my_app-default",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bb7bcfebca682fb9c9e3e47bfd5ef6f.asciidoc b/docs/doc_examples/4bb7bcfebca682fb9c9e3e47bfd5ef6f.asciidoc
new file mode 100644
index 000000000..6ca27ec56
--- /dev/null
+++ b/docs/doc_examples/4bb7bcfebca682fb9c9e3e47bfd5ef6f.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ track_total_hits: false,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ user_name: {
+ terms: {
+ field: "user_name",
+ },
+ },
+ },
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ order: "desc",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bba59cf745ac7b996bf90308bc26957.asciidoc b/docs/doc_examples/4bba59cf745ac7b996bf90308bc26957.asciidoc
new file mode 100644
index 000000000..da7cbe01c
--- /dev/null
+++ b/docs/doc_examples/4bba59cf745ac7b996bf90308bc26957.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "file-path-test",
+ query: {
+ bool: {
+ must: {
+ match: {
+ file_path: "16",
+ },
+ },
+ filter: {
+ term: {
+ "file_path.tree": "/User/alice",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bc4db44b8c74610b73f21a421099a13.asciidoc b/docs/doc_examples/4bc4db44b8c74610b73f21a421099a13.asciidoc
new file mode 100644
index 000000000..9b8c6cf65
--- /dev/null
+++ b/docs/doc_examples/4bc4db44b8c74610b73f21a421099a13.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateToken({
+ realm_name: "saml1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc b/docs/doc_examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc
new file mode 100644
index 000000000..2e11299ce
--- /dev/null
+++ b/docs/doc_examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ op_type: "create",
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bd42e31ac4a5cf237777f1a0e97aba8.asciidoc b/docs/doc_examples/4bd42e31ac4a5cf237777f1a0e97aba8.asciidoc
new file mode 100644
index 000000000..4bc587d0b
--- /dev/null
+++ b/docs/doc_examples/4bd42e31ac4a5cf237777f1a0e97aba8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.startTransform({
+ transform_id: "suspicious_client_ips",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4be07b34db282044c88d5021c7ea08ee.asciidoc b/docs/doc_examples/4be07b34db282044c88d5021c7ea08ee.asciidoc
new file mode 100644
index 000000000..f48a5f5fb
--- /dev/null
+++ b/docs/doc_examples/4be07b34db282044c88d5021c7ea08ee.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 3,
+ },
+ my_text: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index",
+ id: 1,
+ document: {
+ my_text: "text1",
+ my_vector: [0.5, 10, 6],
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index",
+ id: 2,
+ document: {
+ my_text: "text2",
+ my_vector: [-0.5, 10, 10],
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/4be20da16d2b58216e8b307218c7bf3a.asciidoc b/docs/doc_examples/4be20da16d2b58216e8b307218c7bf3a.asciidoc
new file mode 100644
index 000000000..c1d20522b
--- /dev/null
+++ b/docs/doc_examples/4be20da16d2b58216e8b307218c7bf3a.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ mappings: {
+ properties: {
+ host: {
+ properties: {
+ ip: {
+ type: "ip",
+ ignore_malformed: true,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc b/docs/doc_examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc
new file mode 100644
index 000000000..23c616763
--- /dev/null
+++ b/docs/doc_examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ text_embedding: {
+ type: "dense_vector",
+ dims: 384,
+ index_options: {
+ type: "flat",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bf6bb703a52267379ae2b1e1308cf8b.asciidoc b/docs/doc_examples/4bf6bb703a52267379ae2b1e1308cf8b.asciidoc
new file mode 100644
index 000000000..365539ce5
--- /dev/null
+++ b/docs/doc_examples/4bf6bb703a52267379ae2b1e1308cf8b.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ filter: {
+ script: {
+ script: {
+ source: "doc['num1'].value > params.param1",
+ lang: "painless",
+ params: {
+ param1: 5,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc b/docs/doc_examples/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc
new file mode 100644
index 000000000..9bacd56b7
--- /dev/null
+++ b/docs/doc_examples/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateDatafeed({
+ datafeed_id: "datafeed-test-job",
+ query: {
+ term: {
+ "geo.src": "US",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c174e228b6b74497b73ef2be80de7ad.asciidoc b/docs/doc_examples/4c174e228b6b74497b73ef2be80de7ad.asciidoc
new file mode 100644
index 000000000..8315e4886
--- /dev/null
+++ b/docs/doc_examples/4c174e228b6b74497b73ef2be80de7ad.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getTrainedModels();
+console.log(response);
+----
diff --git a/docs/doc_examples/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc b/docs/doc_examples/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc
new file mode 100644
index 000000000..cccd5f36f
--- /dev/null
+++ b/docs/doc_examples/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ query: "this is a test",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc b/docs/doc_examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc
new file mode 100644
index 000000000..704b7dd74
--- /dev/null
+++ b/docs/doc_examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: "my-index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c712bd5637892a11f16b8975a0a98ed.asciidoc b/docs/doc_examples/4c712bd5637892a11f16b8975a0a98ed.asciidoc
new file mode 100644
index 000000000..aae92e25f
--- /dev/null
+++ b/docs/doc_examples/4c712bd5637892a11f16b8975a0a98ed.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.mlDataFrameAnalytics({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c777b8360ef6c7671ae2e3803c0b0f6.asciidoc b/docs/doc_examples/4c777b8360ef6c7671ae2e3803c0b0f6.asciidoc
new file mode 100644
index 000000000..7c466f200
--- /dev/null
+++ b/docs/doc_examples/4c777b8360ef6c7671ae2e3803c0b0f6.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ top_tags: {
+ terms: {
+ field: "type",
+ size: 3,
+ },
+ aggs: {
+ top_sales_hits: {
+ top_hits: {
+ sort: [
+ {
+ date: {
+ order: "desc",
+ },
+ },
+ ],
+ _source: {
+ includes: ["date", "price"],
+ },
+ size: 1,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c77d12039fe2445c9251e33979071ac.asciidoc b/docs/doc_examples/4c77d12039fe2445c9251e33979071ac.asciidoc
new file mode 100644
index 000000000..925f2fd98
--- /dev/null
+++ b/docs/doc_examples/4c77d12039fe2445c9251e33979071ac.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "log-messages",
+ filter_path: "aggregations",
+ aggs: {
+ categories: {
+ categorize_text: {
+ field: "message",
+ categorization_filters: ["\\w+\\_\\d{3}"],
+ similarity_threshold: 11,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c803b088c1915a7b0634d5cafabe606.asciidoc b/docs/doc_examples/4c803b088c1915a7b0634d5cafabe606.asciidoc
new file mode 100644
index 000000000..420a3ae92
--- /dev/null
+++ b/docs/doc_examples/4c803b088c1915a7b0634d5cafabe606.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "network-traffic",
+ size: 0,
+ aggs: {
+ "ipv4-subnets": {
+ ip_prefix: {
+ field: "ipv4",
+ prefix_length: 24,
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc b/docs/doc_examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc
new file mode 100644
index 000000000..2c8c7983b
--- /dev/null
+++ b/docs/doc_examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "my-msmarco-minilm-model",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ num_allocations: 1,
+ num_threads: 1,
+ model_id: "msmarco-MiniLM-L12-cos-v5",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc b/docs/doc_examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc
new file mode 100644
index 000000000..bff837e2d
--- /dev/null
+++ b/docs/doc_examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ tag: {
+ type: "text",
+ fielddata: true,
+ fielddata_frequency_filter: {
+ min: 0.001,
+ max: 0.1,
+ min_segment_size: 500,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc b/docs/doc_examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc
new file mode 100644
index 000000000..50706a679
--- /dev/null
+++ b/docs/doc_examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain();
+console.log(response);
+----
diff --git a/docs/doc_examples/4ca5bc2c2b2f64d15b9c16370ae97a39.asciidoc b/docs/doc_examples/4ca5bc2c2b2f64d15b9c16370ae97a39.asciidoc
new file mode 100644
index 000000000..4f7a524a1
--- /dev/null
+++ b/docs/doc_examples/4ca5bc2c2b2f64d15b9c16370ae97a39.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "tiles-in-bounds": {
+ geohash_grid: {
+ field: "location",
+ precision: 8,
+ bounds: {
+ top_left: "POINT (4.21875 53.4375)",
+ bottom_right: "POINT (5.625 52.03125)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4cb44556b8c699f43489b17b42ddd475.asciidoc b/docs/doc_examples/4cb44556b8c699f43489b17b42ddd475.asciidoc
new file mode 100644
index 000000000..9d45d4014
--- /dev/null
+++ b/docs/doc_examples/4cb44556b8c699f43489b17b42ddd475.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ docs: [
+ {
+ _index: "test",
+ _id: "1",
+ stored_fields: ["field1", "field2"],
+ },
+ {
+ _index: "test",
+ _id: "2",
+ stored_fields: ["field3", "field4"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4cd40113e0fc90c37976f28d7e4a2327.asciidoc b/docs/doc_examples/4cd40113e0fc90c37976f28d7e4a2327.asciidoc
new file mode 100644
index 000000000..4ee26b047
--- /dev/null
+++ b/docs/doc_examples/4cd40113e0fc90c37976f28d7e4a2327.asciidoc
@@ -0,0 +1,81 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ analysis: {
+ normalizer: {
+ my_normalizer: {
+ type: "custom",
+ char_filter: [],
+ filter: ["lowercase", "asciifolding"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ foo: {
+ type: "keyword",
+ normalizer: "my_normalizer",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "index",
+ id: 1,
+ document: {
+ foo: "BÀR",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "index",
+ id: 2,
+ document: {
+ foo: "bar",
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "index",
+ id: 3,
+ document: {
+ foo: "baz",
+ },
+});
+console.log(response3);
+
+const response4 = await client.indices.refresh({
+ index: "index",
+});
+console.log(response4);
+
+const response5 = await client.search({
+ index: "index",
+ query: {
+ term: {
+ foo: "BAR",
+ },
+ },
+});
+console.log(response5);
+
+const response6 = await client.search({
+ index: "index",
+ query: {
+ match: {
+ foo: "BAR",
+ },
+ },
+});
+console.log(response6);
+----
diff --git a/docs/doc_examples/4cdbd53f08df4bf66e2a47c0f1fcb3f8.asciidoc b/docs/doc_examples/4cdbd53f08df4bf66e2a47c0f1fcb3f8.asciidoc
new file mode 100644
index 000000000..f61623475
--- /dev/null
+++ b/docs/doc_examples/4cdbd53f08df4bf66e2a47c0f1fcb3f8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache({
+ index: "my-index-000001",
+ fields: "foo,bar",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc b/docs/doc_examples/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc
new file mode 100644
index 000000000..21cbecbe4
--- /dev/null
+++ b/docs/doc_examples/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc
@@ -0,0 +1,64 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.putSynonym({
+ id: "my-synonyms-set",
+ synonyms_set: [
+ {
+ id: "test-1",
+ synonyms: "hello, hi",
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.indices.create({
+ index: "test-index",
+ settings: {
+ analysis: {
+ filter: {
+ synonyms_filter: {
+ type: "synonym_graph",
+ synonyms_set: "my-synonyms-set",
+ updateable: true,
+ },
+ },
+ analyzer: {
+ my_index_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase"],
+ },
+ my_search_analyzer: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "synonyms_filter"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ analyzer: "my_index_analyzer",
+ search_analyzer: "my_search_analyzer",
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.synonyms.putSynonym({
+ id: "my-synonyms-set",
+ synonyms_set: [
+ {
+ id: "test-1",
+ synonyms: "hello, hi, howdy",
+ },
+ ],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/4ce4563e207233c48ffe849728052dca.asciidoc b/docs/doc_examples/4ce4563e207233c48ffe849728052dca.asciidoc
new file mode 100644
index 000000000..02cf01978
--- /dev/null
+++ b/docs/doc_examples/4ce4563e207233c48ffe849728052dca.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "logs-my_app-default",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4d21725453955582ff12b4a1104aa7b6.asciidoc b/docs/doc_examples/4d21725453955582ff12b4a1104aa7b6.asciidoc
new file mode 100644
index 000000000..f220f30fb
--- /dev/null
+++ b/docs/doc_examples/4d21725453955582ff12b4a1104aa7b6.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateFilter({
+ filter_id: "safe_domains",
+ description: "Updated list of domains",
+ add_items: ["*.myorg.com"],
+ remove_items: ["wikipedia.org"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4d2e6eb7fea407deeb7a859c267fda62.asciidoc b/docs/doc_examples/4d2e6eb7fea407deeb7a859c267fda62.asciidoc
new file mode 100644
index 000000000..6ff988112
--- /dev/null
+++ b/docs/doc_examples/4d2e6eb7fea407deeb7a859c267fda62.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.putJob({
+ id: "sensor",
+ index_pattern: "sensor-*",
+ rollup_index: "sensor_rollup",
+ cron: "*/30 * * * * ?",
+ page_size: 1000,
+ groups: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "1h",
+ delay: "7d",
+ },
+ terms: {
+ fields: ["node"],
+ },
+ },
+ metrics: [
+ {
+ field: "temperature",
+ metrics: ["min", "max", "sum"],
+ },
+ {
+ field: "voltage",
+ metrics: ["avg"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4d46e2160784bdf7cce948e9f0d31fc8.asciidoc b/docs/doc_examples/4d46e2160784bdf7cce948e9f0d31fc8.asciidoc
new file mode 100644
index 000000000..df784c1c8
--- /dev/null
+++ b/docs/doc_examples/4d46e2160784bdf7cce948e9f0d31fc8.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ filter: ["my_custom_word_delimiter_graph_filter"],
+ },
+ },
+ filter: {
+ my_custom_word_delimiter_graph_filter: {
+ type: "word_delimiter_graph",
+ type_table: ["- => ALPHA"],
+ split_on_case_change: false,
+ split_on_numerics: false,
+ stem_english_possessive: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4d7c0b52d3c0a084157428624c543c90.asciidoc b/docs/doc_examples/4d7c0b52d3c0a084157428624c543c90.asciidoc
new file mode 100644
index 000000000..e54879982
--- /dev/null
+++ b/docs/doc_examples/4d7c0b52d3c0a084157428624c543c90.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.info();
+console.log(response);
+----
diff --git a/docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc b/docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc
new file mode 100644
index 000000000..effb6d63d
--- /dev/null
+++ b/docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "INDEX_NAME",
+ conflicts: "proceed",
+ query: {
+ bool: {
+ filter: [
+ {
+ match: {
+ object_type: "drive_item",
+ },
+ },
+ {
+ exists: {
+ field: "file",
+ },
+ },
+ {
+ range: {
+ lastModifiedDateTime: {
+ lte: "now-180d",
+ },
+ },
+ },
+ ],
+ },
+ },
+ script: {
+ source: "ctx._source.body = ''",
+ lang: "painless",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4dc151eebefd484a28aed1a175743364.asciidoc b/docs/doc_examples/4dc151eebefd484a28aed1a175743364.asciidoc
new file mode 100644
index 000000000..f7f5c27d2
--- /dev/null
+++ b/docs/doc_examples/4dc151eebefd484a28aed1a175743364.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "openai_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "openai_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ded8ad815ac0e83b1c21a6c18fd0763.asciidoc b/docs/doc_examples/4ded8ad815ac0e83b1c21a6c18fd0763.asciidoc
new file mode 100644
index 000000000..df0d19f50
--- /dev/null
+++ b/docs/doc_examples/4ded8ad815ac0e83b1c21a6c18fd0763.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.startTransform({
+ transform_id: "ecommerce-customer-transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e1f02928ef243bf07fd425754b7642b.asciidoc b/docs/doc_examples/4e1f02928ef243bf07fd425754b7642b.asciidoc
new file mode 100644
index 000000000..c49a47833
--- /dev/null
+++ b/docs/doc_examples/4e1f02928ef243bf07fd425754b7642b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.postVotingConfigExclusions({
+ node_names: "node_name",
+});
+console.log(response);
+
+const response1 = await client.cluster.postVotingConfigExclusions({
+ node_names: "node_name",
+ timeout: "1m",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/4e2317aa45e87922d07c8ddc67a82d32.asciidoc b/docs/doc_examples/4e2317aa45e87922d07c8ddc67a82d32.asciidoc
new file mode 100644
index 000000000..fe78fcfc0
--- /dev/null
+++ b/docs/doc_examples/4e2317aa45e87922d07c8ddc67a82d32.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "path_hierarchy",
+ delimiter: "-",
+ replacement: "/",
+ skip: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "one-two-three-four-five",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/4e3414fc712b16311f9e433dd366f49d.asciidoc b/docs/doc_examples/4e3414fc712b16311f9e433dd366f49d.asciidoc
new file mode 100644
index 000000000..e9274320d
--- /dev/null
+++ b/docs/doc_examples/4e3414fc712b16311f9e433dd366f49d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.delete({
+ task_type: "sparse_embedding",
+ inference_id: "my-elser-model",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e4608ae4ce93c27bd174a9ea078cab2.asciidoc b/docs/doc_examples/4e4608ae4ce93c27bd174a9ea078cab2.asciidoc
new file mode 100644
index 000000000..72581c41b
--- /dev/null
+++ b/docs/doc_examples/4e4608ae4ce93c27bd174a9ea078cab2.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ match: {
+ my_text_field: "the query string",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ sparse_vector: {
+ field: "my_tokens",
+ inference_id: "my-elser-endpoint",
+ query: "the query string",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e50d9d25bfb07ac73e3a2be5d2fbbf7.asciidoc b/docs/doc_examples/4e50d9d25bfb07ac73e3a2be5d2fbbf7.asciidoc
new file mode 100644
index 000000000..782e49383
--- /dev/null
+++ b/docs/doc_examples/4e50d9d25bfb07ac73e3a2be5d2fbbf7.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 10000,
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+ pit: {
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+ keep_alive: "1m",
+ },
+ sort: [
+ {
+ "@timestamp": {
+ order: "asc",
+ format: "strict_date_optional_time_nanos",
+ },
+ },
+ {
+ _shard_doc: "desc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e5f7a97efdbf517f7a2ed6ef7ff469c.asciidoc b/docs/doc_examples/4e5f7a97efdbf517f7a2ed6ef7ff469c.asciidoc
new file mode 100644
index 000000000..99ec5cffe
--- /dev/null
+++ b/docs/doc_examples/4e5f7a97efdbf517f7a2ed6ef7ff469c.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: '{ "query": { "terms": { "tags": {{#toJson}}tags{{/toJson}} }}}',
+ params: {
+ tags: ["prod", "es01"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e6b78ac991ed2d5f9a2e7c89f4fc471.asciidoc b/docs/doc_examples/4e6b78ac991ed2d5f9a2e7c89f4fc471.asciidoc
new file mode 100644
index 000000000..38d7d2790
--- /dev/null
+++ b/docs/doc_examples/4e6b78ac991ed2d5f9a2e7c89f4fc471.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "music",
+ pretty: "true",
+ suggest: {
+ "song-suggest": {
+ prefix: "nir",
+ completion: {
+ field: "suggest",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e926063a9494b563387617b08c4f232.asciidoc b/docs/doc_examples/4e926063a9494b563387617b08c4f232.asciidoc
new file mode 100644
index 000000000..9aca6a082
--- /dev/null
+++ b/docs/doc_examples/4e926063a9494b563387617b08c4f232.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "*",
+ verbose: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4e931cfac74e46e221cf4a9ab88a182d.asciidoc b/docs/doc_examples/4e931cfac74e46e221cf4a9ab88a182d.asciidoc
new file mode 100644
index 000000000..38c12bda0
--- /dev/null
+++ b/docs/doc_examples/4e931cfac74e46e221cf4a9ab88a182d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ fields: "rating,title",
+ include_unmapped: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ed946065faa92f9950f04e402676a97.asciidoc b/docs/doc_examples/4ed946065faa92f9950f04e402676a97.asciidoc
new file mode 100644
index 000000000..be96e1741
--- /dev/null
+++ b/docs/doc_examples/4ed946065faa92f9950f04e402676a97.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.xpack.info({
+ human: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc b/docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc
new file mode 100644
index 000000000..3bce99ecc
--- /dev/null
+++ b/docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ bool: {
+ must: [
+ {
+ term: {
+ tags: "vegetarian",
+ },
+ },
+ {
+ range: {
+ rating: {
+ gte: 4.5,
+ },
+ },
+ },
+ ],
+ should: [
+ {
+ term: {
+ category: "Main Course",
+ },
+ },
+ {
+ multi_match: {
+ query: "curry spicy",
+ fields: ["title^2", "description"],
+ },
+ },
+ {
+ range: {
+ date: {
+ gte: "now-1M/d",
+ },
+ },
+ },
+ ],
+ must_not: [
+ {
+ term: {
+ "category.keyword": "Dessert",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ee31fd4ea6d18f32ec28b7fa433441d.asciidoc b/docs/doc_examples/4ee31fd4ea6d18f32ec28b7fa433441d.asciidoc
new file mode 100644
index 000000000..a98b7cbf1
--- /dev/null
+++ b/docs/doc_examples/4ee31fd4ea6d18f32ec28b7fa433441d.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putPrivileges({
+ privileges: {
+ myapp: {
+ read: {
+ actions: ["data:read/*", "action:login"],
+ metadata: {
+ description: "Read access to myapp",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4eeded40f30949e359714a5bb6c88612.asciidoc b/docs/doc_examples/4eeded40f30949e359714a5bb6c88612.asciidoc
new file mode 100644
index 000000000..435c2eaff
--- /dev/null
+++ b/docs/doc_examples/4eeded40f30949e359714a5bb6c88612.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "elser-embeddings",
+ pipeline: "elser_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f08d9e21d9f199acc77abfb83287878.asciidoc b/docs/doc_examples/4f08d9e21d9f199acc77abfb83287878.asciidoc
new file mode 100644
index 000000000..d3563e31a
--- /dev/null
+++ b/docs/doc_examples/4f08d9e21d9f199acc77abfb83287878.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my-app",
+ params: {
+ query_string: "my first query",
+ text_fields: [
+ {
+ name: "title",
+ boost: 5,
+ },
+ {
+ name: "description",
+ boost: 1,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f140d8922efdf3420e41b1cb669a289.asciidoc b/docs/doc_examples/4f140d8922efdf3420e41b1cb669a289.asciidoc
new file mode 100644
index 000000000..2f545ce1a
--- /dev/null
+++ b/docs/doc_examples/4f140d8922efdf3420e41b1cb669a289.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.deleteComponentTemplate({
+ name: "template_1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f1e1205154d280db21fbd2754ed5398.asciidoc b/docs/doc_examples/4f1e1205154d280db21fbd2754ed5398.asciidoc
new file mode 100644
index 000000000..a944b2044
--- /dev/null
+++ b/docs/doc_examples/4f1e1205154d280db21fbd2754ed5398.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "stats-index",
+ mappings: {
+ properties: {
+ agg_metric: {
+ type: "aggregate_metric_double",
+ metrics: ["min", "max", "sum", "value_count"],
+ default_metric: "max",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc b/docs/doc_examples/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc
new file mode 100644
index 000000000..7fc5cd674
--- /dev/null
+++ b/docs/doc_examples/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ gauss: {
+ "@timestamp": {
+ origin: "2013-09-17",
+ scale: "10d",
+ offset: "5d",
+ decay: 0.5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc b/docs/doc_examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc
new file mode 100644
index 000000000..7effcb6e3
--- /dev/null
+++ b/docs/doc_examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ fields: {
+ comment: {
+ fragment_size: 150,
+ number_of_fragments: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f666d710758578e2582850dac3ad144.asciidoc b/docs/doc_examples/4f666d710758578e2582850dac3ad144.asciidoc
new file mode 100644
index 000000000..1b9fc2667
--- /dev/null
+++ b/docs/doc_examples/4f666d710758578e2582850dac3ad144.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUserProfile({
+ uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0",
+ data: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f6694ef147a73b1163bde3c13779d26.asciidoc b/docs/doc_examples/4f6694ef147a73b1163bde3c13779d26.asciidoc
new file mode 100644
index 000000000..0793b4e08
--- /dev/null
+++ b/docs/doc_examples/4f6694ef147a73b1163bde3c13779d26.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ human: "true",
+ filter_path: "nodes.*.indexing_pressure",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f67b5f5c040f611bd2560a5d38ea6f5.asciidoc b/docs/doc_examples/4f67b5f5c040f611bd2560a5d38ea6f5.asciidoc
new file mode 100644
index 000000000..38e0e91b1
--- /dev/null
+++ b/docs/doc_examples/4f67b5f5c040f611bd2560a5d38ea6f5.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ rare_terms: {
+ field: "genre",
+ missing: "N/A",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4f8a4ad49e2bca6784c88ede18a1a709.asciidoc b/docs/doc_examples/4f8a4ad49e2bca6784c88ede18a1a709.asciidoc
new file mode 100644
index 000000000..4031829ae
--- /dev/null
+++ b/docs/doc_examples/4f8a4ad49e2bca6784c88ede18a1a709.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.delete();
+console.log(response);
+----
diff --git a/docs/doc_examples/4fa9ee04188cbf0b38cfc28f6a56527d.asciidoc b/docs/doc_examples/4fa9ee04188cbf0b38cfc28f6a56527d.asciidoc
new file mode 100644
index 000000000..cec0a6911
--- /dev/null
+++ b/docs/doc_examples/4fa9ee04188cbf0b38cfc28f6a56527d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getDatafeeds({
+ datafeed_id: "datafeed-high_sum_total_sales",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4fb0629146ca78b85e823edd405497bb.asciidoc b/docs/doc_examples/4fb0629146ca78b85e823edd405497bb.asciidoc
new file mode 100644
index 000000000..92b9fe5f2
--- /dev/null
+++ b/docs/doc_examples/4fb0629146ca78b85e823edd405497bb.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDataFrameAnalytics({
+ id: "loan_classification",
+ source: {
+ index: "loan-applicants",
+ },
+ dest: {
+ index: "loan-applicants-classified",
+ },
+ analysis: {
+ classification: {
+ dependent_variable: "label",
+ training_percent: 75,
+ num_top_classes: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc b/docs/doc_examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc
new file mode 100644
index 000000000..a1fd27e13
--- /dev/null
+++ b/docs/doc_examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ bool: {
+ should: [
+ {
+ text_expansion: {
+ "ml.inference.title_expanded.predicted_value": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ boost: 1,
+ },
+ },
+ },
+ {
+ text_expansion: {
+ "ml.inference.description_expanded.predicted_value": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ boost: 1,
+ },
+ },
+ },
+ {
+ multi_match: {
+ query: "How is the weather in Jamaica?",
+ fields: ["title", "description"],
+ boost: 4,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc b/docs/doc_examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc
new file mode 100644
index 000000000..edee66d52
--- /dev/null
+++ b/docs/doc_examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_phrase: {
+ message: "number 1",
+ },
+ },
+ highlight: {
+ fields: {
+ message: {
+ type: "plain",
+ fragment_size: 15,
+ number_of_fragments: 3,
+ fragmenter: "simple",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50096ee0ca53fe8a88450ebb2a50f285.asciidoc b/docs/doc_examples/50096ee0ca53fe8a88450ebb2a50f285.asciidoc
new file mode 100644
index 000000000..ee1e99bc4
--- /dev/null
+++ b/docs/doc_examples/50096ee0ca53fe8a88450ebb2a50f285.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "csv",
+ delimiter: ";",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5024c524a7db0d6bb44c1820007cc5f4.asciidoc b/docs/doc_examples/5024c524a7db0d6bb44c1820007cc5f4.asciidoc
new file mode 100644
index 000000000..dfb8e219d
--- /dev/null
+++ b/docs/doc_examples/5024c524a7db0d6bb44c1820007cc5f4.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ description: "...",
+ processors: [
+ {
+ grok: {
+ field: "message",
+ patterns: [
+ "%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes:int} %{NUMBER:duration:double}",
+ ],
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ message: "55.3.244.1 GET /index.html 15824 0.043",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50522d3d5b3d055f712ad737e3d1707a.asciidoc b/docs/doc_examples/50522d3d5b3d055f712ad737e3d1707a.asciidoc
new file mode 100644
index 000000000..c0ef20fe2
--- /dev/null
+++ b/docs/doc_examples/50522d3d5b3d055f712ad737e3d1707a.asciidoc
@@ -0,0 +1,51 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ name: {
+ type: "text",
+ fields: {
+ length: {
+ type: "token_count",
+ analyzer: "standard",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ name: "John Smith",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ name: "Rachel Alice Williams",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ "name.length": 3,
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/505a6c21a4cb608d3662fab1a35eb6df.asciidoc b/docs/doc_examples/505a6c21a4cb608d3662fab1a35eb6df.asciidoc
new file mode 100644
index 000000000..ed78e8d92
--- /dev/null
+++ b/docs/doc_examples/505a6c21a4cb608d3662fab1a35eb6df.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my_index",
+ id: 1,
+ document: {
+ my_text: "histogram_1",
+ my_histogram: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ _doc_count: 45,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my_index",
+ id: 2,
+ document: {
+ my_text: "histogram_2",
+ my_histogram: {
+ values: [0.1, 0.25, 0.35, 0.4, 0.45, 0.5],
+ counts: [8, 17, 8, 7, 6, 2],
+ },
+ _doc_count: 62,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/50764f4ea88079156b0aff2835bcdc45.asciidoc b/docs/doc_examples/50764f4ea88079156b0aff2835bcdc45.asciidoc
new file mode 100644
index 000000000..790614490
--- /dev/null
+++ b/docs/doc_examples/50764f4ea88079156b0aff2835bcdc45.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ metric: "metadata",
+ pretty: "true",
+ filter_path: "metadata.stored_scripts",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5093bfd281dbe41bd0dba8ff979e6e47.asciidoc b/docs/doc_examples/5093bfd281dbe41bd0dba8ff979e6e47.asciidoc
new file mode 100644
index 000000000..c5ebc07bd
--- /dev/null
+++ b/docs/doc_examples/5093bfd281dbe41bd0dba8ff979e6e47.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getScript({
+ id: "my-stored-script",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50a9623c153cabe64101efb633e10e6c.asciidoc b/docs/doc_examples/50a9623c153cabe64101efb633e10e6c.asciidoc
new file mode 100644
index 000000000..3df88c27c
--- /dev/null
+++ b/docs/doc_examples/50a9623c153cabe64101efb633e10e6c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.deleteAutoscalingPolicy({
+ name: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50b5c0332949d2154c72b629b5fa6222.asciidoc b/docs/doc_examples/50b5c0332949d2154c72b629b5fa6222.asciidoc
new file mode 100644
index 000000000..9b53504df
--- /dev/null
+++ b/docs/doc_examples/50b5c0332949d2154c72b629b5fa6222.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ refresh: "wait_for",
+ document: {
+ user_id: 12345,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ refresh: "wait_for",
+ document: {
+ user_id: 12346,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/50c2b06ecddb5a4aebd8b78e38af5f1f.asciidoc b/docs/doc_examples/50c2b06ecddb5a4aebd8b78e38af5f1f.asciidoc
new file mode 100644
index 000000000..d15963c65
--- /dev/null
+++ b/docs/doc_examples/50c2b06ecddb5a4aebd8b78e38af5f1f.asciidoc
@@ -0,0 +1,54 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my-lifecycle-policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "50gb",
+ },
+ },
+ },
+ warm: {
+ min_age: "30d",
+ actions: {
+ shrink: {
+ number_of_shards: 1,
+ },
+ forcemerge: {
+ max_num_segments: 1,
+ },
+ },
+ },
+ cold: {
+ min_age: "60d",
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "found-snapshots",
+ },
+ },
+ },
+ frozen: {
+ min_age: "90d",
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "found-snapshots",
+ },
+ },
+ },
+ delete: {
+ min_age: "735d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50c2cea2adbe9523458c2686ab11df54.asciidoc b/docs/doc_examples/50c2cea2adbe9523458c2686ab11df54.asciidoc
new file mode 100644
index 000000000..a049dc794
--- /dev/null
+++ b/docs/doc_examples/50c2cea2adbe9523458c2686ab11df54.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "text_payloads",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ term_vector: "with_positions_payloads",
+ analyzer: "payload_delimiter",
+ },
+ },
+ },
+ settings: {
+ analysis: {
+ analyzer: {
+ payload_delimiter: {
+ tokenizer: "whitespace",
+ filter: ["delimited_payload"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50d5c5b7e8ed9a95b8d9a25a32a77425.asciidoc b/docs/doc_examples/50d5c5b7e8ed9a95b8d9a25a32a77425.asciidoc
new file mode 100644
index 000000000..5c66601f8
--- /dev/null
+++ b/docs/doc_examples/50d5c5b7e8ed9a95b8d9a25a32a77425.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["unique"],
+ text: "the quick fox jumps the lazy fox",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc b/docs/doc_examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc
new file mode 100644
index 000000000..4cee63e13
--- /dev/null
+++ b/docs/doc_examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ "foo.bar.baz": 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50dc35d3d8705bd62aed20a15209476c.asciidoc b/docs/doc_examples/50dc35d3d8705bd62aed20a15209476c.asciidoc
new file mode 100644
index 000000000..7d0323216
--- /dev/null
+++ b/docs/doc_examples/50dc35d3d8705bd62aed20a15209476c.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping9",
+ rules: {
+ field: {
+ "realm.name": "cloud-saml",
+ },
+ },
+ role_templates: [
+ {
+ template: {
+ source: "saml_user",
+ },
+ },
+ {
+ template: {
+ source: "_user_{{username}}",
+ },
+ },
+ ],
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/50f922e9f002d8ac570953be59414b7b.asciidoc b/docs/doc_examples/50f922e9f002d8ac570953be59414b7b.asciidoc
new file mode 100644
index 000000000..8f508f633
--- /dev/null
+++ b/docs/doc_examples/50f922e9f002d8ac570953be59414b7b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ combined_fields: {
+ query: "database systems",
+ fields: ["title", "abstract"],
+ operator: "and",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/511e5bb8ab881171b7e8629095e30b85.asciidoc b/docs/doc_examples/511e5bb8ab881171b7e8629095e30b85.asciidoc
new file mode 100644
index 000000000..0871eea9c
--- /dev/null
+++ b/docs/doc_examples/511e5bb8ab881171b7e8629095e30b85.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "datastream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/515e1104d136082e826d1b32af011759.asciidoc b/docs/doc_examples/515e1104d136082e826d1b32af011759.asciidoc
new file mode 100644
index 000000000..af042e8f2
--- /dev/null
+++ b/docs/doc_examples/515e1104d136082e826d1b32af011759.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "products",
+ id: 0,
+ refresh: "true",
+ document: {
+ name: "LED TV",
+ resellers: [
+ {
+ reseller: "companyA",
+ price: 350,
+ },
+ {
+ reseller: "companyB",
+ price: 500,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5174c3c731fc1703e5b43ae2bae7a80e.asciidoc b/docs/doc_examples/5174c3c731fc1703e5b43ae2bae7a80e.asciidoc
new file mode 100644
index 000000000..115cd3757
--- /dev/null
+++ b/docs/doc_examples/5174c3c731fc1703e5b43ae2bae7a80e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.clearCursor({
+ cursor:
+ "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/518fcf1dc1edd7dba0864accf71b49f4.asciidoc b/docs/doc_examples/518fcf1dc1edd7dba0864accf71b49f4.asciidoc
new file mode 100644
index 000000000..fc8e655af
--- /dev/null
+++ b/docs/doc_examples/518fcf1dc1edd7dba0864accf71b49f4.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ preference: "_local",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5195a88194f7a139c635a84398d76205.asciidoc b/docs/doc_examples/5195a88194f7a139c635a84398d76205.asciidoc
new file mode 100644
index 000000000..567ff6501
--- /dev/null
+++ b/docs/doc_examples/5195a88194f7a139c635a84398d76205.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "my_snapshot",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/51b40610ae05730b4c6afd25647d7ae0.asciidoc b/docs/doc_examples/51b40610ae05730b4c6afd25647d7ae0.asciidoc
new file mode 100644
index 000000000..e17edea6d
--- /dev/null
+++ b/docs/doc_examples/51b40610ae05730b4c6afd25647d7ae0.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T05:30:00Z",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T06:30:00Z",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ by_day: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "day",
+ offset: "+6h",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/51b44224feee6e2e5974824334474c77.asciidoc b/docs/doc_examples/51b44224feee6e2e5974824334474c77.asciidoc
new file mode 100644
index 000000000..ac951d7c0
--- /dev/null
+++ b/docs/doc_examples/51b44224feee6e2e5974824334474c77.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_s3_repository",
+ repository: {
+ type: "s3",
+ settings: {
+ client: "my-client",
+ bucket: "my-bucket",
+ endpoint: "my.s3.endpoint",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/51f1a0930362594b231a5bcc17673768.asciidoc b/docs/doc_examples/51f1a0930362594b231a5bcc17673768.asciidoc
new file mode 100644
index 000000000..126095322
--- /dev/null
+++ b/docs/doc_examples/51f1a0930362594b231a5bcc17673768.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.modifyDataStream({
+ actions: [
+ {
+ remove_backing_index: {
+ data_stream: "my-logs",
+ index: ".ds-my-logs-2099.01.01-000001",
+ },
+ },
+ {
+ add_backing_index: {
+ data_stream: "my-logs",
+ index: "index-to-add",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/51f6cb682424e110f289af79c106f4c7.asciidoc b/docs/doc_examples/51f6cb682424e110f289af79c106f4c7.asciidoc
new file mode 100644
index 000000000..236694db7
--- /dev/null
+++ b/docs/doc_examples/51f6cb682424e110f289af79c106f4c7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.max_shards_per_node.frozen": 3200,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5275842787967b6db876025f4a1c6942.asciidoc b/docs/doc_examples/5275842787967b6db876025f4a1c6942.asciidoc
new file mode 100644
index 000000000..d2ccfd01b
--- /dev/null
+++ b/docs/doc_examples/5275842787967b6db876025f4a1c6942.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ suggest: {
+ text: "tring out Elasticsearch",
+ "my-suggest-1": {
+ term: {
+ field: "message",
+ },
+ },
+ "my-suggest-2": {
+ term: {
+ field: "user",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5276a831513623e43ed567eb52b6dba9.asciidoc b/docs/doc_examples/5276a831513623e43ed567eb52b6dba9.asciidoc
new file mode 100644
index 000000000..8b4199dbd
--- /dev/null
+++ b/docs/doc_examples/5276a831513623e43ed567eb52b6dba9.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ routing: "my-routing-value",
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/528e5f1c345c3769248cc6889e8cf552.asciidoc b/docs/doc_examples/528e5f1c345c3769248cc6889e8cf552.asciidoc
new file mode 100644
index 000000000..7b49f32ca
--- /dev/null
+++ b/docs/doc_examples/528e5f1c345c3769248cc6889e8cf552.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "index",
+ properties: {
+ title: {
+ type: "text",
+ similarity: "my_similarity",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc b/docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc
new file mode 100644
index 000000000..c493ead5a
--- /dev/null
+++ b/docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: ".elastic-connectors",
+ id: "connector_id",
+ doc: {
+ configuration: {
+ field_a: {
+ type: "str",
+ value: "",
+ },
+ field_b: {
+ type: "bool",
+ value: false,
+ },
+ field_c: {
+ type: "int",
+ value: 1,
+ },
+ field_d: {
+ type: "list",
+ value: "a,b",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/529b975b7cedaac58dce9821956adc37.asciidoc b/docs/doc_examples/529b975b7cedaac58dce9821956adc37.asciidoc
new file mode 100644
index 000000000..91d0a569e
--- /dev/null
+++ b/docs/doc_examples/529b975b7cedaac58dce9821956adc37.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "MultiPolygon",
+ coordinates: [
+ [
+ [
+ [102, 2],
+ [103, 2],
+ [103, 3],
+ [102, 3],
+ [102, 2],
+ ],
+ ],
+ [
+ [
+ [100, 0],
+ [101, 0],
+ [101, 1],
+ [100, 1],
+ [100, 0],
+ ],
+ [
+ [100.2, 0.2],
+ [100.8, 0.2],
+ [100.8, 0.8],
+ [100.2, 0.8],
+ [100.2, 0.2],
+ ],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52a2d119addb15366a935115518335fd.asciidoc b/docs/doc_examples/52a2d119addb15366a935115518335fd.asciidoc
new file mode 100644
index 000000000..45074d6c2
--- /dev/null
+++ b/docs/doc_examples/52a2d119addb15366a935115518335fd.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my_source_index",
+ settings: {
+ settings: {
+ "index.number_of_replicas": 0,
+ "index.routing.allocation.require._name": "shrink_node_name",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc b/docs/doc_examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc
new file mode 100644
index 000000000..7038db1a4
--- /dev/null
+++ b/docs/doc_examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ human: "true",
+ filter_path: "nodes.*.name,nodes.*.indices.indexing",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc b/docs/doc_examples/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc
new file mode 100644
index 000000000..72faf47d1
--- /dev/null
+++ b/docs/doc_examples/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "my-search-template",
+ script: {
+ lang: "mustache",
+ source: {
+ query: {
+ match: {
+ message: "{{query_string}}",
+ },
+ },
+ from: "{{from}}",
+ size: "{{size}}",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52be795b68e6ef3f396f35fea52d0481.asciidoc b/docs/doc_examples/52be795b68e6ef3f396f35fea52d0481.asciidoc
new file mode 100644
index 000000000..de83fe2e1
--- /dev/null
+++ b/docs/doc_examples/52be795b68e6ef3f396f35fea52d0481.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52c2b4c180388f5ae044588ba70b70f0.asciidoc b/docs/doc_examples/52c2b4c180388f5ae044588ba70b70f0.asciidoc
new file mode 100644
index 000000000..b1ed824fb
--- /dev/null
+++ b/docs/doc_examples/52c2b4c180388f5ae044588ba70b70f0.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-image-index",
+ size: 10,
+ query: {
+ bool: {
+ must: {
+ knn: {
+ field: "image-vector",
+ query_vector: [-5, 9, -12],
+ k: 3,
+ },
+ },
+ filter: {
+ term: {
+ "file-type": "png",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52c7e4172a446c394210a07c464c57d2.asciidoc b/docs/doc_examples/52c7e4172a446c394210a07c464c57d2.asciidoc
new file mode 100644
index 000000000..0b1f25a10
--- /dev/null
+++ b/docs/doc_examples/52c7e4172a446c394210a07c464c57d2.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQueryRethrottle({
+ task_id: "r1A2WoRbTwKZ516z6NEs5A:36619",
+ requests_per_second: "-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52cdb5526ce69d0223d1dd198308bfea.asciidoc b/docs/doc_examples/52cdb5526ce69d0223d1dd198308bfea.asciidoc
new file mode 100644
index 000000000..a15862221
--- /dev/null
+++ b/docs/doc_examples/52cdb5526ce69d0223d1dd198308bfea.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic: false,
+ properties: {
+ user: {
+ properties: {
+ name: {
+ type: "text",
+ },
+ social_networks: {
+ dynamic: true,
+ properties: {},
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52f1c1689ab35353858cdeaab7597546.asciidoc b/docs/doc_examples/52f1c1689ab35353858cdeaab7597546.asciidoc
new file mode 100644
index 000000000..0a3fbbf4f
--- /dev/null
+++ b/docs/doc_examples/52f1c1689ab35353858cdeaab7597546.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-data-stream",
+ pipeline: "my-pipeline",
+ document: {
+ message:
+ '89.160.20.128 - - [05/May/2099:16:21:15 +0000] "GET /favicon.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"',
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc b/docs/doc_examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc
new file mode 100644
index 000000000..a6490dd78
--- /dev/null
+++ b/docs/doc_examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "alibabacloud_ai_search_sparse",
+ inference_config: {
+ service: "alibabacloud-ai-search",
+ service_settings: {
+ api_key: "",
+ service_id: "ops-text-sparse-embedding-001",
+ host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
+ workspace: "default",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc b/docs/doc_examples/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc
new file mode 100644
index 000000000..3044bb476
--- /dev/null
+++ b/docs/doc_examples/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ number_of_bytes: {
+ type: "integer",
+ },
+ time_in_seconds: {
+ type: "float",
+ },
+ price: {
+ type: "scaled_float",
+ scaling_factor: 100,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5302f4f2bcc0f400ff71c791e6f68d7b.asciidoc b/docs/doc_examples/5302f4f2bcc0f400ff71c791e6f68d7b.asciidoc
new file mode 100644
index 000000000..96d2153be
--- /dev/null
+++ b/docs/doc_examples/5302f4f2bcc0f400ff71c791e6f68d7b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "keyword_marker",
+ keywords: ["jumping"],
+ },
+ "stemmer",
+ ],
+ text: "fox running and jumping",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5305bc07c1bf90bab3e8db1de3e31b26.asciidoc b/docs/doc_examples/5305bc07c1bf90bab3e8db1de3e31b26.asciidoc
new file mode 100644
index 000000000..fbb8023e0
--- /dev/null
+++ b/docs/doc_examples/5305bc07c1bf90bab3e8db1de3e31b26.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.shutdown.putNode({
+ node_id: "USpTGYaBSIKbgSUJR2Z9lg",
+ type: "restart",
+ reason: "Demonstrating how the node shutdown API works",
+ allocation_delay: "20m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc b/docs/doc_examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc
new file mode 100644
index 000000000..019795cfe
--- /dev/null
+++ b/docs/doc_examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index_long",
+ mappings: {
+ properties: {
+ field: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/532f371934b61fb4992d37bedcc085de.asciidoc b/docs/doc_examples/532f371934b61fb4992d37bedcc085de.asciidoc
new file mode 100644
index 000000000..9cd381107
--- /dev/null
+++ b/docs/doc_examples/532f371934b61fb4992d37bedcc085de.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.shutdown.putNode({
+ node_id: "USpTGYaBSIKbgSUJR2Z9lg",
+ type: "restart",
+ reason: "Demonstrating how the node shutdown API works",
+ allocation_delay: "10m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5330191ec9f11281ebf6867bf11c58ae.asciidoc b/docs/doc_examples/5330191ec9f11281ebf6867bf11c58ae.asciidoc
new file mode 100644
index 000000000..43089e612
--- /dev/null
+++ b/docs/doc_examples/5330191ec9f11281ebf6867bf11c58ae.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ routing: 1,
+ query: {
+ range: {
+ age: {
+ gte: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5332c4cca5fbb45cc700dcd34f37bc38.asciidoc b/docs/doc_examples/5332c4cca5fbb45cc700dcd34f37bc38.asciidoc
new file mode 100644
index 000000000..04bd5892f
--- /dev/null
+++ b/docs/doc_examples/5332c4cca5fbb45cc700dcd34f37bc38.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ english: "Some English text",
+ count: 5,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/53aa8b21e2b1c4d48960343711296704.asciidoc b/docs/doc_examples/53aa8b21e2b1c4d48960343711296704.asciidoc
new file mode 100644
index 000000000..17dd79085
--- /dev/null
+++ b/docs/doc_examples/53aa8b21e2b1c4d48960343711296704.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ regexp: {
+ "my_field.keyword": "a\\\\.*",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/53b908c3432118c5a6e460f74d32006b.asciidoc b/docs/doc_examples/53b908c3432118c5a6e460f74d32006b.asciidoc
new file mode 100644
index 000000000..6ec1db62e
--- /dev/null
+++ b/docs/doc_examples/53b908c3432118c5a6e460f74d32006b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "this is a test",
+ fields: ["subject", "message"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/53bb7f0e3429861aadb8dd3d588085cd.asciidoc b/docs/doc_examples/53bb7f0e3429861aadb8dd3d588085cd.asciidoc
new file mode 100644
index 000000000..061f2096c
--- /dev/null
+++ b/docs/doc_examples/53bb7f0e3429861aadb8dd3d588085cd.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-data-stream",
+ seq_no_primary_term: true,
+ query: {
+ match: {
+ "user.id": "yWIumJd7",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/53c6256295111524d5ff2885bdcb99a9.asciidoc b/docs/doc_examples/53c6256295111524d5ff2885bdcb99a9.asciidoc
new file mode 100644
index 000000000..9822c80fa
--- /dev/null
+++ b/docs/doc_examples/53c6256295111524d5ff2885bdcb99a9.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.getTransform({
+ transform_id: "_stats",
+ from: 5,
+ size: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc b/docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc
new file mode 100644
index 000000000..58eee5923
--- /dev/null
+++ b/docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ id: "query_helper_pipeline",
+ docs: [
+ {
+ _source: {
+ content:
+ "artificial intelligence in medicine articles published in the last 12 months",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/53e4ac5a4009fd21024f4b31e54aa83f.asciidoc b/docs/doc_examples/53e4ac5a4009fd21024f4b31e54aa83f.asciidoc
new file mode 100644
index 000000000..c8cc6b7df
--- /dev/null
+++ b/docs/doc_examples/53e4ac5a4009fd21024f4b31e54aa83f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "facilitator",
+ password: "",
+ roles: ["facilitator-role"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/54059961f05904368ced52c894a50e23.asciidoc b/docs/doc_examples/54059961f05904368ced52c894a50e23.asciidoc
new file mode 100644
index 000000000..c6040d699
--- /dev/null
+++ b/docs/doc_examples/54059961f05904368ced52c894a50e23.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_moving_max: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.max(values)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/540aefc39303c925a4efff71ebe2f002.asciidoc b/docs/doc_examples/540aefc39303c925a4efff71ebe2f002.asciidoc
new file mode 100644
index 000000000..3d74dc98c
--- /dev/null
+++ b/docs/doc_examples/540aefc39303c925a4efff71ebe2f002.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ tags: {
+ significant_terms: {
+ field: "tag",
+ min_doc_count: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5433bb83628cc91d81fbe53c533b2a09.asciidoc b/docs/doc_examples/5433bb83628cc91d81fbe53c533b2a09.asciidoc
new file mode 100644
index 000000000..9b1d74392
--- /dev/null
+++ b/docs/doc_examples/5433bb83628cc91d81fbe53c533b2a09.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "asciifold_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_asciifolding: {
+ tokenizer: "standard",
+ filter: ["asciifolding"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc b/docs/doc_examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc
new file mode 100644
index 000000000..1dfbbd2b4
--- /dev/null
+++ b/docs/doc_examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "indices",
+});
+console.log(response);
+
+const response1 = await client.nodes.stats({
+ metric: "os,process",
+});
+console.log(response1);
+
+const response2 = await client.nodes.stats({
+ node_id: "10.0.0.1",
+ metric: "process",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/548a9b6f447bb820380c1c23e57c18c3.asciidoc b/docs/doc_examples/548a9b6f447bb820380c1c23e57c18c3.asciidoc
new file mode 100644
index 000000000..376f11be8
--- /dev/null
+++ b/docs/doc_examples/548a9b6f447bb820380c1c23e57c18c3.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "cohere_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "cohere_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/548b85bd9e6e7d33e36133953869449b.asciidoc b/docs/doc_examples/548b85bd9e6e7d33e36133953869449b.asciidoc
new file mode 100644
index 000000000..719ae08ac
--- /dev/null
+++ b/docs/doc_examples/548b85bd9e6e7d33e36133953869449b.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "xpack.monitoring.collection.enabled": false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/54a215d242ab65123b09e9dfb71bcbbf.asciidoc b/docs/doc_examples/54a215d242ab65123b09e9dfb71bcbbf.asciidoc
new file mode 100644
index 000000000..3c2251e1a
--- /dev/null
+++ b/docs/doc_examples/54a215d242ab65123b09e9dfb71bcbbf.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ terms: {
+ field: "genre",
+ order: {
+ _key: "asc",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc b/docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc
new file mode 100644
index 000000000..3cd177602
--- /dev/null
+++ b/docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: ".elastic-connectors-sync-jobs-v1",
+ properties: {
+ job_type: {
+ type: "keyword",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/54c12d5099d7b715c15f5bbf65b386a1.asciidoc b/docs/doc_examples/54c12d5099d7b715c15f5bbf65b386a1.asciidoc
new file mode 100644
index 000000000..ea16a6a2c
--- /dev/null
+++ b/docs/doc_examples/54c12d5099d7b715c15f5bbf65b386a1.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "alibabacloud-ai-search-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1024,
+ element_type: "float",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc b/docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc
new file mode 100644
index 000000000..eebda22c2
--- /dev/null
+++ b/docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000002",
+ mappings: {
+ properties: {
+ attributes: {
+ type: "passthrough",
+ priority: 10,
+ properties: {
+ id: {
+ type: "keyword",
+ },
+ },
+ },
+ "resource.attributes": {
+ type: "passthrough",
+ priority: 20,
+ properties: {
+ id: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/55096381f811388fafd8e244dd2402c8.asciidoc b/docs/doc_examples/55096381f811388fafd8e244dd2402c8.asciidoc
new file mode 100644
index 000000000..044e53645
--- /dev/null
+++ b/docs/doc_examples/55096381f811388fafd8e244dd2402c8.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-alias",
+ settings: {
+ "index.number_of_shards": 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/551467688d8c701315d0a371850a4056.asciidoc b/docs/doc_examples/551467688d8c701315d0a371850a4056.asciidoc
new file mode 100644
index 000000000..cc9792da6
--- /dev/null
+++ b/docs/doc_examples/551467688d8c701315d0a371850a4056.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "hugging-face-embeddings",
+ pipeline: "hugging_face_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/551799fef2f86e393db83a967e4a30d1.asciidoc b/docs/doc_examples/551799fef2f86e393db83a967e4a30d1.asciidoc
new file mode 100644
index 000000000..ee97fb114
--- /dev/null
+++ b/docs/doc_examples/551799fef2f86e393db83a967e4a30d1.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ agg_metric: {
+ type: "aggregate_metric_double",
+ metrics: ["min", "max", "sum", "value_count"],
+ default_metric: "max",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ agg_metric: {
+ min: -302.5,
+ max: 702.3,
+ sum: 200,
+ value_count: 25,
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/553904c175a76d5ba83bc5d46fff7373.asciidoc b/docs/doc_examples/553904c175a76d5ba83bc5d46fff7373.asciidoc
new file mode 100644
index 000000000..e4289442f
--- /dev/null
+++ b/docs/doc_examples/553904c175a76d5ba83bc5d46fff7373.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlLogout({
+ token: "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3",
+ refresh_token: "mJdXLtmvTUSpoLwMvdBt_w",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/553d79817bb1333970e99507c37a159a.asciidoc b/docs/doc_examples/553d79817bb1333970e99507c37a159a.asciidoc
new file mode 100644
index 000000000..1097587d1
--- /dev/null
+++ b/docs/doc_examples/553d79817bb1333970e99507c37a159a.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ index: {
+ similarity: {
+ default: {
+ type: "boolean",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5553cf7a02c22f616cd994747f2dd5a5.asciidoc b/docs/doc_examples/5553cf7a02c22f616cd994747f2dd5a5.asciidoc
new file mode 100644
index 000000000..a3365ef4b
--- /dev/null
+++ b/docs/doc_examples/5553cf7a02c22f616cd994747f2dd5a5.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "user.first": "Alice",
+ },
+ },
+ {
+ match: {
+ "user.last": "Smith",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5566cff431570f522e1fc5475b2ed875.asciidoc b/docs/doc_examples/5566cff431570f522e1fc5475b2ed875.asciidoc
new file mode 100644
index 000000000..ac151dd64
--- /dev/null
+++ b/docs/doc_examples/5566cff431570f522e1fc5475b2ed875.asciidoc
@@ -0,0 +1,71 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ settings: {
+ index: {
+ number_of_shards: 1,
+ analysis: {
+ analyzer: {
+ trigram: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "shingle"],
+ },
+ reverse: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "reverse"],
+ },
+ },
+ filter: {
+ shingle: {
+ type: "shingle",
+ min_shingle_size: 2,
+ max_shingle_size: 3,
+ },
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ fields: {
+ trigram: {
+ type: "text",
+ analyzer: "trigram",
+ },
+ reverse: {
+ type: "text",
+ analyzer: "reverse",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ refresh: "true",
+ document: {
+ title: "noble warriors",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "test",
+ refresh: "true",
+ document: {
+ title: "nobel prize",
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc b/docs/doc_examples/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc
new file mode 100644
index 000000000..35b5bc77a
--- /dev/null
+++ b/docs/doc_examples/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ runtime_mappings: {
+ "load_time.seconds": {
+ type: "long",
+ script: {
+ source: "emit(doc['load_time'].value / params.timeUnit)",
+ params: {
+ timeUnit: 1000,
+ },
+ },
+ },
+ },
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time.seconds",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/558b3f9b987771e9f9f35e51a0d7e062.asciidoc b/docs/doc_examples/558b3f9b987771e9f9f35e51a0d7e062.asciidoc
new file mode 100644
index 000000000..1e6422794
--- /dev/null
+++ b/docs/doc_examples/558b3f9b987771e9f9f35e51a0d7e062.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-dfs-index",
+ settings: {
+ number_of_shards: 2,
+ number_of_replicas: 1,
+ },
+ mappings: {
+ properties: {
+ "my-keyword": {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "my-dfs-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ "my-keyword": "a",
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ "my-keyword": "b",
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/5597eeb8f43b5d47bd07f27122c24194.asciidoc b/docs/doc_examples/5597eeb8f43b5d47bd07f27122c24194.asciidoc
new file mode 100644
index 000000000..6afde064f
--- /dev/null
+++ b/docs/doc_examples/5597eeb8f43b5d47bd07f27122c24194.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index:
+ "my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001",
+ ccs_minimize_roundtrips: "false",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ _source: ["user.id", "message", "http.response.status_code"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/55d349ccb0efd5e1c06c6dd383a593cf.asciidoc b/docs/doc_examples/55d349ccb0efd5e1c06c6dd383a593cf.asciidoc
new file mode 100644
index 000000000..5e71a8116
--- /dev/null
+++ b/docs/doc_examples/55d349ccb0efd5e1c06c6dd383a593cf.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index: "my-index-000001,cluster*:my-index-*,cluster_three:-my-index-000001",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ _source: ["user.id", "message", "http.response.status_code"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/55e8ddf643726dec51531ada0bec7143.asciidoc b/docs/doc_examples/55e8ddf643726dec51531ada0bec7143.asciidoc
new file mode 100644
index 000000000..7e7984e2e
--- /dev/null
+++ b/docs/doc_examples/55e8ddf643726dec51531ada0bec7143.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getStats();
+console.log(response);
+----
diff --git a/docs/doc_examples/55f0fec6342f677af74de2124b801aa2.asciidoc b/docs/doc_examples/55f0fec6342f677af74de2124b801aa2.asciidoc
new file mode 100644
index 000000000..1f7148276
--- /dev/null
+++ b/docs/doc_examples/55f0fec6342f677af74de2124b801aa2.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "byte-image-index",
+ knn: {
+ field: "byte-image-vector",
+ query_vector: [-5, 9],
+ k: 10,
+ num_candidates: 100,
+ },
+ fields: ["title"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/55f4a15b84b724b9fbf2efd29a4da120.asciidoc b/docs/doc_examples/55f4a15b84b724b9fbf2efd29a4da120.asciidoc
new file mode 100644
index 000000000..baa6dae78
--- /dev/null
+++ b/docs/doc_examples/55f4a15b84b724b9fbf2efd29a4da120.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.authenticate();
+console.log(response);
+----
diff --git a/docs/doc_examples/5619103306878d58a058bce87c5bd82b.asciidoc b/docs/doc_examples/5619103306878d58a058bce87c5bd82b.asciidoc
new file mode 100644
index 000000000..5f2179a7b
--- /dev/null
+++ b/docs/doc_examples/5619103306878d58a058bce87c5bd82b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.recovery({
+ human: "true",
+ detailed: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5632c3b947062d3a5fc0e4f3413b3308.asciidoc b/docs/doc_examples/5632c3b947062d3a5fc0e4f3413b3308.asciidoc
new file mode 100644
index 000000000..bf8e62960
--- /dev/null
+++ b/docs/doc_examples/5632c3b947062d3a5fc0e4f3413b3308.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_fs_backup",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "/mount/backups/my_fs_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/563dfbf421422c837ee6929ae2ede876.asciidoc b/docs/doc_examples/563dfbf421422c837ee6929ae2ede876.asciidoc
new file mode 100644
index 000000000..f60a1d8d5
--- /dev/null
+++ b/docs/doc_examples/563dfbf421422c837ee6929ae2ede876.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.migrateToDataStream({
+ name: "my-logs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc b/docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc
new file mode 100644
index 000000000..149cff486
--- /dev/null
+++ b/docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "my-elser-model",
+ inference_config: {
+ service: "elser",
+ service_settings: {
+ adaptive_allocations: {
+ enabled: true,
+ min_number_of_allocations: 3,
+ max_number_of_allocations: 10,
+ },
+ num_threads: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56563f91d9f0b74e9e4aae9cb221845b.asciidoc b/docs/doc_examples/56563f91d9f0b74e9e4aae9cb221845b.asciidoc
new file mode 100644
index 000000000..91ca422d8
--- /dev/null
+++ b/docs/doc_examples/56563f91d9f0b74e9e4aae9cb221845b.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_security/cross_cluster/api_key",
+ body: {
+ name: "my-cross-cluster-api-key",
+ expiration: "1d",
+ access: {
+ search: [
+ {
+ names: ["logs*"],
+ },
+ ],
+ replication: [
+ {
+ names: ["archive*"],
+ },
+ ],
+ },
+ metadata: {
+ description: "phase one",
+ environment: {
+ level: 1,
+ trusted: true,
+ tags: ["dev", "staging"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/565908b03edff1d6e6e7cdfb92177faf.asciidoc b/docs/doc_examples/565908b03edff1d6e6e7cdfb92177faf.asciidoc
new file mode 100644
index 000000000..6815ee37a
--- /dev/null
+++ b/docs/doc_examples/565908b03edff1d6e6e7cdfb92177faf.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ runtime_mappings: {
+ "grade.weighted": {
+ type: "double",
+ script:
+ "\n emit(doc['grade'].value * doc['weight'].value)\n ",
+ },
+ },
+ aggs: {
+ grades_stats: {
+ stats: {
+ field: "grade.weighted",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/568979150ce18739f8d3ea859355aaa3.asciidoc b/docs/doc_examples/568979150ce18739f8d3ea859355aaa3.asciidoc
new file mode 100644
index 000000000..c421d5bd2
--- /dev/null
+++ b/docs/doc_examples/568979150ce18739f8d3ea859355aaa3.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUser({
+ username: "jacknich",
+ with_profile_uid: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/569f10fee671632017c722fd983009d4.asciidoc b/docs/doc_examples/569f10fee671632017c722fd983009d4.asciidoc
new file mode 100644
index 000000000..cc388a8c9
--- /dev/null
+++ b/docs/doc_examples/569f10fee671632017c722fd983009d4.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ shop: {
+ terms: {
+ field: "shop",
+ },
+ },
+ },
+ {
+ product: {
+ terms: {
+ field: "product",
+ },
+ },
+ },
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc b/docs/doc_examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc
new file mode 100644
index 000000000..256dc7ce2
--- /dev/null
+++ b/docs/doc_examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ email: {
+ type: "keyword",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56a903530990313b753b1be33578997a.asciidoc b/docs/doc_examples/56a903530990313b753b1be33578997a.asciidoc
new file mode 100644
index 000000000..789290384
--- /dev/null
+++ b/docs/doc_examples/56a903530990313b753b1be33578997a.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ dis_max: {
+ queries: [
+ {
+ multi_match: {
+ query: "Will Smith",
+ type: "cross_fields",
+ fields: ["first", "last"],
+ minimum_should_match: "50%",
+ },
+ },
+ {
+ multi_match: {
+ query: "Will Smith",
+ type: "cross_fields",
+ fields: ["*.edge"],
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56b6b50b174a935d368301ebd717231d.asciidoc b/docs/doc_examples/56b6b50b174a935d368301ebd717231d.asciidoc
new file mode 100644
index 000000000..710fd7bb1
--- /dev/null
+++ b/docs/doc_examples/56b6b50b174a935d368301ebd717231d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.stats({
+ metric: "current_watches",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56da252798b8e7b006738428aa1a7f4c.asciidoc b/docs/doc_examples/56da252798b8e7b006738428aa1a7f4c.asciidoc
new file mode 100644
index 000000000..8f272acdb
--- /dev/null
+++ b/docs/doc_examples/56da252798b8e7b006738428aa1a7f4c.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_range: {
+ type: "long_range",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ my_range: {
+ gt: 200,
+ lt: 300,
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/56da9c55774f4c2e8eadde0579bdc60c.asciidoc b/docs/doc_examples/56da9c55774f4c2e8eadde0579bdc60c.asciidoc
new file mode 100644
index 000000000..aeffe4d01
--- /dev/null
+++ b/docs/doc_examples/56da9c55774f4c2e8eadde0579bdc60c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test*",
+ filter_path: "aggregations",
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ s: {
+ order: "asc",
+ numeric_type: "double",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56db76c987106a870357854d3068ad98.asciidoc b/docs/doc_examples/56db76c987106a870357854d3068ad98.asciidoc
new file mode 100644
index 000000000..3ae4090ca
--- /dev/null
+++ b/docs/doc_examples/56db76c987106a870357854d3068ad98.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_query_rules",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56e90a63f94eeb882fe8acbcd74229c2.asciidoc b/docs/doc_examples/56e90a63f94eeb882fe8acbcd74229c2.asciidoc
new file mode 100644
index 000000000..608ba2f7f
--- /dev/null
+++ b/docs/doc_examples/56e90a63f94eeb882fe8acbcd74229c2.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_moving_min: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.min(values)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56f3a6bec7be5a90fb43144c331a5b5a.asciidoc b/docs/doc_examples/56f3a6bec7be5a90fb43144c331a5b5a.asciidoc
new file mode 100644
index 000000000..ecc6eaa60
--- /dev/null
+++ b/docs/doc_examples/56f3a6bec7be5a90fb43144c331a5b5a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ flat_settings: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/56fa6c9e08258157d445e2f92274962b.asciidoc b/docs/doc_examples/56fa6c9e08258157d445e2f92274962b.asciidoc
new file mode 100644
index 000000000..47651fd9a
--- /dev/null
+++ b/docs/doc_examples/56fa6c9e08258157d445e2f92274962b.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "shingle",
+ min_shingle_size: 2,
+ max_shingle_size: 3,
+ output_unigrams: false,
+ },
+ ],
+ text: "quick brown fox jumps",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/571314a948e49f1f9614d36fcf79392a.asciidoc b/docs/doc_examples/571314a948e49f1f9614d36fcf79392a.asciidoc
new file mode 100644
index 000000000..e70d505ba
--- /dev/null
+++ b/docs/doc_examples/571314a948e49f1f9614d36fcf79392a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.get({
+ id: "FjktRGJ1Y2w1U0phLTRhZnVyeUZ2MVEbWEJyeVBPQldTV3FGZGdIeUVabXBldzo5NzA4",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/578808065fee8691355b8f25c35782cd.asciidoc b/docs/doc_examples/578808065fee8691355b8f25c35782cd.asciidoc
new file mode 100644
index 000000000..ad2b22c3e
--- /dev/null
+++ b/docs/doc_examples/578808065fee8691355b8f25c35782cd.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ filter_path: "profile.shards.fetch",
+ profile: true,
+ query: {
+ term: {
+ "user.id": {
+ value: "elkbee",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5797df4b8e71d821a1488cbb63481104.asciidoc b/docs/doc_examples/5797df4b8e71d821a1488cbb63481104.asciidoc
new file mode 100644
index 000000000..00b4a3abb
--- /dev/null
+++ b/docs/doc_examples/5797df4b8e71d821a1488cbb63481104.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.healthReport({
+ feature: "shards_capacity",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/57a3e8d2ca64e37e90d658c4cd935399.asciidoc b/docs/doc_examples/57a3e8d2ca64e37e90d658c4cd935399.asciidoc
new file mode 100644
index 000000000..22059e18c
--- /dev/null
+++ b/docs/doc_examples/57a3e8d2ca64e37e90d658c4cd935399.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "items",
+ query: {
+ bool: {
+ must: {
+ match: {
+ name: "chocolate",
+ },
+ },
+ should: {
+ distance_feature: {
+ field: "location",
+ pivot: "1000m",
+ origin: [-71.3, 41.15],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/57c690f8fa95bacf4b250803be7467e4.asciidoc b/docs/doc_examples/57c690f8fa95bacf4b250803be7467e4.asciidoc
new file mode 100644
index 000000000..a09a17ef2
--- /dev/null
+++ b/docs/doc_examples/57c690f8fa95bacf4b250803be7467e4.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "BBOX (1000.0, 1002.0, 2000.0, 1000.0)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc b/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc
new file mode 100644
index 000000000..dcf9e4b2e
--- /dev/null
+++ b/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.oidcPrepareAuthentication({
+ body: {
+ realm: "oidc1",
+ state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
+ nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc b/docs/doc_examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc
new file mode 100644
index 000000000..9babe8e35
--- /dev/null
+++ b/docs/doc_examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["temp*"],
+ priority: 0,
+ template: {
+ settings: {
+ number_of_shards: 1,
+ number_of_replicas: 0,
+ },
+ mappings: {
+ _source: {
+ enabled: false,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putIndexTemplate({
+ name: "template_2",
+ index_patterns: ["template*"],
+ priority: 1,
+ template: {
+ settings: {
+ number_of_shards: 2,
+ },
+ mappings: {
+ _source: {
+ enabled: true,
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/582c4b05401dbc190b19411282d85310.asciidoc b/docs/doc_examples/582c4b05401dbc190b19411282d85310.asciidoc
new file mode 100644
index 000000000..09b9fa2b8
--- /dev/null
+++ b/docs/doc_examples/582c4b05401dbc190b19411282d85310.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "my-index-000001",
+ id: 1,
+ script: {
+ source:
+ "if (ctx._source.tags.contains(params['tag'])) { ctx.op = 'delete' } else { ctx.op = 'none' }",
+ lang: "painless",
+ params: {
+ tag: "green",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/582da02c09e0597b4396c87e33571e7b.asciidoc b/docs/doc_examples/582da02c09e0597b4396c87e33571e7b.asciidoc
new file mode 100644
index 000000000..e5be2eaef
--- /dev/null
+++ b/docs/doc_examples/582da02c09e0597b4396c87e33571e7b.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ cursor:
+ "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5837d5f50665ac0a26181d3aaeb3f204.asciidoc b/docs/doc_examples/5837d5f50665ac0a26181d3aaeb3f204.asciidoc
new file mode 100644
index 000000000..b5d5d91f8
--- /dev/null
+++ b/docs/doc_examples/5837d5f50665ac0a26181d3aaeb3f204.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.startTrainedModelDeployment({
+ model_id: "my_model",
+ deployment_id: "my_model_for_search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/584f502cf840134f2db5f39e2483ced1.asciidoc b/docs/doc_examples/584f502cf840134f2db5f39e2483ced1.asciidoc
new file mode 100644
index 000000000..15ffff9c6
--- /dev/null
+++ b/docs/doc_examples/584f502cf840134f2db5f39e2483ced1.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "portuguese_example",
+ settings: {
+ analysis: {
+ filter: {
+ portuguese_stop: {
+ type: "stop",
+ stopwords: "_portuguese_",
+ },
+ portuguese_keywords: {
+ type: "keyword_marker",
+ keywords: ["exemplo"],
+ },
+ portuguese_stemmer: {
+ type: "stemmer",
+ language: "light_portuguese",
+ },
+ },
+ analyzer: {
+ rebuilt_portuguese: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "portuguese_stop",
+ "portuguese_keywords",
+ "portuguese_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/585a34ad79aee16678b37da785933ac8.asciidoc b/docs/doc_examples/585a34ad79aee16678b37da785933ac8.asciidoc
new file mode 100644
index 000000000..8e62c4d26
--- /dev/null
+++ b/docs/doc_examples/585a34ad79aee16678b37da785933ac8.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.stop();
+console.log(response);
+----
diff --git a/docs/doc_examples/585b19369cb9b9763a7e8d405f009a47.asciidoc b/docs/doc_examples/585b19369cb9b9763a7e8d405f009a47.asciidoc
new file mode 100644
index 000000000..02e8855dc
--- /dev/null
+++ b/docs/doc_examples/585b19369cb9b9763a7e8d405f009a47.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ day_of_week: null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc b/docs/doc_examples/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc
new file mode 100644
index 000000000..9063935bf
--- /dev/null
+++ b/docs/doc_examples/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.explainDataLifecycle({
+ index: ".ds-my-data-stream-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/586cfa0e5fd695b7d451e854f9fb4a9c.asciidoc b/docs/doc_examples/586cfa0e5fd695b7d451e854f9fb4a9c.asciidoc
new file mode 100644
index 000000000..0b83eb8c3
--- /dev/null
+++ b/docs/doc_examples/586cfa0e5fd695b7d451e854f9fb4a9c.asciidoc
@@ -0,0 +1,53 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_locations",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my_locations",
+ id: 1,
+ refresh: "true",
+ document: {
+ location: "POINT(4.912350 52.374081)",
+ city: "Amsterdam",
+ name: "NEMO Science Museum",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my_locations",
+ id: 2,
+ refresh: "true",
+ document: {
+ location: "POINT(4.405200 51.222900)",
+ city: "Antwerp",
+ name: "Letterenhuis",
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my_locations",
+ id: 3,
+ refresh: "true",
+ document: {
+ location: "POINT(2.336389 48.861111)",
+ city: "Paris",
+ name: "Musée du Louvre",
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/58ca855be30049f8f0879e532db51ee2.asciidoc b/docs/doc_examples/58ca855be30049f8f0879e532db51ee2.asciidoc
new file mode 100644
index 000000000..4212f2f60
--- /dev/null
+++ b/docs/doc_examples/58ca855be30049f8f0879e532db51ee2.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.putTransform({
+ transform_id: "ecommerce_transform1",
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ query: {
+ term: {
+ "geoip.continent_name": {
+ value: "Asia",
+ },
+ },
+ },
+ },
+ pivot: {
+ group_by: {
+ customer_id: {
+ terms: {
+ field: "customer_id",
+ missing_bucket: true,
+ },
+ },
+ },
+ aggregations: {
+ max_price: {
+ max: {
+ field: "taxful_total_price",
+ },
+ },
+ },
+ },
+ description: "Maximum priced ecommerce data by customer_id in Asia",
+ dest: {
+ index: "kibana_sample_data_ecommerce_transform1",
+ pipeline: "add_timestamp_pipeline",
+ },
+ frequency: "5m",
+ sync: {
+ time: {
+ field: "order_date",
+ delay: "60s",
+ },
+ },
+ retention_policy: {
+ time: {
+ field: "order_date",
+ max_age: "30d",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/58dd26afc919722e21358c91e112b27a.asciidoc b/docs/doc_examples/58dd26afc919722e21358c91e112b27a.asciidoc
new file mode 100644
index 000000000..61938b700
--- /dev/null
+++ b/docs/doc_examples/58dd26afc919722e21358c91e112b27a.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ range: {
+ date: {
+ gte: "2023-05-01",
+ lte: "2023-05-31",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/58e684e0b771b4646662fe12d3060c05.asciidoc b/docs/doc_examples/58e684e0b771b4646662fe12d3060c05.asciidoc
new file mode 100644
index 000000000..22c848908
--- /dev/null
+++ b/docs/doc_examples/58e684e0b771b4646662fe12d3060c05.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "cjk_width_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_cjk_width: {
+ tokenizer: "standard",
+ filter: ["cjk_width"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/58f72be60c25752d7899a35fc60fe6eb.asciidoc b/docs/doc_examples/58f72be60c25752d7899a35fc60fe6eb.asciidoc
new file mode 100644
index 000000000..2fc9fec45
--- /dev/null
+++ b/docs/doc_examples/58f72be60c25752d7899a35fc60fe6eb.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.indices.recovery": "DEBUG",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/591c7fb7451069829a14bba593136f1f.asciidoc b/docs/doc_examples/591c7fb7451069829a14bba593136f1f.asciidoc
new file mode 100644
index 000000000..0b78c8eec
--- /dev/null
+++ b/docs/doc_examples/591c7fb7451069829a14bba593136f1f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.forecast({
+ job_id: "low_request_rate",
+ duration: "10d",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5969c446688c8b326acc80276573e9d2.asciidoc b/docs/doc_examples/5969c446688c8b326acc80276573e9d2.asciidoc
new file mode 100644
index 000000000..7acc40c12
--- /dev/null
+++ b/docs/doc_examples/5969c446688c8b326acc80276573e9d2.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ number_of_fragments: 3,
+ fragment_size: 150,
+ fields: {
+ body: {
+ pre_tags: [""],
+ post_tags: [" "],
+ },
+ "blog.title": {
+ number_of_fragments: 0,
+ },
+ "blog.author": {
+ number_of_fragments: 0,
+ },
+ "blog.comment": {
+ number_of_fragments: 5,
+ order: "score",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/59726e3c90e1218487a781508788c243.asciidoc b/docs/doc_examples/59726e3c90e1218487a781508788c243.asciidoc
new file mode 100644
index 000000000..b895ddd4d
--- /dev/null
+++ b/docs/doc_examples/59726e3c90e1218487a781508788c243.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sale_date: {
+ auto_date_histogram: {
+ field: "date",
+ buckets: 10,
+ missing: "2000/01/01",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/597d456edfcb3d410954a3e9b5babf9a.asciidoc b/docs/doc_examples/597d456edfcb3d410954a3e9b5babf9a.asciidoc
new file mode 100644
index 000000000..a57d2e49f
--- /dev/null
+++ b/docs/doc_examples/597d456edfcb3d410954a3e9b5babf9a.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ mappings: {
+ dynamic_templates: [
+ {
+ strings: {
+ match_mapping_type: "string",
+ mapping: {
+ type: "keyword",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5987afb2c17c73fe3d860937565ef115.asciidoc b/docs/doc_examples/5987afb2c17c73fe3d860937565ef115.asciidoc
new file mode 100644
index 000000000..0107606a5
--- /dev/null
+++ b/docs/doc_examples/5987afb2c17c73fe3d860937565ef115.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.openPointInTime({
+ index: "my-index-000001",
+ keep_alive: "1m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/599454613ac699d447537e79e65ae35a.asciidoc b/docs/doc_examples/599454613ac699d447537e79e65ae35a.asciidoc
new file mode 100644
index 000000000..3f7bd9397
--- /dev/null
+++ b/docs/doc_examples/599454613ac699d447537e79e65ae35a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ script_fields: {
+ my_doubled_field: {
+ script: {
+ source: "doc['my_field'].value * params['multiplier']",
+ params: {
+ multiplier: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/599f693cc7d30b1153f5eeecec8eb23a.asciidoc b/docs/doc_examples/599f693cc7d30b1153f5eeecec8eb23a.asciidoc
new file mode 100644
index 000000000..b478fbc11
--- /dev/null
+++ b/docs/doc_examples/599f693cc7d30b1153f5eeecec8eb23a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteTemplate({
+ name: "my-legacy-index-template",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/59b8b9555f4aa30bc4613f819e9fc8f0.asciidoc b/docs/doc_examples/59b8b9555f4aa30bc4613f819e9fc8f0.asciidoc
new file mode 100644
index 000000000..56b04dfe7
--- /dev/null
+++ b/docs/doc_examples/59b8b9555f4aa30bc4613f819e9fc8f0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.close({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/59d015f7bd0eeab40d0885010a62fa70.asciidoc b/docs/doc_examples/59d015f7bd0eeab40d0885010a62fa70.asciidoc
new file mode 100644
index 000000000..9915745fb
--- /dev/null
+++ b/docs/doc_examples/59d015f7bd0eeab40d0885010a62fa70.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "example2",
+ indices: [
+ {
+ names: ["my-index-000001"],
+ privileges: ["read"],
+ query: {
+ template: {
+ source: {
+ term: {
+ "group.id": "{{_user.metadata.group_id}}",
+ },
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc b/docs/doc_examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc
new file mode 100644
index 000000000..5ea918642
--- /dev/null
+++ b/docs/doc_examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "openai-completion",
+ inference_config: {
+ service: "openai",
+ service_settings: {
+ api_key: "",
+ model_id: "gpt-3.5-turbo",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/59f0ad2a6f97200e98e8eb079cdd8334.asciidoc b/docs/doc_examples/59f0ad2a6f97200e98e8eb079cdd8334.asciidoc
new file mode 100644
index 000000000..695b35e41
--- /dev/null
+++ b/docs/doc_examples/59f0ad2a6f97200e98e8eb079cdd8334.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ index: "my-index-000001",
+ ids: ["1", "2"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5a006feed86309b547bbaa1baca1c496.asciidoc b/docs/doc_examples/5a006feed86309b547bbaa1baca1c496.asciidoc
new file mode 100644
index 000000000..5ab3acc0b
--- /dev/null
+++ b/docs/doc_examples/5a006feed86309b547bbaa1baca1c496.asciidoc
@@ -0,0 +1,69 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ numeric_counts: {
+ match_mapping_type: ["long", "double"],
+ match: "count",
+ mapping: {
+ type: "{dynamic_type}",
+ index: false,
+ },
+ },
+ },
+ {
+ integers: {
+ match_mapping_type: "long",
+ mapping: {
+ type: "integer",
+ },
+ },
+ },
+ {
+ strings: {
+ match_mapping_type: "string",
+ mapping: {
+ type: "text",
+ fields: {
+ raw: {
+ type: "keyword",
+ ignore_above: 256,
+ },
+ },
+ },
+ },
+ },
+ {
+ non_objects_keyword: {
+ match_mapping_type: "*",
+ unmatch_mapping_type: "object",
+ mapping: {
+ type: "keyword",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_integer: 5,
+ my_string: "Some string",
+ my_boolean: "false",
+ field: {
+ count: 4,
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/5a3855f1b3e37d89ab7cbcc4f7ae1dd3.asciidoc b/docs/doc_examples/5a3855f1b3e37d89ab7cbcc4f7ae1dd3.asciidoc
new file mode 100644
index 000000000..a0d7ddaaf
--- /dev/null
+++ b/docs/doc_examples/5a3855f1b3e37d89ab7cbcc4f7ae1dd3.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "limit",
+ max_token_count: 2,
+ },
+ ],
+ text: "quick fox jumps over lazy dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5a3fe9584d203d1fd6c96981ba34e0de.asciidoc b/docs/doc_examples/5a3fe9584d203d1fd6c96981ba34e0de.asciidoc
new file mode 100644
index 000000000..bb83361b8
--- /dev/null
+++ b/docs/doc_examples/5a3fe9584d203d1fd6c96981ba34e0de.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "postal_codes",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_shape",
+ },
+ postal_code: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5a6bb9ac6830668ecc00550c1aa8f2f1.asciidoc b/docs/doc_examples/5a6bb9ac6830668ecc00550c1aa8f2f1.asciidoc
new file mode 100644
index 000000000..ab820fab7
--- /dev/null
+++ b/docs/doc_examples/5a6bb9ac6830668ecc00550c1aa8f2f1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "logstash-reader",
+ indices: [
+ {
+ names: ["logstash-*"],
+ privileges: ["read_cross_cluster", "read", "view_index_metadata"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5a754dcc854b9154296550a0b581cb9d.asciidoc b/docs/doc_examples/5a754dcc854b9154296550a0b581cb9d.asciidoc
new file mode 100644
index 000000000..02bc82b96
--- /dev/null
+++ b/docs/doc_examples/5a754dcc854b9154296550a0b581cb9d.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "network-traffic",
+ size: 0,
+ aggs: {
+ "ipv4-subnets": {
+ ip_prefix: {
+ field: "ipv4",
+ prefix_length: 24,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5a7f05ab1d05b4eef5ff327168517165.asciidoc b/docs/doc_examples/5a7f05ab1d05b4eef5ff327168517165.asciidoc
new file mode 100644
index 000000000..e163c01b6
--- /dev/null
+++ b/docs/doc_examples/5a7f05ab1d05b4eef5ff327168517165.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ routing: "my-routing-value,my-routing-value-2",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5ab9b44939fb30f5b4adbdcc4bcc0733.asciidoc b/docs/doc_examples/5ab9b44939fb30f5b4adbdcc4bcc0733.asciidoc
new file mode 100644
index 000000000..090b5022a
--- /dev/null
+++ b/docs/doc_examples/5ab9b44939fb30f5b4adbdcc4bcc0733.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "datastream_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_age: "5m",
+ },
+ downsample: {
+ fixed_interval: "1h",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5ad365ed9e1a3c26093a0f09666c133a.asciidoc b/docs/doc_examples/5ad365ed9e1a3c26093a0f09666c133a.asciidoc
new file mode 100644
index 000000000..cd5c996c6
--- /dev/null
+++ b/docs/doc_examples/5ad365ed9e1a3c26093a0f09666c133a.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping5",
+ role_templates: [
+ {
+ template: {
+ source: "{{#tojson}}groups{{/tojson}}",
+ },
+ format: "json",
+ },
+ ],
+ rules: {
+ field: {
+ "realm.name": "saml1",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5afbd9caed88c32f8a2968c07054f096.asciidoc b/docs/doc_examples/5afbd9caed88c32f8a2968c07054f096.asciidoc
new file mode 100644
index 000000000..9b7bf7d52
--- /dev/null
+++ b/docs/doc_examples/5afbd9caed88c32f8a2968c07054f096.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.logstash.deletePipeline({
+ id: "my_pipeline",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b0cc9e186a8f765a11141809b8b17b7.asciidoc b/docs/doc_examples/5b0cc9e186a8f765a11141809b8b17b7.asciidoc
new file mode 100644
index 000000000..e110d8fa3
--- /dev/null
+++ b/docs/doc_examples/5b0cc9e186a8f765a11141809b8b17b7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.list({
+ from: 0,
+ size: 3,
+ q: "app*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b191f2dbfa46c774cc9b9b9e8d1d831.asciidoc b/docs/doc_examples/5b191f2dbfa46c774cc9b9b9e8d1d831.asciidoc
new file mode 100644
index 000000000..91150c314
--- /dev/null
+++ b/docs/doc_examples/5b191f2dbfa46c774cc9b9b9e8d1d831.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUserPrivileges();
+console.log(response);
+----
diff --git a/docs/doc_examples/5b1ae98ad03e2819fc7c3468840ef448.asciidoc b/docs/doc_examples/5b1ae98ad03e2819fc7c3468840ef448.asciidoc
new file mode 100644
index 000000000..4caea0a08
--- /dev/null
+++ b/docs/doc_examples/5b1ae98ad03e2819fc7c3468840ef448.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-index*",
+ query:
+ "\n sample by host\n [any where uptime > 0]\n [any where port > 100]\n [any where bool == true]\n ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b266deba5396c7810af1b8315c23596.asciidoc b/docs/doc_examples/5b266deba5396c7810af1b8315c23596.asciidoc
new file mode 100644
index 000000000..76ad3f0dc
--- /dev/null
+++ b/docs/doc_examples/5b266deba5396c7810af1b8315c23596.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ size: 0,
+ aggs: {
+ grouped: {
+ geohash_grid: {
+ field: "location",
+ precision: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b281956e35a26e734c482b42b356c0d.asciidoc b/docs/doc_examples/5b281956e35a26e734c482b42b356c0d.asciidoc
new file mode 100644
index 000000000..54aa6736a
--- /dev/null
+++ b/docs/doc_examples/5b281956e35a26e734c482b42b356c0d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.existsAlias({
+ name: "my-alias",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc b/docs/doc_examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc
new file mode 100644
index 000000000..ffa909eaf
--- /dev/null
+++ b/docs/doc_examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "template_1",
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ },
+ _meta: {
+ description: "set number of shards to one",
+ serialization: {
+ class: "MyComponentTemplate",
+ id: 10,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b3384992c398ea8a3064d2e08725e2b.asciidoc b/docs/doc_examples/5b3384992c398ea8a3064d2e08725e2b.asciidoc
new file mode 100644
index 000000000..b427412d8
--- /dev/null
+++ b/docs/doc_examples/5b3384992c398ea8a3064d2e08725e2b.asciidoc
@@ -0,0 +1,77 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "node",
+ mappings: {
+ properties: {
+ ip: {
+ type: "ip",
+ },
+ date: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "node",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ ip: "192.168.0.1",
+ date: "2020-01-01T01:01:01",
+ m: 1,
+ },
+ {
+ index: {},
+ },
+ {
+ ip: "192.168.0.1",
+ date: "2020-01-01T02:01:01",
+ m: 2,
+ },
+ {
+ index: {},
+ },
+ {
+ ip: "192.168.0.2",
+ date: "2020-01-01T02:01:01",
+ m: 3,
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "node",
+ filter_path: "aggregations",
+ aggs: {
+ ip: {
+ terms: {
+ field: "ip",
+ },
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ date: "desc",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/5b58007f10700ec7934580f034404652.asciidoc b/docs/doc_examples/5b58007f10700ec7934580f034404652.asciidoc
new file mode 100644
index 000000000..0385b42c4
--- /dev/null
+++ b/docs/doc_examples/5b58007f10700ec7934580f034404652.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.create({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b6bc085943e9189236d98b3c05ed62c.asciidoc b/docs/doc_examples/5b6bc085943e9189236d98b3c05ed62c.asciidoc
new file mode 100644
index 000000000..3cb27b100
--- /dev/null
+++ b/docs/doc_examples/5b6bc085943e9189236d98b3c05ed62c.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "25GB",
+ },
+ },
+ },
+ delete: {
+ min_age: "30d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc b/docs/doc_examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc
new file mode 100644
index 000000000..8a1350c9b
--- /dev/null
+++ b/docs/doc_examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: "*",
+});
+console.log(response);
+
+const response1 = await client.indices.getMapping({
+ index: "_all",
+});
+console.log(response1);
+
+const response2 = await client.indices.getMapping();
+console.log(response2);
+----
diff --git a/docs/doc_examples/5b8119b4d9a09f4643be5a5b40875c8f.asciidoc b/docs/doc_examples/5b8119b4d9a09f4643be5a5b40875c8f.asciidoc
new file mode 100644
index 000000000..f7dbd3f5e
--- /dev/null
+++ b/docs/doc_examples/5b8119b4d9a09f4643be5a5b40875c8f.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ is_published: true,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ is_published: false,
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ publish_state: {
+ terms: {
+ field: "is_published",
+ },
+ },
+ },
+ sort: ["is_published"],
+ fields: [
+ {
+ field: "weight",
+ },
+ ],
+ runtime_mappings: {
+ weight: {
+ type: "long",
+ script: "emit(doc['is_published'].value ? 10 : 0)",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/5bb0d84185df2f276f01bb2fba709e1a.asciidoc b/docs/doc_examples/5bb0d84185df2f276f01bb2fba709e1a.asciidoc
new file mode 100644
index 000000000..8e695a1e8
--- /dev/null
+++ b/docs/doc_examples/5bb0d84185df2f276f01bb2fba709e1a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "cluster_one:my-data-stream,cluster_two:my-data-stream",
+ query: '\n process where process.name == "regsvr32.exe"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5bba213a7f543190139d1a69ab2ed076.asciidoc b/docs/doc_examples/5bba213a7f543190139d1a69ab2ed076.asciidoc
new file mode 100644
index 000000000..c95b379f3
--- /dev/null
+++ b/docs/doc_examples/5bba213a7f543190139d1a69ab2ed076.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.asyncQuery({
+ format: "json",
+ body: {
+ query:
+ "\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
+ include_ccs_metadata: true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5bbccf103107e505c17ae59863753efd.asciidoc b/docs/doc_examples/5bbccf103107e505c17ae59863753efd.asciidoc
new file mode 100644
index 000000000..160980a8a
--- /dev/null
+++ b/docs/doc_examples/5bbccf103107e505c17ae59863753efd.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getInfluencers({
+ job_id: "high_sum_total_sales",
+ sort: "influencer_score",
+ desc: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c187ba92dd1678fda86b5eec8cc7421.asciidoc b/docs/doc_examples/5c187ba92dd1678fda86b5eec8cc7421.asciidoc
new file mode 100644
index 000000000..c077c6112
--- /dev/null
+++ b/docs/doc_examples/5c187ba92dd1678fda86b5eec8cc7421.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ filter: {
+ script: {
+ script:
+ "\n double amount = doc['amount'].value;\n if (doc['type'].value == 'expense') {\n amount *= -1;\n }\n return amount < 10;\n ",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c22172a944864a7d138decdc08558b4.asciidoc b/docs/doc_examples/5c22172a944864a7d138decdc08558b4.asciidoc
new file mode 100644
index 000000000..8c0f5c121
--- /dev/null
+++ b/docs/doc_examples/5c22172a944864a7d138decdc08558b4.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.indices({
+ index: "my-data-stream",
+ v: "true",
+ h: "health,status,index,docs.count",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c249eaeb99e6aee07162128288ac1b1.asciidoc b/docs/doc_examples/5c249eaeb99e6aee07162128288ac1b1.asciidoc
new file mode 100644
index 000000000..a1c117415
--- /dev/null
+++ b/docs/doc_examples/5c249eaeb99e6aee07162128288ac1b1.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_percentile: {
+ percentiles: {
+ field: "price",
+ percents: [1, 99],
+ },
+ },
+ the_movperc: {
+ moving_percentiles: {
+ buckets_path: "the_percentile",
+ window: 10,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c24a9a0ddbfa50628dacdb9d25f7ab0.asciidoc b/docs/doc_examples/5c24a9a0ddbfa50628dacdb9d25f7ab0.asciidoc
new file mode 100644
index 000000000..40a5a3b59
--- /dev/null
+++ b/docs/doc_examples/5c24a9a0ddbfa50628dacdb9d25f7ab0.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ grades_stats: {
+ extended_stats: {
+ field: "grade",
+ missing: 0,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c2f486c27bd5346e512265f93375d16.asciidoc b/docs/doc_examples/5c2f486c27bd5346e512265f93375d16.asciidoc
new file mode 100644
index 000000000..cad6dce99
--- /dev/null
+++ b/docs/doc_examples/5c2f486c27bd5346e512265f93375d16.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ range: {
+ timestamp: {
+ time_zone: "+01:00",
+ gte: "2020-01-01T00:00:00",
+ lte: "now",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c6fbeac20dc23b613847f35d431ecab.asciidoc b/docs/doc_examples/5c6fbeac20dc23b613847f35d431ecab.asciidoc
new file mode 100644
index 000000000..3d20e9ceb
--- /dev/null
+++ b/docs/doc_examples/5c6fbeac20dc23b613847f35d431ecab.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ functions: [
+ {
+ gauss: {
+ price: {
+ origin: "0",
+ scale: "20",
+ },
+ },
+ },
+ {
+ gauss: {
+ location: {
+ origin: "11, 12",
+ scale: "2km",
+ },
+ },
+ },
+ ],
+ query: {
+ match: {
+ properties: "balcony",
+ },
+ },
+ score_mode: "multiply",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c7ece1f30267adabdb832424871900a.asciidoc b/docs/doc_examples/5c7ece1f30267adabdb832424871900a.asciidoc
new file mode 100644
index 000000000..68956e123
--- /dev/null
+++ b/docs/doc_examples/5c7ece1f30267adabdb832424871900a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.allocation({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5c8ac24dd56e85d8f3f6705ec3c6dc32.asciidoc b/docs/doc_examples/5c8ac24dd56e85d8f3f6705ec3c6dc32.asciidoc
new file mode 100644
index 000000000..ce39cc7bb
--- /dev/null
+++ b/docs/doc_examples/5c8ac24dd56e85d8f3f6705ec3c6dc32.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "circles",
+ mappings: {
+ properties: {
+ circle: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.ingest.putPipeline({
+ id: "polygonize_circles",
+ description: "translate circle to polygon",
+ processors: [
+ {
+ circle: {
+ field: "circle",
+ error_distance: 28,
+ shape_type: "geo_shape",
+ },
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/5ccfd9f4698dcd7cdfbc6bad60081aab.asciidoc b/docs/doc_examples/5ccfd9f4698dcd7cdfbc6bad60081aab.asciidoc
new file mode 100644
index 000000000..cb0182201
--- /dev/null
+++ b/docs/doc_examples/5ccfd9f4698dcd7cdfbc6bad60081aab.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getDataFrameAnalytics({
+ id: "loganalytics",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5cd792dff7d5891c33bef098d9338ce1.asciidoc b/docs/doc_examples/5cd792dff7d5891c33bef098d9338ce1.asciidoc
new file mode 100644
index 000000000..8570b8d2d
--- /dev/null
+++ b/docs/doc_examples/5cd792dff7d5891c33bef098d9338ce1.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ store: true,
+ },
+ date: {
+ type: "date",
+ store: true,
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ title: "Some short title",
+ date: "2015-01-01",
+ content: "A very long content field...",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ stored_fields: ["title", "date"],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc b/docs/doc_examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc
new file mode 100644
index 000000000..e2a1539c1
--- /dev/null
+++ b/docs/doc_examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "small_chunk_size",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ num_allocations: 1,
+ num_threads: 1,
+ },
+ chunking_settings: {
+ strategy: "sentence",
+ max_chunk_size: 100,
+ sentence_overlap: 0,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc b/docs/doc_examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc
new file mode 100644
index 000000000..423a609ea
--- /dev/null
+++ b/docs/doc_examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5cfab507e50d8c5182939412a9dbcdc8.asciidoc b/docs/doc_examples/5cfab507e50d8c5182939412a9dbcdc8.asciidoc
new file mode 100644
index 000000000..44f1922f2
--- /dev/null
+++ b/docs/doc_examples/5cfab507e50d8c5182939412a9dbcdc8.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "places",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "places",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ name: "NEMO Science Museum",
+ geometry: "POINT(4.912350 52.374081)",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ name: "Sportpark De Weeren",
+ geometry: {
+ type: "Polygon",
+ coordinates: [
+ [
+ [4.965305328369141, 52.39347642069457],
+ [4.966979026794433, 52.391721758934835],
+ [4.969425201416015, 52.39238958618537],
+ [4.967944622039794, 52.39420969150824],
+ [4.965305328369141, 52.39347642069457],
+ ],
+ ],
+ },
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "places",
+ size: 0,
+ aggs: {
+ centroid: {
+ geo_centroid: {
+ field: "geometry",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/5d03bb385904d20c5323885706738459.asciidoc b/docs/doc_examples/5d03bb385904d20c5323885706738459.asciidoc
new file mode 100644
index 000000000..f2bc5d0b8
--- /dev/null
+++ b/docs/doc_examples/5d03bb385904d20c5323885706738459.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "my-data-stream",
+ alias: "my-alias",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc b/docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc
new file mode 100644
index 000000000..6079dac32
--- /dev/null
+++ b/docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test_index",
+ mappings: {
+ dynamic: "strict",
+ properties: {
+ description: {
+ properties: {
+ notes: {
+ type: "text",
+ copy_to: ["description.notes_raw"],
+ analyzer: "standard",
+ search_analyzer: "standard",
+ },
+ notes_raw: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d428ea66252fd252b6a8d6f47605c86.asciidoc b/docs/doc_examples/5d428ea66252fd252b6a8d6f47605c86.asciidoc
new file mode 100644
index 000000000..29e5b0bf4
--- /dev/null
+++ b/docs/doc_examples/5d428ea66252fd252b6a8d6f47605c86.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "cjk_bigram_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ han_bigrams: {
+ tokenizer: "standard",
+ filter: ["han_bigrams_filter"],
+ },
+ },
+ filter: {
+ han_bigrams_filter: {
+ type: "cjk_bigram",
+ ignored_scripts: ["hangul", "hiragana", "katakana"],
+ output_unigrams: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d5b06468c54308f52c212cca5d58fef.asciidoc b/docs/doc_examples/5d5b06468c54308f52c212cca5d58fef.asciidoc
new file mode 100644
index 000000000..5c8ee2a05
--- /dev/null
+++ b/docs/doc_examples/5d5b06468c54308f52c212cca5d58fef.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ cursor:
+ "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWWWdrRlVfSS1TbDYtcW9lc1FJNmlYdw==:BAFmBmF1dGhvcgFmBG5hbWUBZgpwYWdlX2NvdW50AWYMcmVsZWFzZV9kYXRl+v///w8=",
+ columnar: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d5cdbd4c5c62a90ff2a39cba4a59368.asciidoc b/docs/doc_examples/5d5cdbd4c5c62a90ff2a39cba4a59368.asciidoc
new file mode 100644
index 000000000..5b625185e
--- /dev/null
+++ b/docs/doc_examples/5d5cdbd4c5c62a90ff2a39cba4a59368.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ elser: true,
+ text: true,
+ query_string: "where is the best mountain climbing?",
+ elser_fields: [
+ {
+ name: "title",
+ boost: 1,
+ },
+ {
+ name: "description",
+ boost: 1,
+ },
+ ],
+ text_query_boost: 4,
+ min_score: 10,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d689d74062cddd01a0711a2fa7f23fd.asciidoc b/docs/doc_examples/5d689d74062cddd01a0711a2fa7f23fd.asciidoc
new file mode 100644
index 000000000..ca39dd250
--- /dev/null
+++ b/docs/doc_examples/5d689d74062cddd01a0711a2fa7f23fd.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.transport.TransportService.tracer": "TRACE",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d7980d8c745abf7ea0fa573e818bd5b.asciidoc b/docs/doc_examples/5d7980d8c745abf7ea0fa573e818bd5b.asciidoc
new file mode 100644
index 000000000..5d0a781cd
--- /dev/null
+++ b/docs/doc_examples/5d7980d8c745abf7ea0fa573e818bd5b.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ en: {
+ tokenizer: "standard",
+ filter: ["my_shingle_filter"],
+ },
+ },
+ filter: {
+ my_shingle_filter: {
+ type: "shingle",
+ min_shingle_size: 2,
+ max_shingle_size: 5,
+ output_unigrams: false,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc b/docs/doc_examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc
new file mode 100644
index 000000000..3f404df64
--- /dev/null
+++ b/docs/doc_examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ expired_sessions: {
+ terms: {
+ field: "account_id",
+ include: {
+ partition: 0,
+ num_partitions: 20,
+ },
+ size: 10000,
+ order: {
+ last_access: "asc",
+ },
+ },
+ aggs: {
+ last_access: {
+ max: {
+ field: "access_date",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc b/docs/doc_examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc
new file mode 100644
index 000000000..e82ef5dc8
--- /dev/null
+++ b/docs/doc_examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "brown fox",
+ type: "best_fields",
+ fields: ["subject", "message"],
+ tie_breaker: 0.3,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5daf8ede198be9b118da5bee9896cb00.asciidoc b/docs/doc_examples/5daf8ede198be9b118da5bee9896cb00.asciidoc
new file mode 100644
index 000000000..d554caaf0
--- /dev/null
+++ b/docs/doc_examples/5daf8ede198be9b118da5bee9896cb00.asciidoc
@@ -0,0 +1,47 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ flattened: {
+ type: "flattened",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ flattened: {
+ field: [
+ "apple",
+ "apple",
+ "banana",
+ "avocado",
+ "10",
+ "200",
+ "AVOCADO",
+ "Banana",
+ "Tangerine",
+ ],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/5dbf06ca9058843f572676fcaf587f75.asciidoc b/docs/doc_examples/5dbf06ca9058843f572676fcaf587f75.asciidoc
new file mode 100644
index 000000000..0b9e73b16
--- /dev/null
+++ b/docs/doc_examples/5dbf06ca9058843f572676fcaf587f75.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ prices: {
+ variable_width_histogram: {
+ field: "price",
+ buckets: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5ddc26da6e163fda54f52d33b5157051.asciidoc b/docs/doc_examples/5ddc26da6e163fda54f52d33b5157051.asciidoc
new file mode 100644
index 000000000..30bdd7f18
--- /dev/null
+++ b/docs/doc_examples/5ddc26da6e163fda54f52d33b5157051.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ sparse_vector: {
+ field: "my_tokens",
+ inference_id: "my-elser-endpoint",
+ query: "the query string",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc b/docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc
new file mode 100644
index 000000000..e5c8b337a
--- /dev/null
+++ b/docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkDeleteRole({
+ names: ["my_admin_role", "not_an_existing_role"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5df3226fdc8f1f66ae92ba2f527af8c0.asciidoc b/docs/doc_examples/5df3226fdc8f1f66ae92ba2f527af8c0.asciidoc
new file mode 100644
index 000000000..35334cd9c
--- /dev/null
+++ b/docs/doc_examples/5df3226fdc8f1f66ae92ba2f527af8c0.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_field: 5,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5dfb23f6e36ef484f1d3271bae76a8d1.asciidoc b/docs/doc_examples/5dfb23f6e36ef484f1d3271bae76a8d1.asciidoc
new file mode 100644
index 000000000..db5e254b7
--- /dev/null
+++ b/docs/doc_examples/5dfb23f6e36ef484f1d3271bae76a8d1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.recovery({
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5dfe24287bb930ad33345caf092a004b.asciidoc b/docs/doc_examples/5dfe24287bb930ad33345caf092a004b.asciidoc
new file mode 100644
index 000000000..c35b3e1f3
--- /dev/null
+++ b/docs/doc_examples/5dfe24287bb930ad33345caf092a004b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must_not: {
+ exists: {
+ field: "user.id",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc b/docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc
new file mode 100644
index 000000000..329574d90
--- /dev/null
+++ b/docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "only_remote_access_role",
+ remote_indices: [
+ {
+ clusters: ["my_remote"],
+ names: ["logs*"],
+ privileges: ["read", "read_cross_cluster", "view_index_metadata"],
+ },
+ ],
+ remote_cluster: [
+ {
+ clusters: ["my_remote"],
+ privileges: ["monitor_stats"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e099493f135ff7bd614e935c4f2bf5a.asciidoc b/docs/doc_examples/5e099493f135ff7bd614e935c4f2bf5a.asciidoc
new file mode 100644
index 000000000..217e7631a
--- /dev/null
+++ b/docs/doc_examples/5e099493f135ff7bd614e935c4f2bf5a.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ request_cache: "true",
+ size: 0,
+ aggs: {
+ popular_colors: {
+ terms: {
+ field: "colors",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e124875d97c27362ae858160ae1c6d5.asciidoc b/docs/doc_examples/5e124875d97c27362ae858160ae1c6d5.asciidoc
new file mode 100644
index 000000000..4f049addd
--- /dev/null
+++ b/docs/doc_examples/5e124875d97c27362ae858160ae1c6d5.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.getAutoFollowPattern();
+console.log(response);
+----
diff --git a/docs/doc_examples/5e21dbac92f34d236a8f0cc0d3a39cdd.asciidoc b/docs/doc_examples/5e21dbac92f34d236a8f0cc0d3a39cdd.asciidoc
new file mode 100644
index 000000000..cee356963
--- /dev/null
+++ b/docs/doc_examples/5e21dbac92f34d236a8f0cc0d3a39cdd.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "jwt1_users",
+ refresh: "true",
+ roles: ["user"],
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "jwt1",
+ },
+ },
+ {
+ field: {
+ username: "principalname1",
+ },
+ },
+ {
+ field: {
+ dn: "CN=Principal Name 1,DC=example.com",
+ },
+ },
+ {
+ field: {
+ groups: "group1",
+ },
+ },
+ {
+ field: {
+ "metadata.jwt_claim_other": "other1",
+ },
+ },
+ ],
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e2f7097eb299de553d0fa0087d70a59.asciidoc b/docs/doc_examples/5e2f7097eb299de553d0fa0087d70a59.asciidoc
new file mode 100644
index 000000000..0f146561b
--- /dev/null
+++ b/docs/doc_examples/5e2f7097eb299de553d0fa0087d70a59.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "sort.field": ["username", "timestamp"],
+ "sort.order": ["asc", "desc"],
+ },
+ },
+ mappings: {
+ properties: {
+ username: {
+ type: "keyword",
+ doc_values: true,
+ },
+ timestamp: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e3673bcbef5731746e400c4f3fe134d.asciidoc b/docs/doc_examples/5e3673bcbef5731746e400c4f3fe134d.asciidoc
new file mode 100644
index 000000000..b68e17a38
--- /dev/null
+++ b/docs/doc_examples/5e3673bcbef5731746e400c4f3fe134d.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 1,
+ document: {
+ location: [
+ {
+ coordinates: [46.25, 20.14],
+ type: "point",
+ },
+ {
+ coordinates: [47.49, 19.04],
+ type: "point",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e415c490a46358643ee2aab554b4876.asciidoc b/docs/doc_examples/5e415c490a46358643ee2aab554b4876.asciidoc
new file mode 100644
index 000000000..9b9aeab08
--- /dev/null
+++ b/docs/doc_examples/5e415c490a46358643ee2aab554b4876.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain({
+ filter_path:
+ "index,node_allocation_decisions.node_name,node_allocation_decisions.deciders.*",
+ index: "my-index",
+ shard: 0,
+ primary: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e47a407b6ca29dadf6eac5ab1d71163.asciidoc b/docs/doc_examples/5e47a407b6ca29dadf6eac5ab1d71163.asciidoc
new file mode 100644
index 000000000..403e117a9
--- /dev/null
+++ b/docs/doc_examples/5e47a407b6ca29dadf6eac5ab1d71163.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_polygon: {
+ "person.location": {
+ points: [
+ {
+ lat: 40,
+ lon: -70,
+ },
+ {
+ lat: 30,
+ lon: -80,
+ },
+ {
+ lat: 20,
+ lon: -90,
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e6419bc3e2db0d0f05bce58d8cc9215.asciidoc b/docs/doc_examples/5e6419bc3e2db0d0f05bce58d8cc9215.asciidoc
new file mode 100644
index 000000000..2527dc592
--- /dev/null
+++ b/docs/doc_examples/5e6419bc3e2db0d0f05bce58d8cc9215.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ rename: {
+ description: "Rename 'provider' to 'cloud.provider'",
+ field: "provider",
+ target_field: "cloud.provider",
+ on_failure: [
+ {
+ set: {
+ description: "Set 'error.message'",
+ field: "error.message",
+ value:
+ "Field 'provider' does not exist. Cannot rename to 'cloud.provider'",
+ override: false,
+ },
+ },
+ ],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e87dd38ac3a0fd59ad794005b16d13e.asciidoc b/docs/doc_examples/5e87dd38ac3a0fd59ad794005b16d13e.asciidoc
new file mode 100644
index 000000000..5f9ace6d7
--- /dev/null
+++ b/docs/doc_examples/5e87dd38ac3a0fd59ad794005b16d13e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getLifecycle({
+ policy_id: "nightly-snapshots",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5e9a7845e60b79685aab59877c5fbd1a.asciidoc b/docs/doc_examples/5e9a7845e60b79685aab59877c5fbd1a.asciidoc
new file mode 100644
index 000000000..2639ad24b
--- /dev/null
+++ b/docs/doc_examples/5e9a7845e60b79685aab59877c5fbd1a.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ ignored_fields: {
+ terms: {
+ field: "_ignored",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc b/docs/doc_examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc
new file mode 100644
index 000000000..edead60ff
--- /dev/null
+++ b/docs/doc_examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example",
+ mappings: {
+ properties: {
+ comment: {
+ type: "text",
+ index_options: "offsets",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f031b7bd2b7d98d2d10df7420d269ff.asciidoc b/docs/doc_examples/5f031b7bd2b7d98d2d10df7420d269ff.asciidoc
new file mode 100644
index 000000000..e364f163d
--- /dev/null
+++ b/docs/doc_examples/5f031b7bd2b7d98d2d10df7420d269ff.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.resolveIndex({
+ name: "new-data-stream*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc b/docs/doc_examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc
new file mode 100644
index 000000000..454dd9502
--- /dev/null
+++ b/docs/doc_examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ inference_field: {
+ type: "semantic_text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc b/docs/doc_examples/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc
new file mode 100644
index 000000000..34cc9739c
--- /dev/null
+++ b/docs/doc_examples/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ user_id: {
+ type: "keyword",
+ ignore_above: 20,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f3373887e8d3dc31239b687a5151449.asciidoc b/docs/doc_examples/5f3373887e8d3dc31239b687a5151449.asciidoc
new file mode 100644
index 000000000..92ac2ee4b
--- /dev/null
+++ b/docs/doc_examples/5f3373887e8d3dc31239b687a5151449.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ number_one: {
+ type: "integer",
+ },
+ number_two: {
+ type: "integer",
+ coerce: false,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ number_one: "10",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ number_two: "10",
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc b/docs/doc_examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc
new file mode 100644
index 000000000..64e8fd61e
--- /dev/null
+++ b/docs/doc_examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index_long,index_double",
+ sort: [
+ {
+ field: {
+ numeric_type: "date_nanos",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f72ab800c3db9d118df95e2a378d411.asciidoc b/docs/doc_examples/5f72ab800c3db9d118df95e2a378d411.asciidoc
new file mode 100644
index 000000000..caf925227
--- /dev/null
+++ b/docs/doc_examples/5f72ab800c3db9d118df95e2a378d411.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: ".ds-my-data-stream-2099.03.09-000003",
+ id: 2,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f7b59d4fad0bdce6b09abb520ddb51d.asciidoc b/docs/doc_examples/5f7b59d4fad0bdce6b09abb520ddb51d.asciidoc
new file mode 100644
index 000000000..997f41a37
--- /dev/null
+++ b/docs/doc_examples/5f7b59d4fad0bdce6b09abb520ddb51d.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-data-stream",
+ runtime_mappings: {
+ "source.ip": {
+ type: "ip",
+ script:
+ "\n String sourceip=grok('%{IPORHOST:sourceip} .*').extract(doc[ \"message\" ].value)?.sourceip;\n if (sourceip != null) emit(sourceip);\n ",
+ },
+ },
+ query: {
+ bool: {
+ filter: [
+ {
+ range: {
+ "@timestamp": {
+ gte: "now-1d/d",
+ lt: "now/d",
+ },
+ },
+ },
+ {
+ range: {
+ "source.ip": {
+ gte: "192.0.2.0",
+ lte: "192.0.2.255",
+ },
+ },
+ },
+ ],
+ },
+ },
+ fields: ["*"],
+ _source: false,
+ sort: [
+ {
+ "@timestamp": "desc",
+ },
+ {
+ "source.ip": "desc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc b/docs/doc_examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc
new file mode 100644
index 000000000..c04d41ee5
--- /dev/null
+++ b/docs/doc_examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "hyphenation_decompound_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_hyphenation_decompound: {
+ tokenizer: "standard",
+ filter: ["22_char_hyphenation_decompound"],
+ },
+ },
+ filter: {
+ "22_char_hyphenation_decompound": {
+ type: "hyphenation_decompounder",
+ word_list_path: "analysis/example_word_list.txt",
+ hyphenation_patterns_path: "analysis/hyphenation_patterns.xml",
+ max_subword_size: 22,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5f8fb5513d4f725434db2f517ad4298f.asciidoc b/docs/doc_examples/5f8fb5513d4f725434db2f517ad4298f.asciidoc
new file mode 100644
index 000000000..fb2dc80e0
--- /dev/null
+++ b/docs/doc_examples/5f8fb5513d4f725434db2f517ad4298f.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ number_of_shards: 1,
+ similarity: {
+ scripted_tfidf: {
+ type: "scripted",
+ weight_script: {
+ source:
+ "double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; return query.boost * idf;",
+ },
+ script: {
+ source:
+ "double tf = Math.sqrt(doc.freq); double norm = 1/Math.sqrt(doc.length); return weight * tf * norm;",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ field: {
+ type: "text",
+ similarity: "scripted_tfidf",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5faa121e00a0582160b2adb2b72fed67.asciidoc b/docs/doc_examples/5faa121e00a0582160b2adb2b72fed67.asciidoc
new file mode 100644
index 000000000..6ef255e94
--- /dev/null
+++ b/docs/doc_examples/5faa121e00a0582160b2adb2b72fed67.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "log_2099_-*",
+ name: "index.number_*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5fca6671bc8eaddc44ac488d1c3c6909.asciidoc b/docs/doc_examples/5fca6671bc8eaddc44ac488d1c3c6909.asciidoc
new file mode 100644
index 000000000..d3f030697
--- /dev/null
+++ b/docs/doc_examples/5fca6671bc8eaddc44ac488d1c3c6909.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getCalendars({
+ calendar_id: "planned-outages",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5fd002a018c589eb73fadad25889dbe9.asciidoc b/docs/doc_examples/5fd002a018c589eb73fadad25889dbe9.asciidoc
new file mode 100644
index 000000000..d3d537545
--- /dev/null
+++ b/docs/doc_examples/5fd002a018c589eb73fadad25889dbe9.asciidoc
@@ -0,0 +1,57 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_query_rules/my-ruleset",
+ body: {
+ rules: [
+ {
+ rule_id: "rule1",
+ type: "pinned",
+ criteria: [
+ {
+ type: "fuzzy",
+ metadata: "query_string",
+ values: ["puggles", "pugs"],
+ },
+ {
+ type: "exact",
+ metadata: "user_country",
+ values: ["us"],
+ },
+ ],
+ actions: {
+ ids: ["id1", "id2"],
+ },
+ },
+ {
+ rule_id: "rule2",
+ type: "exclude",
+ criteria: [
+ {
+ type: "contains",
+ metadata: "query_string",
+ values: ["beagles"],
+ },
+ ],
+ actions: {
+ docs: [
+ {
+ _index: "my-index-000001",
+ _id: "id3",
+ },
+ {
+ _index: "my-index-000002",
+ _id: "id4",
+ },
+ ],
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5fde0d78e9b2cc0519f8a63848ed344e.asciidoc b/docs/doc_examples/5fde0d78e9b2cc0519f8a63848ed344e.asciidoc
new file mode 100644
index 000000000..f3f9d875c
--- /dev/null
+++ b/docs/doc_examples/5fde0d78e9b2cc0519f8a63848ed344e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_query_rules/my-ruleset",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/5ffe6fd303400e8678fa1ead291e237f.asciidoc b/docs/doc_examples/5ffe6fd303400e8678fa1ead291e237f.asciidoc
new file mode 100644
index 000000000..064493f98
--- /dev/null
+++ b/docs/doc_examples/5ffe6fd303400e8678fa1ead291e237f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/600d33c80f8872dda85c87ed41da95fd.asciidoc b/docs/doc_examples/600d33c80f8872dda85c87ed41da95fd.asciidoc
new file mode 100644
index 000000000..f2a3f5ba3
--- /dev/null
+++ b/docs/doc_examples/600d33c80f8872dda85c87ed41da95fd.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "azure-ai-studio-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "azure_ai_studio_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6013ed65d2058da5ce704b47a504b60a.asciidoc b/docs/doc_examples/6013ed65d2058da5ce704b47a504b60a.asciidoc
new file mode 100644
index 000000000..90a5764ce
--- /dev/null
+++ b/docs/doc_examples/6013ed65d2058da5ce704b47a504b60a.asciidoc
@@ -0,0 +1,53 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "test",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ s: 1,
+ m: 3.1415,
+ },
+ {
+ index: {},
+ },
+ {
+ s: 2,
+ m: 1,
+ },
+ {
+ index: {},
+ },
+ {
+ s: 3,
+ m: 2.71828,
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "test",
+ filter_path: "aggregations",
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ s: "desc",
+ },
+ size: 3,
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/601ad3b0ceccb3fcd282e5ec36748954.asciidoc b/docs/doc_examples/601ad3b0ceccb3fcd282e5ec36748954.asciidoc
new file mode 100644
index 000000000..a5afd1dfd
--- /dev/null
+++ b/docs/doc_examples/601ad3b0ceccb3fcd282e5ec36748954.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getServiceCredentials({
+ namespace: "elastic",
+ service: "fleet-server",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/60299454aa19fec15a604a0dd06fe522.asciidoc b/docs/doc_examples/60299454aa19fec15a604a0dd06fe522.asciidoc
new file mode 100644
index 000000000..471a73692
--- /dev/null
+++ b/docs/doc_examples/60299454aa19fec15a604a0dd06fe522.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings({
+ include_defaults: "true",
+ filter_path: "*.cluster.routing.allocation.disk.watermark.high*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/602e04051c092cf77de2f75a563661b8.asciidoc b/docs/doc_examples/602e04051c092cf77de2f75a563661b8.asciidoc
new file mode 100644
index 000000000..20697b82b
--- /dev/null
+++ b/docs/doc_examples/602e04051c092cf77de2f75a563661b8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.master({
+ help: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/604da59fe41160efa10a846a9dacc07a.asciidoc b/docs/doc_examples/604da59fe41160efa10a846a9dacc07a.asciidoc
new file mode 100644
index 000000000..162c16e15
--- /dev/null
+++ b/docs/doc_examples/604da59fe41160efa10a846a9dacc07a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.getStatus({
+ id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6061aadb3b870791278212d1e8f52b39.asciidoc b/docs/doc_examples/6061aadb3b870791278212d1e8f52b39.asciidoc
new file mode 100644
index 000000000..525e27c32
--- /dev/null
+++ b/docs/doc_examples/6061aadb3b870791278212d1e8f52b39.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getMemoryStats({
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/608cadc6b8a3f194612b69279ccc96de.asciidoc b/docs/doc_examples/608cadc6b8a3f194612b69279ccc96de.asciidoc
new file mode 100644
index 000000000..a3e925620
--- /dev/null
+++ b/docs/doc_examples/608cadc6b8a3f194612b69279ccc96de.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["index1"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "script_score": {\n "query": {\n "bool": {\n "filter": {\n "range": {\n "{{field}}": {\n "{{operator}}": {{value}}\n }\n }\n }\n }\n },\n "script": {\n "source": "cosineSimilarity({{#toJson}}query_vector{{/toJson}}, \'{{dense_vector_field}}\') + 1.0"\n }\n }\n }\n }\n ',
+ params: {
+ field: "price",
+ operator: "gte",
+ value: 1000,
+ dense_vector_field: "product-vector",
+ query_vector: [],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6097ae69c64454a92a89ef01b994e9f9.asciidoc b/docs/doc_examples/6097ae69c64454a92a89ef01b994e9f9.asciidoc
new file mode 100644
index 000000000..7dbdf3f08
--- /dev/null
+++ b/docs/doc_examples/6097ae69c64454a92a89ef01b994e9f9.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.putSynonymRule({
+ set_id: "my-synonyms-set",
+ rule_id: "test-1",
+ synonyms: "hello => hi => howdy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/60a9aa5dcde9023901f6ff27231a10c4.asciidoc b/docs/doc_examples/60a9aa5dcde9023901f6ff27231a10c4.asciidoc
new file mode 100644
index 000000000..1b1a9227e
--- /dev/null
+++ b/docs/doc_examples/60a9aa5dcde9023901f6ff27231a10c4.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "news",
+ query: {
+ match: {
+ content: "madrid",
+ },
+ },
+ aggs: {
+ tags: {
+ significant_text: {
+ field: "content",
+ background_filter: {
+ term: {
+ content: "spain",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/60b0fc1b6ae418621ff1b31591fa1fce.asciidoc b/docs/doc_examples/60b0fc1b6ae418621ff1b31591fa1fce.asciidoc
new file mode 100644
index 000000000..fbf950f93
--- /dev/null
+++ b/docs/doc_examples/60b0fc1b6ae418621ff1b31591fa1fce.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.deleteWatch({
+ id: "cluster_health_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/60cab62af1540db2ad3b696b0ee1d7a8.asciidoc b/docs/doc_examples/60cab62af1540db2ad3b696b0ee1d7a8.asciidoc
new file mode 100644
index 000000000..6f4065839
--- /dev/null
+++ b/docs/doc_examples/60cab62af1540db2ad3b696b0ee1d7a8.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "queries",
+ query: {
+ percolate: {
+ field: "query",
+ document: {
+ body: "fox jumps over the lazy dog",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/60d3f9a99cc91b43aaa7524a9a74dba0.asciidoc b/docs/doc_examples/60d3f9a99cc91b43aaa7524a9a74dba0.asciidoc
new file mode 100644
index 000000000..627606897
--- /dev/null
+++ b/docs/doc_examples/60d3f9a99cc91b43aaa7524a9a74dba0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "breaker",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/60f889fbed5df3185444f7015b48ed76.asciidoc b/docs/doc_examples/60f889fbed5df3185444f7015b48ed76.asciidoc
new file mode 100644
index 000000000..5f4a5a357
--- /dev/null
+++ b/docs/doc_examples/60f889fbed5df3185444f7015b48ed76.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/610f629d0486a64546d62402a0a5e00f.asciidoc b/docs/doc_examples/610f629d0486a64546d62402a0a5e00f.asciidoc
new file mode 100644
index 000000000..d728d2ac9
--- /dev/null
+++ b/docs/doc_examples/610f629d0486a64546d62402a0a5e00f.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ query_string: {
+ query: "kimchy\\!",
+ fields: ["user.id"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/612c2e975f833de9815651135735eae5.asciidoc b/docs/doc_examples/612c2e975f833de9815651135735eae5.asciidoc
new file mode 100644
index 000000000..0dc50cad8
--- /dev/null
+++ b/docs/doc_examples/612c2e975f833de9815651135735eae5.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.cancel({
+ nodes: "nodeId1,nodeId2",
+ actions: "*reindex",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/618c9d42284c067891fb57034a4fd834.asciidoc b/docs/doc_examples/618c9d42284c067891fb57034a4fd834.asciidoc
new file mode 100644
index 000000000..59be85f0f
--- /dev/null
+++ b/docs/doc_examples/618c9d42284c067891fb57034a4fd834.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.startJob({
+ id: "sensor",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/61bf6ac15ae3e22323454a9a2872a2fa.asciidoc b/docs/doc_examples/61bf6ac15ae3e22323454a9a2872a2fa.asciidoc
new file mode 100644
index 000000000..7dd5f988e
--- /dev/null
+++ b/docs/doc_examples/61bf6ac15ae3e22323454a9a2872a2fa.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ type_count: {
+ cardinality: {
+ field: "type",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/61c49cee90c6aa0eafbdd5cc03936e7d.asciidoc b/docs/doc_examples/61c49cee90c6aa0eafbdd5cc03936e7d.asciidoc
new file mode 100644
index 000000000..f7b40662e
--- /dev/null
+++ b/docs/doc_examples/61c49cee90c6aa0eafbdd5cc03936e7d.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "data",
+ id: 1,
+ document: {
+ count: 5,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/61d6b9503459914c436930c3ae87d454.asciidoc b/docs/doc_examples/61d6b9503459914c436930c3ae87d454.asciidoc
new file mode 100644
index 000000000..f6356f14a
--- /dev/null
+++ b/docs/doc_examples/61d6b9503459914c436930c3ae87d454.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_query_rules",
+ querystring: {
+ from: "0",
+ size: "3",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/61e38e95191f4dde791070c6fce8a092.asciidoc b/docs/doc_examples/61e38e95191f4dde791070c6fce8a092.asciidoc
new file mode 100644
index 000000000..f29cf90ad
--- /dev/null
+++ b/docs/doc_examples/61e38e95191f4dde791070c6fce8a092.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movavg: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.holt(values, 0.3, 0.1)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc b/docs/doc_examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc
new file mode 100644
index 000000000..3dfc8f729
--- /dev/null
+++ b/docs/doc_examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.count({
+ filter_path: "-_shards",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/621f4553e24592d40c8cdbbdfaeb027e.asciidoc b/docs/doc_examples/621f4553e24592d40c8cdbbdfaeb027e.asciidoc
new file mode 100644
index 000000000..164decad8
--- /dev/null
+++ b/docs/doc_examples/621f4553e24592d40c8cdbbdfaeb027e.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "image-index",
+ knn: {
+ field: "image-vector",
+ query_vector: [54, 10, -2],
+ k: 5,
+ num_candidates: 50,
+ filter: {
+ term: {
+ "file-type": "png",
+ },
+ },
+ },
+ fields: ["title"],
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6220087321e6d288024a70c6b09bd720.asciidoc b/docs/doc_examples/6220087321e6d288024a70c6b09bd720.asciidoc
new file mode 100644
index 000000000..b2213798e
--- /dev/null
+++ b/docs/doc_examples/6220087321e6d288024a70c6b09bd720.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 4,
+ refresh: "true",
+ document: {
+ query: {
+ match: {
+ message: "lazy dog",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6244204213f60edf2f23295f9059f2c9.asciidoc b/docs/doc_examples/6244204213f60edf2f23295f9059f2c9.asciidoc
new file mode 100644
index 000000000..8c011d9f8
--- /dev/null
+++ b/docs/doc_examples/6244204213f60edf2f23295f9059f2c9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.stats({
+ metric: "queued_watches",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/624e69dedf42c4877234b87ec1d00068.asciidoc b/docs/doc_examples/624e69dedf42c4877234b87ec1d00068.asciidoc
new file mode 100644
index 000000000..80c5388ca
--- /dev/null
+++ b/docs/doc_examples/624e69dedf42c4877234b87ec1d00068.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getLifecycle({
+ policy_id: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/62c311e7ab4de8b79e532929a5069975.asciidoc b/docs/doc_examples/62c311e7ab4de8b79e532929a5069975.asciidoc
new file mode 100644
index 000000000..f1fbcf539
--- /dev/null
+++ b/docs/doc_examples/62c311e7ab4de8b79e532929a5069975.asciidoc
@@ -0,0 +1,83 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ topics: {
+ type: "rank_features",
+ },
+ negative_reviews: {
+ type: "rank_features",
+ positive_score_impact: false,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ topics: {
+ politics: 20,
+ economics: 50.8,
+ },
+ negative_reviews: {
+ "1star": 10,
+ "2star": 100,
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ topics: {
+ politics: 5.2,
+ sports: 80.1,
+ },
+ negative_reviews: {
+ "1star": 1,
+ "2star": 10,
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ rank_feature: {
+ field: "topics.politics",
+ },
+ },
+});
+console.log(response3);
+
+const response4 = await client.search({
+ index: "my-index-000001",
+ query: {
+ rank_feature: {
+ field: "negative_reviews.1star",
+ },
+ },
+});
+console.log(response4);
+
+const response5 = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ topics: "economics",
+ },
+ },
+});
+console.log(response5);
+----
diff --git a/docs/doc_examples/62ccee6ad356428c2d625742f961ceb7.asciidoc b/docs/doc_examples/62ccee6ad356428c2d625742f961ceb7.asciidoc
new file mode 100644
index 000000000..eb4ca18cf
--- /dev/null
+++ b/docs/doc_examples/62ccee6ad356428c2d625742f961ceb7.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.updateApiKey({
+ id: "VuaCfGcBCdbkQm-e5aOx",
+ role_descriptors: {},
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc b/docs/doc_examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc
new file mode 100644
index 000000000..f26be6d36
--- /dev/null
+++ b/docs/doc_examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ foo: [
+ {
+ bar: 1,
+ },
+ {
+ baz: 2,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/62eafc5b3ab75cc67314d5a8567d6077.asciidoc b/docs/doc_examples/62eafc5b3ab75cc67314d5a8567d6077.asciidoc
new file mode 100644
index 000000000..49b4bbe2c
--- /dev/null
+++ b/docs/doc_examples/62eafc5b3ab75cc67314d5a8567d6077.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ username: "myuser",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/62f1ec1bb5cc5a9c2efd536a7474f549.asciidoc b/docs/doc_examples/62f1ec1bb5cc5a9c2efd536a7474f549.asciidoc
new file mode 100644
index 000000000..e03e20e45
--- /dev/null
+++ b/docs/doc_examples/62f1ec1bb5cc5a9c2efd536a7474f549.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "hunspell",
+ locale: "en_US",
+ },
+ ],
+ text: "the foxes jumping quickly",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/630d127ccedd25a6cff31ea098ac2847.asciidoc b/docs/doc_examples/630d127ccedd25a6cff31ea098ac2847.asciidoc
new file mode 100644
index 000000000..e728af9fe
--- /dev/null
+++ b/docs/doc_examples/630d127ccedd25a6cff31ea098ac2847.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "node_upgrade",
+ size: 0,
+ aggs: {
+ startup_time_ttest: {
+ t_test: {
+ a: {
+ field: "startup_time_before",
+ filter: {
+ term: {
+ group: "A",
+ },
+ },
+ },
+ b: {
+ field: "startup_time_before",
+ filter: {
+ term: {
+ group: "B",
+ },
+ },
+ },
+ type: "heteroscedastic",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6326f5c6fd2a6e6b1aff9a643b94f455.asciidoc b/docs/doc_examples/6326f5c6fd2a6e6b1aff9a643b94f455.asciidoc
new file mode 100644
index 000000000..ce4495d70
--- /dev/null
+++ b/docs/doc_examples/6326f5c6fd2a6e6b1aff9a643b94f455.asciidoc
@@ -0,0 +1,47 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ text: "quick brown fox",
+ popularity: 1,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ text: "quick fox",
+ popularity: 5,
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ function_score: {
+ query: {
+ match: {
+ text: "quick brown fox",
+ },
+ },
+ script_score: {
+ script: {
+ lang: "expression",
+ source: "_score * doc['popularity']",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc b/docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc
new file mode 100644
index 000000000..cbb113a2e
--- /dev/null
+++ b/docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: "books",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/634ecacf14b83c5f0bb8b6273cf6418e.asciidoc b/docs/doc_examples/634ecacf14b83c5f0bb8b6273cf6418e.asciidoc
new file mode 100644
index 000000000..039b6cb0b
--- /dev/null
+++ b/docs/doc_examples/634ecacf14b83c5f0bb8b6273cf6418e.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "website-product-search",
+ search_application: {
+ indices: ["website-products"],
+ template: {
+ script: {
+ source: {
+ query: {
+ term: {
+ "{{field_name}}": "{{field_value}}",
+ },
+ },
+ aggs: {
+ color_facet: {
+ terms: {
+ field: "color",
+ size: "{{agg_size}}",
+ },
+ },
+ },
+ },
+ params: {
+ field_name: "product_name",
+ field_value: "hello world",
+ agg_size: 5,
+ },
+ },
+ dictionary: {
+ properties: {
+ field_name: {
+ type: "string",
+ enum: ["name", "color", "description"],
+ },
+ field_value: {
+ type: "string",
+ },
+ agg_size: {
+ type: "integer",
+ minimum: 1,
+ maximum: 10,
+ },
+ },
+ required: ["field_name"],
+ additionalProperties: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63521e0089c631d6668c44a0a9d7fdcc.asciidoc b/docs/doc_examples/63521e0089c631d6668c44a0a9d7fdcc.asciidoc
new file mode 100644
index 000000000..ffee3ec5d
--- /dev/null
+++ b/docs/doc_examples/63521e0089c631d6668c44a0a9d7fdcc.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "custom_limit_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_five_token_limit: {
+ tokenizer: "whitespace",
+ filter: ["five_token_limit"],
+ },
+ },
+ filter: {
+ five_token_limit: {
+ type: "limit",
+ max_token_count: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6352e846bb83725ae6d853aa64d8697d.asciidoc b/docs/doc_examples/6352e846bb83725ae6d853aa64d8697d.asciidoc
new file mode 100644
index 000000000..d5b4d57bf
--- /dev/null
+++ b/docs/doc_examples/6352e846bb83725ae6d853aa64d8697d.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "12km",
+ "pin.location": {
+ lat: 40,
+ lon: -70,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6365312d470426cab1b77e9ffde49170.asciidoc b/docs/doc_examples/6365312d470426cab1b77e9ffde49170.asciidoc
new file mode 100644
index 000000000..b8033119e
--- /dev/null
+++ b/docs/doc_examples/6365312d470426cab1b77e9ffde49170.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "click_role",
+ indices: [
+ {
+ names: ["events-*"],
+ privileges: ["read"],
+ query: '{"match": {"category": "click"}}',
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/636ee2066450605247ec1f68d04b8ee4.asciidoc b/docs/doc_examples/636ee2066450605247ec1f68d04b8ee4.asciidoc
new file mode 100644
index 000000000..91d90ea7a
--- /dev/null
+++ b/docs/doc_examples/636ee2066450605247ec1f68d04b8ee4.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "http.clientip": "40.135.0.0",
+ },
+ },
+ fields: ["*"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63893e7e9479a9b60db71dcddcc79aaf.asciidoc b/docs/doc_examples/63893e7e9479a9b60db71dcddcc79aaf.asciidoc
new file mode 100644
index 000000000..d8ded8387
--- /dev/null
+++ b/docs/doc_examples/63893e7e9479a9b60db71dcddcc79aaf.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteCalendar({
+ calendar_id: "planned-outages",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc b/docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc
new file mode 100644
index 000000000..742fed240
--- /dev/null
+++ b/docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "alibabacloud_ai_search_completion",
+ inference_config: {
+ service: "alibabacloud-ai-search",
+ service_settings: {
+ host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
+ api_key: "{{API_KEY}}",
+ service_id: "ops-qwen-turbo",
+ workspace: "default",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc b/docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc
new file mode 100644
index 000000000..041c60f0a
--- /dev/null
+++ b/docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkPutRole({
+ roles: {
+ my_admin_role: {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index1", "index2"],
+ privileges: ["all"],
+ field_security: {
+ grant: ["title", "body"],
+ },
+ query: '{"match": {"title": "foo"}}',
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["admin", "read"],
+ resources: ["*"],
+ },
+ ],
+ run_as: ["other_user"],
+ metadata: {
+ version: 1,
+ },
+ },
+ my_user_role: {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index1"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["title", "body"],
+ },
+ query: '{"match": {"title": "foo"}}',
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["admin", "read"],
+ resources: ["*"],
+ },
+ ],
+ run_as: ["other_user"],
+ metadata: {
+ version: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63cc960215ae83b359c12df3c0993bfa.asciidoc b/docs/doc_examples/63cc960215ae83b359c12df3c0993bfa.asciidoc
new file mode 100644
index 000000000..3ad9daa12
--- /dev/null
+++ b/docs/doc_examples/63cc960215ae83b359c12df3c0993bfa.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ number_of_shards: 3,
+ number_of_replicas: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63e20883732ec30b5400046be2efb0f1.asciidoc b/docs/doc_examples/63e20883732ec30b5400046be2efb0f1.asciidoc
new file mode 100644
index 000000000..57d1e690f
--- /dev/null
+++ b/docs/doc_examples/63e20883732ec30b5400046be2efb0f1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.flush({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/63ecdab34940af053acc409164914c32.asciidoc b/docs/doc_examples/63ecdab34940af053acc409164914c32.asciidoc
new file mode 100644
index 000000000..b19b74623
--- /dev/null
+++ b/docs/doc_examples/63ecdab34940af053acc409164914c32.asciidoc
@@ -0,0 +1,81 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ analyzer: "standard",
+ },
+ impact: {
+ type: "sparse_vector",
+ },
+ positive: {
+ type: "sparse_vector",
+ },
+ negative: {
+ type: "sparse_vector",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ document: {
+ text: "I had some terribly delicious carrots.",
+ impact: [
+ {
+ I: 0.55,
+ had: 0.4,
+ some: 0.28,
+ terribly: 0.01,
+ delicious: 1.2,
+ carrots: 0.8,
+ },
+ {
+ I: 0.54,
+ had: 0.4,
+ some: 0.28,
+ terribly: 2.01,
+ delicious: 0.02,
+ carrots: 0.4,
+ },
+ ],
+ positive: {
+ I: 0.55,
+ had: 0.4,
+ some: 0.28,
+ terribly: 0.01,
+ delicious: 1.2,
+ carrots: 0.8,
+ },
+ negative: {
+ I: 0.54,
+ had: 0.4,
+ some: 0.28,
+ terribly: 2.01,
+ delicious: 0.02,
+ carrots: 0.4,
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ impact: {
+ value: "delicious",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc b/docs/doc_examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc
new file mode 100644
index 000000000..feecc4a39
--- /dev/null
+++ b/docs/doc_examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.lastSync({
+ connector_id: "my-connector",
+ last_access_control_sync_error: "Houston, we have a problem!",
+ last_access_control_sync_scheduled_at: "2023-11-09T15:13:08.231Z",
+ last_access_control_sync_status: "pending",
+ last_deleted_document_count: 42,
+ last_incremental_sync_scheduled_at: "2023-11-09T15:13:08.231Z",
+ last_indexed_document_count: 42,
+ last_sync_error: "Houston, we have a problem!",
+ last_sync_scheduled_at: "2024-11-09T15:13:08.231Z",
+ last_sync_status: "completed",
+ last_synced: "2024-11-09T15:13:08.231Z",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/640a89d0b39630269433425ff476faf3.asciidoc b/docs/doc_examples/640a89d0b39630269433425ff476faf3.asciidoc
new file mode 100644
index 000000000..a64753ac7
--- /dev/null
+++ b/docs/doc_examples/640a89d0b39630269433425ff476faf3.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "archived.*": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/640da6dd719a34975b5627dfa5fcdd55.asciidoc b/docs/doc_examples/640da6dd719a34975b5627dfa5fcdd55.asciidoc
new file mode 100644
index 000000000..a61d31c9e
--- /dev/null
+++ b/docs/doc_examples/640da6dd719a34975b5627dfa5fcdd55.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "xpack.monitoring.collection.enabled": true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc b/docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc
new file mode 100644
index 000000000..54d88b41e
--- /dev/null
+++ b/docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.stats({
+ include_remotes: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/640e4f2c2d29f9851320a70927bd7a6c.asciidoc b/docs/doc_examples/640e4f2c2d29f9851320a70927bd7a6c.asciidoc
new file mode 100644
index 000000000..e3b853969
--- /dev/null
+++ b/docs/doc_examples/640e4f2c2d29f9851320a70927bd7a6c.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "indices.lifecycle.poll_interval": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/641009f2147e1ca56215c701f45c970b.asciidoc b/docs/doc_examples/641009f2147e1ca56215c701f45c970b.asciidoc
new file mode 100644
index 000000000..a07dc7981
--- /dev/null
+++ b/docs/doc_examples/641009f2147e1ca56215c701f45c970b.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "tiles-in-bounds": {
+ geotile_grid: {
+ field: "location",
+ precision: 22,
+ bounds: {
+ top_left: "POINT (4.9 52.4)",
+ bottom_right: "POINT (5.0 52.3)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6414b9276ba1c63898c3ff5cbe03c54e.asciidoc b/docs/doc_examples/6414b9276ba1c63898c3ff5cbe03c54e.asciidoc
new file mode 100644
index 000000000..c6274ed1e
--- /dev/null
+++ b/docs/doc_examples/6414b9276ba1c63898c3ff5cbe03c54e.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.segments();
+console.log(response);
+----
diff --git a/docs/doc_examples/641f75862c70e25e79d249d9e0a79f03.asciidoc b/docs/doc_examples/641f75862c70e25e79d249d9e0a79f03.asciidoc
new file mode 100644
index 000000000..002fbb288
--- /dev/null
+++ b/docs/doc_examples/641f75862c70e25e79d249d9e0a79f03.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ nested: {
+ path: "obj1",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "obj1.name": "blue",
+ },
+ },
+ {
+ range: {
+ "obj1.count": {
+ gt: 5,
+ },
+ },
+ },
+ ],
+ },
+ },
+ score_mode: "avg",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/642161d70dacf7d153767d37d3726838.asciidoc b/docs/doc_examples/642161d70dacf7d153767d37d3726838.asciidoc
new file mode 100644
index 000000000..d3906eec1
--- /dev/null
+++ b/docs/doc_examples/642161d70dacf7d153767d37d3726838.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.getRollupIndexCaps({
+ index: "*_rollup",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/642c0c1c76e9bf226cd216ebae9ab958.asciidoc b/docs/doc_examples/642c0c1c76e9bf226cd216ebae9ab958.asciidoc
new file mode 100644
index 000000000..832c25a7a
--- /dev/null
+++ b/docs/doc_examples/642c0c1c76e9bf226cd216ebae9ab958.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "keep_words_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_keep_word_array: {
+ tokenizer: "standard",
+ filter: ["keep_word_array"],
+ },
+ standard_keep_word_file: {
+ tokenizer: "standard",
+ filter: ["keep_word_file"],
+ },
+ },
+ filter: {
+ keep_word_array: {
+ type: "keep",
+ keep_words: ["one", "two", "three"],
+ },
+ keep_word_file: {
+ type: "keep",
+ keep_words_path: "analysis/example_word_list.txt",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/643b9506d1129d5215f9a1bb0b509aba.asciidoc b/docs/doc_examples/643b9506d1129d5215f9a1bb0b509aba.asciidoc
new file mode 100644
index 000000000..1d7d9df89
--- /dev/null
+++ b/docs/doc_examples/643b9506d1129d5215f9a1bb0b509aba.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ full_name: {
+ path_match: "name.*",
+ path_unmatch: "*.middle",
+ mapping: {
+ type: "text",
+ copy_to: "full_name",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ name: {
+ first: "John",
+ middle: "Winston",
+ last: "Lennon",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc b/docs/doc_examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc
new file mode 100644
index 000000000..0bc357bb7
--- /dev/null
+++ b/docs/doc_examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-index-template",
+ index_patterns: ["logs-*"],
+ data_stream: {},
+ template: {
+ settings: {
+ "index.mode": "logsdb",
+ },
+ },
+ priority: 101,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/645433e8e479e5d71c100f66dd2de5d0.asciidoc b/docs/doc_examples/645433e8e479e5d71c100f66dd2de5d0.asciidoc
new file mode 100644
index 000000000..ed93f04b5
--- /dev/null
+++ b/docs/doc_examples/645433e8e479e5d71c100f66dd2de5d0.asciidoc
@@ -0,0 +1,534 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-data-stream",
+ refresh: "true",
+ pipeline: "my-timestamp-pipeline",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:49:00Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 91153,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 463314616,
+ },
+ usage: {
+ bytes: 307007078,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 585236,
+ },
+ rss: {
+ bytes: 102728,
+ },
+ pagefaults: 120901,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:45:50Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 124501,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 982546514,
+ },
+ usage: {
+ bytes: 360035574,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1339884,
+ },
+ rss: {
+ bytes: 381174,
+ },
+ pagefaults: 178473,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:44:50Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 38907,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 862723768,
+ },
+ usage: {
+ bytes: 379572388,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 431227,
+ },
+ rss: {
+ bytes: 386580,
+ },
+ pagefaults: 233166,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:44:40Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 86706,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 567160996,
+ },
+ usage: {
+ bytes: 103266017,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1724908,
+ },
+ rss: {
+ bytes: 105431,
+ },
+ pagefaults: 233166,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:44:00Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 150069,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 639054643,
+ },
+ usage: {
+ bytes: 265142477,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1786511,
+ },
+ rss: {
+ bytes: 189235,
+ },
+ pagefaults: 138172,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:42:40Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 82260,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 854735585,
+ },
+ usage: {
+ bytes: 309798052,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 924058,
+ },
+ rss: {
+ bytes: 110838,
+ },
+ pagefaults: 259073,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:42:10Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 153404,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 279586406,
+ },
+ usage: {
+ bytes: 214904955,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1047265,
+ },
+ rss: {
+ bytes: 91914,
+ },
+ pagefaults: 302252,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:40:20Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 125613,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 822782853,
+ },
+ usage: {
+ bytes: 100475044,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 2109932,
+ },
+ rss: {
+ bytes: 278446,
+ },
+ pagefaults: 74843,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:40:10Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 100046,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 567160996,
+ },
+ usage: {
+ bytes: 362826547,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 1986724,
+ },
+ rss: {
+ bytes: 402801,
+ },
+ pagefaults: 296495,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2022-06-21T15:38:30Z",
+ kubernetes: {
+ host: "gke-apps-0",
+ node: "gke-apps-0-0",
+ pod: "gke-apps-0-0-0",
+ container: {
+ cpu: {
+ usage: {
+ nanocores: 40018,
+ core: {
+ ns: 12828317850,
+ },
+ node: {
+ pct: 0.0000277905,
+ },
+ limit: {
+ pct: 0.0000277905,
+ },
+ },
+ },
+ memory: {
+ available: {
+ bytes: 1062428344,
+ },
+ usage: {
+ bytes: 265142477,
+ node: {
+ pct: 0.01770037710617187,
+ },
+ limit: {
+ pct: 0.00009923134671484496,
+ },
+ },
+ workingset: {
+ bytes: 2294743,
+ },
+ rss: {
+ bytes: 340623,
+ },
+ pagefaults: 224530,
+ majorpagefaults: 0,
+ },
+ start_time: "2021-03-30T07:59:06Z",
+ name: "container-name-44",
+ },
+ namespace: "namespace26",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64622409407316d2d47094e692d9b516.asciidoc b/docs/doc_examples/64622409407316d2d47094e692d9b516.asciidoc
new file mode 100644
index 000000000..19d1e10d5
--- /dev/null
+++ b/docs/doc_examples/64622409407316d2d47094e692d9b516.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.evaluateDataFrame({
+ index: "student_performance_mathematics_reg",
+ query: {
+ term: {
+ "ml.is_training": {
+ value: false,
+ },
+ },
+ },
+ evaluation: {
+ regression: {
+ actual_field: "G3",
+ predicted_field: "ml.G3_prediction",
+ metrics: {
+ r_squared: {},
+ mse: {},
+ msle: {},
+ huber: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6464124d1677f4552ddddd95a340ca3a.asciidoc b/docs/doc_examples/6464124d1677f4552ddddd95a340ca3a.asciidoc
new file mode 100644
index 000000000..81f43eb4f
--- /dev/null
+++ b/docs/doc_examples/6464124d1677f4552ddddd95a340ca3a.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "library",
+ refresh: "true",
+ document: {
+ title: "Book #1",
+ rating: 200.1,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "library",
+ refresh: "true",
+ document: {
+ title: "Book #2",
+ rating: 1.7,
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "library",
+ refresh: "true",
+ document: {
+ title: "Book #3",
+ rating: 0.1,
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ filter_path: "hits.hits._source",
+ _source: "title",
+ sort: "rating:desc",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/646d71869f1a18c5bede7759559bfc47.asciidoc b/docs/doc_examples/646d71869f1a18c5bede7759559bfc47.asciidoc
new file mode 100644
index 000000000..9f9b95638
--- /dev/null
+++ b/docs/doc_examples/646d71869f1a18c5bede7759559bfc47.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "_all",
+ fields: "message",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6490d89a4e43cac5e6b9bc19840d5478.asciidoc b/docs/doc_examples/6490d89a4e43cac5e6b9bc19840d5478.asciidoc
new file mode 100644
index 000000000..6406a2c30
--- /dev/null
+++ b/docs/doc_examples/6490d89a4e43cac5e6b9bc19840d5478.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "fingerprint",
+ text: "Yes yes, Gödel said this sentence is consistent and.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64a6fb4bcb8cfea139a0e5d3765c063a.asciidoc b/docs/doc_examples/64a6fb4bcb8cfea139a0e5d3765c063a.asciidoc
new file mode 100644
index 000000000..64d437f6f
--- /dev/null
+++ b/docs/doc_examples/64a6fb4bcb8cfea139a0e5d3765c063a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.translate({
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64a79861225553799b26e118d7851dcc.asciidoc b/docs/doc_examples/64a79861225553799b26e118d7851dcc.asciidoc
new file mode 100644
index 000000000..b093d850f
--- /dev/null
+++ b/docs/doc_examples/64a79861225553799b26e118d7851dcc.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.explainLifecycle({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64aff98cf477555e7411714c17006572.asciidoc b/docs/doc_examples/64aff98cf477555e7411714c17006572.asciidoc
new file mode 100644
index 000000000..906360d56
--- /dev/null
+++ b/docs/doc_examples/64aff98cf477555e7411714c17006572.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ range: {
+ timestamp: {
+ gte: "now-1d/d",
+ lte: "now/d",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64c572abc23394a77b6cca0b5368ee1d.asciidoc b/docs/doc_examples/64c572abc23394a77b6cca0b5368ee1d.asciidoc
new file mode 100644
index 000000000..2f0e298e1
--- /dev/null
+++ b/docs/doc_examples/64c572abc23394a77b6cca0b5368ee1d.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.features.getFeatures();
+console.log(response);
+----
diff --git a/docs/doc_examples/64c804869ddfbcb9075817d0bbf71b5c.asciidoc b/docs/doc_examples/64c804869ddfbcb9075817d0bbf71b5c.asciidoc
new file mode 100644
index 000000000..71c886d2a
--- /dev/null
+++ b/docs/doc_examples/64c804869ddfbcb9075817d0bbf71b5c.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ elser: true,
+ query_string: "where is the best mountain climbing?",
+ elser_fields: [
+ {
+ name: "title",
+ boost: 1,
+ },
+ {
+ name: "description",
+ boost: 1,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64ca2ccb79a8f4add5b8fe2d3322ae92.asciidoc b/docs/doc_examples/64ca2ccb79a8f4add5b8fe2d3322ae92.asciidoc
new file mode 100644
index 000000000..c82166c2e
--- /dev/null
+++ b/docs/doc_examples/64ca2ccb79a8f4add5b8fe2d3322ae92.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ avg_grade: {
+ avg: {
+ field: "grade",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64d24f4b2a57dba48092dafe3eb68ad1.asciidoc b/docs/doc_examples/64d24f4b2a57dba48092dafe3eb68ad1.asciidoc
new file mode 100644
index 000000000..b5f8b138e
--- /dev/null
+++ b/docs/doc_examples/64d24f4b2a57dba48092dafe3eb68ad1.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ index: "test",
+ stored_fields: "field1,field2",
+ docs: [
+ {
+ _id: "1",
+ },
+ {
+ _id: "2",
+ stored_fields: ["field3", "field4"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/64ffaa6814ec1ec4f59b8f33b47cffb4.asciidoc b/docs/doc_examples/64ffaa6814ec1ec4f59b8f33b47cffb4.asciidoc
new file mode 100644
index 000000000..cac6f7e52
--- /dev/null
+++ b/docs/doc_examples/64ffaa6814ec1ec4f59b8f33b47cffb4.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index",
+ settings: {
+ "archived.*": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/650a0fb27c66a790c4687267423af1da.asciidoc b/docs/doc_examples/650a0fb27c66a790c4687267423af1da.asciidoc
new file mode 100644
index 000000000..a82a5ec0e
--- /dev/null
+++ b/docs/doc_examples/650a0fb27c66a790c4687267423af1da.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ remove: {
+ index: "logs-nginx.access-prod",
+ alias: "logs",
+ },
+ },
+ {
+ add: {
+ index: "logs-my_app-default",
+ alias: "logs",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6521c3578dc4ad4a6db697700986e78e.asciidoc b/docs/doc_examples/6521c3578dc4ad4a6db697700986e78e.asciidoc
new file mode 100644
index 000000000..f0438bf28
--- /dev/null
+++ b/docs/doc_examples/6521c3578dc4ad4a6db697700986e78e.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "place",
+ pretty: "true",
+ suggest: {
+ place_suggestion: {
+ prefix: "tim",
+ completion: {
+ field: "suggest",
+ size: 10,
+ contexts: {
+ location: [
+ {
+ lat: 43.6624803,
+ lon: -79.3863353,
+ precision: 2,
+ },
+ {
+ context: {
+ lat: 43.6624803,
+ lon: -79.3863353,
+ },
+ boost: 2,
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc b/docs/doc_examples/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc
new file mode 100644
index 000000000..40435f67a
--- /dev/null
+++ b/docs/doc_examples/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ actors: {
+ terms: {
+ field: "actors",
+ size: 10,
+ },
+ aggs: {
+ costars: {
+ terms: {
+ field: "actors",
+ size: 5,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/654882f545eca8d7047695f867c63072.asciidoc b/docs/doc_examples/654882f545eca8d7047695f867c63072.asciidoc
new file mode 100644
index 000000000..678ccc1fe
--- /dev/null
+++ b/docs/doc_examples/654882f545eca8d7047695f867c63072.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.stopTransform({
+ transform_id: "ecommerce_transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/65578c390837cb4c0fcc77fb17857714.asciidoc b/docs/doc_examples/65578c390837cb4c0fcc77fb17857714.asciidoc
new file mode 100644
index 000000000..8030d9270
--- /dev/null
+++ b/docs/doc_examples/65578c390837cb4c0fcc77fb17857714.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ max_monthly_sales: {
+ max_bucket: {
+ buckets_path: "sales_per_month>sales",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc b/docs/doc_examples/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc
new file mode 100644
index 000000000..85ccdf9af
--- /dev/null
+++ b/docs/doc_examples/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "logs-foo_component1",
+ template: {
+ mappings: {
+ properties: {
+ "host.name": {
+ type: "keyword",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/658842bf41e0fcb7969937155946a0ff.asciidoc b/docs/doc_examples/658842bf41e0fcb7969937155946a0ff.asciidoc
new file mode 100644
index 000000000..46cdd17c1
--- /dev/null
+++ b/docs/doc_examples/658842bf41e0fcb7969937155946a0ff.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "slm-read-only",
+ cluster: ["read_slm"],
+ indices: [
+ {
+ names: [".slm-history-*"],
+ privileges: ["read"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/65b6185356f16f2f0d84bc5aee2ed0fc.asciidoc b/docs/doc_examples/65b6185356f16f2f0d84bc5aee2ed0fc.asciidoc
new file mode 100644
index 000000000..3fe957756
--- /dev/null
+++ b/docs/doc_examples/65b6185356f16f2f0d84bc5aee2ed0fc.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ sparse_vector: {
+ field: "ml.tokens",
+ inference_id: "the inference ID to produce the token weights",
+ query: "the query string",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc b/docs/doc_examples/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc
new file mode 100644
index 000000000..5644ea387
--- /dev/null
+++ b/docs/doc_examples/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ rings_around_amsterdam: {
+ geo_distance: {
+ field: "location",
+ origin: "POINT (4.894 52.3760)",
+ ranges: [
+ {
+ to: 100000,
+ },
+ {
+ from: 100000,
+ to: 300000,
+ },
+ {
+ from: 300000,
+ },
+ ],
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6606d46685d10377b996b5f20f1229b5.asciidoc b/docs/doc_examples/6606d46685d10377b996b5f20f1229b5.asciidoc
new file mode 100644
index 000000000..5cbb57477
--- /dev/null
+++ b/docs/doc_examples/6606d46685d10377b996b5f20f1229b5.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateIndexName({
+ connector_id: "my-connector",
+ index_name: "data-from-my-google-drive",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc b/docs/doc_examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc
new file mode 100644
index 000000000..9856c1923
--- /dev/null
+++ b/docs/doc_examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "ledger",
+ size: 0,
+ query: {
+ match_all: {},
+ },
+ aggs: {
+ profit: {
+ scripted_metric: {
+ init_script: "state.transactions = []",
+ map_script:
+ "state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)",
+ combine_script:
+ "double profit = 0; for (t in state.transactions) { profit += t } return profit",
+ reduce_script:
+ "double profit = 0; for (a in states) { profit += a } return profit",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/66539dc6011dd2e0282cf81db1f3df27.asciidoc b/docs/doc_examples/66539dc6011dd2e0282cf81db1f3df27.asciidoc
new file mode 100644
index 000000000..a1e318f4e
--- /dev/null
+++ b/docs/doc_examples/66539dc6011dd2e0282cf81db1f3df27.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ h: "ip,port,heapPercent,name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/666c420fe61fa122386da3c356a64943.asciidoc b/docs/doc_examples/666c420fe61fa122386da3c356a64943.asciidoc
new file mode 100644
index 000000000..1da863638
--- /dev/null
+++ b/docs/doc_examples/666c420fe61fa122386da3c356a64943.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+ sort: {
+ _script: {
+ type: "number",
+ script: {
+ lang: "painless",
+ source: "doc['field_name'].value * params.factor",
+ params: {
+ factor: 1.1,
+ },
+ },
+ order: "asc",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6689aa213884196b47a6f482d4993749.asciidoc b/docs/doc_examples/6689aa213884196b47a6f482d4993749.asciidoc
new file mode 100644
index 000000000..437216410
--- /dev/null
+++ b/docs/doc_examples/6689aa213884196b47a6f482d4993749.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline-id",
+ description: "My optional pipeline description",
+ processors: [
+ {
+ set: {
+ description: "My optional processor description",
+ field: "my-keyword-field",
+ value: "foo",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6693f0ffa0de3229b5dedda197810e70.asciidoc b/docs/doc_examples/6693f0ffa0de3229b5dedda197810e70.asciidoc
new file mode 100644
index 000000000..6e92e6268
--- /dev/null
+++ b/docs/doc_examples/6693f0ffa0de3229b5dedda197810e70.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.get({
+ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
+ keep_alive: "5d",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/669773766b041be768003055ad523038.asciidoc b/docs/doc_examples/669773766b041be768003055ad523038.asciidoc
new file mode 100644
index 000000000..0934ce2fc
--- /dev/null
+++ b/docs/doc_examples/669773766b041be768003055ad523038.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: ".ds-my-data-stream-2099.03.08-000002",
+ id: 2,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6705eca2095ade294548cfb25bf2dd86.asciidoc b/docs/doc_examples/6705eca2095ade294548cfb25bf2dd86.asciidoc
new file mode 100644
index 000000000..7b190a4c5
--- /dev/null
+++ b/docs/doc_examples/6705eca2095ade294548cfb25bf2dd86.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ v: "true",
+ h: "index,shard,prirep,state,node,unassigned.reason",
+ s: "state",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/672d30eb3af573140d966e88b14814f8.asciidoc b/docs/doc_examples/672d30eb3af573140d966e88b14814f8.asciidoc
new file mode 100644
index 000000000..02dd6b739
--- /dev/null
+++ b/docs/doc_examples/672d30eb3af573140d966e88b14814f8.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index",
+ id: 1,
+ pipeline: "monthlyindex",
+ document: {
+ date1: "2016-04-25T12:02:01.789Z",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6742a8cd0b7b4c1c325ce2f22faf6cb4.asciidoc b/docs/doc_examples/6742a8cd0b7b4c1c325ce2f22faf6cb4.asciidoc
new file mode 100644
index 000000000..7d1c236b7
--- /dev/null
+++ b/docs/doc_examples/6742a8cd0b7b4c1c325ce2f22faf6cb4.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "log-messages",
+ filter_path: "aggregations",
+ aggs: {
+ categories: {
+ categorize_text: {
+ field: "message",
+ categorization_filters: ["\\w+\\_\\d{3}"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/674bb755111c6fbaa4c5ac759395c122.asciidoc b/docs/doc_examples/674bb755111c6fbaa4c5ac759395c122.asciidoc
new file mode 100644
index 000000000..21120aeb3
--- /dev/null
+++ b/docs/doc_examples/674bb755111c6fbaa4c5ac759395c122.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index",
+ flat_settings: "true",
+ include_defaults: "true",
+});
+console.log(response);
+
+const response1 = await client.cluster.getSettings({
+ flat_settings: "true",
+ include_defaults: "true",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/67967388db610dcb9d24fb59ede348d8.asciidoc b/docs/doc_examples/67967388db610dcb9d24fb59ede348d8.asciidoc
new file mode 100644
index 000000000..577b3ea88
--- /dev/null
+++ b/docs/doc_examples/67967388db610dcb9d24fb59ede348d8.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ min_price: {
+ min: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/67a1f31cf60773a2378c2c30723c4b96.asciidoc b/docs/doc_examples/67a1f31cf60773a2378c2c30723c4b96.asciidoc
new file mode 100644
index 000000000..a64330970
--- /dev/null
+++ b/docs/doc_examples/67a1f31cf60773a2378c2c30723c4b96.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_ranks: {
+ percentile_ranks: {
+ field: "load_time",
+ values: [500, 600],
+ missing: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/67a490d749a0c3bb16a266663423893d.asciidoc b/docs/doc_examples/67a490d749a0c3bb16a266663423893d.asciidoc
new file mode 100644
index 000000000..f650cc07a
--- /dev/null
+++ b/docs/doc_examples/67a490d749a0c3bb16a266663423893d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.deleteWatch({
+ id: "log_error_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/67a55ac3aaee09f4aeeb7d2763da3335.asciidoc b/docs/doc_examples/67a55ac3aaee09f4aeeb7d2763da3335.asciidoc
new file mode 100644
index 000000000..13c543473
--- /dev/null
+++ b/docs/doc_examples/67a55ac3aaee09f4aeeb7d2763da3335.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "places",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "places",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ name: "NEMO Science Museum",
+ geometry: "POINT(4.912350 52.374081)",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ name: "Sportpark De Weeren",
+ geometry: {
+ type: "Polygon",
+ coordinates: [
+ [
+ [4.965305328369141, 52.39347642069457],
+ [4.966979026794433, 52.391721758934835],
+ [4.969425201416015, 52.39238958618537],
+ [4.967944622039794, 52.39420969150824],
+ [4.965305328369141, 52.39347642069457],
+ ],
+ ],
+ },
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "places",
+ size: 0,
+ aggs: {
+ viewport: {
+ geo_bounds: {
+ field: "geometry",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/67aac8882fa476db8a5878b67ea08eb3.asciidoc b/docs/doc_examples/67aac8882fa476db8a5878b67ea08eb3.asciidoc
new file mode 100644
index 000000000..3dc53206e
--- /dev/null
+++ b/docs/doc_examples/67aac8882fa476db8a5878b67ea08eb3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_snapshot/my_repository/_analyze",
+ querystring: {
+ blob_count: "10",
+ max_blob_size: "1mb",
+ timeout: "120s",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/67bab07fda27ef77e3bc948211051a33.asciidoc b/docs/doc_examples/67bab07fda27ef77e3bc948211051a33.asciidoc
new file mode 100644
index 000000000..5bc95aa00
--- /dev/null
+++ b/docs/doc_examples/67bab07fda27ef77e3bc948211051a33.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.threadPool({
+ thread_pool_patterns: "write,search",
+ v: "true",
+ s: "n,nn",
+ h: "n,nn,q,a,r,c",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/67c3808751223eef69a57e6fd02ddf4f.asciidoc b/docs/doc_examples/67c3808751223eef69a57e6fd02ddf4f.asciidoc
new file mode 100644
index 000000000..37ef597f7
--- /dev/null
+++ b/docs/doc_examples/67c3808751223eef69a57e6fd02ddf4f.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ more_like_this: {
+ fields: ["title", "description"],
+ like: [
+ {
+ _index: "imdb",
+ _id: "1",
+ },
+ {
+ _index: "imdb",
+ _id: "2",
+ },
+ "and potentially some more text here as well",
+ ],
+ min_term_freq: 1,
+ max_query_terms: 12,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/67ffa135c50c43d6788636c88078c7d1.asciidoc b/docs/doc_examples/67ffa135c50c43d6788636c88078c7d1.asciidoc
new file mode 100644
index 000000000..16ae9d9b2
--- /dev/null
+++ b/docs/doc_examples/67ffa135c50c43d6788636c88078c7d1.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ id: "my-pipeline-id",
+ docs: [
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ foo: "bar",
+ },
+ },
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ foo: "rab",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/682336e5232c9ad3d866cb203d1c58c1.asciidoc b/docs/doc_examples/682336e5232c9ad3d866cb203d1c58c1.asciidoc
new file mode 100644
index 000000000..6da7fb4fa
--- /dev/null
+++ b/docs/doc_examples/682336e5232c9ad3d866cb203d1c58c1.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "azure-openai-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1536,
+ element_type: "float",
+ similarity: "dot_product",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6843d859e2965d17cad4f033c81db83f.asciidoc b/docs/doc_examples/6843d859e2965d17cad4f033c81db83f.asciidoc
new file mode 100644
index 000000000..440cd6741
--- /dev/null
+++ b/docs/doc_examples/6843d859e2965d17cad4f033c81db83f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-data-stream-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ settings: {
+ "sort.field": ["@timestamp"],
+ "sort.order": ["desc"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc b/docs/doc_examples/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc
new file mode 100644
index 000000000..5184e4c0a
--- /dev/null
+++ b/docs/doc_examples/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "metrics_index",
+ mappings: {
+ properties: {
+ latency_histo: {
+ type: "histogram",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ refresh: "true",
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ max_latency: {
+ max: {
+ field: "latency_histo",
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/6859530dd9d85e59bd33a53ec96a3836.asciidoc b/docs/doc_examples/6859530dd9d85e59bd33a53ec96a3836.asciidoc
new file mode 100644
index 000000000..0558f50d4
--- /dev/null
+++ b/docs/doc_examples/6859530dd9d85e59bd33a53ec96a3836.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "users",
+ id: 1,
+ refresh: "wait_for",
+ document: {
+ email: "mardy.brown@asciidocsmith.com",
+ first_name: "Mardy",
+ last_name: "Brown",
+ city: "New Orleans",
+ county: "Orleans",
+ state: "LA",
+ zip: 70116,
+ web: "mardy.asciidocsmith.com",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/686bc640b877de845c46bef372a9866c.asciidoc b/docs/doc_examples/686bc640b877de845c46bef372a9866c.asciidoc
new file mode 100644
index 000000000..e081be4f1
--- /dev/null
+++ b/docs/doc_examples/686bc640b877de845c46bef372a9866c.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "parent_example",
+ size: 0,
+ aggs: {
+ "top-names": {
+ terms: {
+ field: "owner.display_name.keyword",
+ size: 10,
+ },
+ aggs: {
+ "to-questions": {
+ parent: {
+ type: "answer",
+ },
+ aggs: {
+ "top-tags": {
+ terms: {
+ field: "tags.keyword",
+ size: 10,
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/68721288dc9ad8aa1b55099b4d303051.asciidoc b/docs/doc_examples/68721288dc9ad8aa1b55099b4d303051.asciidoc
new file mode 100644
index 000000000..6b3caa8d2
--- /dev/null
+++ b/docs/doc_examples/68721288dc9ad8aa1b55099b4d303051.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "quick brown f",
+ type: "bool_prefix",
+ fields: ["subject", "message"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/68738b4fd0dda177022be45be95b4c84.asciidoc b/docs/doc_examples/68738b4fd0dda177022be45be95b4c84.asciidoc
new file mode 100644
index 000000000..950fc0229
--- /dev/null
+++ b/docs/doc_examples/68738b4fd0dda177022be45be95b4c84.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindexRethrottle({
+ task_id: "r1A2WoRbTwKZ516z6NEs5A:36619",
+ requests_per_second: "-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6884454f57c3a41059037ea762f48d77.asciidoc b/docs/doc_examples/6884454f57c3a41059037ea762f48d77.asciidoc
new file mode 100644
index 000000000..c870eedf0
--- /dev/null
+++ b/docs/doc_examples/6884454f57c3a41059037ea762f48d77.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "standard",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/68a891f609ca3a379d2d64e4914f3067.asciidoc b/docs/doc_examples/68a891f609ca3a379d2d64e4914f3067.asciidoc
new file mode 100644
index 000000000..324247ffd
--- /dev/null
+++ b/docs/doc_examples/68a891f609ca3a379d2d64e4914f3067.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["kstem"],
+ text: "the foxes jumping quickly",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/68b64313bf89ec3f2c645da61999dbb4.asciidoc b/docs/doc_examples/68b64313bf89ec3f2c645da61999dbb4.asciidoc
new file mode 100644
index 000000000..ed5756abf
--- /dev/null
+++ b/docs/doc_examples/68b64313bf89ec3f2c645da61999dbb4.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.info({
+ node_id: "plugins",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/68cb8a452e780ca78b0cb761be3629af.asciidoc b/docs/doc_examples/68cb8a452e780ca78b0cb761be3629af.asciidoc
new file mode 100644
index 000000000..df5f75e1f
--- /dev/null
+++ b/docs/doc_examples/68cb8a452e780ca78b0cb761be3629af.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ stored_fields: "_none_",
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc b/docs/doc_examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc
new file mode 100644
index 000000000..021aa7e19
--- /dev/null
+++ b/docs/doc_examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc
@@ -0,0 +1,53 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "destination_template",
+ template: {
+ settings: {
+ index: {
+ number_of_replicas: 0,
+ number_of_shards: 4,
+ mode: "time_series",
+ routing_path: ["metricset"],
+ time_series: {
+ end_time: "2023-09-01T14:00:00.000Z",
+ start_time: "2023-09-01T06:00:00.000Z",
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ metricset: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ k8s: {
+ properties: {
+ tx: {
+ type: "long",
+ },
+ rx: {
+ type: "long",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putIndexTemplate({
+ name: 2,
+ index_patterns: ["k9s*"],
+ composed_of: ["destination_template"],
+ data_stream: {},
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/691fe20d467324ed43a36fd15852c492.asciidoc b/docs/doc_examples/691fe20d467324ed43a36fd15852c492.asciidoc
new file mode 100644
index 000000000..e97c3e203
--- /dev/null
+++ b/docs/doc_examples/691fe20d467324ed43a36fd15852c492.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.follow({
+ index: "kibana_sample_data_ecommerce",
+ wait_for_active_shards: 1,
+ remote_cluster: "clusterB",
+ leader_index: "kibana_sample_data_ecommerce2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/692606cc6d6462becc321d92961a3bac.asciidoc b/docs/doc_examples/692606cc6d6462becc321d92961a3bac.asciidoc
new file mode 100644
index 000000000..368ac4df2
--- /dev/null
+++ b/docs/doc_examples/692606cc6d6462becc321d92961a3bac.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.textStructure.testGrokPattern({
+ grok_pattern: "Hello %{WORD:first_name} %{WORD:last_name}",
+ text: ["Hello John Doe", "this does not match"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc b/docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc
new file mode 100644
index 000000000..bf62637fc
--- /dev/null
+++ b/docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "my-msmarco-minilm-model",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ num_allocations: 1,
+ num_threads: 1,
+ model_id: "cross-encoder__ms-marco-minilm-l-6-v2",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69582847099ee62ed34feddfaba83ef6.asciidoc b/docs/doc_examples/69582847099ee62ed34feddfaba83ef6.asciidoc
new file mode 100644
index 000000000..836a958ed
--- /dev/null
+++ b/docs/doc_examples/69582847099ee62ed34feddfaba83ef6.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ quantity: {
+ histogram: {
+ field: "quantity",
+ interval: 10,
+ missing: 0,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc b/docs/doc_examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc
new file mode 100644
index 000000000..55aba4454
--- /dev/null
+++ b/docs/doc_examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ require_field_match: false,
+ fields: {
+ body: {
+ pre_tags: [""],
+ post_tags: [" "],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc b/docs/doc_examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc
new file mode 100644
index 000000000..07b79978d
--- /dev/null
+++ b/docs/doc_examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 1,
+ stored_fields: "tags,counter",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69ab708fe65a75f870223d2289c3d171.asciidoc b/docs/doc_examples/69ab708fe65a75f870223d2289c3d171.asciidoc
new file mode 100644
index 000000000..58f053630
--- /dev/null
+++ b/docs/doc_examples/69ab708fe65a75f870223d2289c3d171.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ description: "Hide my IP",
+ processors: [
+ {
+ redact: {
+ field: "message",
+ patterns: ["%{IP:REDACTED}", "%{EMAILADDRESS:REDACTED}"],
+ prefix: "*",
+ suffix: "*",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ message: "55.3.244.1 GET /index.html 15824 0.043 test@elastic.co",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc b/docs/doc_examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc
new file mode 100644
index 000000000..a367d97aa
--- /dev/null
+++ b/docs/doc_examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69d5710bdec73041c66f21d5f96637e8.asciidoc b/docs/doc_examples/69d5710bdec73041c66f21d5f96637e8.asciidoc
new file mode 100644
index 000000000..a4e5f6f09
--- /dev/null
+++ b/docs/doc_examples/69d5710bdec73041c66f21d5f96637e8.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index_long",
+ mappings: {
+ properties: {
+ field: {
+ type: "date_nanos",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69d9b8fd364596aa37eae6864d8a6d89.asciidoc b/docs/doc_examples/69d9b8fd364596aa37eae6864d8a6d89.asciidoc
new file mode 100644
index 000000000..04aafb486
--- /dev/null
+++ b/docs/doc_examples/69d9b8fd364596aa37eae6864d8a6d89.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: ".watcher-history*",
+ pretty: "true",
+ sort: [
+ {
+ "result.execution_time": "desc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69daf5ec2a9bc07096e1833286c36076.asciidoc b/docs/doc_examples/69daf5ec2a9bc07096e1833286c36076.asciidoc
new file mode 100644
index 000000000..426c6447d
--- /dev/null
+++ b/docs/doc_examples/69daf5ec2a9bc07096e1833286c36076.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "timeseries_template",
+ index_patterns: ["timeseries-*"],
+ template: {
+ settings: {
+ number_of_shards: 1,
+ number_of_replicas: 1,
+ "index.lifecycle.name": "timeseries_policy",
+ "index.lifecycle.rollover_alias": "timeseries",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/69f8b0f2a9ba47e11f363d788cee9d6d.asciidoc b/docs/doc_examples/69f8b0f2a9ba47e11f363d788cee9d6d.asciidoc
new file mode 100644
index 000000000..a17ce6569
--- /dev/null
+++ b/docs/doc_examples/69f8b0f2a9ba47e11f363d788cee9d6d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.migration.deprecations({
+ index: "logstash-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a1702dd50690cae833572e48a0ddf25.asciidoc b/docs/doc_examples/6a1702dd50690cae833572e48a0ddf25.asciidoc
new file mode 100644
index 000000000..16ed57458
--- /dev/null
+++ b/docs/doc_examples/6a1702dd50690cae833572e48a0ddf25.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "Will Smith",
+ fields: ["title", "*_name"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a350a17701e8c8158407191f2718b66.asciidoc b/docs/doc_examples/6a350a17701e8c8158407191f2718b66.asciidoc
new file mode 100644
index 000000000..e9a2ea7cb
--- /dev/null
+++ b/docs/doc_examples/6a350a17701e8c8158407191f2718b66.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.unfollow({
+ index: "follower_index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc b/docs/doc_examples/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc
new file mode 100644
index 000000000..da66cc8b8
--- /dev/null
+++ b/docs/doc_examples/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "ingest.geoip.downloader.enabled": false,
+ "indices.lifecycle.history_index_enabled": false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a3a86ff58e5f20950d429cf2832c229.asciidoc b/docs/doc_examples/6a3a86ff58e5f20950d429cf2832c229.asciidoc
new file mode 100644
index 000000000..34eea3284
--- /dev/null
+++ b/docs/doc_examples/6a3a86ff58e5f20950d429cf2832c229.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.getPipeline({
+ id: "my-pipeline-id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a3f06962cceb3dfd3cd4fb5c679fa75.asciidoc b/docs/doc_examples/6a3f06962cceb3dfd3cd4fb5c679fa75.asciidoc
new file mode 100644
index 000000000..174de7224
--- /dev/null
+++ b/docs/doc_examples/6a3f06962cceb3dfd3cd4fb5c679fa75.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "my-index-000001",
+ tokenizer: "keyword",
+ char_filter: ["my_mappings_char_filter"],
+ text: "I'm delighted about it :(",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a50c1c53673fe9cc3cbda38a2853cdd.asciidoc b/docs/doc_examples/6a50c1c53673fe9cc3cbda38a2853cdd.asciidoc
new file mode 100644
index 000000000..fe9c85ee0
--- /dev/null
+++ b/docs/doc_examples/6a50c1c53673fe9cc3cbda38a2853cdd.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.deleteAsync({
+ id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a55dbba114c6c1408474f7e9cfdbb94.asciidoc b/docs/doc_examples/6a55dbba114c6c1408474f7e9cfdbb94.asciidoc
new file mode 100644
index 000000000..70459caa9
--- /dev/null
+++ b/docs/doc_examples/6a55dbba114c6c1408474f7e9cfdbb94.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_unverified_backup",
+ verify: "false",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "my_unverified_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6a9655fe22fa5db7a540c145bcf1fb31.asciidoc b/docs/doc_examples/6a9655fe22fa5db7a540c145bcf1fb31.asciidoc
new file mode 100644
index 000000000..f5f3bbd42
--- /dev/null
+++ b/docs/doc_examples/6a9655fe22fa5db7a540c145bcf1fb31.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "stats-index",
+ id: 1,
+ document: {
+ agg_metric: {
+ min: -302.5,
+ max: 702.3,
+ sum: 200,
+ value_count: 25,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "stats-index",
+ id: 2,
+ document: {
+ agg_metric: {
+ min: -93,
+ max: 1702.3,
+ sum: 300,
+ value_count: 25,
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6a969ebe7490d93d35be895b14e5a42a.asciidoc b/docs/doc_examples/6a969ebe7490d93d35be895b14e5a42a.asciidoc
new file mode 100644
index 000000000..fed00c64b
--- /dev/null
+++ b/docs/doc_examples/6a969ebe7490d93d35be895b14e5a42a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.get({
+ index: "logs-my_app-default",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6aa2941855d13f365f70aa8767ecb137.asciidoc b/docs/doc_examples/6aa2941855d13f365f70aa8767ecb137.asciidoc
new file mode 100644
index 000000000..ff7934808
--- /dev/null
+++ b/docs/doc_examples/6aa2941855d13f365f70aa8767ecb137.asciidoc
@@ -0,0 +1,60 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ city: {
+ type: "text",
+ fields: {
+ raw: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ city: "New York",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ city: "York",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ city: "york",
+ },
+ },
+ sort: {
+ "city.raw": "asc",
+ },
+ aggs: {
+ Cities: {
+ terms: {
+ field: "city.raw",
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/6aca241c0361d26f134712821e2d09a9.asciidoc b/docs/doc_examples/6aca241c0361d26f134712821e2d09a9.asciidoc
new file mode 100644
index 000000000..63445d9ea
--- /dev/null
+++ b/docs/doc_examples/6aca241c0361d26f134712821e2d09a9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.cleanupRepository({
+ name: "my_repository",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc b/docs/doc_examples/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc
new file mode 100644
index 000000000..41332985c
--- /dev/null
+++ b/docs/doc_examples/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.exclude._ip": "192.168.2.*",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b0288acb739c4667d41339e5100c327.asciidoc b/docs/doc_examples/6b0288acb739c4667d41339e5100c327.asciidoc
new file mode 100644
index 000000000..bc220ac1f
--- /dev/null
+++ b/docs/doc_examples/6b0288acb739c4667d41339e5100c327.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ query: "this is a testt",
+ fuzziness: "AUTO",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b0d492c0f50103fefeab385a7bebd01.asciidoc b/docs/doc_examples/6b0d492c0f50103fefeab385a7bebd01.asciidoc
new file mode 100644
index 000000000..494d76385
--- /dev/null
+++ b/docs/doc_examples/6b0d492c0f50103fefeab385a7bebd01.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "logs-debug",
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ message: {
+ type: "text",
+ },
+ level: {
+ type: "constant_keyword",
+ value: "debug",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b104a66ab47fc1e1f24a5738f82feb4.asciidoc b/docs/doc_examples/6b104a66ab47fc1e1f24a5738f82feb4.asciidoc
new file mode 100644
index 000000000..6565c34d0
--- /dev/null
+++ b/docs/doc_examples/6b104a66ab47fc1e1f24a5738f82feb4.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.putAutoFollowPattern({
+ name: "beats",
+ remote_cluster: "leader",
+ leader_index_patterns: ["metricbeat-*", "packetbeat-*"],
+ follow_index_pattern: "{{leader_index}}-copy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b1336ff477f91d4a0db0b06db546ff0.asciidoc b/docs/doc_examples/6b1336ff477f91d4a0db0b06db546ff0.asciidoc
new file mode 100644
index 000000000..dc348caaf
--- /dev/null
+++ b/docs/doc_examples/6b1336ff477f91d4a0db0b06db546ff0.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.stop();
+console.log(response);
+----
diff --git a/docs/doc_examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc b/docs/doc_examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc
new file mode 100644
index 000000000..496a684a3
--- /dev/null
+++ b/docs/doc_examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ t_shirts: {
+ filter: {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b3dcde0656d3a96dbcfed1ec814e10a.asciidoc b/docs/doc_examples/6b3dcde0656d3a96dbcfed1ec814e10a.asciidoc
new file mode 100644
index 000000000..a892432a6
--- /dev/null
+++ b/docs/doc_examples/6b3dcde0656d3a96dbcfed1ec814e10a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.shutdown.deleteNode({
+ node_id: "USpTGYaBSIKbgSUJR2Z9lg",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b6e275efe3d2aafe0fc3443f2c96868.asciidoc b/docs/doc_examples/6b6e275efe3d2aafe0fc3443f2c96868.asciidoc
new file mode 100644
index 000000000..ddb9c53f2
--- /dev/null
+++ b/docs/doc_examples/6b6e275efe3d2aafe0fc3443f2c96868.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "google-vertex-ai-embeddings",
+ pipeline: "google_vertex_ai_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b6f5e0ab4ef523fc9a3a4a655848f64.asciidoc b/docs/doc_examples/6b6f5e0ab4ef523fc9a3a4a655848f64.asciidoc
new file mode 100644
index 000000000..b7f2cb320
--- /dev/null
+++ b/docs/doc_examples/6b6f5e0ab4ef523fc9a3a4a655848f64.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ sparse_vector: {
+ field: "ml.tokens",
+ query_vector: {
+ token1: 0.5,
+ token2: 0.3,
+ token3: 0.2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc b/docs/doc_examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc
new file mode 100644
index 000000000..3dff97a73
--- /dev/null
+++ b/docs/doc_examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my-example-app",
+ search_application: {
+ indices: ["example-index"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n \n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
+ params: {
+ query: "",
+ _es_filters: {},
+ _es_aggs: {},
+ _es_sort_fields: {},
+ size: 10,
+ from: 0,
+ },
+ dictionary: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b77795e9249c8d9865f7a49fd86a863.asciidoc b/docs/doc_examples/6b77795e9249c8d9865f7a49fd86a863.asciidoc
new file mode 100644
index 000000000..fa4b12cc5
--- /dev/null
+++ b/docs/doc_examples/6b77795e9249c8d9865f7a49fd86a863.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ range: {
+ age: {
+ gte: 10,
+ lte: 20,
+ boost: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc b/docs/doc_examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc
new file mode 100644
index 000000000..ae22a8b4d
--- /dev/null
+++ b/docs/doc_examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job",
+ querystring: {
+ status: "pending",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6ba332596f5eb29660c90ab2d480e7dc.asciidoc b/docs/doc_examples/6ba332596f5eb29660c90ab2d480e7dc.asciidoc
new file mode 100644
index 000000000..9250d0925
--- /dev/null
+++ b/docs/doc_examples/6ba332596f5eb29660c90ab2d480e7dc.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putTemplate({
+ name: "template_1",
+ index_patterns: ["te*"],
+ order: 0,
+ settings: {
+ number_of_shards: 1,
+ },
+ mappings: {
+ _source: {
+ enabled: false,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putTemplate({
+ name: "template_2",
+ index_patterns: ["tes*"],
+ order: 1,
+ settings: {
+ number_of_shards: 1,
+ },
+ mappings: {
+ _source: {
+ enabled: true,
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc b/docs/doc_examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc
new file mode 100644
index 000000000..51a32d243
--- /dev/null
+++ b/docs/doc_examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ title: "quick brown fox",
+ },
+ },
+ {
+ match: {
+ "title.original": "quick brown fox",
+ },
+ },
+ {
+ match: {
+ "title.shingles": "quick brown fox",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6bfa0a9a50c4e94276c7d63af1c31d9e.asciidoc b/docs/doc_examples/6bfa0a9a50c4e94276c7d63af1c31d9e.asciidoc
new file mode 100644
index 000000000..0c0ea6b3e
--- /dev/null
+++ b/docs/doc_examples/6bfa0a9a50c4e94276c7d63af1c31d9e.asciidoc
@@ -0,0 +1,56 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "place",
+ mappings: {
+ properties: {
+ suggest: {
+ type: "completion",
+ contexts: [
+ {
+ name: "place_type",
+ type: "category",
+ },
+ {
+ name: "location",
+ type: "geo",
+ precision: 4,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.create({
+ index: "place_path_category",
+ mappings: {
+ properties: {
+ suggest: {
+ type: "completion",
+ contexts: [
+ {
+ name: "place_type",
+ type: "category",
+ path: "cat",
+ },
+ {
+ name: "location",
+ type: "geo",
+ precision: 4,
+ path: "loc",
+ },
+ ],
+ },
+ loc: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6c00dae1a456ae5e854e98e895dca2ab.asciidoc b/docs/doc_examples/6c00dae1a456ae5e854e98e895dca2ab.asciidoc
new file mode 100644
index 000000000..e80bc72a3
--- /dev/null
+++ b/docs/doc_examples/6c00dae1a456ae5e854e98e895dca2ab.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ query: {
+ match: {
+ message: "elasticsearch",
+ },
+ },
+ script_score: {
+ script: {
+ source: "Math.log(2 + doc['my-int'].value)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6c0acbff2df9003ccaf4350c9e2e186e.asciidoc b/docs/doc_examples/6c0acbff2df9003ccaf4350c9e2e186e.asciidoc
new file mode 100644
index 000000000..73adb18c2
--- /dev/null
+++ b/docs/doc_examples/6c0acbff2df9003ccaf4350c9e2e186e.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_polygon: {
+ "person.location": {
+ points: [
+ [-70, 40],
+ [-80, 30],
+ [-90, 20],
+ ],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc b/docs/doc_examples/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc
new file mode 100644
index 000000000..38e73da9a
--- /dev/null
+++ b/docs/doc_examples/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "drivers",
+ mappings: {
+ properties: {
+ driver: {
+ type: "nested",
+ properties: {
+ last_name: {
+ type: "text",
+ },
+ vehicle: {
+ type: "nested",
+ properties: {
+ make: {
+ type: "text",
+ },
+ model: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6c70b022a8a74b887fe46e514feb38c0.asciidoc b/docs/doc_examples/6c70b022a8a74b887fe46e514feb38c0.asciidoc
new file mode 100644
index 000000000..f9d6b2ee4
--- /dev/null
+++ b/docs/doc_examples/6c70b022a8a74b887fe46e514feb38c0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.recovery({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6c72460570307f23478100db04a84c8e.asciidoc b/docs/doc_examples/6c72460570307f23478100db04a84c8e.asciidoc
new file mode 100644
index 000000000..b7c25f62e
--- /dev/null
+++ b/docs/doc_examples/6c72460570307f23478100db04a84c8e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getComponentTemplate({
+ name: "temp*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6c72f6791ba9223943f7556c5bfaa728.asciidoc b/docs/doc_examples/6c72f6791ba9223943f7556c5bfaa728.asciidoc
new file mode 100644
index 000000000..93e7af9bf
--- /dev/null
+++ b/docs/doc_examples/6c72f6791ba9223943f7556c5bfaa728.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ fields: [
+ "user.id",
+ "http.response.*",
+ {
+ field: "@timestamp",
+ format: "epoch_millis",
+ },
+ ],
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6c8bf6d4d68b7756f953be4c07655337.asciidoc b/docs/doc_examples/6c8bf6d4d68b7756f953be4c07655337.asciidoc
new file mode 100644
index 000000000..624074238
--- /dev/null
+++ b/docs/doc_examples/6c8bf6d4d68b7756f953be4c07655337.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.reloadSecureSettings({
+ secure_settings_password: "keystore-password",
+});
+console.log(response);
+
+const response1 = await client.nodes.reloadSecureSettings({
+ node_id: "nodeId1,nodeId2",
+ secure_settings_password: "keystore-password",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6c927313867647e0ef3cd3a37cb410cc.asciidoc b/docs/doc_examples/6c927313867647e0ef3cd3a37cb410cc.asciidoc
new file mode 100644
index 000000000..49ffbd241
--- /dev/null
+++ b/docs/doc_examples/6c927313867647e0ef3cd3a37cb410cc.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ username: "myuser",
+ realm_name: "native1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6cb1dae368c945ecf7c9ec332a5743a2.asciidoc b/docs/doc_examples/6cb1dae368c945ecf7c9ec332a5743a2.asciidoc
new file mode 100644
index 000000000..fd3ab96e4
--- /dev/null
+++ b/docs/doc_examples/6cb1dae368c945ecf7c9ec332a5743a2.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ fields: {
+ raw: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ text: [
+ "the quick brown fox",
+ "the quick brown fox",
+ "jumped over the lazy dog",
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6cd083045bf06e80b83889a939a18451.asciidoc b/docs/doc_examples/6cd083045bf06e80b83889a939a18451.asciidoc
new file mode 100644
index 000000000..9fb10298a
--- /dev/null
+++ b/docs/doc_examples/6cd083045bf06e80b83889a939a18451.asciidoc
@@ -0,0 +1,95 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ user: {
+ type: "nested",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ group: "fans",
+ user: [
+ {
+ first: "John",
+ last: "Smith",
+ },
+ {
+ first: "Alice",
+ last: "White",
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ nested: {
+ path: "user",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "user.first": "Alice",
+ },
+ },
+ {
+ match: {
+ "user.last": "Smith",
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ nested: {
+ path: "user",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "user.first": "Alice",
+ },
+ },
+ {
+ match: {
+ "user.last": "White",
+ },
+ },
+ ],
+ },
+ },
+ inner_hits: {
+ highlight: {
+ fields: {
+ "user.first": {},
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/6ce6cac9df216c52371c2e77e6e07ba1.asciidoc b/docs/doc_examples/6ce6cac9df216c52371c2e77e6e07ba1.asciidoc
new file mode 100644
index 000000000..396d11fe4
--- /dev/null
+++ b/docs/doc_examples/6ce6cac9df216c52371c2e77e6e07ba1.asciidoc
@@ -0,0 +1,57 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_query_rules/my-ruleset",
+ body: {
+ rules: [
+ {
+ rule_id: "my-rule1",
+ type: "pinned",
+ criteria: [
+ {
+ type: "contains",
+ metadata: "user_query",
+ values: ["pugs", "puggles"],
+ },
+ {
+ type: "exact",
+ metadata: "user_country",
+ values: ["us"],
+ },
+ ],
+ actions: {
+ ids: ["id1", "id2"],
+ },
+ },
+ {
+ rule_id: "my-rule2",
+ type: "exclude",
+ criteria: [
+ {
+ type: "fuzzy",
+ metadata: "user_query",
+ values: ["rescue dogs"],
+ },
+ ],
+ actions: {
+ docs: [
+ {
+ _index: "index1",
+ _id: "id3",
+ },
+ {
+ _index: "index2",
+ _id: "id4",
+ },
+ ],
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6ce8334def48552ba7d44025580d9105.asciidoc b/docs/doc_examples/6ce8334def48552ba7d44025580d9105.asciidoc
new file mode 100644
index 000000000..2333655e3
--- /dev/null
+++ b/docs/doc_examples/6ce8334def48552ba7d44025580d9105.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "",
+ aliases: {
+ "my-alias": {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6cf3307c00f464c46475e352e067d714.asciidoc b/docs/doc_examples/6cf3307c00f464c46475e352e067d714.asciidoc
new file mode 100644
index 000000000..489e7448a
--- /dev/null
+++ b/docs/doc_examples/6cf3307c00f464c46475e352e067d714.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_geoshapes",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: {
+ lat: 40.73,
+ lon: -74.1,
+ },
+ bottom_right: {
+ lat: 40.01,
+ lon: -71.12,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6d48f83c4a36d0544d876d3eff48dcef.asciidoc b/docs/doc_examples/6d48f83c4a36d0544d876d3eff48dcef.asciidoc
new file mode 100644
index 000000000..3dd4b3ef8
--- /dev/null
+++ b/docs/doc_examples/6d48f83c4a36d0544d876d3eff48dcef.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.executeRetention();
+console.log(response);
+----
diff --git a/docs/doc_examples/6d81c749ff9554044ee5f3ad92dcb89a.asciidoc b/docs/doc_examples/6d81c749ff9554044ee5f3ad92dcb89a.asciidoc
new file mode 100644
index 000000000..2b2033138
--- /dev/null
+++ b/docs/doc_examples/6d81c749ff9554044ee5f3ad92dcb89a.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my-weather-sensor-lifecycle-policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_age: "1d",
+ max_primary_shard_size: "50gb",
+ },
+ },
+ },
+ warm: {
+ min_age: "30d",
+ actions: {
+ shrink: {
+ number_of_shards: 1,
+ },
+ forcemerge: {
+ max_num_segments: 1,
+ },
+ },
+ },
+ cold: {
+ min_age: "60d",
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "found-snapshots",
+ },
+ },
+ },
+ frozen: {
+ min_age: "90d",
+ actions: {
+ searchable_snapshot: {
+ snapshot_repository: "found-snapshots",
+ },
+ },
+ },
+ delete: {
+ min_age: "735d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6db118771354792646229e7a3c30c7e9.asciidoc b/docs/doc_examples/6db118771354792646229e7a3c30c7e9.asciidoc
new file mode 100644
index 000000000..9623daabc
--- /dev/null
+++ b/docs/doc_examples/6db118771354792646229e7a3c30c7e9.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516729294000,
+ temperature: 200,
+ voltage: 5.2,
+ node: "a",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516642894000,
+ temperature: 201,
+ voltage: 5.8,
+ node: "b",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516556494000,
+ temperature: 202,
+ voltage: 5.1,
+ node: "a",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516470094000,
+ temperature: 198,
+ voltage: 5.6,
+ node: "b",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516383694000,
+ temperature: 200,
+ voltage: 4.2,
+ node: "c",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516297294000,
+ temperature: 202,
+ voltage: 4,
+ node: "c",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6dbfe5565a95508e65d304131847f9fc.asciidoc b/docs/doc_examples/6dbfe5565a95508e65d304131847f9fc.asciidoc
new file mode 100644
index 000000000..f308c6785
--- /dev/null
+++ b/docs/doc_examples/6dbfe5565a95508e65d304131847f9fc.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "edge_ngram",
+ min_gram: 1,
+ max_gram: 2,
+ },
+ ],
+ text: "the quick brown fox jumps",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc b/docs/doc_examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc
new file mode 100644
index 000000000..fdbb82230
--- /dev/null
+++ b/docs/doc_examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query:
+ '\n FROM library\n | EVAL year = DATE_EXTRACT("year", release_date)\n | WHERE page_count > 300 AND author == "Frank Herbert"\n | STATS count = COUNT(*) by year\n | WHERE count > 0\n | LIMIT 5\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6dd2a107bc64fd6f058fb17c21640649.asciidoc b/docs/doc_examples/6dd2a107bc64fd6f058fb17c21640649.asciidoc
new file mode 100644
index 000000000..76f1aa692
--- /dev/null
+++ b/docs/doc_examples/6dd2a107bc64fd6f058fb17c21640649.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateToken({
+ username: "myuser",
+ realm_name: "saml1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6dd4c02fe3d6b800648a04d3e2d29fc1.asciidoc b/docs/doc_examples/6dd4c02fe3d6b800648a04d3e2d29fc1.asciidoc
new file mode 100644
index 000000000..018089d85
--- /dev/null
+++ b/docs/doc_examples/6dd4c02fe3d6b800648a04d3e2d29fc1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.delete({
+ repository: "my_repository",
+ snapshot: "snapshot_2,snapshot_3",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6ddd4e657efbf45def430a6419825796.asciidoc b/docs/doc_examples/6ddd4e657efbf45def430a6419825796.asciidoc
new file mode 100644
index 000000000..5bd1b226c
--- /dev/null
+++ b/docs/doc_examples/6ddd4e657efbf45def430a6419825796.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "azure_ai_studio_completion",
+ inference_config: {
+ service: "azureaistudio",
+ service_settings: {
+ api_key: "",
+ target: "",
+ provider: "",
+ endpoint_type: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6e000496a1fa8b57148518eaad692f35.asciidoc b/docs/doc_examples/6e000496a1fa8b57148518eaad692f35.asciidoc
new file mode 100644
index 000000000..c909cdf1a
--- /dev/null
+++ b/docs/doc_examples/6e000496a1fa8b57148518eaad692f35.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_none: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6e0b675eff7ed73c09a76a415930a486.asciidoc b/docs/doc_examples/6e0b675eff7ed73c09a76a415930a486.asciidoc
new file mode 100644
index 000000000..9ddf0e410
--- /dev/null
+++ b/docs/doc_examples/6e0b675eff7ed73c09a76a415930a486.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ "my-join-field": {
+ type: "join",
+ relations: {
+ "my-parent": "my-child",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6e1157f3184fa192d47a3d0e3ea17a6c.asciidoc b/docs/doc_examples/6e1157f3184fa192d47a3d0e3ea17a6c.asciidoc
new file mode 100644
index 000000000..97695fc48
--- /dev/null
+++ b/docs/doc_examples/6e1157f3184fa192d47a3d0e3ea17a6c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "letter_unique_pos_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ letter_unique_pos: {
+ tokenizer: "letter",
+ filter: ["unique_pos"],
+ },
+ },
+ filter: {
+ unique_pos: {
+ type: "unique",
+ only_on_same_position: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc b/docs/doc_examples/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc
new file mode 100644
index 000000000..2b2e6635e
--- /dev/null
+++ b/docs/doc_examples/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc b/docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc
new file mode 100644
index 000000000..a541500cb
--- /dev/null
+++ b/docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "movies",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ sparse_vector: {
+ field: "plot_embedding",
+ inference_id: "my-elser-model",
+ query: "films that explore psychological depths",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ multi_match: {
+ query: "crime",
+ fields: ["plot", "title"],
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [10, 22, 77],
+ k: 10,
+ num_candidates: 10,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6e86225ed4a6e3be8078b83ef301f731.asciidoc b/docs/doc_examples/6e86225ed4a6e3be8078b83ef301f731.asciidoc
new file mode 100644
index 000000000..13215e509
--- /dev/null
+++ b/docs/doc_examples/6e86225ed4a6e3be8078b83ef301f731.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ percolate: {
+ field: "query",
+ document: {
+ message: "A new bonsai tree in the office",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6ea062455229151e311869a81ee40252.asciidoc b/docs/doc_examples/6ea062455229151e311869a81ee40252.asciidoc
new file mode 100644
index 000000000..b8f766fc4
--- /dev/null
+++ b/docs/doc_examples/6ea062455229151e311869a81ee40252.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "_all",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "*",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/6edfc35a66afd9b884431fccf48fdbf5.asciidoc b/docs/doc_examples/6edfc35a66afd9b884431fccf48fdbf5.asciidoc
new file mode 100644
index 000000000..ffbcb2402
--- /dev/null
+++ b/docs/doc_examples/6edfc35a66afd9b884431fccf48fdbf5.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ {
+ type: "synonym_graph",
+ synonyms: ["pc => personal computer", "computer, pc, laptop"],
+ },
+ ],
+ text: "Check how PC synonyms work",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6eead05dd3b04722ef0ea5644c2e047d.asciidoc b/docs/doc_examples/6eead05dd3b04722ef0ea5644c2e047d.asciidoc
new file mode 100644
index 000000000..8c778d24d
--- /dev/null
+++ b/docs/doc_examples/6eead05dd3b04722ef0ea5644c2e047d.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ total_sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ "t-shirts": {
+ filter: {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ "t-shirt-percentage": {
+ bucket_script: {
+ buckets_path: {
+ tShirtSales: "t-shirts>sales",
+ totalSales: "total_sales",
+ },
+ script: "params.tShirtSales / params.totalSales * 100",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f0389ac52808df23bb6081a1acd4eed.asciidoc b/docs/doc_examples/6f0389ac52808df23bb6081a1acd4eed.asciidoc
new file mode 100644
index 000000000..7ca6b0211
--- /dev/null
+++ b/docs/doc_examples/6f0389ac52808df23bb6081a1acd4eed.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.enableUser({
+ username: "logstash_system",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f07152055e99416deb10e95b428b847.asciidoc b/docs/doc_examples/6f07152055e99416deb10e95b428b847.asciidoc
new file mode 100644
index 000000000..5257c944a
--- /dev/null
+++ b/docs/doc_examples/6f07152055e99416deb10e95b428b847.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "edge_ngram_custom_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ default: {
+ tokenizer: "whitespace",
+ filter: ["3_5_edgegrams"],
+ },
+ },
+ filter: {
+ "3_5_edgegrams": {
+ type: "edge_ngram",
+ min_gram: 3,
+ max_gram: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f34e27481460a95e59ffbacb76bd637.asciidoc b/docs/doc_examples/6f34e27481460a95e59ffbacb76bd637.asciidoc
new file mode 100644
index 000000000..719ffc1b4
--- /dev/null
+++ b/docs/doc_examples/6f34e27481460a95e59ffbacb76bd637.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_analyzer: {
+ char_filter: ["emoticons"],
+ tokenizer: "punctuation",
+ filter: ["lowercase", "english_stop"],
+ },
+ },
+ tokenizer: {
+ punctuation: {
+ type: "pattern",
+ pattern: "[ .,!?]",
+ },
+ },
+ char_filter: {
+ emoticons: {
+ type: "mapping",
+ mappings: [":) => _happy_", ":( => _sad_"],
+ },
+ },
+ filter: {
+ english_stop: {
+ type: "stop",
+ stopwords: "_english_",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_custom_analyzer",
+ text: "I'm a :) person, and you?",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc b/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc
new file mode 100644
index 000000000..26bbeb20a
--- /dev/null
+++ b/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkUpdateApiKeys({
+ body: {
+ ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f48ab7cbb8a4a46d0e9272c07166eaf.asciidoc b/docs/doc_examples/6f48ab7cbb8a4a46d0e9272c07166eaf.asciidoc
new file mode 100644
index 000000000..64d437f6f
--- /dev/null
+++ b/docs/doc_examples/6f48ab7cbb8a4a46d0e9272c07166eaf.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.translate({
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f4cbebfd6d2cee54aa3e7a86a755ef8.asciidoc b/docs/doc_examples/6f4cbebfd6d2cee54aa3e7a86a755ef8.asciidoc
new file mode 100644
index 000000000..f105ce8e3
--- /dev/null
+++ b/docs/doc_examples/6f4cbebfd6d2cee54aa3e7a86a755ef8.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-image-index",
+ size: 3,
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ title: {
+ query: "mountain lake",
+ boost: 1,
+ },
+ },
+ },
+ {
+ knn: {
+ field: "image-vector",
+ query_vector: [-5, 9, -12],
+ k: 10,
+ boost: 2,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc b/docs/doc_examples/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc
new file mode 100644
index 000000000..3287480a9
--- /dev/null
+++ b/docs/doc_examples/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "logs",
+ document: {
+ timestamp: "2015-05-17T18:12:07.613Z",
+ request: "GET index.html",
+ status_code: 404,
+ message: "Error: File not found",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f6d5a4a90e1265822628d4ced963639.asciidoc b/docs/doc_examples/6f6d5a4a90e1265822628d4ced963639.asciidoc
new file mode 100644
index 000000000..674318811
--- /dev/null
+++ b/docs/doc_examples/6f6d5a4a90e1265822628d4ced963639.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ create_date: "2015/09/02",
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/6f842819c50e8490080dd085e0c6aca3.asciidoc b/docs/doc_examples/6f842819c50e8490080dd085e0c6aca3.asciidoc
new file mode 100644
index 000000000..c9537fe0f
--- /dev/null
+++ b/docs/doc_examples/6f842819c50e8490080dd085e0c6aca3.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ size: 0,
+ aggs: {
+ foo_terms: {
+ terms: {
+ field: "foo",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f855bc92b4cc6e6a63f95bce1cb4441.asciidoc b/docs/doc_examples/6f855bc92b4cc6e6a63f95bce1cb4441.asciidoc
new file mode 100644
index 000000000..bbf47db33
--- /dev/null
+++ b/docs/doc_examples/6f855bc92b4cc6e6a63f95bce1cb4441.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.logstash.getPipeline({
+ id: "my_pipeline",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f8a682c908b826ca90cadd9d2f582b4.asciidoc b/docs/doc_examples/6f8a682c908b826ca90cadd9d2f582b4.asciidoc
new file mode 100644
index 000000000..61c814366
--- /dev/null
+++ b/docs/doc_examples/6f8a682c908b826ca90cadd9d2f582b4.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ stored_fields: ["user", "postDate"],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc b/docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc
new file mode 100644
index 000000000..b1295fe7d
--- /dev/null
+++ b/docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.delete({
+ connector_id: "my-connector-id&delete_sync_jobs=true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6fa570ae7039171e2ab722344ec1063f.asciidoc b/docs/doc_examples/6fa570ae7039171e2ab722344ec1063f.asciidoc
new file mode 100644
index 000000000..0e259c87b
--- /dev/null
+++ b/docs/doc_examples/6fa570ae7039171e2ab722344ec1063f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "my-index-000001",
+ fields: "user",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6fbb88f399618e1b47412082062ce2bd.asciidoc b/docs/doc_examples/6fbb88f399618e1b47412082062ce2bd.asciidoc
new file mode 100644
index 000000000..ca9fca0c6
--- /dev/null
+++ b/docs/doc_examples/6fbb88f399618e1b47412082062ce2bd.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_logs",
+ },
+ pivot: {
+ group_by: {
+ timestamp: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "1h",
+ },
+ },
+ },
+ aggregations: {
+ "bytes.max": {
+ max: {
+ field: "bytes",
+ },
+ },
+ top: {
+ top_metrics: {
+ metrics: [
+ {
+ field: "clientip",
+ },
+ {
+ field: "geo.src",
+ },
+ ],
+ sort: {
+ bytes: "desc",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6fbbf40cab0187f544ff7bca31d18d57.asciidoc b/docs/doc_examples/6fbbf40cab0187f544ff7bca31d18d57.asciidoc
new file mode 100644
index 000000000..a8101d857
--- /dev/null
+++ b/docs/doc_examples/6fbbf40cab0187f544ff7bca31d18d57.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "Polygon",
+ coordinates: [
+ [
+ [100, 0],
+ [101, 0],
+ [101, 1],
+ [100, 1],
+ [100, 0],
+ ],
+ [
+ [100.2, 0.2],
+ [100.8, 0.2],
+ [100.8, 0.8],
+ [100.2, 0.8],
+ [100.2, 0.2],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6fc778e9a888b16b937c5c2a7a1ec140.asciidoc b/docs/doc_examples/6fc778e9a888b16b937c5c2a7a1ec140.asciidoc
new file mode 100644
index 000000000..f55316e25
--- /dev/null
+++ b/docs/doc_examples/6fc778e9a888b16b937c5c2a7a1ec140.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchableSnapshots.clearCache({
+ index: "my-index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6fd82baa17a48e09e3d2eed514af7f46.asciidoc b/docs/doc_examples/6fd82baa17a48e09e3d2eed514af7f46.asciidoc
new file mode 100644
index 000000000..42f8f8f12
--- /dev/null
+++ b/docs/doc_examples/6fd82baa17a48e09e3d2eed514af7f46.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "MultiLineString",
+ coordinates: [
+ [
+ [102, 2],
+ [103, 2],
+ [103, 3],
+ [102, 3],
+ ],
+ [
+ [100, 0],
+ [101, 0],
+ [101, 1],
+ [100, 1],
+ ],
+ [
+ [100.2, 0.2],
+ [100.8, 0.2],
+ [100.8, 0.8],
+ [100.2, 0.8],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6fe6c095c6995e0f2214f5f3bc85d74e.asciidoc b/docs/doc_examples/6fe6c095c6995e0f2214f5f3bc85d74e.asciidoc
new file mode 100644
index 000000000..324d41871
--- /dev/null
+++ b/docs/doc_examples/6fe6c095c6995e0f2214f5f3bc85d74e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteDataLifecycle({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/6febf0e6883b23b15ac213abc4bac326.asciidoc b/docs/doc_examples/6febf0e6883b23b15ac213abc4bac326.asciidoc
new file mode 100644
index 000000000..b44743e74
--- /dev/null
+++ b/docs/doc_examples/6febf0e6883b23b15ac213abc4bac326.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "place",
+ suggest: {
+ place_suggestion: {
+ prefix: "tim",
+ completion: {
+ field: "suggest",
+ size: 10,
+ contexts: {
+ location: {
+ lat: 43.662,
+ lon: -79.38,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7011fcdd231804f9c3894154ae2c3fbc.asciidoc b/docs/doc_examples/7011fcdd231804f9c3894154ae2c3fbc.asciidoc
new file mode 100644
index 000000000..ccbea663c
--- /dev/null
+++ b/docs/doc_examples/7011fcdd231804f9c3894154ae2c3fbc.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ "text.tokens": {
+ type: "sparse_vector",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/701f1fffc65e9e51c96aa60261e2eae3.asciidoc b/docs/doc_examples/701f1fffc65e9e51c96aa60261e2eae3.asciidoc
new file mode 100644
index 000000000..64ab745d0
--- /dev/null
+++ b/docs/doc_examples/701f1fffc65e9e51c96aa60261e2eae3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ id: "VuaCfGcBCdbkQm-e5aOx",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7021ddb273a3a00847324d2f670c4c04.asciidoc b/docs/doc_examples/7021ddb273a3a00847324d2f670c4c04.asciidoc
new file mode 100644
index 000000000..c1cc5cbae
--- /dev/null
+++ b/docs/doc_examples/7021ddb273a3a00847324d2f670c4c04.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "image-index",
+ query: {
+ match: {
+ title: {
+ query: "mountain lake",
+ boost: 0.9,
+ },
+ },
+ },
+ knn: [
+ {
+ field: "image-vector",
+ query_vector: [54, 10, -2],
+ k: 5,
+ num_candidates: 50,
+ boost: 0.1,
+ },
+ {
+ field: "title-vector",
+ query_vector: [1, 20, -52, 23, 10],
+ k: 10,
+ num_candidates: 10,
+ boost: 0.5,
+ },
+ ],
+ size: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7067a498bb6c788854a26443a64b843a.asciidoc b/docs/doc_examples/7067a498bb6c788854a26443a64b843a.asciidoc
new file mode 100644
index 000000000..40a3c3ca0
--- /dev/null
+++ b/docs/doc_examples/7067a498bb6c788854a26443a64b843a.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ runtime_mappings: {
+ "amount.signed": {
+ type: "double",
+ script:
+ "\n double amount = doc['amount'].value;\n if (doc['type'].value == 'expense') {\n amount *= -1;\n }\n emit(amount);\n ",
+ },
+ },
+ query: {
+ bool: {
+ filter: {
+ range: {
+ "amount.signed": {
+ lt: 10,
+ },
+ },
+ },
+ },
+ },
+ fields: [
+ {
+ field: "amount.signed",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/708e7ec681be41791f232817a07cda82.asciidoc b/docs/doc_examples/708e7ec681be41791f232817a07cda82.asciidoc
new file mode 100644
index 000000000..3533d112b
--- /dev/null
+++ b/docs/doc_examples/708e7ec681be41791f232817a07cda82.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "snapshot*",
+ size: 2,
+ sort: "name",
+ offset: 2,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/70bbe14bc4d5a5d58e81ab2b02408817.asciidoc b/docs/doc_examples/70bbe14bc4d5a5d58e81ab2b02408817.asciidoc
new file mode 100644
index 000000000..cac8da9a9
--- /dev/null
+++ b/docs/doc_examples/70bbe14bc4d5a5d58e81ab2b02408817.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "users",
+ roles: ["user"],
+ rules: {
+ field: {
+ dn: "cn=John Doe,ou=example,o=com",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/70c736ecb3746dbe839af0e468712805.asciidoc b/docs/doc_examples/70c736ecb3746dbe839af0e468712805.asciidoc
new file mode 100644
index 000000000..7691586b6
--- /dev/null
+++ b/docs/doc_examples/70c736ecb3746dbe839af0e468712805.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.deleteTransform({
+ transform_id: "ecommerce_transform",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/70cc66bf4054ebf0ad4955cb99d9ab80.asciidoc b/docs/doc_examples/70cc66bf4054ebf0ad4955cb99d9ab80.asciidoc
new file mode 100644
index 000000000..ee695268c
--- /dev/null
+++ b/docs/doc_examples/70cc66bf4054ebf0ad4955cb99d9ab80.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateTrainedModelDeployment({
+ model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
+ number_of_allocations: 4,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/70f89dd6b71ea890ad3cf47d83e43344.asciidoc b/docs/doc_examples/70f89dd6b71ea890ad3cf47d83e43344.asciidoc
new file mode 100644
index 000000000..efaf4c5c5
--- /dev/null
+++ b/docs/doc_examples/70f89dd6b71ea890ad3cf47d83e43344.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ description: "My optional pipeline description",
+ processors: [
+ {
+ set: {
+ description: "My optional processor description",
+ field: "my-long-field",
+ value: 10,
+ },
+ },
+ {
+ set: {
+ description: "Set 'my-boolean-field' to true",
+ field: "my-boolean-field",
+ value: true,
+ },
+ },
+ {
+ lowercase: {
+ field: "my-keyword-field",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7106e6317e6368b9863cf64df9c6f0c9.asciidoc b/docs/doc_examples/7106e6317e6368b9863cf64df9c6f0c9.asciidoc
new file mode 100644
index 000000000..5802bc29b
--- /dev/null
+++ b/docs/doc_examples/7106e6317e6368b9863cf64df9c6f0c9.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.putTransform({
+ transform_id: "ecommerce_transform2",
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ },
+ latest: {
+ unique_key: ["customer_id"],
+ sort: "order_date",
+ },
+ description: "Latest order for each customer",
+ dest: {
+ index: "kibana_sample_data_ecommerce_transform2",
+ },
+ frequency: "5m",
+ sync: {
+ time: {
+ field: "order_date",
+ delay: "60s",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/711443504b69d0d296e717c716a223e2.asciidoc b/docs/doc_examples/711443504b69d0d296e717c716a223e2.asciidoc
new file mode 100644
index 000000000..773424205
--- /dev/null
+++ b/docs/doc_examples/711443504b69d0d296e717c716a223e2.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "drivers",
+ query: {
+ nested: {
+ path: "driver",
+ query: {
+ nested: {
+ path: "driver.vehicle",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "driver.vehicle.make": "Powell Motors",
+ },
+ },
+ {
+ match: {
+ "driver.vehicle.model": "Canyonero",
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7148c8512079d378af70302e65502dd2.asciidoc b/docs/doc_examples/7148c8512079d378af70302e65502dd2.asciidoc
new file mode 100644
index 000000000..e2d513793
--- /dev/null
+++ b/docs/doc_examples/7148c8512079d378af70302e65502dd2.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "timeseries-000001",
+ aliases: {
+ timeseries: {
+ is_write_index: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7163346755400594d1dd7e445aa19ff0.asciidoc b/docs/doc_examples/7163346755400594d1dd7e445aa19ff0.asciidoc
new file mode 100644
index 000000000..cbb6b62da
--- /dev/null
+++ b/docs/doc_examples/7163346755400594d1dd7e445aa19ff0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "music",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/719141517d83b7e8e929b347a8d67c9f.asciidoc b/docs/doc_examples/719141517d83b7e8e929b347a8d67c9f.asciidoc
new file mode 100644
index 000000000..358afa030
--- /dev/null
+++ b/docs/doc_examples/719141517d83b7e8e929b347a8d67c9f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.get({
+ index: "kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001",
+ features: "settings",
+ flat_settings: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/71998bb300ac2a58419b0772cdc1c586.asciidoc b/docs/doc_examples/71998bb300ac2a58419b0772cdc1c586.asciidoc
new file mode 100644
index 000000000..2efade53d
--- /dev/null
+++ b/docs/doc_examples/71998bb300ac2a58419b0772cdc1c586.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ versions: {
+ type: "version",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ versions: ["8.0.0-beta1", "8.5.0", "0.90.12", "2.6.1", "1.3.4", "1.3.4"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc b/docs/doc_examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc
new file mode 100644
index 000000000..ccc77f823
--- /dev/null
+++ b/docs/doc_examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.stats({
+ node_id: "node1,node*,master:false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/71de08a2d962c66f0c60677eff23f8d1.asciidoc b/docs/doc_examples/71de08a2d962c66f0c60677eff23f8d1.asciidoc
new file mode 100644
index 000000000..87fdcbfec
--- /dev/null
+++ b/docs/doc_examples/71de08a2d962c66f0c60677eff23f8d1.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ aggs: {
+ price_ranges: {
+ range: {
+ field: "price",
+ keyed: true,
+ ranges: [
+ {
+ key: "cheap",
+ to: 100,
+ },
+ {
+ key: "average",
+ from: 100,
+ to: 200,
+ },
+ {
+ key: "expensive",
+ from: 200,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/71e47a83f632ef159956287bbfe4ca12.asciidoc b/docs/doc_examples/71e47a83f632ef159956287bbfe4ca12.asciidoc
new file mode 100644
index 000000000..c76b1d751
--- /dev/null
+++ b/docs/doc_examples/71e47a83f632ef159956287bbfe4ca12.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "example",
+ query: {
+ shape: {
+ geometry: {
+ shape: {
+ type: "envelope",
+ coordinates: [
+ [1355, 5355],
+ [1400, 5200],
+ ],
+ },
+ relation: "within",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/71fa652ddea811eb3c8bf8c5db21e549.asciidoc b/docs/doc_examples/71fa652ddea811eb3c8bf8c5db21e549.asciidoc
new file mode 100644
index 000000000..559eb3d85
--- /dev/null
+++ b/docs/doc_examples/71fa652ddea811eb3c8bf8c5db21e549.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "analyze_sample",
+ analyzer: "whitespace",
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/722238b4e7b78cdb3c6a986780e7e286.asciidoc b/docs/doc_examples/722238b4e7b78cdb3c6a986780e7e286.asciidoc
new file mode 100644
index 000000000..f2001fb6e
--- /dev/null
+++ b/docs/doc_examples/722238b4e7b78cdb3c6a986780e7e286.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "range_index",
+ size: 0,
+ query: {
+ range: {
+ time_frame: {
+ gte: "2019-11-01",
+ format: "yyyy-MM-dd",
+ },
+ },
+ },
+ aggs: {
+ november_data: {
+ date_histogram: {
+ field: "time_frame",
+ calendar_interval: "day",
+ format: "yyyy-MM-dd",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/726994d8f3793b86628255a797155a52.asciidoc b/docs/doc_examples/726994d8f3793b86628255a797155a52.asciidoc
new file mode 100644
index 000000000..c85f3c379
--- /dev/null
+++ b/docs/doc_examples/726994d8f3793b86628255a797155a52.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.info({
+ node_id: "ingest",
+ filter_path: "nodes.*.ingest.processors",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc b/docs/doc_examples/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc
new file mode 100644
index 000000000..3fe8f1d65
--- /dev/null
+++ b/docs/doc_examples/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ cluster_one: {
+ seeds: ["35.238.149.1:9300"],
+ skip_unavailable: true,
+ },
+ cluster_two: {
+ seeds: ["35.238.149.2:9300"],
+ skip_unavailable: false,
+ },
+ cluster_three: {
+ seeds: ["35.238.149.3:9300"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc b/docs/doc_examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc
new file mode 100644
index 000000000..186d8540d
--- /dev/null
+++ b/docs/doc_examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.start();
+console.log(response);
+----
diff --git a/docs/doc_examples/72b999120785dfba2827268482e9be0a.asciidoc b/docs/doc_examples/72b999120785dfba2827268482e9be0a.asciidoc
new file mode 100644
index 000000000..042a2e3b2
--- /dev/null
+++ b/docs/doc_examples/72b999120785dfba2827268482e9be0a.asciidoc
@@ -0,0 +1,98 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (4.405200 51.222900)",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (2.336389 48.861111)",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (2.327000 48.860000)",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ query: {
+ match: {
+ name: "musée",
+ },
+ },
+ aggs: {
+ viewport: {
+ geo_bounds: {
+ field: "location",
+ wrap_longitude: true,
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/72bae0252b74ff6fd9f0702ff008d84a.asciidoc b/docs/doc_examples/72bae0252b74ff6fd9f0702ff008d84a.asciidoc
new file mode 100644
index 000000000..d46bcd8d4
--- /dev/null
+++ b/docs/doc_examples/72bae0252b74ff6fd9f0702ff008d84a.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "*",
+ sort: "name",
+ from_sort_value: "snapshot_2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/72beebe779a258c225dee7b023e60c52.asciidoc b/docs/doc_examples/72beebe779a258c225dee7b023e60c52.asciidoc
new file mode 100644
index 000000000..261b4ebbb
--- /dev/null
+++ b/docs/doc_examples/72beebe779a258c225dee7b023e60c52.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73250f845738c428246a3ade66a8f54c.asciidoc b/docs/doc_examples/73250f845738c428246a3ade66a8f54c.asciidoc
new file mode 100644
index 000000000..e49b85234
--- /dev/null
+++ b/docs/doc_examples/73250f845738c428246a3ade66a8f54c.asciidoc
@@ -0,0 +1,51 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "exams",
+ refresh: "true",
+ document: {
+ grade: 100,
+ weight: [2, 3],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "exams",
+ refresh: "true",
+ document: {
+ grade: 80,
+ weight: 3,
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "exams",
+ filter_path: "aggregations",
+ size: 0,
+ runtime_mappings: {
+ "weight.combined": {
+ type: "double",
+ script:
+ "\n double s = 0;\n for (double w : doc['weight']) {\n s += w;\n }\n emit(s);\n ",
+ },
+ },
+ aggs: {
+ weighted_grade: {
+ weighted_avg: {
+ value: {
+ script: "doc.grade.value + 1",
+ },
+ weight: {
+ field: "weight.combined",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/734e2b1d1ca84a305240a449738f0eba.asciidoc b/docs/doc_examples/734e2b1d1ca84a305240a449738f0eba.asciidoc
new file mode 100644
index 000000000..0d616a95b
--- /dev/null
+++ b/docs/doc_examples/734e2b1d1ca84a305240a449738f0eba.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.indices({
+ v: "true",
+ index:
+ ".ds-my-data-stream-2022.06.17-000001,kibana_sample_data_flightsh=index,status,health",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73646c12ad33a813ab2280f1dc83500e.asciidoc b/docs/doc_examples/73646c12ad33a813ab2280f1dc83500e.asciidoc
new file mode 100644
index 000000000..e5c2d87bb
--- /dev/null
+++ b/docs/doc_examples/73646c12ad33a813ab2280f1dc83500e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.follow({
+ index: "",
+ wait_for_active_shards: 1,
+ remote_cluster: "",
+ leader_index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/738db420e3ad2a127ea75fb8e5051926.asciidoc b/docs/doc_examples/738db420e3ad2a127ea75fb8e5051926.asciidoc
new file mode 100644
index 000000000..a3947f0ec
--- /dev/null
+++ b/docs/doc_examples/738db420e3ad2a127ea75fb8e5051926.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "last-log-from-clientip",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73b07b24ab2c4cd304a57f9cbda8b863.asciidoc b/docs/doc_examples/73b07b24ab2c4cd304a57f9cbda8b863.asciidoc
new file mode 100644
index 000000000..7f0ee2b39
--- /dev/null
+++ b/docs/doc_examples/73b07b24ab2c4cd304a57f9cbda8b863.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.getBehavioralAnalytics();
+console.log(response);
+----
diff --git a/docs/doc_examples/73be1f93d789264e5b972ddb5991bc66.asciidoc b/docs/doc_examples/73be1f93d789264e5b972ddb5991bc66.asciidoc
new file mode 100644
index 000000000..d5aaaf737
--- /dev/null
+++ b/docs/doc_examples/73be1f93d789264e5b972ddb5991bc66.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.discovery": "DEBUG",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc b/docs/doc_examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc
new file mode 100644
index 000000000..f8d2781a1
--- /dev/null
+++ b/docs/doc_examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.getRollupIndexCaps({
+ index: "sensor_rollup",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73df03be6ee78b10106581dbd7cb39ef.asciidoc b/docs/doc_examples/73df03be6ee78b10106581dbd7cb39ef.asciidoc
new file mode 100644
index 000000000..7b799e7e0
--- /dev/null
+++ b/docs/doc_examples/73df03be6ee78b10106581dbd7cb39ef.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movavg: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.ewma(values, 0.3)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc b/docs/doc_examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc
new file mode 100644
index 000000000..b7156b497
--- /dev/null
+++ b/docs/doc_examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.enable": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73f9271dee9b8539b6aa7e17f323c623.asciidoc b/docs/doc_examples/73f9271dee9b8539b6aa7e17f323c623.asciidoc
new file mode 100644
index 000000000..387c13543
--- /dev/null
+++ b/docs/doc_examples/73f9271dee9b8539b6aa7e17f323c623.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "products",
+ aggs: {
+ genres_and_products: {
+ multi_terms: {
+ terms: [
+ {
+ field: "genre",
+ },
+ {
+ field: "product",
+ },
+ ],
+ order: {
+ total_quantity: "desc",
+ },
+ },
+ aggs: {
+ total_quantity: {
+ sum: {
+ field: "quantity",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/73fa0d6d03cd98ea538fff9e89d99eed.asciidoc b/docs/doc_examples/73fa0d6d03cd98ea538fff9e89d99eed.asciidoc
new file mode 100644
index 000000000..05336a24a
--- /dev/null
+++ b/docs/doc_examples/73fa0d6d03cd98ea538fff9e89d99eed.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getServiceAccounts({
+ namespace: "elastic",
+ service: "fleet-server",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7404c6e809fee5d7eb9678a82a872806.asciidoc b/docs/doc_examples/7404c6e809fee5d7eb9678a82a872806.asciidoc
new file mode 100644
index 000000000..a9a9de6b8
--- /dev/null
+++ b/docs/doc_examples/7404c6e809fee5d7eb9678a82a872806.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ "my-agg-name": {
+ terms: {
+ field: "my-field",
+ },
+ aggs: {
+ "my-sub-agg-name": {
+ avg: {
+ field: "my-other-field",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/741180473ba526219578ad0422f4fe81.asciidoc b/docs/doc_examples/741180473ba526219578ad0422f4fe81.asciidoc
new file mode 100644
index 000000000..8a5484224
--- /dev/null
+++ b/docs/doc_examples/741180473ba526219578ad0422f4fe81.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/my-connector/_features",
+ body: {
+ features: {
+ document_level_security: {
+ enabled: true,
+ },
+ incremental_sync: {
+ enabled: true,
+ },
+ sync_rules: {
+ advanced: {
+ enabled: false,
+ },
+ basic: {
+ enabled: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7429b16221fe741fd31b0584786dd0b0.asciidoc b/docs/doc_examples/7429b16221fe741fd31b0584786dd0b0.asciidoc
new file mode 100644
index 000000000..8f897c69c
--- /dev/null
+++ b/docs/doc_examples/7429b16221fe741fd31b0584786dd0b0.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.inference({
+ task_type: "text_embedding",
+ inference_id: "my-cohere-endpoint",
+ input:
+ "The sky above the port was the color of television tuned to a dead channel.",
+ task_settings: {
+ input_type: "ingest",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc b/docs/doc_examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc
new file mode 100644
index 000000000..c3d68dfcc
--- /dev/null
+++ b/docs/doc_examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "mv",
+ mappings: {
+ properties: {
+ b: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "mv",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ a: 1,
+ b: [2, 2, 1],
+ },
+ {
+ index: {},
+ },
+ {
+ a: 2,
+ b: [1, 1],
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.esql.query({
+ query: "FROM mv | LIMIT 2",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc b/docs/doc_examples/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc
new file mode 100644
index 000000000..c7336a48f
--- /dev/null
+++ b/docs/doc_examples/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ cluster_two: {
+ mode: null,
+ seeds: null,
+ skip_unavailable: null,
+ "transport.compress": null,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc b/docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc
new file mode 100644
index 000000000..a33976eea
--- /dev/null
+++ b/docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ query: {
+ constant_score: {
+ filter: {
+ range: {
+ price: {
+ lte: "500",
+ },
+ },
+ },
+ },
+ },
+ aggs: {
+ prices: {
+ histogram: {
+ field: "price",
+ interval: 50,
+ extended_bounds: {
+ min: 0,
+ max: 500,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/74678f8bbc7e4fc1885719d1cf63ac67.asciidoc b/docs/doc_examples/74678f8bbc7e4fc1885719d1cf63ac67.asciidoc
new file mode 100644
index 000000000..2c9c1ee30
--- /dev/null
+++ b/docs/doc_examples/74678f8bbc7e4fc1885719d1cf63ac67.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ range: {
+ date_range: {
+ field: "date",
+ format: "MM-yyy",
+ ranges: [
+ {
+ from: "01-2015",
+ to: "03-2015",
+ key: "quarter_01",
+ },
+ {
+ from: "03-2015",
+ to: "06-2015",
+ key: "quarter_02",
+ },
+ ],
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/746e0a1cb5984f2672963b363505c7b3.asciidoc b/docs/doc_examples/746e0a1cb5984f2672963b363505c7b3.asciidoc
new file mode 100644
index 000000000..4a55b9ef8
--- /dev/null
+++ b/docs/doc_examples/746e0a1cb5984f2672963b363505c7b3.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ date: {
+ type: "date",
+ format: "strict_date_optional_time||epoch_second",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "example",
+ refresh: "true",
+ document: {
+ date: 1618321898,
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ fields: [
+ {
+ field: "date",
+ },
+ ],
+ _source: false,
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/746e87db7e1e8b5e6b40d8b5b188de42.asciidoc b/docs/doc_examples/746e87db7e1e8b5e6b40d8b5b188de42.asciidoc
new file mode 100644
index 000000000..9dce10243
--- /dev/null
+++ b/docs/doc_examples/746e87db7e1e8b5e6b40d8b5b188de42.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ grades_stats: {
+ stats: {
+ field: "grade",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc b/docs/doc_examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc
new file mode 100644
index 000000000..f48892684
--- /dev/null
+++ b/docs/doc_examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ intervals: {
+ my_text: {
+ match: {
+ query: "hot porridge",
+ max_gaps: 10,
+ filter: {
+ not_containing: {
+ match: {
+ query: "salty",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/747a4b5001423938d7d05399d28f1995.asciidoc b/docs/doc_examples/747a4b5001423938d7d05399d28f1995.asciidoc
new file mode 100644
index 000000000..9b0378abb
--- /dev/null
+++ b/docs/doc_examples/747a4b5001423938d7d05399d28f1995.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "indices.lifecycle.poll_interval": "1m",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc b/docs/doc_examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc
new file mode 100644
index 000000000..335953144
--- /dev/null
+++ b/docs/doc_examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.exists({
+ index: "my-index-000001",
+ id: 0,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/74b13ceb6cda3acaa9e9f58c9e5e2431.asciidoc b/docs/doc_examples/74b13ceb6cda3acaa9e9f58c9e5e2431.asciidoc
new file mode 100644
index 000000000..ef9d24928
--- /dev/null
+++ b/docs/doc_examples/74b13ceb6cda3acaa9e9f58c9e5e2431.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ _meta: {
+ class: "MyApp2::User3",
+ version: {
+ min: "1.3",
+ max: "1.5",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/74b229a6e020113e5749099451979c89.asciidoc b/docs/doc_examples/74b229a6e020113e5749099451979c89.asciidoc
new file mode 100644
index 000000000..b99aa857f
--- /dev/null
+++ b/docs/doc_examples/74b229a6e020113e5749099451979c89.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test-index",
+ query: {
+ nested: {
+ path: "inference_field.inference.chunks",
+ query: {
+ knn: {
+ field: "inference_field.inference.chunks.embeddings",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "my_inference_id",
+ model_text: "mountain lake",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/74da377bccad43da2b0e276c086d26ba.asciidoc b/docs/doc_examples/74da377bccad43da2b0e276c086d26ba.asciidoc
new file mode 100644
index 000000000..6e3a95345
--- /dev/null
+++ b/docs/doc_examples/74da377bccad43da2b0e276c086d26ba.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.info({
+ target: "_all",
+});
+console.log(response);
+
+const response1 = await client.cluster.info({
+ target: "http",
+});
+console.log(response1);
+
+const response2 = await client.cluster.info({
+ target: "ingest",
+});
+console.log(response2);
+
+const response3 = await client.cluster.info({
+ target: "thread_pool",
+});
+console.log(response3);
+
+const response4 = await client.cluster.info({
+ target: "script",
+});
+console.log(response4);
+
+const response5 = await client.cluster.info({
+ target: "http,ingest",
+});
+console.log(response5);
+----
diff --git a/docs/doc_examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc b/docs/doc_examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc
new file mode 100644
index 000000000..8a82d0135
--- /dev/null
+++ b/docs/doc_examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.reroute({
+ commands: [
+ {
+ allocate_empty_primary: {
+ index: "my-index",
+ shard: 0,
+ node: "my-node",
+ accept_data_loss: "true",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7594a9a85c8511701e281974cbc253e1.asciidoc b/docs/doc_examples/7594a9a85c8511701e281974cbc253e1.asciidoc
new file mode 100644
index 000000000..3c4dca864
--- /dev/null
+++ b/docs/doc_examples/7594a9a85c8511701e281974cbc253e1.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "amazon_bedrock_embeddings",
+ inference_config: {
+ service: "amazonbedrock",
+ service_settings: {
+ access_key: "",
+ secret_key: "",
+ region: "",
+ provider: "",
+ model: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/75957a7d1b67e3d47899c5f18b32cb61.asciidoc b/docs/doc_examples/75957a7d1b67e3d47899c5f18b32cb61.asciidoc
new file mode 100644
index 000000000..0ec4dd0eb
--- /dev/null
+++ b/docs/doc_examples/75957a7d1b67e3d47899c5f18b32cb61.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.closeJob({
+ job_id: "low_request_rate",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/75aba7b1d3a22dce62f26b8b1e6bee58.asciidoc b/docs/doc_examples/75aba7b1d3a22dce62f26b8b1e6bee58.asciidoc
new file mode 100644
index 000000000..d60a21fe9
--- /dev/null
+++ b/docs/doc_examples/75aba7b1d3a22dce62f26b8b1e6bee58.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ explain: "true",
+ query: {
+ query_string: {
+ query: "@timestamp:foo",
+ lenient: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/75c347b181112d2c4538c01ade903afe.asciidoc b/docs/doc_examples/75c347b181112d2c4538c01ade903afe.asciidoc
new file mode 100644
index 000000000..2fbf4fba5
--- /dev/null
+++ b/docs/doc_examples/75c347b181112d2c4538c01ade903afe.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ rewrite: "true",
+ query: {
+ match: {
+ "user.id": {
+ query: "kimchy",
+ fuzziness: "auto",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/75e13a00f0909c955031ff62acc14a79.asciidoc b/docs/doc_examples/75e13a00f0909c955031ff62acc14a79.asciidoc
new file mode 100644
index 000000000..2f6f4225f
--- /dev/null
+++ b/docs/doc_examples/75e13a00f0909c955031ff62acc14a79.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "GET /search",
+ },
+ },
+ collapse: {
+ field: "user.id",
+ },
+ sort: [
+ {
+ "http.response.bytes": {
+ order: "desc",
+ },
+ },
+ ],
+ from: 0,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc b/docs/doc_examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc
new file mode 100644
index 000000000..5b9aad331
--- /dev/null
+++ b/docs/doc_examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "transactions",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ type: "sale",
+ amount: 80,
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ type: "cost",
+ amount: 10,
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ type: "cost",
+ amount: 30,
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ type: "sale",
+ amount: 130,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc b/docs/doc_examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc
new file mode 100644
index 000000000..fe5240085
--- /dev/null
+++ b/docs/doc_examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.rollupSearch({
+ index: "sensor_rollup",
+ size: 0,
+ aggregations: {
+ avg_temperature: {
+ avg: {
+ field: "temperature",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc b/docs/doc_examples/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc
new file mode 100644
index 000000000..0b3e61686
--- /dev/null
+++ b/docs/doc_examples/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "k9s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/76448aaaaa2c352bb6e09d2f83a3fbb3.asciidoc b/docs/doc_examples/76448aaaaa2c352bb6e09d2f83a3fbb3.asciidoc
new file mode 100644
index 000000000..de1d5548b
--- /dev/null
+++ b/docs/doc_examples/76448aaaaa2c352bb6e09d2f83a3fbb3.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "letter",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7659f2f2b0fbe8584b855a01638b95ed.asciidoc b/docs/doc_examples/7659f2f2b0fbe8584b855a01638b95ed.asciidoc
new file mode 100644
index 000000000..b0ad2e9ce
--- /dev/null
+++ b/docs/doc_examples/7659f2f2b0fbe8584b855a01638b95ed.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ user_name: {
+ terms: {
+ field: "user_name",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/765c9c8b40b67a42121648045dbf10fb.asciidoc b/docs/doc_examples/765c9c8b40b67a42121648045dbf10fb.asciidoc
new file mode 100644
index 000000000..4a4cc035f
--- /dev/null
+++ b/docs/doc_examples/765c9c8b40b67a42121648045dbf10fb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ filter_path: "nodes.*.jvm.mem.pools.old",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/766cfc1c9fcd2c186e965761ceb2c07d.asciidoc b/docs/doc_examples/766cfc1c9fcd2c186e965761ceb2c07d.asciidoc
new file mode 100644
index 000000000..a5adb3692
--- /dev/null
+++ b/docs/doc_examples/766cfc1c9fcd2c186e965761ceb2c07d.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ number_of_replicas: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/769f75829a8e6670aa4cf83d0d737046.asciidoc b/docs/doc_examples/769f75829a8e6670aa4cf83d0d737046.asciidoc
new file mode 100644
index 000000000..4434f1c64
--- /dev/null
+++ b/docs/doc_examples/769f75829a8e6670aa4cf83d0d737046.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T00:30:00Z",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T01:30:00Z",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T02:30:00Z",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ by_day: {
+ auto_date_histogram: {
+ field: "date",
+ buckets: 3,
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/76b279835936ee4b546a171c671c3cd7.asciidoc b/docs/doc_examples/76b279835936ee4b546a171c671c3cd7.asciidoc
new file mode 100644
index 000000000..f957fef1c
--- /dev/null
+++ b/docs/doc_examples/76b279835936ee4b546a171c671c3cd7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["cjk_width"],
+ text: "シーサイドライナー",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/76bc87c2592864152768687c2963d1d1.asciidoc b/docs/doc_examples/76bc87c2592864152768687c2963d1d1.asciidoc
new file mode 100644
index 000000000..0fb78415d
--- /dev/null
+++ b/docs/doc_examples/76bc87c2592864152768687c2963d1d1.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.updateApiKey({
+ id: "VuaCfGcBCdbkQm-e5aOx",
+ role_descriptors: {
+ "role-a": {
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["write"],
+ },
+ ],
+ },
+ },
+ metadata: {
+ environment: {
+ level: 2,
+ trusted: true,
+ tags: ["production"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/76c167d8ab305cb43b594f140c902dfe.asciidoc b/docs/doc_examples/76c167d8ab305cb43b594f140c902dfe.asciidoc
new file mode 100644
index 000000000..91593ace6
--- /dev/null
+++ b/docs/doc_examples/76c167d8ab305cb43b594f140c902dfe.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shrink({
+ index: "my_source_index",
+ target: "my_target_index",
+ settings: {
+ "index.number_of_replicas": 1,
+ "index.number_of_shards": 1,
+ "index.codec": "best_compression",
+ },
+ aliases: {
+ my_search_indices: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc b/docs/doc_examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc
new file mode 100644
index 000000000..b40a8f8d9
--- /dev/null
+++ b/docs/doc_examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ operations: [
+ {
+ index: {
+ _index: "amazon-reviews",
+ _id: "2",
+ },
+ },
+ {
+ review_text: "This product is amazing! I love it.",
+ review_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8],
+ },
+ {
+ index: {
+ _index: "amazon-reviews",
+ _id: "3",
+ },
+ },
+ {
+ review_text: "This product is terrible. I hate it.",
+ review_vector: [0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
+ },
+ {
+ index: {
+ _index: "amazon-reviews",
+ _id: "4",
+ },
+ },
+ {
+ review_text: "This product is great. I can do anything with it.",
+ review_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8],
+ },
+ {
+ index: {
+ _index: "amazon-reviews",
+ _id: "5",
+ },
+ },
+ {
+ review_text:
+ "This product has ruined my life and the lives of my family and friends.",
+ review_vector: [0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/76dbdd0b2bd48c3c6b1a8d81e23bafd6.asciidoc b/docs/doc_examples/76dbdd0b2bd48c3c6b1a8d81e23bafd6.asciidoc
new file mode 100644
index 000000000..8d065bde7
--- /dev/null
+++ b/docs/doc_examples/76dbdd0b2bd48c3c6b1a8d81e23bafd6.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "standard",
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc b/docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc
new file mode 100644
index 000000000..ab4d1fc80
--- /dev/null
+++ b/docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ {
+ text_similarity_reranker: {
+ retriever: {
+ standard: {
+ query: {
+ term: {
+ topic: "ai",
+ },
+ },
+ },
+ },
+ field: "text",
+ inference_id: "my-rerank-model",
+ inference_text:
+ "Can I use generative AI to identify user intent and improve search relevance?",
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc b/docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc
new file mode 100644
index 000000000..9bd1c1eea
--- /dev/null
+++ b/docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ match: {
+ description: {
+ query: "fluffy pancakes",
+ operator: "and",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7709a48020a6cefbbe547fb944541cdb.asciidoc b/docs/doc_examples/7709a48020a6cefbbe547fb944541cdb.asciidoc
new file mode 100644
index 000000000..d657a9e99
--- /dev/null
+++ b/docs/doc_examples/7709a48020a6cefbbe547fb944541cdb.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-bit-vectors",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ my_vector: [127, -127, 0, 1, 42],
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ my_vector: "8100012a7f",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7741a04e7e621c528cd72848d875776d.asciidoc b/docs/doc_examples/7741a04e7e621c528cd72848d875776d.asciidoc
new file mode 100644
index 000000000..d09d2747f
--- /dev/null
+++ b/docs/doc_examples/7741a04e7e621c528cd72848d875776d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.createDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77447e2966708e92f5e219d43ac3f00d.asciidoc b/docs/doc_examples/77447e2966708e92f5e219d43ac3f00d.asciidoc
new file mode 100644
index 000000000..74f0318e5
--- /dev/null
+++ b/docs/doc_examples/77447e2966708e92f5e219d43ac3f00d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ actions: "*reindex",
+ wait_for_completion: "true",
+ timeout: "10s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/774bfde8793dc4927f7cad2dd91c5b5f.asciidoc b/docs/doc_examples/774bfde8793dc4927f7cad2dd91c5b5f.asciidoc
new file mode 100644
index 000000000..6334c10b3
--- /dev/null
+++ b/docs/doc_examples/774bfde8793dc4927f7cad2dd91c5b5f.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.msearchTemplate({
+ index: "my-index",
+ search_templates: [
+ {},
+ {
+ id: "my-search-template",
+ params: {
+ query_string: "hello world",
+ from: 0,
+ size: 10,
+ },
+ },
+ {},
+ {
+ id: "my-other-search-template",
+ params: {
+ query_type: "match_all",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc b/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc
new file mode 100644
index 000000000..107aebead
--- /dev/null
+++ b/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.textStructure.findMessageStructure({
+ body: {
+ messages: [
+ "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
+ "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]",
+ "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]",
+ "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]",
+ "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]",
+ "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]",
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]",
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]",
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]",
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]",
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]",
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]",
+ "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]",
+ "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]",
+ "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]",
+ "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled",
+ "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled",
+ "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled",
+ "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]",
+ "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]",
+ "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized",
+ "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...",
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7752b677825523bfb0c38ad9325a6d47.asciidoc b/docs/doc_examples/7752b677825523bfb0c38ad9325a6d47.asciidoc
new file mode 100644
index 000000000..f6a5082a7
--- /dev/null
+++ b/docs/doc_examples/7752b677825523bfb0c38ad9325a6d47.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.delete({
+ connector_id: "another-connector",
+ delete_sync_jobs: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc b/docs/doc_examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc
new file mode 100644
index 000000000..4cb267864
--- /dev/null
+++ b/docs/doc_examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "model2",
+ docs: [
+ {
+ text_field: "The movie was awesome!!",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7777326c6052fee28061e5b82540aedc.asciidoc b/docs/doc_examples/7777326c6052fee28061e5b82540aedc.asciidoc
new file mode 100644
index 000000000..52190b90d
--- /dev/null
+++ b/docs/doc_examples/7777326c6052fee28061e5b82540aedc.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ grade_percentiles: {
+ percentiles: {
+ field: "grade",
+ missing: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7781b13b0ffff6026d10c4e3ab4a3a51.asciidoc b/docs/doc_examples/7781b13b0ffff6026d10c4e3ab4a3a51.asciidoc
new file mode 100644
index 000000000..730b79191
--- /dev/null
+++ b/docs/doc_examples/7781b13b0ffff6026d10c4e3ab4a3a51.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.putBehavioralAnalytics({
+ name: "my_analytics_collection",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77828fcaecc3f058c48b955928198ff6.asciidoc b/docs/doc_examples/77828fcaecc3f058c48b955928198ff6.asciidoc
new file mode 100644
index 000000000..6e2fce72a
--- /dev/null
+++ b/docs/doc_examples/77828fcaecc3f058c48b955928198ff6.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ description: "parse multiple patterns",
+ processors: [
+ {
+ grok: {
+ field: "message",
+ patterns: ["%{FAVORITE_DOG:pet}", "%{FAVORITE_CAT:pet}"],
+ pattern_definitions: {
+ FAVORITE_DOG: "beagle",
+ FAVORITE_CAT: "burmese",
+ },
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ message: "I love burmese cats!",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77b90f6787195767b6da60d8532714b4.asciidoc b/docs/doc_examples/77b90f6787195767b6da60d8532714b4.asciidoc
new file mode 100644
index 000000000..08570d5c6
--- /dev/null
+++ b/docs/doc_examples/77b90f6787195767b6da60d8532714b4.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "azure_openai_embeddings",
+ inference_config: {
+ service: "azureopenai",
+ service_settings: {
+ api_key: "",
+ resource_name: "",
+ deployment_id: "",
+ api_version: "2024-02-01",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77c099c97ea6911e2dd6e996da7dcca0.asciidoc b/docs/doc_examples/77c099c97ea6911e2dd6e996da7dcca0.asciidoc
new file mode 100644
index 000000000..921f2ca66
--- /dev/null
+++ b/docs/doc_examples/77c099c97ea6911e2dd6e996da7dcca0.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.hotThreads();
+console.log(response);
+
+const response1 = await client.nodes.hotThreads({
+ node_id: "nodeId1,nodeId2",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/77c50f982906718ecc59aa708aed728f.asciidoc b/docs/doc_examples/77c50f982906718ecc59aa708aed728f.asciidoc
new file mode 100644
index 000000000..30b9ef4e8
--- /dev/null
+++ b/docs/doc_examples/77c50f982906718ecc59aa708aed728f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "my-index-000001",
+ id: 1,
+ script: {
+ source: "ctx._source.counter += params.count",
+ lang: "painless",
+ params: {
+ count: 4,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77ca1a3193f75651e0bf9e8fe5227a04.asciidoc b/docs/doc_examples/77ca1a3193f75651e0bf9e8fe5227a04.asciidoc
new file mode 100644
index 000000000..1a9c3ccc7
--- /dev/null
+++ b/docs/doc_examples/77ca1a3193f75651e0bf9e8fe5227a04.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getModelSnapshotUpgradeStats({
+ job_id: "low_request_rate",
+ snapshot_id: "_all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc b/docs/doc_examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc
new file mode 100644
index 000000000..ce23498c5
--- /dev/null
+++ b/docs/doc_examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc
@@ -0,0 +1,68 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:30:17-05:00",
+ message:
+ '40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:30:53-05:00",
+ message:
+ '232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:12-05:00",
+ message:
+ '26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:19-05:00",
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:22-05:00",
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:27-05:00",
+ message:
+ '252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:28-05:00",
+ message: "not a valid apache log",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/77e3dcd87d2b2c8e6ec842462b02df1f.asciidoc b/docs/doc_examples/77e3dcd87d2b2c8e6ec842462b02df1f.asciidoc
new file mode 100644
index 000000000..12eb887d4
--- /dev/null
+++ b/docs/doc_examples/77e3dcd87d2b2c8e6ec842462b02df1f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clone({
+ index: "my-index-000001",
+ target: "cloned-my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc b/docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc
new file mode 100644
index 000000000..5151bb769
--- /dev/null
+++ b/docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query:
+ "(information retrieval) OR (artificial intelligence)",
+ default_field: "text",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ field: "text",
+ inference_id: "my-rerank-model",
+ inference_text:
+ "What are the state of the art applications of AI in information retrieval?",
+ },
+ },
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc b/docs/doc_examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc
new file mode 100644
index 000000000..c20499d5f
--- /dev/null
+++ b/docs/doc_examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.aliases({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/783c4fa5351a242364210fc32496beb2.asciidoc b/docs/doc_examples/783c4fa5351a242364210fc32496beb2.asciidoc
new file mode 100644
index 000000000..932715a9c
--- /dev/null
+++ b/docs/doc_examples/783c4fa5351a242364210fc32496beb2.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "products",
+ id: 1567,
+ if_seq_no: 362,
+ if_primary_term: 2,
+ document: {
+ product: "r2d2",
+ details: "A resourceful astromech droid",
+ tags: ["droid"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7841b65a3bb880ed66cec453925a50cf.asciidoc b/docs/doc_examples/7841b65a3bb880ed66cec453925a50cf.asciidoc
new file mode 100644
index 000000000..672d5b18e
--- /dev/null
+++ b/docs/doc_examples/7841b65a3bb880ed66cec453925a50cf.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001,my-index-000002",
+ query: {
+ match_all: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7846974b47a3eab1832a475663d23ad9.asciidoc b/docs/doc_examples/7846974b47a3eab1832a475663d23ad9.asciidoc
new file mode 100644
index 000000000..c9eeee3af
--- /dev/null
+++ b/docs/doc_examples/7846974b47a3eab1832a475663d23ad9.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 10000,
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+ pit: {
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+ keep_alive: "1m",
+ },
+ sort: [
+ {
+ "@timestamp": {
+ order: "asc",
+ format: "strict_date_optional_time_nanos",
+ },
+ },
+ ],
+ search_after: ["2021-05-20T05:30:04.832Z", 4294967298],
+ track_total_hits: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7885ca9d7c61050095288eef6bc6cca9.asciidoc b/docs/doc_examples/7885ca9d7c61050095288eef6bc6cca9.asciidoc
new file mode 100644
index 000000000..08547635f
--- /dev/null
+++ b/docs/doc_examples/7885ca9d7c61050095288eef6bc6cca9.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "jwt8_users",
+ refresh: "true",
+ roles: ["user"],
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "jwt8",
+ },
+ },
+ {
+ field: {
+ username: "principalname1",
+ },
+ },
+ ],
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7888c509774a2abfe82ca370c43d8789.asciidoc b/docs/doc_examples/7888c509774a2abfe82ca370c43d8789.asciidoc
new file mode 100644
index 000000000..d4e0c4db6
--- /dev/null
+++ b/docs/doc_examples/7888c509774a2abfe82ca370c43d8789.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "cohere-embeddings",
+ pipeline: "cohere_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/78c4035e4fbf6851140660f6ed2a1fa5.asciidoc b/docs/doc_examples/78c4035e4fbf6851140660f6ed2a1fa5.asciidoc
new file mode 100644
index 000000000..2838ef1fb
--- /dev/null
+++ b/docs/doc_examples/78c4035e4fbf6851140660f6ed2a1fa5.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats();
+console.log(response);
+----
diff --git a/docs/doc_examples/78c96113ae4ed0054e581b17542528a7.asciidoc b/docs/doc_examples/78c96113ae4ed0054e581b17542528a7.asciidoc
new file mode 100644
index 000000000..8cb7ac484
--- /dev/null
+++ b/docs/doc_examples/78c96113ae4ed0054e581b17542528a7.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "source",
+ query: {
+ match: {
+ company: "cat",
+ },
+ },
+ },
+ dest: {
+ index: "dest",
+ routing: "=cat",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc b/docs/doc_examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc
new file mode 100644
index 000000000..3c6cc46c4
--- /dev/null
+++ b/docs/doc_examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ remove: {
+ index: "index1",
+ alias: "logs-non-existing",
+ },
+ },
+ {
+ add: {
+ index: "index2",
+ alias: "logs-non-existing",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/790c49fe2ec638e5e8db51a9236bba35.asciidoc b/docs/doc_examples/790c49fe2ec638e5e8db51a9236bba35.asciidoc
new file mode 100644
index 000000000..47e4a08cd
--- /dev/null
+++ b/docs/doc_examples/790c49fe2ec638e5e8db51a9236bba35.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations,my_geoshapes",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: {
+ lat: 40.73,
+ lon: -74.1,
+ },
+ bottom_right: {
+ lat: 40.01,
+ lon: -71.12,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7965d4dbafdc7ca9e1ee6759939dd2e8.asciidoc b/docs/doc_examples/7965d4dbafdc7ca9e1ee6759939dd2e8.asciidoc
new file mode 100644
index 000000000..639870304
--- /dev/null
+++ b/docs/doc_examples/7965d4dbafdc7ca9e1ee6759939dd2e8.asciidoc
@@ -0,0 +1,80 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_errors",
+ metadata: {
+ color: "red",
+ },
+ trigger: {
+ schedule: {
+ interval: "5m",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: "log-events",
+ body: {
+ size: 0,
+ query: {
+ match: {
+ status: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 5,
+ },
+ },
+ },
+ transform: {
+ search: {
+ request: {
+ indices: "log-events",
+ body: {
+ query: {
+ match: {
+ status: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ actions: {
+ my_webhook: {
+ webhook: {
+ method: "POST",
+ host: "mylisteninghost",
+ port: 9200,
+ path: "/{{watch_id}}",
+ body: "Encountered {{ctx.payload.hits.total}} errors",
+ },
+ },
+ email_administrator: {
+ email: {
+ to: "sys.admino@host.domain",
+ subject: "Encountered {{ctx.payload.hits.total}} errors",
+ body: "Too many error in the system, see attached data",
+ attachments: {
+ attached_data: {
+ data: {
+ format: "json",
+ },
+ },
+ },
+ priority: "high",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79b43a1bf02fb5b38f54b8d5aa5dab53.asciidoc b/docs/doc_examples/79b43a1bf02fb5b38f54b8d5aa5dab53.asciidoc
new file mode 100644
index 000000000..db825c446
--- /dev/null
+++ b/docs/doc_examples/79b43a1bf02fb5b38f54b8d5aa5dab53.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ auto_date_histogram: {
+ field: "date",
+ buckets: 5,
+ format: "yyyy-MM-dd",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79bf91ace935d095d8e44b3ef3fe2efa.asciidoc b/docs/doc_examples/79bf91ace935d095d8e44b3ef3fe2efa.asciidoc
new file mode 100644
index 000000000..91e3d5e2d
--- /dev/null
+++ b/docs/doc_examples/79bf91ace935d095d8e44b3ef3fe2efa.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ flat_settings: "true",
+ include_defaults: "true",
+});
+console.log(response);
+
+const response1 = await client.cluster.getSettings({
+ flat_settings: "true",
+ include_defaults: "true",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/79cb85efd5e4c435e73b253cb9feabb1.asciidoc b/docs/doc_examples/79cb85efd5e4c435e73b253cb9feabb1.asciidoc
new file mode 100644
index 000000000..359f35a94
--- /dev/null
+++ b/docs/doc_examples/79cb85efd5e4c435e73b253cb9feabb1.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ runtime_mappings: {
+ "http.response": {
+ type: "long",
+ script:
+ '\n String response=dissect(\'%{clientip} %{ident} %{auth} [%{@timestamp}] "%{verb} %{request} HTTP/%{httpversion}" %{response} %{size}\').extract(doc["message"].value)?.response;\n if (response != null) emit(Integer.parseInt(response));\n ',
+ },
+ },
+ query: {
+ match: {
+ "http.response": "304",
+ },
+ },
+ fields: ["http.response"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc b/docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc
new file mode 100644
index 000000000..60583c320
--- /dev/null
+++ b/docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "my-elastic-rerank",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ model_id: ".rerank-v1",
+ num_threads: 1,
+ adaptive_allocations: {
+ enabled: true,
+ min_number_of_allocations: 1,
+ max_number_of_allocations: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79e053326a3a8eec828523a035393f66.asciidoc b/docs/doc_examples/79e053326a3a8eec828523a035393f66.asciidoc
new file mode 100644
index 000000000..8795c99d4
--- /dev/null
+++ b/docs/doc_examples/79e053326a3a8eec828523a035393f66.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.delete({
+ index: ".ds-my-data-stream-2099.03.08-000003",
+ id: "bfspvnIBr7VVZlfp2lqX",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc b/docs/doc_examples/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc
new file mode 100644
index 000000000..65de39045
--- /dev/null
+++ b/docs/doc_examples/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "LINESTRING (-77.03653 38.897676, -77.009051 38.889939)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79f33e05b203eb46eef7958fbc95ef77.asciidoc b/docs/doc_examples/79f33e05b203eb46eef7958fbc95ef77.asciidoc
new file mode 100644
index 000000000..ad764d327
--- /dev/null
+++ b/docs/doc_examples/79f33e05b203eb46eef7958fbc95ef77.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.getAutoFollowPattern({
+ name: "my_auto_follow_pattern",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/79feb4a0c0a21b7015a52f9736cd4683.asciidoc b/docs/doc_examples/79feb4a0c0a21b7015a52f9736cd4683.asciidoc
new file mode 100644
index 000000000..8f6ef79f5
--- /dev/null
+++ b/docs/doc_examples/79feb4a0c0a21b7015a52f9736cd4683.asciidoc
@@ -0,0 +1,69 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ comments: {
+ type: "nested",
+ properties: {
+ votes: {
+ type: "nested",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 1,
+ refresh: "true",
+ document: {
+ title: "Test title",
+ comments: [
+ {
+ author: "kimchy",
+ text: "comment text",
+ votes: [],
+ },
+ {
+ author: "nik9000",
+ text: "words words words",
+ votes: [
+ {
+ value: 1,
+ voter: "kimchy",
+ },
+ {
+ value: -1,
+ voter: "other",
+ },
+ ],
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "test",
+ query: {
+ nested: {
+ path: "comments.votes",
+ query: {
+ match: {
+ "comments.votes.voter": "kimchy",
+ },
+ },
+ inner_hits: {},
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc b/docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc
new file mode 100644
index 000000000..13de04136
--- /dev/null
+++ b/docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-metrics",
+ index_patterns: ["metrics-mymetrics-*"],
+ priority: 200,
+ data_stream: {},
+ template: {
+ settings: {
+ "index.mode": "time_series",
+ },
+ mappings: {
+ properties: {
+ attributes: {
+ type: "passthrough",
+ priority: 10,
+ time_series_dimension: true,
+ properties: {
+ "host.name": {
+ type: "keyword",
+ },
+ },
+ },
+ cpu: {
+ type: "integer",
+ time_series_metric: "counter",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics-mymetrics-test",
+ document: {
+ "@timestamp": "2020-01-01T00:00:00.000Z",
+ attributes: {
+ "host.name": "foo",
+ zone: "bar",
+ },
+ cpu: 10,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7a0c633a67244e9703344d036e584d95.asciidoc b/docs/doc_examples/7a0c633a67244e9703344d036e584d95.asciidoc
new file mode 100644
index 000000000..e117ad484
--- /dev/null
+++ b/docs/doc_examples/7a0c633a67244e9703344d036e584d95.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.enableUserProfile({
+ uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc b/docs/doc_examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc
new file mode 100644
index 000000000..2da76ddb9
--- /dev/null
+++ b/docs/doc_examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc
@@ -0,0 +1,54 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "ip_location",
+ refresh: "true",
+ document: {
+ ip: "192.168.1.1",
+ country: "Canada",
+ city: "Montreal",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "logs",
+ id: 1,
+ refresh: "true",
+ document: {
+ host: "192.168.1.1",
+ message: "the first message",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "logs",
+ id: 2,
+ refresh: "true",
+ document: {
+ host: "192.168.1.2",
+ message: "the second message",
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "logs",
+ runtime_mappings: {
+ location: {
+ type: "lookup",
+ target_index: "ip_location",
+ input_field: "host",
+ target_field: "ip",
+ fetch_fields: ["country", "city"],
+ },
+ },
+ fields: ["host", "message", "location"],
+ _source: false,
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/7a23a385a63c87cab58fd494870450fd.asciidoc b/docs/doc_examples/7a23a385a63c87cab58fd494870450fd.asciidoc
new file mode 100644
index 000000000..3b2ace07c
--- /dev/null
+++ b/docs/doc_examples/7a23a385a63c87cab58fd494870450fd.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping4",
+ roles: ["superuser"],
+ enabled: true,
+ rules: {
+ any: [
+ {
+ field: {
+ username: "esadmin",
+ },
+ },
+ {
+ field: {
+ groups: "cn=admins,dc=example,dc=com",
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc b/docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc
new file mode 100644
index 000000000..a289078cb
--- /dev/null
+++ b/docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc
@@ -0,0 +1,50 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-api-key",
+ role_descriptors: {
+ "role-source1": {
+ indices: [
+ {
+ names: ["source1"],
+ privileges: ["read"],
+ query: {
+ template: {
+ params: {
+ access_control: [
+ "example.user@example.com",
+ "source1-user-group",
+ ],
+ },
+ },
+ source: "...",
+ },
+ },
+ ],
+ },
+ "role-source2": {
+ indices: [
+ {
+ names: ["source2"],
+ privileges: ["read"],
+ query: {
+ template: {
+ params: {
+ access_control: [
+ "example.user@example.com",
+ "source2-user-group",
+ ],
+ },
+ },
+ source: "...",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a2b9a7b2b6553a48bd4db60a939c0fc.asciidoc b/docs/doc_examples/7a2b9a7b2b6553a48bd4db60a939c0fc.asciidoc
new file mode 100644
index 000000000..d368a4e1d
--- /dev/null
+++ b/docs/doc_examples/7a2b9a7b2b6553a48bd4db60a939c0fc.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ query: {
+ match: {
+ body: {
+ query: "miss bicycl",
+ analyzer: "whitespace",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc b/docs/doc_examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc
new file mode 100644
index 000000000..63fb1f69a
--- /dev/null
+++ b/docs/doc_examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000003",
+ mappings: {
+ properties: {
+ inference_field: {
+ type: "semantic_text",
+ inference_id: "my-elser-endpoint-for-ingest",
+ search_inference_id: "my-elser-endpoint-for-search",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a3a7fbd81e5050b42e8c1eca26c7c1d.asciidoc b/docs/doc_examples/7a3a7fbd81e5050b42e8c1eca26c7c1d.asciidoc
new file mode 100644
index 000000000..7470631a7
--- /dev/null
+++ b/docs/doc_examples/7a3a7fbd81e5050b42e8c1eca26c7c1d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.delete({
+ id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a8de5606f283f4ef171b015eef6befa.asciidoc b/docs/doc_examples/7a8de5606f283f4ef171b015eef6befa.asciidoc
new file mode 100644
index 000000000..bd6e331e5
--- /dev/null
+++ b/docs/doc_examples/7a8de5606f283f4ef171b015eef6befa.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ metric: "search",
+ groups: "group1,group2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7a987cd13383bdc990155d7bd5fb221e.asciidoc b/docs/doc_examples/7a987cd13383bdc990155d7bd5fb221e.asciidoc
new file mode 100644
index 000000000..7c80d271b
--- /dev/null
+++ b/docs/doc_examples/7a987cd13383bdc990155d7bd5fb221e.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role5",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["*"],
+ except: ["customer.handle"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7ab968a61bb0783f563dd6d29b253901.asciidoc b/docs/doc_examples/7ab968a61bb0783f563dd6d29b253901.asciidoc
new file mode 100644
index 000000000..fbb338d57
--- /dev/null
+++ b/docs/doc_examples/7ab968a61bb0783f563dd6d29b253901.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "catalan_example",
+ settings: {
+ analysis: {
+ filter: {
+ catalan_elision: {
+ type: "elision",
+ articles: ["d", "l", "m", "n", "s", "t"],
+ articles_case: true,
+ },
+ catalan_stop: {
+ type: "stop",
+ stopwords: "_catalan_",
+ },
+ catalan_keywords: {
+ type: "keyword_marker",
+ keywords: ["example"],
+ },
+ catalan_stemmer: {
+ type: "stemmer",
+ language: "catalan",
+ },
+ },
+ analyzer: {
+ rebuilt_catalan: {
+ tokenizer: "standard",
+ filter: [
+ "catalan_elision",
+ "lowercase",
+ "catalan_stop",
+ "catalan_keywords",
+ "catalan_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc b/docs/doc_examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc
new file mode 100644
index 000000000..613941fde
--- /dev/null
+++ b/docs/doc_examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ conflicts: "proceed",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc b/docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc
new file mode 100644
index 000000000..838cdbbbd
--- /dev/null
+++ b/docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "music-connector",
+ role_descriptors: {
+ "music-connector-role": {
+ cluster: ["monitor", "manage_connector"],
+ indices: [
+ {
+ names: ["music", ".search-acl-filter-music", ".elastic-connectors*"],
+ privileges: ["all"],
+ allow_restricted_indices: false,
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7b3e913368e96eaa6e22e0d03c81310e.asciidoc b/docs/doc_examples/7b3e913368e96eaa6e22e0d03c81310e.asciidoc
new file mode 100644
index 000000000..098cad713
--- /dev/null
+++ b/docs/doc_examples/7b3e913368e96eaa6e22e0d03c81310e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.store.type": "hybridfs",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7b3f255d28ce5b46d111402b96b41351.asciidoc b/docs/doc_examples/7b3f255d28ce5b46d111402b96b41351.asciidoc
new file mode 100644
index 000000000..e563de4f6
--- /dev/null
+++ b/docs/doc_examples/7b3f255d28ce5b46d111402b96b41351.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "admin_user",
+ refresh: "true",
+ password: "l0ng-r4nd0m-p@ssw0rd",
+ roles: ["my_admin_role"],
+ full_name: "Eirian Zola",
+ metadata: {
+ intelligence: 7,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc b/docs/doc_examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc
new file mode 100644
index 000000000..04acf4a95
--- /dev/null
+++ b/docs/doc_examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ doc: {
+ name: "new_name",
+ },
+ doc_as_upsert: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc b/docs/doc_examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc
new file mode 100644
index 000000000..ad9af9cfe
--- /dev/null
+++ b/docs/doc_examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.refresh();
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ filter_path: "hits.total",
+ query: {
+ range: {
+ "http.response.bytes": {
+ lt: 2000000,
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7b864d61767ab283cfd5f9b9ba784b1f.asciidoc b/docs/doc_examples/7b864d61767ab283cfd5f9b9ba784b1f.asciidoc
new file mode 100644
index 000000000..04eba86cc
--- /dev/null
+++ b/docs/doc_examples/7b864d61767ab283cfd5f9b9ba784b1f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ name: "my-api-key",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7b908b1189f076942de8cd497ff1fa59.asciidoc b/docs/doc_examples/7b908b1189f076942de8cd497ff1fa59.asciidoc
new file mode 100644
index 000000000..6c4197dee
--- /dev/null
+++ b/docs/doc_examples/7b908b1189f076942de8cd497ff1fa59.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "quick brown fox",
+ type: "most_fields",
+ fields: ["title", "title.original", "title.shingles"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7b9dfe5857bde1bd8483ea3241656714.asciidoc b/docs/doc_examples/7b9dfe5857bde1bd8483ea3241656714.asciidoc
new file mode 100644
index 000000000..6fca4f796
--- /dev/null
+++ b/docs/doc_examples/7b9dfe5857bde1bd8483ea3241656714.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7c24d4bef3f2045407fbf1b95c5416f9.asciidoc b/docs/doc_examples/7c24d4bef3f2045407fbf1b95c5416f9.asciidoc
new file mode 100644
index 000000000..127d9e0d9
--- /dev/null
+++ b/docs/doc_examples/7c24d4bef3f2045407fbf1b95c5416f9.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "range_index",
+ settings: {
+ number_of_shards: 2,
+ },
+ mappings: {
+ properties: {
+ expected_attendees: {
+ type: "integer_range",
+ },
+ time_frame: {
+ type: "date_range",
+ format: "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "range_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ expected_attendees: {
+ gte: 10,
+ lt: 20,
+ },
+ time_frame: {
+ gte: "2015-10-31 12:00:00",
+ lte: "2015-11-01",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7c3414279d47e9c29105d061ed316ef8.asciidoc b/docs/doc_examples/7c3414279d47e9c29105d061ed316ef8.asciidoc
new file mode 100644
index 000000000..0c0bc6bf3
--- /dev/null
+++ b/docs/doc_examples/7c3414279d47e9c29105d061ed316ef8.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "music",
+ id: 1,
+ refresh: "true",
+ document: {
+ suggest: ["Nevermind", "Nirvana"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7c4551abbb7a5f3841109f7664bc4aad.asciidoc b/docs/doc_examples/7c4551abbb7a5f3841109f7664bc4aad.asciidoc
new file mode 100644
index 000000000..36a0b7806
--- /dev/null
+++ b/docs/doc_examples/7c4551abbb7a5f3841109f7664bc4aad.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ camel: {
+ type: "pattern",
+ pattern:
+ "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "camel",
+ text: "MooseX::FTPClass2_beta",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7c5aed55a2a1dce4b63c18e1ce8146ff.asciidoc b/docs/doc_examples/7c5aed55a2a1dce4b63c18e1ce8146ff.asciidoc
new file mode 100644
index 000000000..ab7abc2bb
--- /dev/null
+++ b/docs/doc_examples/7c5aed55a2a1dce4b63c18e1ce8146ff.asciidoc
@@ -0,0 +1,109 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "network-traffic",
+ mappings: {
+ properties: {
+ ipv4: {
+ type: "ip",
+ },
+ ipv6: {
+ type: "ip",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "network-traffic",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 0,
+ },
+ },
+ {
+ ipv4: "192.168.1.10",
+ ipv6: "2001:db8:a4f8:112a:6001:0:12:7f10",
+ },
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ ipv4: "192.168.1.12",
+ ipv6: "2001:db8:a4f8:112a:6001:0:12:7f12",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ ipv4: "192.168.1.33",
+ ipv6: "2001:db8:a4f8:112a:6001:0:12:7f33",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ ipv4: "192.168.1.10",
+ ipv6: "2001:db8:a4f8:112a:6001:0:12:7f10",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ ipv4: "192.168.2.41",
+ ipv6: "2001:db8:a4f8:112c:6001:0:12:7f41",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ ipv4: "192.168.2.10",
+ ipv6: "2001:db8:a4f8:112c:6001:0:12:7f10",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ ipv4: "192.168.2.23",
+ ipv6: "2001:db8:a4f8:112c:6001:0:12:7f23",
+ },
+ {
+ index: {
+ _id: 7,
+ },
+ },
+ {
+ ipv4: "192.168.3.201",
+ ipv6: "2001:db8:a4f8:114f:6001:0:12:7201",
+ },
+ {
+ index: {
+ _id: 8,
+ },
+ },
+ {
+ ipv4: "192.168.3.107",
+ ipv6: "2001:db8:a4f8:114f:6001:0:12:7307",
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7c5e41a7c0075d87b8f8348a6efa990c.asciidoc b/docs/doc_examples/7c5e41a7c0075d87b8f8348a6efa990c.asciidoc
new file mode 100644
index 000000000..650854bef
--- /dev/null
+++ b/docs/doc_examples/7c5e41a7c0075d87b8f8348a6efa990c.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.pauseFollow({
+ index: "follower_index",
+});
+console.log(response);
+
+const response1 = await client.indices.close({
+ index: "follower_index",
+});
+console.log(response1);
+
+const response2 = await client.ccr.follow({
+ index: "follower_index",
+ wait_for_active_shards: 1,
+ remote_cluster: "remote_cluster",
+ leader_index: "leader_index",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/7c9076f3e93a8f61189783c736bf6082.asciidoc b/docs/doc_examples/7c9076f3e93a8f61189783c736bf6082.asciidoc
new file mode 100644
index 000000000..47e925855
--- /dev/null
+++ b/docs/doc_examples/7c9076f3e93a8f61189783c736bf6082.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role2",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["event_*"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7ca224d1a7de20a15c008e1b9dbda377.asciidoc b/docs/doc_examples/7ca224d1a7de20a15c008e1b9dbda377.asciidoc
new file mode 100644
index 000000000..dd36cf357
--- /dev/null
+++ b/docs/doc_examples/7ca224d1a7de20a15c008e1b9dbda377.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ tags: {
+ terms: {
+ field: "tags",
+ missing: "N/A",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7cd23457e220c8b64c5b0041d2acc27a.asciidoc b/docs/doc_examples/7cd23457e220c8b64c5b0041d2acc27a.asciidoc
new file mode 100644
index 000000000..0719c3219
--- /dev/null
+++ b/docs/doc_examples/7cd23457e220c8b64c5b0041d2acc27a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.info({
+ node_id: "_all",
+ metric: "jvm",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc b/docs/doc_examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc
new file mode 100644
index 000000000..837ad5aaf
--- /dev/null
+++ b/docs/doc_examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ refresh_interval: null,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7d1cbcb545aa19260073dbb2b7ef5074.asciidoc b/docs/doc_examples/7d1cbcb545aa19260073dbb2b7ef5074.asciidoc
new file mode 100644
index 000000000..bd1a07cfe
--- /dev/null
+++ b/docs/doc_examples/7d1cbcb545aa19260073dbb2b7ef5074.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ size: 2,
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ },
+ },
+ },
+ {
+ product: {
+ terms: {
+ field: "product",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7d3a74fe0ba3fe95d1c3275365ff9315.asciidoc b/docs/doc_examples/7d3a74fe0ba3fe95d1c3275365ff9315.asciidoc
new file mode 100644
index 000000000..b319e1c28
--- /dev/null
+++ b/docs/doc_examples/7d3a74fe0ba3fe95d1c3275365ff9315.asciidoc
@@ -0,0 +1,50 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ flattened: {
+ type: "flattened",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ flattened: {
+ field: [
+ {
+ id: 1,
+ name: "foo",
+ },
+ {
+ id: 2,
+ name: "bar",
+ },
+ {
+ id: 3,
+ name: "baz",
+ },
+ ],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7d880157a95f64ad339225d4af71c2de.asciidoc b/docs/doc_examples/7d880157a95f64ad339225d4af71c2de.asciidoc
new file mode 100644
index 000000000..35848c635
--- /dev/null
+++ b/docs/doc_examples/7d880157a95f64ad339225d4af71c2de.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.suggestUserProfiles({
+ name: "jack",
+ hint: {
+ uids: [
+ "u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0",
+ "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
+ ],
+ labels: {
+ direction: ["north", "east"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7d9eba51a269571ae62fb8b442b373ce.asciidoc b/docs/doc_examples/7d9eba51a269571ae62fb8b442b373ce.asciidoc
new file mode 100644
index 000000000..687099666
--- /dev/null
+++ b/docs/doc_examples/7d9eba51a269571ae62fb8b442b373ce.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["lowercase", "custom_stems", "porter_stem"],
+ },
+ },
+ filter: {
+ custom_stems: {
+ type: "stemmer_override",
+ rules_path: "analysis/stemmer_override.txt",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7dabae9b37d2cbd724f2a069be9e753b.asciidoc b/docs/doc_examples/7dabae9b37d2cbd724f2a069be9e753b.asciidoc
new file mode 100644
index 000000000..ae1c0059d
--- /dev/null
+++ b/docs/doc_examples/7dabae9b37d2cbd724f2a069be9e753b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.resetJob({
+ job_id: "total-requests",
+ wait_for_completion: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc b/docs/doc_examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc
new file mode 100644
index 000000000..32a9da209
--- /dev/null
+++ b/docs/doc_examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ sparse_vector: {
+ field: "ml.tokens",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ prune: true,
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: false,
+ },
+ },
+ },
+ rescore: {
+ window_size: 100,
+ query: {
+ rescore_query: {
+ sparse_vector: {
+ field: "ml.tokens",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ prune: true,
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: true,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7db09cab02d71f3a10d91071216d80fc.asciidoc b/docs/doc_examples/7db09cab02d71f3a10d91071216d80fc.asciidoc
new file mode 100644
index 000000000..94a971289
--- /dev/null
+++ b/docs/doc_examples/7db09cab02d71f3a10d91071216d80fc.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "amazon-reviews",
+ retriever: {
+ knn: {
+ field: "review_vector",
+ query_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8],
+ k: 2,
+ num_candidates: 5,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc b/docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
new file mode 100644
index 000000000..79ead4d92
--- /dev/null
+++ b/docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ match: {
+ description: {
+ query: "fluffy pancakes",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7dc6c0a6386289ac6a34105e839ced55.asciidoc b/docs/doc_examples/7dc6c0a6386289ac6a34105e839ced55.asciidoc
new file mode 100644
index 000000000..55bc7f4c7
--- /dev/null
+++ b/docs/doc_examples/7dc6c0a6386289ac6a34105e839ced55.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ by_date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ my_rate: {
+ rate: {
+ unit: "year",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7dc82f7d36686fd57a47e34cbda39a4e.asciidoc b/docs/doc_examples/7dc82f7d36686fd57a47e34cbda39a4e.asciidoc
new file mode 100644
index 000000000..d5c2807fa
--- /dev/null
+++ b/docs/doc_examples/7dc82f7d36686fd57a47e34cbda39a4e.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["delimited_payload"],
+ text: "the|0 brown|10 fox|5 is|0 quick|10",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7dd481337e40f16185f3baa3fc2cce15.asciidoc b/docs/doc_examples/7dd481337e40f16185f3baa3fc2cce15.asciidoc
new file mode 100644
index 000000000..4733b1f3d
--- /dev/null
+++ b/docs/doc_examples/7dd481337e40f16185f3baa3fc2cce15.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ terms: {
+ _routing: ["user1"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc b/docs/doc_examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc
new file mode 100644
index 000000000..9d1e63bbd
--- /dev/null
+++ b/docs/doc_examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_s3_repository",
+ repository: {
+ type: "s3",
+ settings: {
+ bucket: "my-bucket",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7dedb148ff74912de81b8f8275f0d7f3.asciidoc b/docs/doc_examples/7dedb148ff74912de81b8f8275f0d7f3.asciidoc
new file mode 100644
index 000000000..a5cf11623
--- /dev/null
+++ b/docs/doc_examples/7dedb148ff74912de81b8f8275f0d7f3.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ aggs: {
+ price_ranges: {
+ terms: {
+ field: "price_range",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc b/docs/doc_examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc
new file mode 100644
index 000000000..fd2f71849
--- /dev/null
+++ b/docs/doc_examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ detailed: "true",
+ actions: "*byquery",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e126e2751311db60cfcbb22c9c41caa.asciidoc b/docs/doc_examples/7e126e2751311db60cfcbb22c9c41caa.asciidoc
new file mode 100644
index 000000000..62d725868
--- /dev/null
+++ b/docs/doc_examples/7e126e2751311db60cfcbb22c9c41caa.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards();
+console.log(response);
+----
diff --git a/docs/doc_examples/7e16d21cba51eb8960835b63a1a7266a.asciidoc b/docs/doc_examples/7e16d21cba51eb8960835b63a1a7266a.asciidoc
new file mode 100644
index 000000000..de928127b
--- /dev/null
+++ b/docs/doc_examples/7e16d21cba51eb8960835b63a1a7266a.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_date_formats: ["MM/dd/yyyy"],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ create_date: "09/25/2015",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7e20b6e15e409b02a5e452ceddf1e1e0.asciidoc b/docs/doc_examples/7e20b6e15e409b02a5e452ceddf1e1e0.asciidoc
new file mode 100644
index 000000000..4862dab30
--- /dev/null
+++ b/docs/doc_examples/7e20b6e15e409b02a5e452ceddf1e1e0.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ order: "desc",
+ },
+ },
+ },
+ {
+ product: {
+ terms: {
+ field: "product",
+ order: "asc",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e2b9bf4ab353c377b761101775edf93.asciidoc b/docs/doc_examples/7e2b9bf4ab353c377b761101775edf93.asciidoc
new file mode 100644
index 000000000..a42e937f1
--- /dev/null
+++ b/docs/doc_examples/7e2b9bf4ab353c377b761101775edf93.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "metrics-weather_sensors-dev",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-05-06T16:21:15.000Z",
+ sensor_id: "HAL-000001",
+ location: "plains",
+ temperature: 26.7,
+ humidity: 49.9,
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-05-06T16:25:42.000Z",
+ sensor_id: "SYKENET-000001",
+ location: "swamp",
+ temperature: 32.4,
+ humidity: 88.9,
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics-weather_sensors-dev",
+ document: {
+ "@timestamp": "2099-05-06T16:21:15.000Z",
+ sensor_id: "SYKENET-000001",
+ location: "swamp",
+ temperature: 32.4,
+ humidity: 88.9,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc b/docs/doc_examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc
new file mode 100644
index 000000000..198997e4a
--- /dev/null
+++ b/docs/doc_examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e48648ca27024831c60b455e836c496.asciidoc b/docs/doc_examples/7e48648ca27024831c60b455e836c496.asciidoc
new file mode 100644
index 000000000..8968a05ff
--- /dev/null
+++ b/docs/doc_examples/7e48648ca27024831c60b455e836c496.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ pinned: {
+ docs: [
+ {
+ _index: "my-index-000001",
+ _id: "1",
+ },
+ {
+ _id: "4",
+ },
+ ],
+ organic: {
+ match: {
+ description: "iphone",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e49705769c42895fb7b1e2ca028ff47.asciidoc b/docs/doc_examples/7e49705769c42895fb7b1e2ca028ff47.asciidoc
new file mode 100644
index 000000000..72f26c0a7
--- /dev/null
+++ b/docs/doc_examples/7e49705769c42895fb7b1e2ca028ff47.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes();
+console.log(response);
+----
diff --git a/docs/doc_examples/7e4cb3de3e3c75646b60f9f81ddc59cc.asciidoc b/docs/doc_examples/7e4cb3de3e3c75646b60f9f81ddc59cc.asciidoc
new file mode 100644
index 000000000..fa38b85db
--- /dev/null
+++ b/docs/doc_examples/7e4cb3de3e3c75646b60f9f81ddc59cc.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.clearTrainedModelDeploymentCache({
+ model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e5faa551f2c95ffd627da352563d450.asciidoc b/docs/doc_examples/7e5faa551f2c95ffd627da352563d450.asciidoc
new file mode 100644
index 000000000..27447be85
--- /dev/null
+++ b/docs/doc_examples/7e5faa551f2c95ffd627da352563d450.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping6",
+ roles: ["example-user"],
+ enabled: true,
+ rules: {
+ field: {
+ dn: "*,ou=subtree,dc=example,dc=com",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e74d1a54e816e8f40cfdaa01b070788.asciidoc b/docs/doc_examples/7e74d1a54e816e8f40cfdaa01b070788.asciidoc
new file mode 100644
index 000000000..629e908bd
--- /dev/null
+++ b/docs/doc_examples/7e74d1a54e816e8f40cfdaa01b070788.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "example-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ term: {
+ text: "rrf",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [3],
+ k: 5,
+ num_candidates: 5,
+ },
+ },
+ ],
+ rank_window_size: 5,
+ rank_constant: 1,
+ },
+ },
+ size: 3,
+ aggs: {
+ int_count: {
+ terms: {
+ field: "integer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7e77509ab646276ff78f58bb38bec8dd.asciidoc b/docs/doc_examples/7e77509ab646276ff78f58bb38bec8dd.asciidoc
new file mode 100644
index 000000000..5fda2a862
--- /dev/null
+++ b/docs/doc_examples/7e77509ab646276ff78f58bb38bec8dd.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "DELETE",
+ path: "/_query_rules/my-ruleset",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7ebeb6cf26be5b5ecdfd408bd0fc3215.asciidoc b/docs/doc_examples/7ebeb6cf26be5b5ecdfd408bd0fc3215.asciidoc
new file mode 100644
index 000000000..0750d7989
--- /dev/null
+++ b/docs/doc_examples/7ebeb6cf26be5b5ecdfd408bd0fc3215.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-knn-index",
+ mappings: {
+ properties: {
+ "my-vector": {
+ type: "dense_vector",
+ dims: 3,
+ index: true,
+ similarity: "l2_norm",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "my-knn-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ "my-vector": [1, 5, -20],
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ "my-vector": [42, 8, -15],
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ "my-vector": [15, 11, 23],
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7ebfb30b3ece855c1b783d9210939469.asciidoc b/docs/doc_examples/7ebfb30b3ece855c1b783d9210939469.asciidoc
new file mode 100644
index 000000000..7207b9cc1
--- /dev/null
+++ b/docs/doc_examples/7ebfb30b3ece855c1b783d9210939469.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.flushJob({
+ job_id: "total-requests",
+ advance_time: 1514804400000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7ed26b34ce90192a1563dcddf0e45dc0.asciidoc b/docs/doc_examples/7ed26b34ce90192a1563dcddf0e45dc0.asciidoc
new file mode 100644
index 000000000..d61869f16
--- /dev/null
+++ b/docs/doc_examples/7ed26b34ce90192a1563dcddf0e45dc0.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ sales_deriv: {
+ derivative: {
+ buckets_path: "sales",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc b/docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc
new file mode 100644
index 000000000..9d18e53eb
--- /dev/null
+++ b/docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "ip_location",
+ description: "Add ip geolocation info",
+ processors: [
+ {
+ ip_location: {
+ field: "ip",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "ip_location",
+ document: {
+ ip: "80.231.5.0",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/7f2d511cb64743c006225e5933a14bb4.asciidoc b/docs/doc_examples/7f2d511cb64743c006225e5933a14bb4.asciidoc
new file mode 100644
index 000000000..c492ea70d
--- /dev/null
+++ b/docs/doc_examples/7f2d511cb64743c006225e5933a14bb4.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote1",
+ cluster: ["cross_cluster_search"],
+ indices: [
+ {
+ names: [""],
+ privileges: ["read"],
+ },
+ ],
+ remote_indices: [
+ {
+ names: ["logs-*"],
+ privileges: ["read", "read_cross_cluster"],
+ clusters: ["my_remote_cluster"],
+ },
+ ],
+ remote_cluster: [
+ {
+ privileges: ["monitor_enrich"],
+ clusters: ["my_remote_cluster"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7f37031fb40b68a61255b7c71d7eed0b.asciidoc b/docs/doc_examples/7f37031fb40b68a61255b7c71d7eed0b.asciidoc
new file mode 100644
index 000000000..09db83420
--- /dev/null
+++ b/docs/doc_examples/7f37031fb40b68a61255b7c71d7eed0b.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ id: "my_watch",
+ action_modes: {
+ action1: "force_simulate",
+ action2: "skip",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7f514e9e785e4323d16396359cb184f2.asciidoc b/docs/doc_examples/7f514e9e785e4323d16396359cb184f2.asciidoc
new file mode 100644
index 000000000..9303413af
--- /dev/null
+++ b/docs/doc_examples/7f514e9e785e4323d16396359cb184f2.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "range_index",
+ properties: {
+ ip_allowlist: {
+ type: "ip_range",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "range_index",
+ id: 2,
+ document: {
+ ip_allowlist: "192.168.0.0/16",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc b/docs/doc_examples/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc
new file mode 100644
index 000000000..c452de4e5
--- /dev/null
+++ b/docs/doc_examples/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ query: "ny city",
+ auto_generate_synonyms_phrase_query: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7f92ddd4e940a37d6227c43fd279c8f5.asciidoc b/docs/doc_examples/7f92ddd4e940a37d6227c43fd279c8f5.asciidoc
new file mode 100644
index 000000000..61ec2bb09
--- /dev/null
+++ b/docs/doc_examples/7f92ddd4e940a37d6227c43fd279c8f5.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 1,
+ query: {
+ match: {
+ client_ip: "211.11.9.0",
+ },
+ },
+ fields: ["*"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7fb921376cbf66bf9f381bcdd62030ba.asciidoc b/docs/doc_examples/7fb921376cbf66bf9f381bcdd62030ba.asciidoc
new file mode 100644
index 000000000..3abdbb52f
--- /dev/null
+++ b/docs/doc_examples/7fb921376cbf66bf9f381bcdd62030ba.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getScriptContext();
+console.log(response);
+----
diff --git a/docs/doc_examples/7fbebf0fc9b4a402917a4723ad547c6a.asciidoc b/docs/doc_examples/7fbebf0fc9b4a402917a4723ad547c6a.asciidoc
new file mode 100644
index 000000000..cd01ba6fc
--- /dev/null
+++ b/docs/doc_examples/7fbebf0fc9b4a402917a4723ad547c6a.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my-repo",
+ repository: {
+ type: "s3",
+ settings: {
+ bucket: "repo-bucket",
+ client: "elastic-internal-71bcd3",
+ base_path: "myrepo",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7fd2532f4e12e3efbc58af195060b31e.asciidoc b/docs/doc_examples/7fd2532f4e12e3efbc58af195060b31e.asciidoc
new file mode 100644
index 000000000..8306c83a4
--- /dev/null
+++ b/docs/doc_examples/7fd2532f4e12e3efbc58af195060b31e.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ text: "The fooBarBaz method",
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ text: "bar",
+ },
+ },
+ highlight: {
+ fields: {
+ text: {},
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/7fd5883564d183603e60b37d286ac7e2.asciidoc b/docs/doc_examples/7fd5883564d183603e60b37d286ac7e2.asciidoc
new file mode 100644
index 000000000..6fa8a7c88
--- /dev/null
+++ b/docs/doc_examples/7fd5883564d183603e60b37d286ac7e2.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteExpiredData({
+ timeout: "1h",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc b/docs/doc_examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc
new file mode 100644
index 000000000..9fdb8dc45
--- /dev/null
+++ b/docs/doc_examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query:
+ '\n FROM library\n | EVAL year = DATE_EXTRACT("year", release_date)\n | WHERE page_count > ?page_count AND author == ?author\n | STATS count = COUNT(*) by year\n | WHERE count > ?count\n | LIMIT 5\n ',
+ params: [
+ {
+ page_count: 300,
+ },
+ {
+ author: "Frank Herbert",
+ },
+ {
+ count: 0,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7fe2179705304af5e87eb382dca6235a.asciidoc b/docs/doc_examples/7fe2179705304af5e87eb382dca6235a.asciidoc
new file mode 100644
index 000000000..7aa2b01be
--- /dev/null
+++ b/docs/doc_examples/7fe2179705304af5e87eb382dca6235a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.open({
+ index: "logs-my_app-default",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc b/docs/doc_examples/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc
new file mode 100644
index 000000000..6e49e53e5
--- /dev/null
+++ b/docs/doc_examples/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ "price.weighted": {
+ type: "double",
+ script:
+ "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n ",
+ },
+ },
+ query: {
+ constant_score: {
+ filter: {
+ match: {
+ type: "hat",
+ },
+ },
+ },
+ },
+ aggs: {
+ hat_prices: {
+ sum: {
+ field: "price.weighted",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7fef68840761c6982c14ad7af96caf37.asciidoc b/docs/doc_examples/7fef68840761c6982c14ad7af96caf37.asciidoc
new file mode 100644
index 000000000..88a14a284
--- /dev/null
+++ b/docs/doc_examples/7fef68840761c6982c14ad7af96caf37.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ group: "fans",
+ user: [
+ {
+ first: "John",
+ last: "Smith",
+ },
+ {
+ first: "Alice",
+ last: "White",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/7ff4124df0541ee2496034004f4146d4.asciidoc b/docs/doc_examples/7ff4124df0541ee2496034004f4146d4.asciidoc
new file mode 100644
index 000000000..cc4fcf208
--- /dev/null
+++ b/docs/doc_examples/7ff4124df0541ee2496034004f4146d4.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ tags: {
+ type: "keyword",
+ eager_global_ordinals: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/800861c15bb33ca01a46fb97dde7537a.asciidoc b/docs/doc_examples/800861c15bb33ca01a46fb97dde7537a.asciidoc
new file mode 100644
index 000000000..30819bdc6
--- /dev/null
+++ b/docs/doc_examples/800861c15bb33ca01a46fb97dde7537a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getFilters({
+ filter_id: "safe_domains",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc b/docs/doc_examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc
new file mode 100644
index 000000000..bb8174e35
--- /dev/null
+++ b/docs/doc_examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "attachment",
+ description: "Extract attachment information",
+ processors: [
+ {
+ attachment: {
+ field: "data",
+ indexed_chars: 11,
+ indexed_chars_field: "max_size",
+ remove_binary: true,
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id_2",
+ pipeline: "attachment",
+ document: {
+ data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
+ max_size: 5,
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id_2",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc b/docs/doc_examples/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc
new file mode 100644
index 000000000..1821e0de4
--- /dev/null
+++ b/docs/doc_examples/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ full_text: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8051766cadded0892290bc2cc06e145c.asciidoc b/docs/doc_examples/8051766cadded0892290bc2cc06e145c.asciidoc
new file mode 100644
index 000000000..c4522e245
--- /dev/null
+++ b/docs/doc_examples/8051766cadded0892290bc2cc06e145c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.ackWatch({
+ watch_id: "my_watch",
+ action_id: "action1,action2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/805f5550b90e75aa5cc82b90d8c6c242.asciidoc b/docs/doc_examples/805f5550b90e75aa5cc82b90d8c6c242.asciidoc
new file mode 100644
index 000000000..409f1ce03
--- /dev/null
+++ b/docs/doc_examples/805f5550b90e75aa5cc82b90d8c6c242.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "news",
+ query: {
+ match: {
+ content: "elasticsearch",
+ },
+ },
+ aggs: {
+ sample: {
+ sampler: {
+ shard_size: 100,
+ },
+ aggs: {
+ keywords: {
+ significant_text: {
+ field: "content",
+ filter_duplicate_text: true,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/807c0c9763f8c1114b3c8278c2a0cb56.asciidoc b/docs/doc_examples/807c0c9763f8c1114b3c8278c2a0cb56.asciidoc
new file mode 100644
index 000000000..b10488464
--- /dev/null
+++ b/docs/doc_examples/807c0c9763f8c1114b3c8278c2a0cb56.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ intervals: {
+ my_text: {
+ all_of: {
+ ordered: true,
+ intervals: [
+ {
+ match: {
+ query: "my favorite food",
+ max_gaps: 0,
+ ordered: true,
+ },
+ },
+ {
+ any_of: {
+ intervals: [
+ {
+ match: {
+ query: "hot water",
+ },
+ },
+ {
+ match: {
+ query: "cold porridge",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8080cd9e24a8785728ce7c372ec4acf1.asciidoc b/docs/doc_examples/8080cd9e24a8785728ce7c372ec4acf1.asciidoc
new file mode 100644
index 000000000..2904d2dc7
--- /dev/null
+++ b/docs/doc_examples/8080cd9e24a8785728ce7c372ec4acf1.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_watcher/settings",
+ body: {
+ "index.routing.allocation.include.role": "watcher",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/808f4db1e2361be77dd6816c1f818139.asciidoc b/docs/doc_examples/808f4db1e2361be77dd6816c1f818139.asciidoc
new file mode 100644
index 000000000..83b3a9af5
--- /dev/null
+++ b/docs/doc_examples/808f4db1e2361be77dd6816c1f818139.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shardStores({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/80dbaf28d1976dc00de3fe2018067e81.asciidoc b/docs/doc_examples/80dbaf28d1976dc00de3fe2018067e81.asciidoc
new file mode 100644
index 000000000..c74de8b5f
--- /dev/null
+++ b/docs/doc_examples/80dbaf28d1976dc00de3fe2018067e81.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteTemplate({
+ name: ".cloud-hot-warm-allocation-0",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc b/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc
new file mode 100644
index 000000000..659fc0e47
--- /dev/null
+++ b/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkUpdateApiKeys({
+ body: {
+ ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
+ role_descriptors: {
+ "role-a": {
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["write"],
+ },
+ ],
+ },
+ },
+ metadata: {
+ environment: {
+ level: 2,
+ trusted: true,
+ tags: ["production"],
+ },
+ },
+ expiration: "30d",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc b/docs/doc_examples/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc
new file mode 100644
index 000000000..ad1cec287
--- /dev/null
+++ b/docs/doc_examples/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.getSynonymRule({
+ set_id: "my-synonyms-set",
+ rule_id: "test-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/812a3d7ab461d74efd9136aaf4bcf11c.asciidoc b/docs/doc_examples/812a3d7ab461d74efd9136aaf4bcf11c.asciidoc
new file mode 100644
index 000000000..4bea906fc
--- /dev/null
+++ b/docs/doc_examples/812a3d7ab461d74efd9136aaf4bcf11c.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "range_index",
+ size: 0,
+ aggs: {
+ range_histo: {
+ histogram: {
+ field: "expected_attendees",
+ interval: 5,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/812deb6b7668c7444f3b99d843d2adc1.asciidoc b/docs/doc_examples/812deb6b7668c7444f3b99d843d2adc1.asciidoc
new file mode 100644
index 000000000..62f019cdf
--- /dev/null
+++ b/docs/doc_examples/812deb6b7668c7444f3b99d843d2adc1.asciidoc
@@ -0,0 +1,48 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "shapes",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "shapes",
+ id: "footprint",
+ document: {
+ geometry: {
+ type: "envelope",
+ coordinates: [
+ [1355, 5355],
+ [1400, 5200],
+ ],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "example",
+ query: {
+ shape: {
+ geometry: {
+ indexed_shape: {
+ index: "shapes",
+ id: "footprint",
+ path: "geometry",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/8141b60ad245ece2ff5e8d0817400ee5.asciidoc b/docs/doc_examples/8141b60ad245ece2ff5e8d0817400ee5.asciidoc
new file mode 100644
index 000000000..796fe255d
--- /dev/null
+++ b/docs/doc_examples/8141b60ad245ece2ff5e8d0817400ee5.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence by process.pid\n [ file where file.name == "cmd.exe" and process.pid != 2013 ]\n [ process where stringContains(process.executable, "regsvr32") ]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8141cdaddbe7d794f09f9ee84e46194c.asciidoc b/docs/doc_examples/8141cdaddbe7d794f09f9ee84e46194c.asciidoc
new file mode 100644
index 000000000..814d8e865
--- /dev/null
+++ b/docs/doc_examples/8141cdaddbe7d794f09f9ee84e46194c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.count({
+ index: "my-index-000001",
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/81612c2537386e031b7eb604f6756a71.asciidoc b/docs/doc_examples/81612c2537386e031b7eb604f6756a71.asciidoc
new file mode 100644
index 000000000..ae7191527
--- /dev/null
+++ b/docs/doc_examples/81612c2537386e031b7eb604f6756a71.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clone({
+ index: "my_source_index",
+ target: "my_target_index",
+ settings: {
+ "index.number_of_shards": 5,
+ },
+ aliases: {
+ my_search_indices: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8194f1fae6aa72ab91ea559daad932d4.asciidoc b/docs/doc_examples/8194f1fae6aa72ab91ea559daad932d4.asciidoc
new file mode 100644
index 000000000..377f726ec
--- /dev/null
+++ b/docs/doc_examples/8194f1fae6aa72ab91ea559daad932d4.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ max_concurrent_shard_requests: 3,
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/819e00cc6547d925d80090b94e0650d7.asciidoc b/docs/doc_examples/819e00cc6547d925d80090b94e0650d7.asciidoc
new file mode 100644
index 000000000..9e33adbad
--- /dev/null
+++ b/docs/doc_examples/819e00cc6547d925d80090b94e0650d7.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index:
+ "my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ _source: ["user.id", "message", "http.response.status_code"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc b/docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc
new file mode 100644
index 000000000..a4744544e
--- /dev/null
+++ b/docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ v: "true",
+});
+console.log(response);
+
+const response1 = await client.cat.recovery({
+ v: "true",
+ active_only: "true",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/81c7a392efd505b686eed978fb7d9d17.asciidoc b/docs/doc_examples/81c7a392efd505b686eed978fb7d9d17.asciidoc
new file mode 100644
index 000000000..d516dced4
--- /dev/null
+++ b/docs/doc_examples/81c7a392efd505b686eed978fb7d9d17.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "english_example",
+ settings: {
+ analysis: {
+ filter: {
+ english_stop: {
+ type: "stop",
+ stopwords: "_english_",
+ },
+ english_keywords: {
+ type: "keyword_marker",
+ keywords: ["example"],
+ },
+ english_stemmer: {
+ type: "stemmer",
+ language: "english",
+ },
+ english_possessive_stemmer: {
+ type: "stemmer",
+ language: "possessive_english",
+ },
+ },
+ analyzer: {
+ rebuilt_english: {
+ tokenizer: "standard",
+ filter: [
+ "english_possessive_stemmer",
+ "lowercase",
+ "english_stop",
+ "english_keywords",
+ "english_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/81ee2ad368208c4c78098292547b0577.asciidoc b/docs/doc_examples/81ee2ad368208c4c78098292547b0577.asciidoc
new file mode 100644
index 000000000..f7aa01327
--- /dev/null
+++ b/docs/doc_examples/81ee2ad368208c4c78098292547b0577.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "admin_user",
+ roles: ["monitoring"],
+ rules: {
+ field: {
+ dn: "cn=Admin,ou=example,o=com",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/81ef5774355180fc44d2a52b5182d24a.asciidoc b/docs/doc_examples/81ef5774355180fc44d2a52b5182d24a.asciidoc
new file mode 100644
index 000000000..2a175137a
--- /dev/null
+++ b/docs/doc_examples/81ef5774355180fc44d2a52b5182d24a.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ message_stats: {
+ string_stats: {
+ field: "message.keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/81f1b1e1d5c81683b6bf471c469e6046.asciidoc b/docs/doc_examples/81f1b1e1d5c81683b6bf471c469e6046.asciidoc
new file mode 100644
index 000000000..a16d759b9
--- /dev/null
+++ b/docs/doc_examples/81f1b1e1d5c81683b6bf471c469e6046.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "shirts",
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ color: "red",
+ },
+ },
+ {
+ term: {
+ brand: "gucci",
+ },
+ },
+ ],
+ },
+ },
+ aggs: {
+ models: {
+ terms: {
+ field: "model",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8206a7cc615ad93fec322513b8fdd4fd.asciidoc b/docs/doc_examples/8206a7cc615ad93fec322513b8fdd4fd.asciidoc
new file mode 100644
index 000000000..7b2517ea2
--- /dev/null
+++ b/docs/doc_examples/8206a7cc615ad93fec322513b8fdd4fd.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "job-candidates",
+ id: 2,
+ refresh: "true",
+ document: {
+ name: "Jason Response",
+ programming_languages: ["java", "php"],
+ required_matches: 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/820f689eaaef15fc07abd1073fa880f8.asciidoc b/docs/doc_examples/820f689eaaef15fc07abd1073fa880f8.asciidoc
new file mode 100644
index 000000000..7882ecb00
--- /dev/null
+++ b/docs/doc_examples/820f689eaaef15fc07abd1073fa880f8.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ from: 5,
+ size: 20,
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/821422f8a03dc98d024a15fc737fe9eb.asciidoc b/docs/doc_examples/821422f8a03dc98d024a15fc737fe9eb.asciidoc
new file mode 100644
index 000000000..3e052ea88
--- /dev/null
+++ b/docs/doc_examples/821422f8a03dc98d024a15fc737fe9eb.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteTrainedModelAlias({
+ model_id: "flight-delay-prediction-1574775339910",
+ model_alias: "flight_delay_model",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/821ac598f5f4a795a13f8dd0c0c4d8d6.asciidoc b/docs/doc_examples/821ac598f5f4a795a13f8dd0c0c4d8d6.asciidoc
new file mode 100644
index 000000000..463b34a82
--- /dev/null
+++ b/docs/doc_examples/821ac598f5f4a795a13f8dd0c0c4d8d6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.createDataStream({
+ name: "metrics-weather_sensors-dev",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/824fded1f9db28906ae7e85ae8de9bd0.asciidoc b/docs/doc_examples/824fded1f9db28906ae7e85ae8de9bd0.asciidoc
new file mode 100644
index 000000000..e01c1c4ce
--- /dev/null
+++ b/docs/doc_examples/824fded1f9db28906ae7e85ae8de9bd0.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.resumeFollow({
+ index: "follower_index",
+ max_read_request_operation_count: 1024,
+ max_outstanding_read_requests: 16,
+ max_read_request_size: "1024k",
+ max_write_request_operation_count: 32768,
+ max_write_request_size: "16k",
+ max_outstanding_write_requests: 8,
+ max_write_buffer_count: 512,
+ max_write_buffer_size: "512k",
+ max_retry_delay: "10s",
+ read_poll_timeout: "30s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/827b7e9308ea288f18aea00a5accc38e.asciidoc b/docs/doc_examples/827b7e9308ea288f18aea00a5accc38e.asciidoc
new file mode 100644
index 000000000..dd4323962
--- /dev/null
+++ b/docs/doc_examples/827b7e9308ea288f18aea00a5accc38e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getComponentTemplate({
+ name: "template_1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/82844ef45e11c0eece100d3109db3182.asciidoc b/docs/doc_examples/82844ef45e11c0eece100d3109db3182.asciidoc
new file mode 100644
index 000000000..07d04a9b1
--- /dev/null
+++ b/docs/doc_examples/82844ef45e11c0eece100d3109db3182.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "amazon_bedrock_completion",
+ inference_config: {
+ service: "amazonbedrock",
+ service_settings: {
+ access_key: "",
+ secret_key: "",
+ region: "us-east-1",
+ provider: "amazontitan",
+ model: "amazon.titan-text-premier-v1:0",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/828f0045747fde4888a947bb99e190e3.asciidoc b/docs/doc_examples/828f0045747fde4888a947bb99e190e3.asciidoc
new file mode 100644
index 000000000..a4e4969f9
--- /dev/null
+++ b/docs/doc_examples/828f0045747fde4888a947bb99e190e3.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "movies",
+ retriever: {
+ rule: {
+ match_criteria: {
+ query_string: "harry potter",
+ },
+ ruleset_ids: ["my-ruleset"],
+ retriever: {
+ standard: {
+ query: {
+ query_string: {
+ query: "harry potter",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/829a40d484c778a8c58340c7bf09e1d8.asciidoc b/docs/doc_examples/829a40d484c778a8c58340c7bf09e1d8.asciidoc
new file mode 100644
index 000000000..8d6320e7a
--- /dev/null
+++ b/docs/doc_examples/829a40d484c778a8c58340c7bf09e1d8.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ operator: "or",
+ query: "the quick brown",
+ },
+ },
+ },
+ rescore: {
+ window_size: 50,
+ query: {
+ rescore_query: {
+ match_phrase: {
+ message: {
+ query: "the quick brown",
+ slop: 2,
+ },
+ },
+ },
+ query_weight: 0.7,
+ rescore_query_weight: 1.2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/82d6de3081de7b0664f44adf2942675a.asciidoc b/docs/doc_examples/82d6de3081de7b0664f44adf2942675a.asciidoc
new file mode 100644
index 000000000..429967543
--- /dev/null
+++ b/docs/doc_examples/82d6de3081de7b0664f44adf2942675a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.getBehavioralAnalytics({
+ name: "my_analytics_collection",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/82e94b6cdf65e324575f916b3776b779.asciidoc b/docs/doc_examples/82e94b6cdf65e324575f916b3776b779.asciidoc
new file mode 100644
index 000000000..a6c307c15
--- /dev/null
+++ b/docs/doc_examples/82e94b6cdf65e324575f916b3776b779.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ strings_as_keywords: {
+ match_mapping_type: "string",
+ runtime: {},
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83062a543163370328cf2e21a68c1bd3.asciidoc b/docs/doc_examples/83062a543163370328cf2e21a68c1bd3.asciidoc
new file mode 100644
index 000000000..71645d3b6
--- /dev/null
+++ b/docs/doc_examples/83062a543163370328cf2e21a68c1bd3.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ delete: {
+ actions: {
+ wait_for_snapshot: {
+ policy: "slm-policy-name",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/831f65d700577e11112c711236110f61.asciidoc b/docs/doc_examples/831f65d700577e11112c711236110f61.asciidoc
new file mode 100644
index 000000000..701142ed9
--- /dev/null
+++ b/docs/doc_examples/831f65d700577e11112c711236110f61.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_email_analyzer: {
+ type: "pattern",
+ pattern: "\\W|_",
+ lowercase: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_email_analyzer",
+ text: "John_Smith@foo-bar.com",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/8330b2ea6317769e52d0647ba434b354.asciidoc b/docs/doc_examples/8330b2ea6317769e52d0647ba434b354.asciidoc
new file mode 100644
index 000000000..3692a9350
--- /dev/null
+++ b/docs/doc_examples/8330b2ea6317769e52d0647ba434b354.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ routing: "key1",
+ docs: [
+ {
+ _index: "test",
+ _id: "1",
+ routing: "key2",
+ },
+ {
+ _index: "test",
+ _id: "2",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8345d2615f43a934fe1871a5120eca1d.asciidoc b/docs/doc_examples/8345d2615f43a934fe1871a5120eca1d.asciidoc
new file mode 100644
index 000000000..e9fab2a15
--- /dev/null
+++ b/docs/doc_examples/8345d2615f43a934fe1871a5120eca1d.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ query: {
+ bool: {
+ filter: {
+ term: {
+ currency: "EUR",
+ },
+ },
+ },
+ },
+ },
+ pivot: {
+ group_by: {
+ customer_id: {
+ terms: {
+ field: "customer_id",
+ },
+ },
+ },
+ aggregations: {
+ "total_quantity.sum": {
+ sum: {
+ field: "total_quantity",
+ },
+ },
+ "taxless_total_price.sum": {
+ sum: {
+ field: "taxless_total_price",
+ },
+ },
+ "total_quantity.max": {
+ max: {
+ field: "total_quantity",
+ },
+ },
+ "order_id.cardinality": {
+ cardinality: {
+ field: "order_id",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/834764b2fba6cbb41eaabd740be75656.asciidoc b/docs/doc_examples/834764b2fba6cbb41eaabd740be75656.asciidoc
new file mode 100644
index 000000000..2b286e62b
--- /dev/null
+++ b/docs/doc_examples/834764b2fba6cbb41eaabd740be75656.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_analyzer: {
+ tokenizer: "standard",
+ filter: ["keyword_repeat", "porter_stem", "remove_duplicates"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8357aa6099089940589ae3e97e7bcffa.asciidoc b/docs/doc_examples/8357aa6099089940589ae3e97e7bcffa.asciidoc
new file mode 100644
index 000000000..aa9ff97c5
--- /dev/null
+++ b/docs/doc_examples/8357aa6099089940589ae3e97e7bcffa.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataStream();
+console.log(response);
+----
diff --git a/docs/doc_examples/83780c8f5f17eb21064c1ba6e0a7aa10.asciidoc b/docs/doc_examples/83780c8f5f17eb21064c1ba6e0a7aa10.asciidoc
new file mode 100644
index 000000000..b31cf25db
--- /dev/null
+++ b/docs/doc_examples/83780c8f5f17eb21064c1ba6e0a7aa10.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ wrapper: {
+ query: "eyJ0ZXJtIiA6IHsgInVzZXIuaWQiIDogImtpbWNoeSIgfX0=",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/838a4eabebba4c06100fb37dc30c7722.asciidoc b/docs/doc_examples/838a4eabebba4c06100fb37dc30c7722.asciidoc
new file mode 100644
index 000000000..6ff988112
--- /dev/null
+++ b/docs/doc_examples/838a4eabebba4c06100fb37dc30c7722.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.putJob({
+ id: "sensor",
+ index_pattern: "sensor-*",
+ rollup_index: "sensor_rollup",
+ cron: "*/30 * * * * ?",
+ page_size: 1000,
+ groups: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "1h",
+ delay: "7d",
+ },
+ terms: {
+ fields: ["node"],
+ },
+ },
+ metrics: [
+ {
+ field: "temperature",
+ metrics: ["min", "max", "sum"],
+ },
+ {
+ field: "voltage",
+ metrics: ["avg"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/839710129a165cf93c6e329abedf9089.asciidoc b/docs/doc_examples/839710129a165cf93c6e329abedf9089.asciidoc
new file mode 100644
index 000000000..e21691205
--- /dev/null
+++ b/docs/doc_examples/839710129a165cf93c6e329abedf9089.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_security/cross_cluster/api_key",
+ body: {
+ name: "my-cross-cluster-api-key",
+ access: {
+ search: [
+ {
+ names: ["logs*"],
+ },
+ ],
+ },
+ metadata: {
+ application: "search",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/839a4b2930856790e34cc9dfeb983284.asciidoc b/docs/doc_examples/839a4b2930856790e34cc9dfeb983284.asciidoc
new file mode 100644
index 000000000..4c5a97c46
--- /dev/null
+++ b/docs/doc_examples/839a4b2930856790e34cc9dfeb983284.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ downsample: {
+ fixed_interval: "1h",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83b94f9e7b3a9abca8e165ea56927714.asciidoc b/docs/doc_examples/83b94f9e7b3a9abca8e165ea56927714.asciidoc
new file mode 100644
index 000000000..7cfc7762b
--- /dev/null
+++ b/docs/doc_examples/83b94f9e7b3a9abca8e165ea56927714.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "",
+ aliases: {
+ "my-write-alias": {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83cd4eb89818b4c32f654d370eafa920.asciidoc b/docs/doc_examples/83cd4eb89818b4c32f654d370eafa920.asciidoc
new file mode 100644
index 000000000..d06f00c1d
--- /dev/null
+++ b/docs/doc_examples/83cd4eb89818b4c32f654d370eafa920.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "keep_types",
+ types: [""],
+ },
+ ],
+ text: "1 quick fox 2 lazy dogs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83d712b9ffb2e703212b762eba3c521a.asciidoc b/docs/doc_examples/83d712b9ffb2e703212b762eba3c521a.asciidoc
new file mode 100644
index 000000000..e386b454b
--- /dev/null
+++ b/docs/doc_examples/83d712b9ffb2e703212b762eba3c521a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-alias",
+ ignore_unavailable: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83d8c920460a12f87b9d5bf65515c367.asciidoc b/docs/doc_examples/83d8c920460a12f87b9d5bf65515c367.asciidoc
new file mode 100644
index 000000000..3c1edaaca
--- /dev/null
+++ b/docs/doc_examples/83d8c920460a12f87b9d5bf65515c367.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_moving_sum: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script:
+ "MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83dd715e45a5da097123c6d10f22f8f4.asciidoc b/docs/doc_examples/83dd715e45a5da097123c6d10f22f8f4.asciidoc
new file mode 100644
index 000000000..ee691348e
--- /dev/null
+++ b/docs/doc_examples/83dd715e45a5da097123c6d10f22f8f4.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_containing: {
+ little: {
+ span_term: {
+ field1: "foo",
+ },
+ },
+ big: {
+ span_near: {
+ clauses: [
+ {
+ span_term: {
+ field1: "bar",
+ },
+ },
+ {
+ span_term: {
+ field1: "baz",
+ },
+ },
+ ],
+ slop: 5,
+ in_order: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/83dfd0852101eca3ba8174c9c38b4e73.asciidoc b/docs/doc_examples/83dfd0852101eca3ba8174c9c38b4e73.asciidoc
new file mode 100644
index 000000000..e7f4dc8b5
--- /dev/null
+++ b/docs/doc_examples/83dfd0852101eca3ba8174c9c38b4e73.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getTemplate({
+ name: ".monitoring-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/840b6c5c3d9c56aed854cfab8da04486.asciidoc b/docs/doc_examples/840b6c5c3d9c56aed854cfab8da04486.asciidoc
new file mode 100644
index 000000000..cda364d7e
--- /dev/null
+++ b/docs/doc_examples/840b6c5c3d9c56aed854cfab8da04486.asciidoc
@@ -0,0 +1,95 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "file-path-test",
+ settings: {
+ analysis: {
+ analyzer: {
+ custom_path_tree: {
+ tokenizer: "custom_hierarchy",
+ },
+ custom_path_tree_reversed: {
+ tokenizer: "custom_hierarchy_reversed",
+ },
+ },
+ tokenizer: {
+ custom_hierarchy: {
+ type: "path_hierarchy",
+ delimiter: "/",
+ },
+ custom_hierarchy_reversed: {
+ type: "path_hierarchy",
+ delimiter: "/",
+ reverse: "true",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ file_path: {
+ type: "text",
+ fields: {
+ tree: {
+ type: "text",
+ analyzer: "custom_path_tree",
+ },
+ tree_reversed: {
+ type: "text",
+ analyzer: "custom_path_tree_reversed",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "file-path-test",
+ id: 1,
+ document: {
+ file_path: "/User/alice/photos/2017/05/16/my_photo1.jpg",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "file-path-test",
+ id: 2,
+ document: {
+ file_path: "/User/alice/photos/2017/05/16/my_photo2.jpg",
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "file-path-test",
+ id: 3,
+ document: {
+ file_path: "/User/alice/photos/2017/05/16/my_photo3.jpg",
+ },
+});
+console.log(response3);
+
+const response4 = await client.index({
+ index: "file-path-test",
+ id: 4,
+ document: {
+ file_path: "/User/alice/photos/2017/05/15/my_photo1.jpg",
+ },
+});
+console.log(response4);
+
+const response5 = await client.index({
+ index: "file-path-test",
+ id: 5,
+ document: {
+ file_path: "/User/bob/photos/2017/05/16/my_photo1.jpg",
+ },
+});
+console.log(response5);
+----
diff --git a/docs/doc_examples/84108653e9e03b4edacd878ec870df77.asciidoc b/docs/doc_examples/84108653e9e03b4edacd878ec870df77.asciidoc
new file mode 100644
index 000000000..23119d33f
--- /dev/null
+++ b/docs/doc_examples/84108653e9e03b4edacd878ec870df77.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "hungarian_example",
+ settings: {
+ analysis: {
+ filter: {
+ hungarian_stop: {
+ type: "stop",
+ stopwords: "_hungarian_",
+ },
+ hungarian_keywords: {
+ type: "keyword_marker",
+ keywords: ["példa"],
+ },
+ hungarian_stemmer: {
+ type: "stemmer",
+ language: "hungarian",
+ },
+ },
+ analyzer: {
+ rebuilt_hungarian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "hungarian_stop",
+ "hungarian_keywords",
+ "hungarian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc b/docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc
new file mode 100644
index 000000000..12610d1a5
--- /dev/null
+++ b/docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: ".watcher-history*",
+ pretty: "true",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ "result.condition.met": true,
+ },
+ },
+ {
+ range: {
+ "result.execution_time": {
+ gte: "now-10s",
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/841ad0a70f4271f61f0bac0b467b59c5.asciidoc b/docs/doc_examples/841ad0a70f4271f61f0bac0b467b59c5.asciidoc
new file mode 100644
index 000000000..7848732d8
--- /dev/null
+++ b/docs/doc_examples/841ad0a70f4271f61f0bac0b467b59c5.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mtermvectors({
+ index: "my-index-000001",
+ docs: [
+ {
+ _id: "2",
+ fields: ["message"],
+ term_statistics: true,
+ },
+ {
+ _id: "1",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/841d8b766902c8e3ae85c228a31383ac.asciidoc b/docs/doc_examples/841d8b766902c8e3ae85c228a31383ac.asciidoc
new file mode 100644
index 000000000..bf5b9ae06
--- /dev/null
+++ b/docs/doc_examples/841d8b766902c8e3ae85c228a31383ac.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.getAsyncStatus({
+ id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
+ format: "json",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc b/docs/doc_examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc
new file mode 100644
index 000000000..ae893a16e
--- /dev/null
+++ b/docs/doc_examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.repositoryVerifyIntegrity({
+ name: "my_repository",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84243213614fe64930b1d430704afb29.asciidoc b/docs/doc_examples/84243213614fe64930b1d430704afb29.asciidoc
new file mode 100644
index 000000000..3e58c1614
--- /dev/null
+++ b/docs/doc_examples/84243213614fe64930b1d430704afb29.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ voltage_corrected: {
+ type: "double",
+ script: {
+ source:
+ "\n emit(doc['voltage'].value * params['multiplier'])\n ",
+ params: {
+ multiplier: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84465de841fe5c6099a0382f786f2cb8.asciidoc b/docs/doc_examples/84465de841fe5c6099a0382f786f2cb8.asciidoc
new file mode 100644
index 000000000..230633e38
--- /dev/null
+++ b/docs/doc_examples/84465de841fe5c6099a0382f786f2cb8.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ remove: {
+ index: "logs-nginx.access-prod",
+ alias: "logs",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/844928da2ff9a1394af5347a5e2e4f78.asciidoc b/docs/doc_examples/844928da2ff9a1394af5347a5e2e4f78.asciidoc
new file mode 100644
index 000000000..b0acfaa1d
--- /dev/null
+++ b/docs/doc_examples/844928da2ff9a1394af5347a5e2e4f78.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ "index.indexing.slowlog.threshold.index.warn": "10s",
+ "index.indexing.slowlog.threshold.index.info": "5s",
+ "index.indexing.slowlog.threshold.index.debug": "2s",
+ "index.indexing.slowlog.threshold.index.trace": "500ms",
+ "index.indexing.slowlog.source": "1000",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8478c39c71bbb559ef6ab919f918f22b.asciidoc b/docs/doc_examples/8478c39c71bbb559ef6ab919f918f22b.asciidoc
new file mode 100644
index 000000000..4bd021e11
--- /dev/null
+++ b/docs/doc_examples/8478c39c71bbb559ef6ab919f918f22b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ filter: {
+ range: {
+ "@timestamp": {
+ gte: "now-1d/d",
+ lt: "now/d",
+ },
+ },
+ },
+ query:
+ '\n file where (file.type == "file" and file.name == "cmd.exe")\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8494d09c39e109a012094eb9d6ec52ac.asciidoc b/docs/doc_examples/8494d09c39e109a012094eb9d6ec52ac.asciidoc
new file mode 100644
index 000000000..66286fa8f
--- /dev/null
+++ b/docs/doc_examples/8494d09c39e109a012094eb9d6ec52ac.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "pipelineA",
+ description: "inner pipeline",
+ processors: [
+ {
+ set: {
+ field: "inner_pipeline_set",
+ value: "inner",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84c61160ca815e29e9973ba1380219dd.asciidoc b/docs/doc_examples/84c61160ca815e29e9973ba1380219dd.asciidoc
new file mode 100644
index 000000000..ef2135f43
--- /dev/null
+++ b/docs/doc_examples/84c61160ca815e29e9973ba1380219dd.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchableSnapshots.stats({
+ index: "my-index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84c69fb07050f0e89720007a6507a221.asciidoc b/docs/doc_examples/84c69fb07050f0e89720007a6507a221.asciidoc
new file mode 100644
index 000000000..902a23594
--- /dev/null
+++ b/docs/doc_examples/84c69fb07050f0e89720007a6507a221.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.cancel({
+ task_id: "oTUltX4IQMOUUVeiohTt8A:464",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84e2cf7417c9e0c9e6f3c23031001440.asciidoc b/docs/doc_examples/84e2cf7417c9e0c9e6f3c23031001440.asciidoc
new file mode 100644
index 000000000..06916ca58
--- /dev/null
+++ b/docs/doc_examples/84e2cf7417c9e0c9e6f3c23031001440.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.stats();
+console.log(response);
+----
diff --git a/docs/doc_examples/84edb44c5b74426f448b2baa101092d6.asciidoc b/docs/doc_examples/84edb44c5b74426f448b2baa101092d6.asciidoc
new file mode 100644
index 000000000..0de7ea182
--- /dev/null
+++ b/docs/doc_examples/84edb44c5b74426f448b2baa101092d6.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "range_index",
+ query: {
+ term: {
+ expected_attendees: {
+ value: 12,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc b/docs/doc_examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc
new file mode 100644
index 000000000..5d2ef1d8d
--- /dev/null
+++ b/docs/doc_examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ term: {
+ "author.keyword": "Maria Rodriguez",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84f2f0cea90340bdd041421afdb58ec3.asciidoc b/docs/doc_examples/84f2f0cea90340bdd041421afdb58ec3.asciidoc
new file mode 100644
index 000000000..13c112515
--- /dev/null
+++ b/docs/doc_examples/84f2f0cea90340bdd041421afdb58ec3.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index1",
+ mappings: {
+ properties: {
+ comment: {
+ type: "text",
+ analyzer: "standard",
+ fields: {
+ english: {
+ type: "text",
+ analyzer: "english",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/84f3e8524f6ff80e870c03ab71551538.asciidoc b/docs/doc_examples/84f3e8524f6ff80e870c03ab71551538.asciidoc
new file mode 100644
index 000000000..4859db54a
--- /dev/null
+++ b/docs/doc_examples/84f3e8524f6ff80e870c03ab71551538.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ preference: "my-custom-shard-string",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc b/docs/doc_examples/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc
new file mode 100644
index 000000000..bf886d598
--- /dev/null
+++ b/docs/doc_examples/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ runtime_mappings: {
+ "measures.voltage": {
+ type: "double",
+ script: {
+ source:
+ "if (doc['model_number.keyword'].value.equals('HG537PU'))\n {emit(1.7 * params._source['measures']['voltage']);}\n else{emit(params._source['measures']['voltage']);}",
+ },
+ },
+ },
+ query: {
+ match: {
+ model_number: "HG537PU",
+ },
+ },
+ fields: ["measures.voltage"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/851f9754dbefc099c54c5423ca4565c0.asciidoc b/docs/doc_examples/851f9754dbefc099c54c5423ca4565c0.asciidoc
new file mode 100644
index 000000000..9682a809d
--- /dev/null
+++ b/docs/doc_examples/851f9754dbefc099c54c5423ca4565c0.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "network-traffic",
+ size: 0,
+ aggs: {
+ "ipv6-subnets": {
+ ip_prefix: {
+ field: "ipv6",
+ prefix_length: 64,
+ is_ipv6: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/852b394d78b8c79ee0055b5501981a4b.asciidoc b/docs/doc_examples/852b394d78b8c79ee0055b5501981a4b.asciidoc
new file mode 100644
index 000000000..9dbde19b3
--- /dev/null
+++ b/docs/doc_examples/852b394d78b8c79ee0055b5501981a4b.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ product_name: {
+ terms: {
+ field: "product",
+ missing_bucket: true,
+ missing_order: "last",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc b/docs/doc_examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc
new file mode 100644
index 000000000..0ca3674f6
--- /dev/null
+++ b/docs/doc_examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "movies",
+ retriever: {
+ rule: {
+ match_criteria: {
+ query_string: "harry potter",
+ },
+ ruleset_ids: ["my-ruleset"],
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "sorcerer's stone",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "chamber of secrets",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85479e02af00681210e17e3d0ff51e21.asciidoc b/docs/doc_examples/85479e02af00681210e17e3d0ff51e21.asciidoc
new file mode 100644
index 000000000..cbe5e40f7
--- /dev/null
+++ b/docs/doc_examples/85479e02af00681210e17e3d0ff51e21.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ date: {
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85519a614ae18c998986d46bbad82b76.asciidoc b/docs/doc_examples/85519a614ae18c998986d46bbad82b76.asciidoc
new file mode 100644
index 000000000..bd8e5bc57
--- /dev/null
+++ b/docs/doc_examples/85519a614ae18c998986d46bbad82b76.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my_template",
+ index_patterns: ["test-*"],
+ template: {
+ settings: {
+ number_of_shards: 1,
+ number_of_replicas: 1,
+ "index.lifecycle.name": "my_policy",
+ "index.lifecycle.rollover_alias": "test-alias",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc b/docs/doc_examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc
new file mode 100644
index 000000000..dad0bf4d5
--- /dev/null
+++ b/docs/doc_examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "mistral_embeddings",
+ inference_config: {
+ service: "mistral",
+ service_settings: {
+ api_key: "",
+ model: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/856c10ad554c26b70f1121454caff40a.asciidoc b/docs/doc_examples/856c10ad554c26b70f1121454caff40a.asciidoc
new file mode 100644
index 000000000..561da085c
--- /dev/null
+++ b/docs/doc_examples/856c10ad554c26b70f1121454caff40a.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "byte-image-index",
+ knn: {
+ field: "byte-image-vector",
+ query_vector: "fb09",
+ k: 10,
+ num_candidates: 100,
+ },
+ fields: ["title"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8582e918a6275472d2eba2e95f1dbe77.asciidoc b/docs/doc_examples/8582e918a6275472d2eba2e95f1dbe77.asciidoc
new file mode 100644
index 000000000..ec8e3ffd4
--- /dev/null
+++ b/docs/doc_examples/8582e918a6275472d2eba2e95f1dbe77.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.disk.watermark.low": "90%",
+ "cluster.routing.allocation.disk.watermark.low.max_headroom": "100GB",
+ "cluster.routing.allocation.disk.watermark.high": "95%",
+ "cluster.routing.allocation.disk.watermark.high.max_headroom": "20GB",
+ "cluster.routing.allocation.disk.watermark.flood_stage": "97%",
+ "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": "5GB",
+ "cluster.routing.allocation.disk.watermark.flood_stage.frozen": "97%",
+ "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom":
+ "5GB",
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putSettings({
+ index: "*",
+ expand_wildcards: "all",
+ settings: {
+ "index.blocks.read_only_allow_delete": null,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/858fde15fb0a0340873b123043f8c3b4.asciidoc b/docs/doc_examples/858fde15fb0a0340873b123043f8c3b4.asciidoc
new file mode 100644
index 000000000..249008681
--- /dev/null
+++ b/docs/doc_examples/858fde15fb0a0340873b123043f8c3b4.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_text: "histogram_1",
+ my_histogram: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ my_text: "histogram_2",
+ my_histogram: {
+ values: [0.1, 0.25, 0.35, 0.4, 0.45, 0.5],
+ counts: [8, 17, 8, 7, 6, 2],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/85ae90b63ecba9d2bad16144b054c0a1.asciidoc b/docs/doc_examples/85ae90b63ecba9d2bad16144b054c0a1.asciidoc
new file mode 100644
index 000000000..f546521a4
--- /dev/null
+++ b/docs/doc_examples/85ae90b63ecba9d2bad16144b054c0a1.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ runtime_mappings: {
+ release_day_of_week: {
+ type: "keyword",
+ script:
+ "\n emit(doc['release_date'].value.dayOfWeekEnum.toString())\n ",
+ },
+ },
+ query:
+ "\n SELECT * FROM library WHERE page_count > 300 AND author = 'Frank Herbert'\n ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85d2e33791f1a74a69dfb04a60e69306.asciidoc b/docs/doc_examples/85d2e33791f1a74a69dfb04a60e69306.asciidoc
new file mode 100644
index 000000000..3670bfbae
--- /dev/null
+++ b/docs/doc_examples/85d2e33791f1a74a69dfb04a60e69306.asciidoc
@@ -0,0 +1,58 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "error_logs_alert",
+ metadata: {
+ color: "red",
+ },
+ trigger: {
+ schedule: {
+ interval: "5m",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: "log-events",
+ body: {
+ size: 0,
+ query: {
+ match: {
+ status: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 5,
+ },
+ },
+ },
+ actions: {
+ email_administrator: {
+ throttle_period: "15m",
+ email: {
+ to: "sys.admino@host.domain",
+ subject: "Encountered {{ctx.payload.hits.total}} errors",
+ body: "Too many error in the system, see attached data",
+ attachments: {
+ attached_data: {
+ data: {
+ format: "json",
+ },
+ },
+ },
+ priority: "high",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85e2719d9fd6d2c2d47d28d39f2e3f7e.asciidoc b/docs/doc_examples/85e2719d9fd6d2c2d47d28d39f2e3f7e.asciidoc
new file mode 100644
index 000000000..dda69bb3e
--- /dev/null
+++ b/docs/doc_examples/85e2719d9fd6d2c2d47d28d39f2e3f7e.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.migration.getFeatureUpgradeStatus();
+console.log(response);
+----
diff --git a/docs/doc_examples/85f0e5e8ab91ceab63c21dbedd9f4037.asciidoc b/docs/doc_examples/85f0e5e8ab91ceab63c21dbedd9f4037.asciidoc
new file mode 100644
index 000000000..563f66b85
--- /dev/null
+++ b/docs/doc_examples/85f0e5e8ab91ceab63c21dbedd9f4037.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "finnish_example",
+ settings: {
+ analysis: {
+ filter: {
+ finnish_stop: {
+ type: "stop",
+ stopwords: "_finnish_",
+ },
+ finnish_keywords: {
+ type: "keyword_marker",
+ keywords: ["esimerkki"],
+ },
+ finnish_stemmer: {
+ type: "stemmer",
+ language: "finnish",
+ },
+ },
+ analyzer: {
+ rebuilt_finnish: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "finnish_stop",
+ "finnish_keywords",
+ "finnish_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85f2839beeb71edb66988e5c82188be0.asciidoc b/docs/doc_examples/85f2839beeb71edb66988e5c82188be0.asciidoc
new file mode 100644
index 000000000..70e3a8299
--- /dev/null
+++ b/docs/doc_examples/85f2839beeb71edb66988e5c82188be0.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.post({
+ licenses: [
+ {
+ uid: "893361dc-9749-4997-93cb-802e3d7fa4xx",
+ type: "basic",
+ issue_date_in_millis: 1411948800000,
+ expiry_date_in_millis: 1914278399999,
+ max_nodes: 1,
+ issued_to: "issuedTo",
+ issuer: "issuer",
+ signature: "xx",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85f6667f148d16d075493fddf07e2932.asciidoc b/docs/doc_examples/85f6667f148d16d075493fddf07e2932.asciidoc
new file mode 100644
index 000000000..4b8133125
--- /dev/null
+++ b/docs/doc_examples/85f6667f148d16d075493fddf07e2932.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: ".ds-my-data-stream-2099.03.07-000001",
+ },
+ dest: {
+ index: "new-data-stream",
+ op_type: "create",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc b/docs/doc_examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc
new file mode 100644
index 000000000..9bc60ea81
--- /dev/null
+++ b/docs/doc_examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "use_existing_deployment",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ deployment_id: ".elser_model_2",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8619bd17bbfe33490b1f277007f654db.asciidoc b/docs/doc_examples/8619bd17bbfe33490b1f277007f654db.asciidoc
new file mode 100644
index 000000000..48f850d0c
--- /dev/null
+++ b/docs/doc_examples/8619bd17bbfe33490b1f277007f654db.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "cohere-rerank",
+ inference_config: {
+ service: "cohere",
+ service_settings: {
+ api_key: "",
+ model_id: "rerank-english-v3.0",
+ },
+ task_settings: {
+ top_n: 10,
+ return_documents: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/861f5f61409dc87f3671293b87839ff7.asciidoc b/docs/doc_examples/861f5f61409dc87f3671293b87839ff7.asciidoc
new file mode 100644
index 000000000..c9fcd3320
--- /dev/null
+++ b/docs/doc_examples/861f5f61409dc87f3671293b87839ff7.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.stats({
+ human: "true",
+ pretty: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/86280dcb49aa89083be4b2644daf1b7c.asciidoc b/docs/doc_examples/86280dcb49aa89083be4b2644daf1b7c.asciidoc
new file mode 100644
index 000000000..2d6d44e58
--- /dev/null
+++ b/docs/doc_examples/86280dcb49aa89083be4b2644daf1b7c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getJobs({
+ job_id: "high_sum_total_sales",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/862907653d1c18d2e80eff7f421200e2.asciidoc b/docs/doc_examples/862907653d1c18d2e80eff7f421200e2.asciidoc
new file mode 100644
index 000000000..f6b386605
--- /dev/null
+++ b/docs/doc_examples/862907653d1c18d2e80eff7f421200e2.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "saml-example",
+ roles: ["example_role"],
+ enabled: true,
+ rules: {
+ field: {
+ "realm.name": "saml1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/863253bf0ab7d227ff72a0a384f4de8c.asciidoc b/docs/doc_examples/863253bf0ab7d227ff72a0a384f4de8c.asciidoc
new file mode 100644
index 000000000..e3b853969
--- /dev/null
+++ b/docs/doc_examples/863253bf0ab7d227ff72a0a384f4de8c.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "indices.lifecycle.poll_interval": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8634c9993485d622fb12d24f4f242264.asciidoc b/docs/doc_examples/8634c9993485d622fb12d24f4f242264.asciidoc
new file mode 100644
index 000000000..7a25d33e8
--- /dev/null
+++ b/docs/doc_examples/8634c9993485d622fb12d24f4f242264.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.modifyDataStream({
+ actions: [
+ {
+ remove_backing_index: {
+ data_stream: "my-data-stream",
+ index: ".ds-my-data-stream-2023.07.26-000001",
+ },
+ },
+ {
+ add_backing_index: {
+ data_stream: "my-data-stream",
+ index: ".ds-my-data-stream-2023.07.26-000001-downsample",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/867f7d43a78066731ead2e223960fc07.asciidoc b/docs/doc_examples/867f7d43a78066731ead2e223960fc07.asciidoc
new file mode 100644
index 000000000..331002c0c
--- /dev/null
+++ b/docs/doc_examples/867f7d43a78066731ead2e223960fc07.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "action.destructive_requires_name": false,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8684589e31d96ab229e8c4feb4d704bb.asciidoc b/docs/doc_examples/8684589e31d96ab229e8c4feb4d704bb.asciidoc
new file mode 100644
index 000000000..8d712c7ba
--- /dev/null
+++ b/docs/doc_examples/8684589e31d96ab229e8c4feb4d704bb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.getPolicy({
+ name: "my-policy,other-policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/86926bcebf213ac182d4373027554858.asciidoc b/docs/doc_examples/86926bcebf213ac182d4373027554858.asciidoc
new file mode 100644
index 000000000..8baadb02c
--- /dev/null
+++ b/docs/doc_examples/86926bcebf213ac182d4373027554858.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_index",
+ mappings: {
+ properties: {
+ my_counter: {
+ type: "unsigned_long",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8696ba08ca6cc4992110c331732e5f47.asciidoc b/docs/doc_examples/8696ba08ca6cc4992110c331732e5f47.asciidoc
new file mode 100644
index 000000000..44ced54be
--- /dev/null
+++ b/docs/doc_examples/8696ba08ca6cc4992110c331732e5f47.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ grade_boxplot: {
+ boxplot: {
+ field: "grade",
+ missing: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8699d35269a47ba867fa8cc766287413.asciidoc b/docs/doc_examples/8699d35269a47ba867fa8cc766287413.asciidoc
new file mode 100644
index 000000000..d3af85d46
--- /dev/null
+++ b/docs/doc_examples/8699d35269a47ba867fa8cc766287413.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.postStartBasic();
+console.log(response);
+----
diff --git a/docs/doc_examples/86c5594c4ec551391096c1abcd652b50.asciidoc b/docs/doc_examples/86c5594c4ec551391096c1abcd652b50.asciidoc
new file mode 100644
index 000000000..ec1a73d6b
--- /dev/null
+++ b/docs/doc_examples/86c5594c4ec551391096c1abcd652b50.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_index",
+ query: {
+ match_all: {},
+ },
+ script_fields: {
+ count10: {
+ script: {
+ source: "Long.divideUnsigned(doc['my_counter'].value, 10)",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8703f3b1b3895543abc36e2a7a0013d3.asciidoc b/docs/doc_examples/8703f3b1b3895543abc36e2a7a0013d3.asciidoc
new file mode 100644
index 000000000..102d6de69
--- /dev/null
+++ b/docs/doc_examples/8703f3b1b3895543abc36e2a7a0013d3.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index_1",
+});
+console.log(response);
+
+const response1 = await client.indices.create({
+ index: "index_2",
+});
+console.log(response1);
+
+const response2 = await client.indices.create({
+ index: "index_3",
+ settings: {
+ "index.priority": 10,
+ },
+});
+console.log(response2);
+
+const response3 = await client.indices.create({
+ index: "index_4",
+ settings: {
+ "index.priority": 5,
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/871154d08efd7251cf3272e758f06acf.asciidoc b/docs/doc_examples/871154d08efd7251cf3272e758f06acf.asciidoc
new file mode 100644
index 000000000..9d1b127fc
--- /dev/null
+++ b/docs/doc_examples/871154d08efd7251cf3272e758f06acf.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "common_grams_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ index_grams: {
+ tokenizer: "whitespace",
+ filter: ["common_grams"],
+ },
+ },
+ filter: {
+ common_grams: {
+ type: "common_grams",
+ common_words: ["a", "is", "the"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8731188553e14134b0a533010318f91a.asciidoc b/docs/doc_examples/8731188553e14134b0a533010318f91a.asciidoc
new file mode 100644
index 000000000..476b8e9b5
--- /dev/null
+++ b/docs/doc_examples/8731188553e14134b0a533010318f91a.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ terms: {
+ force: ["British Transport Police"],
+ },
+ },
+ aggregations: {
+ significant_crime_types: {
+ significant_terms: {
+ field: "crime_type",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8739fad1fb2323950b673acf0c9f2ff5.asciidoc b/docs/doc_examples/8739fad1fb2323950b673acf0c9f2ff5.asciidoc
new file mode 100644
index 000000000..88e4bf500
--- /dev/null
+++ b/docs/doc_examples/8739fad1fb2323950b673acf0c9f2ff5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.open({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/873e2333734b1cf5ed066596e5f74b0a.asciidoc b/docs/doc_examples/873e2333734b1cf5ed066596e5f74b0a.asciidoc
new file mode 100644
index 000000000..966f0118a
--- /dev/null
+++ b/docs/doc_examples/873e2333734b1cf5ed066596e5f74b0a.asciidoc
@@ -0,0 +1,98 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ city: "Amsterdam",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ city: "Amsterdam",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ city: "Amsterdam",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (4.405200 51.222900)",
+ city: "Antwerp",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (2.336389 48.861111)",
+ city: "Paris",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (2.327000 48.860000)",
+ city: "Paris",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ centroid: {
+ geo_centroid: {
+ field: "location",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/873fbbc6ab81409058591385fd602736.asciidoc b/docs/doc_examples/873fbbc6ab81409058591385fd602736.asciidoc
new file mode 100644
index 000000000..73e8ab273
--- /dev/null
+++ b/docs/doc_examples/873fbbc6ab81409058591385fd602736.asciidoc
@@ -0,0 +1,48 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "drivers",
+ id: 1,
+ document: {
+ driver: {
+ last_name: "McQueen",
+ vehicle: [
+ {
+ make: "Powell Motors",
+ model: "Canyonero",
+ },
+ {
+ make: "Miller-Meteor",
+ model: "Ecto-1",
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "drivers",
+ id: 2,
+ refresh: "true",
+ document: {
+ driver: {
+ last_name: "Hudson",
+ vehicle: [
+ {
+ make: "Mifune",
+ model: "Mach Five",
+ },
+ {
+ make: "Miller-Meteor",
+ model: "Ecto-1",
+ },
+ ],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc b/docs/doc_examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc
new file mode 100644
index 000000000..7a998c4c7
--- /dev/null
+++ b/docs/doc_examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ "user.id": "kimchy",
+ },
+});
+console.log(response);
+
+const response1 = await client.count({
+ index: "my-index-000001",
+ q: "user:kimchy",
+});
+console.log(response1);
+
+const response2 = await client.count({
+ index: "my-index-000001",
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/8743887d9b89ea1a2d5e780c349972cf.asciidoc b/docs/doc_examples/8743887d9b89ea1a2d5e780c349972cf.asciidoc
new file mode 100644
index 000000000..b6f07251e
--- /dev/null
+++ b/docs/doc_examples/8743887d9b89ea1a2d5e780c349972cf.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "GET /search",
+ },
+ },
+ collapse: {
+ field: "geo.country_name",
+ inner_hits: {
+ name: "by_location",
+ collapse: {
+ field: "user.id",
+ },
+ size: 3,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87457bb3467484bec3e9df4e25942ba6.asciidoc b/docs/doc_examples/87457bb3467484bec3e9df4e25942ba6.asciidoc
new file mode 100644
index 000000000..238cd5ff2
--- /dev/null
+++ b/docs/doc_examples/87457bb3467484bec3e9df4e25942ba6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query: "FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87469f8b7e9b965408479d276c3ce8aa.asciidoc b/docs/doc_examples/87469f8b7e9b965408479d276c3ce8aa.asciidoc
new file mode 100644
index 000000000..ddbbf086a
--- /dev/null
+++ b/docs/doc_examples/87469f8b7e9b965408479d276c3ce8aa.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.getBehavioralAnalytics({
+ name: "my*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87733deeea4b441b595d19a0f97346f0.asciidoc b/docs/doc_examples/87733deeea4b441b595d19a0f97346f0.asciidoc
new file mode 100644
index 000000000..e2c5d71b0
--- /dev/null
+++ b/docs/doc_examples/87733deeea4b441b595d19a0f97346f0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.healthReport({
+ feature: "shards_availability",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/877ea90c663b5df9efe95717646a666f.asciidoc b/docs/doc_examples/877ea90c663b5df9efe95717646a666f.asciidoc
new file mode 100644
index 000000000..7579e5be5
--- /dev/null
+++ b/docs/doc_examples/877ea90c663b5df9efe95717646a666f.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ group: {
+ type: "keyword",
+ },
+ user: {
+ type: "nested",
+ properties: {
+ first: {
+ type: "keyword",
+ },
+ last: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ group: "fans",
+ user: [
+ {
+ first: "John",
+ last: "Smith",
+ },
+ {
+ first: "Alice",
+ last: "White",
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ fields: ["*"],
+ _source: false,
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/87846c3ddacab1da4af626ae8099e4be.asciidoc b/docs/doc_examples/87846c3ddacab1da4af626ae8099e4be.asciidoc
new file mode 100644
index 000000000..6b632a678
--- /dev/null
+++ b/docs/doc_examples/87846c3ddacab1da4af626ae8099e4be.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "basic_user",
+ roles: ["user"],
+ rules: {
+ field: {
+ dn: "cn=John Doe,ou=example,o=com",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87b0b496747ad6c1e4ab4b462128fa1c.asciidoc b/docs/doc_examples/87b0b496747ad6c1e4ab4b462128fa1c.asciidoc
new file mode 100644
index 000000000..c199db648
--- /dev/null
+++ b/docs/doc_examples/87b0b496747ad6c1e4ab4b462128fa1c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodeattrs({
+ v: "true",
+ h: "name,pid,attr,value",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87c3e9963400a3e4b296ef8d1c86fae3.asciidoc b/docs/doc_examples/87c3e9963400a3e4b296ef8d1c86fae3.asciidoc
new file mode 100644
index 000000000..5d65f861a
--- /dev/null
+++ b/docs/doc_examples/87c3e9963400a3e4b296ef8d1c86fae3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRoles({
+ name: "my_admin_role,my_test_role",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87c42ef733a50954e4d757fc0a08decc.asciidoc b/docs/doc_examples/87c42ef733a50954e4d757fc0a08decc.asciidoc
new file mode 100644
index 000000000..a5245804c
--- /dev/null
+++ b/docs/doc_examples/87c42ef733a50954e4d757fc0a08decc.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-api-key-1",
+ metadata: {
+ application: "my-application",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87d970b4944b6d742c484d7184996c8a.asciidoc b/docs/doc_examples/87d970b4944b6d742c484d7184996c8a.asciidoc
new file mode 100644
index 000000000..f258702ac
--- /dev/null
+++ b/docs/doc_examples/87d970b4944b6d742c484d7184996c8a.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ query_string: "Where is the best place for mountain climbing?",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/87f854393d715aabf4d45e90a8eb74ce.asciidoc b/docs/doc_examples/87f854393d715aabf4d45e90a8eb74ce.asciidoc
new file mode 100644
index 000000000..fd8b35e40
--- /dev/null
+++ b/docs/doc_examples/87f854393d715aabf4d45e90a8eb74ce.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "reviews",
+ size: 0,
+ aggs: {
+ review_variability: {
+ median_absolute_deviation: {
+ field: "rating",
+ missing: 5,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88195d87a350e7fff200131f410c3e88.asciidoc b/docs/doc_examples/88195d87a350e7fff200131f410c3e88.asciidoc
new file mode 100644
index 000000000..7078a7afc
--- /dev/null
+++ b/docs/doc_examples/88195d87a350e7fff200131f410c3e88.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ aggs: {
+ price_ranges: {
+ range: {
+ field: "price",
+ keyed: true,
+ ranges: [
+ {
+ to: 100,
+ },
+ {
+ from: 100,
+ to: 200,
+ },
+ {
+ from: 200,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88341b4eba71ec722f3e38fa1696fe87.asciidoc b/docs/doc_examples/88341b4eba71ec722f3e38fa1696fe87.asciidoc
new file mode 100644
index 000000000..5933f7fad
--- /dev/null
+++ b/docs/doc_examples/88341b4eba71ec722f3e38fa1696fe87.asciidoc
@@ -0,0 +1,56 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ },
+ dest: {
+ index: "sample_ecommerce_orders_by_customer",
+ },
+ pivot: {
+ group_by: {
+ user: {
+ terms: {
+ field: "user",
+ },
+ },
+ customer_id: {
+ terms: {
+ field: "customer_id",
+ },
+ },
+ },
+ aggregations: {
+ order_count: {
+ value_count: {
+ field: "order_id",
+ },
+ },
+ total_order_amt: {
+ sum: {
+ field: "taxful_total_price",
+ },
+ },
+ avg_amt_per_order: {
+ avg: {
+ field: "taxful_total_price",
+ },
+ },
+ avg_unique_products_per_order: {
+ avg: {
+ field: "total_unique_products",
+ },
+ },
+ total_unique_products: {
+ cardinality: {
+ field: "products.product_id",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88554b79dba8fd79991855a692b69ff9.asciidoc b/docs/doc_examples/88554b79dba8fd79991855a692b69ff9.asciidoc
new file mode 100644
index 000000000..0904a2fe0
--- /dev/null
+++ b/docs/doc_examples/88554b79dba8fd79991855a692b69ff9.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.graph.explore({
+ index: "clicklogs",
+ query: {
+ match: {
+ "query.raw": "midi",
+ },
+ },
+ controls: {
+ use_significance: false,
+ sample_size: 2000,
+ timeout: 2000,
+ sample_diversity: {
+ field: "category.raw",
+ max_docs_per_value: 500,
+ },
+ },
+ vertices: [
+ {
+ field: "product",
+ size: 5,
+ min_doc_count: 10,
+ shard_min_doc_count: 3,
+ },
+ ],
+ connections: {
+ query: {
+ bool: {
+ filter: [
+ {
+ range: {
+ query_time: {
+ gte: "2015-10-01 00:00:00",
+ },
+ },
+ },
+ ],
+ },
+ },
+ vertices: [
+ {
+ field: "query.raw",
+ size: 5,
+ min_doc_count: 10,
+ shard_min_doc_count: 3,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88a08d0b15ef41324f5c23db533d47d1.asciidoc b/docs/doc_examples/88a08d0b15ef41324f5c23db533d47d1.asciidoc
new file mode 100644
index 000000000..667429e4b
--- /dev/null
+++ b/docs/doc_examples/88a08d0b15ef41324f5c23db533d47d1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88a283dfccc481f1afba79d9b3c61f51.asciidoc b/docs/doc_examples/88a283dfccc481f1afba79d9b3c61f51.asciidoc
new file mode 100644
index 000000000..fe244468b
--- /dev/null
+++ b/docs/doc_examples/88a283dfccc481f1afba79d9b3c61f51.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryUser();
+console.log(response);
+----
diff --git a/docs/doc_examples/88b19973b970adf9b73fca82017d4951.asciidoc b/docs/doc_examples/88b19973b970adf9b73fca82017d4951.asciidoc
new file mode 100644
index 000000000..6fb12eca1
--- /dev/null
+++ b/docs/doc_examples/88b19973b970adf9b73fca82017d4951.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-*",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88cecae3f0363fc186d955dd8616b5d4.asciidoc b/docs/doc_examples/88cecae3f0363fc186d955dd8616b5d4.asciidoc
new file mode 100644
index 000000000..c37e3b663
--- /dev/null
+++ b/docs/doc_examples/88cecae3f0363fc186d955dd8616b5d4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.getStatus({
+ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
+ keep_alive: "5d",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/88cf60d3310a56d8ae12704abc05b565.asciidoc b/docs/doc_examples/88cf60d3310a56d8ae12704abc05b565.asciidoc
new file mode 100644
index 000000000..0c4c71725
--- /dev/null
+++ b/docs/doc_examples/88cf60d3310a56d8ae12704abc05b565.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.getTrialStatus();
+console.log(response);
+----
diff --git a/docs/doc_examples/894fce12d8f0d01e4c4083885a0c0077.asciidoc b/docs/doc_examples/894fce12d8f0d01e4c4083885a0c0077.asciidoc
new file mode 100644
index 000000000..5a195c6f2
--- /dev/null
+++ b/docs/doc_examples/894fce12d8f0d01e4c4083885a0c0077.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "mistral-embeddings",
+ pipeline: "mistral_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8963fb1e3d0900ba3b68be212e8972ee.asciidoc b/docs/doc_examples/8963fb1e3d0900ba3b68be212e8972ee.asciidoc
new file mode 100644
index 000000000..800021f23
--- /dev/null
+++ b/docs/doc_examples/8963fb1e3d0900ba3b68be212e8972ee.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ names: {
+ type: "text",
+ position_increment_gap: 0,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ names: ["John Abraham", "Lincoln Smith"],
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_phrase: {
+ names: "Abraham Lincoln",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/897668edcbb0785fa5229aeb2dfc963e.asciidoc b/docs/doc_examples/897668edcbb0785fa5229aeb2dfc963e.asciidoc
new file mode 100644
index 000000000..3a2727d45
--- /dev/null
+++ b/docs/doc_examples/897668edcbb0785fa5229aeb2dfc963e.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ query: {
+ match: {
+ message: "bonsai tree",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/89a6b24618cafd60de1702a5b9f28a8d.asciidoc b/docs/doc_examples/89a6b24618cafd60de1702a5b9f28a8d.asciidoc
new file mode 100644
index 000000000..13d14c876
--- /dev/null
+++ b/docs/doc_examples/89a6b24618cafd60de1702a5b9f28a8d.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ suggest: {
+ text: "noble prize",
+ simple_phrase: {
+ phrase: {
+ field: "title.trigram",
+ size: 1,
+ direct_generator: [
+ {
+ field: "title.trigram",
+ suggest_mode: "always",
+ min_word_length: 1,
+ },
+ ],
+ collate: {
+ query: {
+ source: {
+ match: {
+ "{{field_name}}": "{{suggestion}}",
+ },
+ },
+ },
+ params: {
+ field_name: "title",
+ },
+ prune: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/89aed93f641a5e243bdc3ee5cdc2acc6.asciidoc b/docs/doc_examples/89aed93f641a5e243bdc3ee5cdc2acc6.asciidoc
new file mode 100644
index 000000000..88aba54b9
--- /dev/null
+++ b/docs/doc_examples/89aed93f641a5e243bdc3ee5cdc2acc6.asciidoc
@@ -0,0 +1,56 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["index1", "index2"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "bool": {\n "should": [\n {{#text}}\n {\n "multi_match": {\n "query": "{{query_string}}",\n "fields": [{{#text_fields}}"{{name}}^{{boost}}",{{/text_fields}}],\n "boost": "{{text_query_boost}}"\n }\n },\n {{/text}}\n {{#elser}}\n {{#elser_fields}}\n {\n "sparse_vector": {\n "field": "ml.inference.{{.}}_expanded.predicted_value",\n "inference_id": "",\n "query": "{{query_string}}"\n }\n },\n {{/elser_fields}}\n { "bool": { "must": [] } },\n {{/elser}}\n {{^text}}\n {{^elser}}\n {\n "query_string": {\n "query": "{{query_string}}",\n "default_field": "{{default_field}}",\n "default_operator": "{{default_operator}}",\n "boost": "{{text_query_boost}}"\n }\n },\n {{/elser}}\n {{/text}}\n { "bool": { "must": [] } }\n ],\n "minimum_should_match": 1\n }\n },\n "min_score": "{{min_score}}",\n "explain": "{{explain}}",\n "from": "{{from}}",\n "size": "{{size}}"\n }\n ',
+ params: {
+ text: false,
+ elser: false,
+ elser_fields: [
+ {
+ name: "title",
+ boost: 1,
+ },
+ {
+ name: "description",
+ boost: 1,
+ },
+ ],
+ text_fields: [
+ {
+ name: "title",
+ boost: 10,
+ },
+ {
+ name: "description",
+ boost: 5,
+ },
+ {
+ name: "state",
+ boost: 1,
+ },
+ ],
+ query_string: "*",
+ text_query_boost: 4,
+ default_field: "*",
+ default_operator: "OR",
+ explain: false,
+ from: 0,
+ size: 10,
+ min_score: 0,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/89b72dd7f747f6297c2b089e8bc807be.asciidoc b/docs/doc_examples/89b72dd7f747f6297c2b089e8bc807be.asciidoc
new file mode 100644
index 000000000..d0d409240
--- /dev/null
+++ b/docs/doc_examples/89b72dd7f747f6297c2b089e8bc807be.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_repository",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "my_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/89c57917bc7bd2e6387b5eb54ece37b1.asciidoc b/docs/doc_examples/89c57917bc7bd2e6387b5eb54ece37b1.asciidoc
new file mode 100644
index 000000000..fe5711134
--- /dev/null
+++ b/docs/doc_examples/89c57917bc7bd2e6387b5eb54ece37b1.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.count({
+ index: "my-index-000001",
+ query: {
+ exists: {
+ field: "my-field",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc b/docs/doc_examples/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc
new file mode 100644
index 000000000..700b24426
--- /dev/null
+++ b/docs/doc_examples/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.addBlock({
+ index: "my_source_index",
+ block: "write",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/89dee10a24ea2727af5b00039a4271bd.asciidoc b/docs/doc_examples/89dee10a24ea2727af5b00039a4271bd.asciidoc
new file mode 100644
index 000000000..4b84700b5
--- /dev/null
+++ b/docs/doc_examples/89dee10a24ea2727af5b00039a4271bd.asciidoc
@@ -0,0 +1,161 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "tour",
+ mappings: {
+ properties: {
+ city: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ category: {
+ type: "keyword",
+ },
+ route: {
+ type: "long",
+ },
+ name: {
+ type: "keyword",
+ },
+ location: {
+ type: "geo_point",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ settings: {
+ index: {
+ mode: "time_series",
+ routing_path: ["city"],
+ time_series: {
+ start_time: "2023-01-01T00:00:00Z",
+ end_time: "2024-01-01T00:00:00Z",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "tour",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-02T09:00:00Z",
+ route: 0,
+ location: "POINT(4.889187 52.373184)",
+ city: "Amsterdam",
+ category: "Attraction",
+ name: "Royal Palace Amsterdam",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-02T10:00:00Z",
+ route: 1,
+ location: "POINT(4.885057 52.370159)",
+ city: "Amsterdam",
+ category: "Attraction",
+ name: "The Amsterdam Dungeon",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-02T13:00:00Z",
+ route: 2,
+ location: "POINT(4.901618 52.369219)",
+ city: "Amsterdam",
+ category: "Museum",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-02T16:00:00Z",
+ route: 3,
+ location: "POINT(4.912350 52.374081)",
+ city: "Amsterdam",
+ category: "Museum",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-03T12:00:00Z",
+ route: 4,
+ location: "POINT(4.914722 52.371667)",
+ city: "Amsterdam",
+ category: "Museum",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-04T09:00:00Z",
+ route: 5,
+ location: "POINT(4.401384 51.220292)",
+ city: "Antwerp",
+ category: "Attraction",
+ name: "Cathedral of Our Lady",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-04T12:00:00Z",
+ route: 6,
+ location: "POINT(4.405819 51.221758)",
+ city: "Antwerp",
+ category: "Museum",
+ name: "Snijders&Rockoxhuis",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-04T15:00:00Z",
+ route: 7,
+ location: "POINT(4.405200 51.222900)",
+ city: "Antwerp",
+ category: "Museum",
+ name: "Letterenhuis",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-05T10:00:00Z",
+ route: 8,
+ location: "POINT(2.336389 48.861111)",
+ city: "Paris",
+ category: "Museum",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-01-05T14:00:00Z",
+ route: 9,
+ location: "POINT(2.327000 48.860000)",
+ city: "Paris",
+ category: "Museum",
+ name: "Musée dOrsay",
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/89f8eac24f3ec6a7668d580aaf0eeefa.asciidoc b/docs/doc_examples/89f8eac24f3ec6a7668d580aaf0eeefa.asciidoc
new file mode 100644
index 000000000..03db68d26
--- /dev/null
+++ b/docs/doc_examples/89f8eac24f3ec6a7668d580aaf0eeefa.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["snowball"],
+ text: "detailed output",
+ explain: true,
+ attributes: ["keyword"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8a0b5f759de3f27f0801c1176e616117.asciidoc b/docs/doc_examples/8a0b5f759de3f27f0801c1176e616117.asciidoc
new file mode 100644
index 000000000..5ac85568d
--- /dev/null
+++ b/docs/doc_examples/8a0b5f759de3f27f0801c1176e616117.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "semantic-embeddings",
+ mappings: {
+ properties: {
+ content: {
+ type: "semantic_text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8a12cd824404d74f098d854716a26899.asciidoc b/docs/doc_examples/8a12cd824404d74f098d854716a26899.asciidoc
new file mode 100644
index 000000000..0de5dd4f6
--- /dev/null
+++ b/docs/doc_examples/8a12cd824404d74f098d854716a26899.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteDatafeed({
+ datafeed_id: "datafeed-total-requests",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc b/docs/doc_examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc
new file mode 100644
index 000000000..d88b6d247
--- /dev/null
+++ b/docs/doc_examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.get({
+ task_id: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8a1f6cffa653800282c0ae160ee375bc.asciidoc b/docs/doc_examples/8a1f6cffa653800282c0ae160ee375bc.asciidoc
new file mode 100644
index 000000000..75db49a3d
--- /dev/null
+++ b/docs/doc_examples/8a1f6cffa653800282c0ae160ee375bc.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: {
+ source:
+ "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }",
+ lang: "painless",
+ params: {
+ tag: "blue",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8a4941cae0b32d68b22bec2d12c82860.asciidoc b/docs/doc_examples/8a4941cae0b32d68b22bec2d12c82860.asciidoc
new file mode 100644
index 000000000..120f4e523
--- /dev/null
+++ b/docs/doc_examples/8a4941cae0b32d68b22bec2d12c82860.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence by process.pid with maxspan=1h\n [ process where process.name == "regsvr32.exe" ]\n [ file where stringContains(file.name, "scrobj.dll") ]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8a617dbfe5887f8ecc8815de132b6eb0.asciidoc b/docs/doc_examples/8a617dbfe5887f8ecc8815de132b6eb0.asciidoc
new file mode 100644
index 000000000..b481e842e
--- /dev/null
+++ b/docs/doc_examples/8a617dbfe5887f8ecc8815de132b6eb0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "cross-cluster-kibana",
+ password: "l0ng-r4nd0m-p@ssw0rd",
+ roles: ["logstash-reader", "kibana-access"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8aa17bd25a3f2d634e5253b4b72fec4c.asciidoc b/docs/doc_examples/8aa17bd25a3f2d634e5253b4b72fec4c.asciidoc
new file mode 100644
index 000000000..c6532bbde
--- /dev/null
+++ b/docs/doc_examples/8aa17bd25a3f2d634e5253b4b72fec4c.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.explainDataFrameAnalytics({
+ source: {
+ index: "houses_sold_last_10_yrs",
+ },
+ analysis: {
+ regression: {
+ dependent_variable: "price",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8aa74aee3dcf4b34028e4c5e1c1ed27b.asciidoc b/docs/doc_examples/8aa74aee3dcf4b34028e4c5e1c1ed27b.asciidoc
new file mode 100644
index 000000000..2146d1c0b
--- /dev/null
+++ b/docs/doc_examples/8aa74aee3dcf4b34028e4c5e1c1ed27b.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "bug_reports",
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ },
+ labels: {
+ type: "flattened",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "bug_reports",
+ id: 1,
+ document: {
+ title: "Results are not sorted correctly.",
+ labels: {
+ priority: "urgent",
+ release: ["v1.2.5", "v1.3.0"],
+ timestamp: {
+ created: 1541458026,
+ closed: 1541457010,
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/8ab11a25e017124a70484781ca11fb52.asciidoc b/docs/doc_examples/8ab11a25e017124a70484781ca11fb52.asciidoc
new file mode 100644
index 000000000..abbd63ece
--- /dev/null
+++ b/docs/doc_examples/8ab11a25e017124a70484781ca11fb52.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ filter_path: "-hits.events",
+ query: '\n any where process.name == "regsvr32.exe" \n ',
+ size: 200,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b07372a21a10a16b52e70fc0c87ad4e.asciidoc b/docs/doc_examples/8b07372a21a10a16b52e70fc0c87ad4e.asciidoc
new file mode 100644
index 000000000..f93c9a6ad
--- /dev/null
+++ b/docs/doc_examples/8b07372a21a10a16b52e70fc0c87ad4e.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ region: "US",
+ manager: {
+ age: 30,
+ name: {
+ first: "John",
+ last: "Smith",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc b/docs/doc_examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc
new file mode 100644
index 000000000..3bccba38f
--- /dev/null
+++ b/docs/doc_examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryRole({
+ sort: ["name"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b301122cbf42be6eafeda714a36559e.asciidoc b/docs/doc_examples/8b301122cbf42be6eafeda714a36559e.asciidoc
new file mode 100644
index 000000000..fe63d2690
--- /dev/null
+++ b/docs/doc_examples/8b301122cbf42be6eafeda714a36559e.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.logstash.putPipeline({
+ id: "my_pipeline",
+ pipeline: {
+ description: "Sample pipeline for illustration purposes",
+ last_modified: "2021-01-02T02:50:51.250Z",
+ pipeline_metadata: {
+ type: "logstash_pipeline",
+ version: "1",
+ },
+ username: "elastic",
+ pipeline: "input {}\n filter { grok {} }\n output {}",
+ pipeline_settings: {
+ "pipeline.workers": 1,
+ "pipeline.batch.size": 125,
+ "pipeline.batch.delay": 50,
+ "queue.type": "memory",
+ "queue.max_bytes": "1gb",
+ "queue.checkpoint.writes": 1024,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b38eeb41eb388ee6d92f26b5c0cc48d.asciidoc b/docs/doc_examples/8b38eeb41eb388ee6d92f26b5c0cc48d.asciidoc
new file mode 100644
index 000000000..9d2e6845a
--- /dev/null
+++ b/docs/doc_examples/8b38eeb41eb388ee6d92f26b5c0cc48d.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "my-prod-tag-script",
+ script: {
+ lang: "painless",
+ source:
+ "\n Collection tags = ctx.tags;\n if(tags != null){\n for (String tag : tags) {\n if (tag.toLowerCase().contains('prod')) {\n return false;\n }\n }\n }\n return true;\n ",
+ },
+});
+console.log(response);
+
+const response1 = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ drop: {
+ description: "Drop documents that don't contain 'prod' tag",
+ if: {
+ id: "my-prod-tag-script",
+ },
+ },
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/8b3a94495127efd9d56b2cd7f3eecdca.asciidoc b/docs/doc_examples/8b3a94495127efd9d56b2cd7f3eecdca.asciidoc
new file mode 100644
index 000000000..6a76e6bcd
--- /dev/null
+++ b/docs/doc_examples/8b3a94495127efd9d56b2cd7f3eecdca.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getRoleMapping({
+ name: "mapping1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b5bc6e217b0d33e4c88d84f5c1a0712.asciidoc b/docs/doc_examples/8b5bc6e217b0d33e4c88d84f5c1a0712.asciidoc
new file mode 100644
index 000000000..7f67c6988
--- /dev/null
+++ b/docs/doc_examples/8b5bc6e217b0d33e4c88d84f5c1a0712.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ products_without_a_price: {
+ missing: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b652e3205a5e9e0187f56ce3c36ae4e.asciidoc b/docs/doc_examples/8b652e3205a5e9e0187f56ce3c36ae4e.asciidoc
new file mode 100644
index 000000000..fad8ef639
--- /dev/null
+++ b/docs/doc_examples/8b652e3205a5e9e0187f56ce3c36ae4e.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "log-messages",
+ filter_path: "aggregations",
+ aggs: {
+ categories: {
+ categorize_text: {
+ field: "message",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b7956a2b88fd798a895d3466d671b58.asciidoc b/docs/doc_examples/8b7956a2b88fd798a895d3466d671b58.asciidoc
new file mode 100644
index 000000000..6216793f1
--- /dev/null
+++ b/docs/doc_examples/8b7956a2b88fd798a895d3466d671b58.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "http.tracer.include": "*",
+ "http.tracer.exclude": "",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc b/docs/doc_examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc
new file mode 100644
index 000000000..9bee24620
--- /dev/null
+++ b/docs/doc_examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx_keep",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ path: {
+ type: "object",
+ synthetic_source_keep: "all",
+ },
+ ids: {
+ type: "integer",
+ synthetic_source_keep: "arrays",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc b/docs/doc_examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc
new file mode 100644
index 000000000..c92fe8266
--- /dev/null
+++ b/docs/doc_examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/_sync_job/my-connector-sync-job/_error",
+ body: {
+ error: "some-error",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c2060b0272556457f4871c5d7a589fd.asciidoc b/docs/doc_examples/8c2060b0272556457f4871c5d7a589fd.asciidoc
new file mode 100644
index 000000000..b2e2c8b0f
--- /dev/null
+++ b/docs/doc_examples/8c2060b0272556457f4871c5d7a589fd.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "logstash-reader",
+ indices: [
+ {
+ names: ["logstash-*"],
+ privileges: ["read", "view_index_metadata"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c5d48252cd6d1ee26a2bb817f89c78e.asciidoc b/docs/doc_examples/8c5d48252cd6d1ee26a2bb817f89c78e.asciidoc
new file mode 100644
index 000000000..226992d54
--- /dev/null
+++ b/docs/doc_examples/8c5d48252cd6d1ee26a2bb817f89c78e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteFilter({
+ filter_id: "safe_domains",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c619666488927dac6ecb7dcebca44c2.asciidoc b/docs/doc_examples/8c619666488927dac6ecb7dcebca44c2.asciidoc
new file mode 100644
index 000000000..d637e9ff4
--- /dev/null
+++ b/docs/doc_examples/8c619666488927dac6ecb7dcebca44c2.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "cohere-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1024,
+ element_type: "byte",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c693e057f6e85fbf2b56ca442719362.asciidoc b/docs/doc_examples/8c693e057f6e85fbf2b56ca442719362.asciidoc
new file mode 100644
index 000000000..da0b3217f
--- /dev/null
+++ b/docs/doc_examples/8c693e057f6e85fbf2b56ca442719362.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "stats-index",
+ size: 0,
+ aggs: {
+ metric_min: {
+ min: {
+ field: "agg_metric",
+ },
+ },
+ metric_max: {
+ max: {
+ field: "agg_metric",
+ },
+ },
+ metric_value_count: {
+ value_count: {
+ field: "agg_metric",
+ },
+ },
+ metric_sum: {
+ sum: {
+ field: "agg_metric",
+ },
+ },
+ metric_avg: {
+ avg: {
+ field: "agg_metric",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c6f3bb8abae9ff1d21e776f16ad1c86.asciidoc b/docs/doc_examples/8c6f3bb8abae9ff1d21e776f16ad1c86.asciidoc
new file mode 100644
index 000000000..756573630
--- /dev/null
+++ b/docs/doc_examples/8c6f3bb8abae9ff1d21e776f16ad1c86.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDataFrameAnalytics({
+ id: "model-flight-delays-pre",
+ source: {
+ index: ["kibana_sample_data_flights"],
+ query: {
+ range: {
+ DistanceKilometers: {
+ gt: 0,
+ },
+ },
+ },
+ _source: {
+ includes: [],
+ excludes: ["FlightDelay", "FlightDelayType"],
+ },
+ },
+ dest: {
+ index: "df-flight-delays",
+ results_field: "ml-results",
+ },
+ analysis: {
+ regression: {
+ dependent_variable: "FlightDelayMin",
+ training_percent: 90,
+ },
+ },
+ analyzed_fields: {
+ includes: [],
+ excludes: ["FlightNum"],
+ },
+ model_memory_limit: "100mb",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc b/docs/doc_examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc
new file mode 100644
index 000000000..05fa659e7
--- /dev/null
+++ b/docs/doc_examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Document with ID 1",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ text: "Document with ID 2",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ terms: {
+ _id: ["1", "2"],
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/8c9081dc738d1290fd76071b283fcaec.asciidoc b/docs/doc_examples/8c9081dc738d1290fd76071b283fcaec.asciidoc
new file mode 100644
index 000000000..19241e817
--- /dev/null
+++ b/docs/doc_examples/8c9081dc738d1290fd76071b283fcaec.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 2,
+ routing: "user1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc b/docs/doc_examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc
new file mode 100644
index 000000000..bbd7c9edc
--- /dev/null
+++ b/docs/doc_examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ fields: ["voltage_corrected", "node"],
+ size: 2,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8cbf9b46ce3ccc966c4902d2e0c56317.asciidoc b/docs/doc_examples/8cbf9b46ce3ccc966c4902d2e0c56317.asciidoc
new file mode 100644
index 000000000..117a672d0
--- /dev/null
+++ b/docs/doc_examples/8cbf9b46ce3ccc966c4902d2e0c56317.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["keyword_repeat", "stemmer"],
+ text: "fox running and jumping",
+ explain: true,
+ attributes: "keyword",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc b/docs/doc_examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc
new file mode 100644
index 000000000..0b2932f62
--- /dev/null
+++ b/docs/doc_examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc
@@ -0,0 +1,79 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ operations: [
+ {
+ update: {
+ _id: "1",
+ _index: "index1",
+ retry_on_conflict: 3,
+ },
+ },
+ {
+ doc: {
+ field: "value",
+ },
+ },
+ {
+ update: {
+ _id: "0",
+ _index: "index1",
+ retry_on_conflict: 3,
+ },
+ },
+ {
+ script: {
+ source: "ctx._source.counter += params.param1",
+ lang: "painless",
+ params: {
+ param1: 1,
+ },
+ },
+ upsert: {
+ counter: 1,
+ },
+ },
+ {
+ update: {
+ _id: "2",
+ _index: "index1",
+ retry_on_conflict: 3,
+ },
+ },
+ {
+ doc: {
+ field: "value",
+ },
+ doc_as_upsert: true,
+ },
+ {
+ update: {
+ _id: "3",
+ _index: "index1",
+ _source: true,
+ },
+ },
+ {
+ doc: {
+ field: "value",
+ },
+ },
+ {
+ update: {
+ _id: "4",
+ _index: "index1",
+ },
+ },
+ {
+ doc: {
+ field: "value",
+ },
+ _source: true,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8cef2b98f3fe3a85874f1b48ebe6ec63.asciidoc b/docs/doc_examples/8cef2b98f3fe3a85874f1b48ebe6ec63.asciidoc
new file mode 100644
index 000000000..a2825d9b1
--- /dev/null
+++ b/docs/doc_examples/8cef2b98f3fe3a85874f1b48ebe6ec63.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "elision_case_insensitive_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ default: {
+ tokenizer: "whitespace",
+ filter: ["elision_case_insensitive"],
+ },
+ },
+ filter: {
+ elision_case_insensitive: {
+ type: "elision",
+ articles: ["l", "m", "t", "qu", "n", "s", "j"],
+ articles_case: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc b/docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
new file mode 100644
index 000000000..0241e351c
--- /dev/null
+++ b/docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
@@ -0,0 +1,61 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "cooking_blog",
+ properties: {
+ title: {
+ type: "text",
+ analyzer: "standard",
+ fields: {
+ keyword: {
+ type: "keyword",
+ ignore_above: 256,
+ },
+ },
+ },
+ description: {
+ type: "text",
+ fields: {
+ keyword: {
+ type: "keyword",
+ },
+ },
+ },
+ author: {
+ type: "text",
+ fields: {
+ keyword: {
+ type: "keyword",
+ },
+ },
+ },
+ date: {
+ type: "date",
+ format: "yyyy-MM-dd",
+ },
+ category: {
+ type: "text",
+ fields: {
+ keyword: {
+ type: "keyword",
+ },
+ },
+ },
+ tags: {
+ type: "text",
+ fields: {
+ keyword: {
+ type: "keyword",
+ },
+ },
+ },
+ rating: {
+ type: "float",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d064eda2199de52e5be9ee68a5b7c68.asciidoc b/docs/doc_examples/8d064eda2199de52e5be9ee68a5b7c68.asciidoc
new file mode 100644
index 000000000..929bb2357
--- /dev/null
+++ b/docs/doc_examples/8d064eda2199de52e5be9ee68a5b7c68.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-text-embeddings-pipeline",
+ description: "Text embedding pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: ".elser_model_2",
+ input_output: [
+ {
+ input_field: "my_text_field",
+ output_field: "my_tokens",
+ },
+ ],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d421c5bec38eecce4679b219cacc9db.asciidoc b/docs/doc_examples/8d421c5bec38eecce4679b219cacc9db.asciidoc
new file mode 100644
index 000000000..ddc9bab51
--- /dev/null
+++ b/docs/doc_examples/8d421c5bec38eecce4679b219cacc9db.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ runtime_mappings: {
+ "load_time.seconds": {
+ type: "long",
+ script: {
+ source: "emit(doc['load_time'].value / params.timeUnit)",
+ params: {
+ timeUnit: 1000,
+ },
+ },
+ },
+ },
+ aggs: {
+ load_time_ranks: {
+ percentile_ranks: {
+ values: [500, 600],
+ field: "load_time.seconds",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d4ca17349e7e82c329cdd854cc670a1.asciidoc b/docs/doc_examples/8d4ca17349e7e82c329cdd854cc670a1.asciidoc
new file mode 100644
index 000000000..709910bb1
--- /dev/null
+++ b/docs/doc_examples/8d4ca17349e7e82c329cdd854cc670a1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote-search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d4dda5d988d568f4f4210a6387e026f.asciidoc b/docs/doc_examples/8d4dda5d988d568f4f4210a6387e026f.asciidoc
new file mode 100644
index 000000000..e4289442f
--- /dev/null
+++ b/docs/doc_examples/8d4dda5d988d568f4f4210a6387e026f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlLogout({
+ token: "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3",
+ refresh_token: "mJdXLtmvTUSpoLwMvdBt_w",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d6631b622f9bfb8fa70154f6fb8b153.asciidoc b/docs/doc_examples/8d6631b622f9bfb8fa70154f6fb8b153.asciidoc
new file mode 100644
index 000000000..4e6209177
--- /dev/null
+++ b/docs/doc_examples/8d6631b622f9bfb8fa70154f6fb8b153.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "kibana_sample_data_ecommerce",
+ q: "kimchy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d7193902a353872740a3324c60c5001.asciidoc b/docs/doc_examples/8d7193902a353872740a3324c60c5001.asciidoc
new file mode 100644
index 000000000..fe8e691c7
--- /dev/null
+++ b/docs/doc_examples/8d7193902a353872740a3324c60c5001.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "events",
+ settings: {
+ index: {
+ "sort.field": "timestamp",
+ "sort.order": "desc",
+ },
+ },
+ mappings: {
+ properties: {
+ timestamp: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8d9b04f2a97f4229dec9e620126de049.asciidoc b/docs/doc_examples/8d9b04f2a97f4229dec9e620126de049.asciidoc
new file mode 100644
index 000000000..22ae3fa2d
--- /dev/null
+++ b/docs/doc_examples/8d9b04f2a97f4229dec9e620126de049.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.com.amazonaws.request": "DEBUG",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8db799543eb084ec71547980863d60b9.asciidoc b/docs/doc_examples/8db799543eb084ec71547980863d60b9.asciidoc
new file mode 100644
index 000000000..fb3df27c8
--- /dev/null
+++ b/docs/doc_examples/8db799543eb084ec71547980863d60b9.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ sum_monthly_sales: {
+ sum_bucket: {
+ buckets_path: "sales_per_month>sales",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc b/docs/doc_examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc
new file mode 100644
index 000000000..6ff015fdb
--- /dev/null
+++ b/docs/doc_examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.segments({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e06d8b2b737c43806018eae2ca061c1.asciidoc b/docs/doc_examples/8e06d8b2b737c43806018eae2ca061c1.asciidoc
new file mode 100644
index 000000000..5c43e7f8f
--- /dev/null
+++ b/docs/doc_examples/8e06d8b2b737c43806018eae2ca061c1.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ message_stats: {
+ string_stats: {
+ field: "message.keyword",
+ missing: "[empty message]",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e0f43829df9af20547ea6896f4c0124.asciidoc b/docs/doc_examples/8e0f43829df9af20547ea6896f4c0124.asciidoc
new file mode 100644
index 000000000..738638e26
--- /dev/null
+++ b/docs/doc_examples/8e0f43829df9af20547ea6896f4c0124.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "rollover_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_size: "50gb",
+ },
+ },
+ },
+ delete: {
+ min_age: "1d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e208098a0156c4c92afe0a06960b230.asciidoc b/docs/doc_examples/8e208098a0156c4c92afe0a06960b230.asciidoc
new file mode 100644
index 000000000..cf5a5c2b6
--- /dev/null
+++ b/docs/doc_examples/8e208098a0156c4c92afe0a06960b230.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlAuthenticate({
+ content:
+ "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....",
+ ids: ["4fee3b046395c4e751011e97f8900b5273d56685"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc b/docs/doc_examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc
new file mode 100644
index 000000000..fab31728c
--- /dev/null
+++ b/docs/doc_examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.deprecation": "OFF",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc b/docs/doc_examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc
new file mode 100644
index 000000000..9a6f60e85
--- /dev/null
+++ b/docs/doc_examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ metric: "indexing,search",
+ level: "shards",
+ human: "true",
+ expand_wildcards: "all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e42a17edace2bc6e42c6a1532779937.asciidoc b/docs/doc_examples/8e42a17edace2bc6e42c6a1532779937.asciidoc
new file mode 100644
index 000000000..f65a76375
--- /dev/null
+++ b/docs/doc_examples/8e42a17edace2bc6e42c6a1532779937.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ max_price: {
+ max: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e43bb5b7946143e69d397bb81d87df0.asciidoc b/docs/doc_examples/8e43bb5b7946143e69d397bb81d87df0.asciidoc
new file mode 100644
index 000000000..f94192bd1
--- /dev/null
+++ b/docs/doc_examples/8e43bb5b7946143e69d397bb81d87df0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.followStats({
+ index: "follower_index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e68cdfad45e7e6dff254d931eea29d4.asciidoc b/docs/doc_examples/8e68cdfad45e7e6dff254d931eea29d4.asciidoc
new file mode 100644
index 000000000..6f990c6e7
--- /dev/null
+++ b/docs/doc_examples/8e68cdfad45e7e6dff254d931eea29d4.asciidoc
@@ -0,0 +1,101 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-06-21T15:00:01-05:00",
+ message:
+ '211.11.9.0 - - [2020-06-21T15:00:01-05:00] "GET /english/index.html HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-06-21T15:00:01-05:00",
+ message:
+ '211.11.9.0 - - [2020-06-21T15:00:01-05:00] "GET /english/index.html HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:30:17-05:00",
+ message:
+ '40.135.0.0 - - [2020-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:30:53-05:00",
+ message:
+ '232.0.0.0 - - [2020-04-30T14:30:53-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:12-05:00",
+ message:
+ '26.1.0.0 - - [2020-04-30T14:31:12-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:19-05:00",
+ message:
+ '247.37.0.0 - - [2020-04-30T14:31:19-05:00] "GET /french/splash_inet.html HTTP/1.0" 200 3781',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:27-05:00",
+ message:
+ '252.0.0.0 - - [2020-04-30T14:31:27-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:29-05:00",
+ message:
+ '247.37.0.0 - - [2020-04-30T14:31:29-05:00] "GET /images/hm_brdl.gif HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:29-05:00",
+ message:
+ '247.37.0.0 - - [2020-04-30T14:31:29-05:00] "GET /images/hm_arw.gif HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:32-05:00",
+ message:
+ '247.37.0.0 - - [2020-04-30T14:31:32-05:00] "GET /images/nav_bg_top.gif HTTP/1.0" 200 929',
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2020-04-30T14:31:43-05:00",
+ message:
+ '247.37.0.0 - - [2020-04-30T14:31:43-05:00] "GET /french/images/nav_venue_off.gif HTTP/1.0" 304 0',
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc b/docs/doc_examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc
new file mode 100644
index 000000000..fb4577692
--- /dev/null
+++ b/docs/doc_examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateScheduling({
+ connector_id: "my-connector",
+ scheduling: {
+ access_control: {
+ enabled: true,
+ interval: "0 10 0 * * ?",
+ },
+ full: {
+ enabled: true,
+ interval: "0 20 0 * * ?",
+ },
+ incremental: {
+ enabled: false,
+ interval: "0 30 0 * * ?",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e92b10ebcfedc76562ab52d0e46b916.asciidoc b/docs/doc_examples/8e92b10ebcfedc76562ab52d0e46b916.asciidoc
new file mode 100644
index 000000000..7fdd02e82
--- /dev/null
+++ b/docs/doc_examples/8e92b10ebcfedc76562ab52d0e46b916.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteScript({
+ id: "my-search-template",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e9e7dc5fad2b2b8e74ab4dc225d9c53.asciidoc b/docs/doc_examples/8e9e7dc5fad2b2b8e74ab4dc225d9c53.asciidoc
new file mode 100644
index 000000000..f05ef2cfe
--- /dev/null
+++ b/docs/doc_examples/8e9e7dc5fad2b2b8e74ab4dc225d9c53.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.setUpgradeMode({
+ enabled: "false",
+ timeout: "10m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8e9f7261af6264c92d0eb4d586a176f9.asciidoc b/docs/doc_examples/8e9f7261af6264c92d0eb4d586a176f9.asciidoc
new file mode 100644
index 000000000..89704ff94
--- /dev/null
+++ b/docs/doc_examples/8e9f7261af6264c92d0eb4d586a176f9.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "lowercase_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_lowercase: {
+ tokenizer: "whitespace",
+ filter: ["lowercase"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8eac28d2e9b6482b413d61817456a14f.asciidoc b/docs/doc_examples/8eac28d2e9b6482b413d61817456a14f.asciidoc
new file mode 100644
index 000000000..ef8fbee12
--- /dev/null
+++ b/docs/doc_examples/8eac28d2e9b6482b413d61817456a14f.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ terms: {
+ field: "genre",
+ order: {
+ max_play_count: "desc",
+ },
+ },
+ aggs: {
+ max_play_count: {
+ max: {
+ field: "play_count",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc b/docs/doc_examples/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc
new file mode 100644
index 000000000..e8e466065
--- /dev/null
+++ b/docs/doc_examples/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["content", "name^5"],
+ query: "this AND that OR thus",
+ tie_breaker: 0,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8ed31628081db2b6e9106d61d1e142be.asciidoc b/docs/doc_examples/8ed31628081db2b6e9106d61d1e142be.asciidoc
new file mode 100644
index 000000000..7940e4418
--- /dev/null
+++ b/docs/doc_examples/8ed31628081db2b6e9106d61d1e142be.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ simple_query_string: {
+ query: "ny city",
+ auto_generate_synonyms_phrase_query: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8edcd80d9b545a222dcc2f25ca4c6d5f.asciidoc b/docs/doc_examples/8edcd80d9b545a222dcc2f25ca4c6d5f.asciidoc
new file mode 100644
index 000000000..59801baf0
--- /dev/null
+++ b/docs/doc_examples/8edcd80d9b545a222dcc2f25ca4c6d5f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my-search-app",
+ params: {
+ query_string:
+ "What is the most popular brand of coffee sold in the United States?",
+ elser_fields: ["title", "meta_description"],
+ text_fields: ["title", "meta_description"],
+ rrf: {
+ rank_window_size: 50,
+ rank_constant: 25,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8ee9521f57661a050efb614f02b4a090.asciidoc b/docs/doc_examples/8ee9521f57661a050efb614f02b4a090.asciidoc
new file mode 100644
index 000000000..e74958326
--- /dev/null
+++ b/docs/doc_examples/8ee9521f57661a050efb614f02b4a090.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ terms: {
+ field: "genre",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f0c5c81cdb902c136db821947ee70a1.asciidoc b/docs/doc_examples/8f0c5c81cdb902c136db821947ee70a1.asciidoc
new file mode 100644
index 000000000..6d592d602
--- /dev/null
+++ b/docs/doc_examples/8f0c5c81cdb902c136db821947ee70a1.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ "price.adjusted": {
+ type: "double",
+ script:
+ "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n ",
+ },
+ },
+ aggs: {
+ min_price: {
+ min: {
+ field: "price.adjusted",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f2875d976332cf5da8fb7764097a307.asciidoc b/docs/doc_examples/8f2875d976332cf5da8fb7764097a307.asciidoc
new file mode 100644
index 000000000..2d5479b4c
--- /dev/null
+++ b/docs/doc_examples/8f2875d976332cf5da8fb7764097a307.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ lifecycle: {
+ data_retention: "7d",
+ },
+ },
+ _meta: {
+ description: "Template with data stream lifecycle",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc b/docs/doc_examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc
new file mode 100644
index 000000000..4e03b85dd
--- /dev/null
+++ b/docs/doc_examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ actions: "*search",
+ detailed: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f6f7ea5abf56152b4a5639ddf40848f.asciidoc b/docs/doc_examples/8f6f7ea5abf56152b4a5639ddf40848f.asciidoc
new file mode 100644
index 000000000..8d4db5856
--- /dev/null
+++ b/docs/doc_examples/8f6f7ea5abf56152b4a5639ddf40848f.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "native1_users",
+ refresh: "true",
+ roles: ["user"],
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "native1",
+ },
+ },
+ {
+ field: {
+ username: "principalname1",
+ },
+ },
+ ],
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f7936f219500305e5b2518dbbf949ea.asciidoc b/docs/doc_examples/8f7936f219500305e5b2518dbbf949ea.asciidoc
new file mode 100644
index 000000000..51580581f
--- /dev/null
+++ b/docs/doc_examples/8f7936f219500305e5b2518dbbf949ea.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.status({
+ id: "FmpwbThueVB4UkRDeUxqb1l4akIza3cbWEJyeVBPQldTV3FGZGdIeUVabXBldzoyMDIw",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc b/docs/doc_examples/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc
new file mode 100644
index 000000000..939e09227
--- /dev/null
+++ b/docs/doc_examples/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ tags: {
+ terms: {
+ field: "tags",
+ execution_hint: "map",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8f9f88cf9a27c1138226efb94ac09e73.asciidoc b/docs/doc_examples/8f9f88cf9a27c1138226efb94ac09e73.asciidoc
new file mode 100644
index 000000000..c3470454d
--- /dev/null
+++ b/docs/doc_examples/8f9f88cf9a27c1138226efb94ac09e73.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ ip_addr: "192.168.0.0/16",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8fe128323a944765f525c76d85af7a2f.asciidoc b/docs/doc_examples/8fe128323a944765f525c76d85af7a2f.asciidoc
new file mode 100644
index 000000000..3d82c170f
--- /dev/null
+++ b/docs/doc_examples/8fe128323a944765f525c76d85af7a2f.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "kibana_sample_data_ecommerce",
+ size: 0,
+ track_total_hits: "false",
+ aggregations: {
+ sampling: {
+ random_sampler: {
+ probability: 0.1,
+ },
+ aggs: {
+ price_percentiles: {
+ percentiles: {
+ field: "taxful_total_price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/8fec06a98d0151c1d717a01491d0b8f0.asciidoc b/docs/doc_examples/8fec06a98d0151c1d717a01491d0b8f0.asciidoc
new file mode 100644
index 000000000..2d7c738ce
--- /dev/null
+++ b/docs/doc_examples/8fec06a98d0151c1d717a01491d0b8f0.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "dsl-data-stream",
+ document: {
+ "@timestamp": "2023-10-18T16:21:15.000Z",
+ message:
+ '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736',
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/90083d93e46fad2524755b8d4d1306fc.asciidoc b/docs/doc_examples/90083d93e46fad2524755b8d4d1306fc.asciidoc
new file mode 100644
index 000000000..d1c80a37d
--- /dev/null
+++ b/docs/doc_examples/90083d93e46fad2524755b8d4d1306fc.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/_sync_job/my-connector-sync-job/_stats",
+ body: {
+ deleted_document_count: 10,
+ indexed_document_count: 20,
+ indexed_document_volume: 1000,
+ total_document_count: 2000,
+ last_seen: "2023-01-02T10:00:00Z",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/901d66919e584515717bf78ab5ca2cbb.asciidoc b/docs/doc_examples/901d66919e584515717bf78ab5ca2cbb.asciidoc
new file mode 100644
index 000000000..696802ab2
--- /dev/null
+++ b/docs/doc_examples/901d66919e584515717bf78ab5ca2cbb.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ range: {
+ date_range: {
+ field: "date",
+ time_zone: "CET",
+ ranges: [
+ {
+ to: "2016/02/01",
+ },
+ {
+ from: "2016/02/01",
+ to: "now/d",
+ },
+ {
+ from: "now/d",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc b/docs/doc_examples/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc
new file mode 100644
index 000000000..66053e31e
--- /dev/null
+++ b/docs/doc_examples/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "kibana_sample_data_ecommerce2",
+ document: {
+ user: "kimchy",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9054187cbab5c9e1c4ca2a4dba6a5db0.asciidoc b/docs/doc_examples/9054187cbab5c9e1c4ca2a4dba6a5db0.asciidoc
new file mode 100644
index 000000000..da884497d
--- /dev/null
+++ b/docs/doc_examples/9054187cbab5c9e1c4ca2a4dba6a5db0.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.xpack.info();
+console.log(response);
+----
diff --git a/docs/doc_examples/90631797c7fbda43902abf2cc0ea8304.asciidoc b/docs/doc_examples/90631797c7fbda43902abf2cc0ea8304.asciidoc
new file mode 100644
index 000000000..5e3c8c70b
--- /dev/null
+++ b/docs/doc_examples/90631797c7fbda43902abf2cc0ea8304.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "indices",
+ index_metric: "request_cache",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/908326e14ad76c2ff04a9b6d8365751f.asciidoc b/docs/doc_examples/908326e14ad76c2ff04a9b6d8365751f.asciidoc
new file mode 100644
index 000000000..d6ab00301
--- /dev/null
+++ b/docs/doc_examples/908326e14ad76c2ff04a9b6d8365751f.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "passage_vectors",
+ fields: ["creation_time", "full_text"],
+ _source: false,
+ knn: {
+ query_vector: [0.45, 45],
+ field: "paragraph.vector",
+ k: 2,
+ num_candidates: 2,
+ inner_hits: {
+ _source: false,
+ fields: ["paragraph.text"],
+ size: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/909a032a9c1f7095b798444705b09ad6.asciidoc b/docs/doc_examples/909a032a9c1f7095b798444705b09ad6.asciidoc
new file mode 100644
index 000000000..e72223aab
--- /dev/null
+++ b/docs/doc_examples/909a032a9c1f7095b798444705b09ad6.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/90c087560ea6c0b7405f710971c86ef0.asciidoc b/docs/doc_examples/90c087560ea6c0b7405f710971c86ef0.asciidoc
new file mode 100644
index 000000000..ed42ce39f
--- /dev/null
+++ b/docs/doc_examples/90c087560ea6c0b7405f710971c86ef0.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.putAutoFollowPattern({
+ name: "my_auto_follow_pattern",
+ remote_cluster: "remote_cluster",
+ leader_index_patterns: ["leader_index*"],
+ follow_index_pattern: "{{leader_index}}-follower",
+ settings: {
+ "index.number_of_replicas": 0,
+ },
+ max_read_request_operation_count: 1024,
+ max_outstanding_read_requests: 16,
+ max_read_request_size: "1024k",
+ max_write_request_operation_count: 32768,
+ max_write_request_size: "16k",
+ max_outstanding_write_requests: 8,
+ max_write_buffer_count: 512,
+ max_write_buffer_size: "512k",
+ max_retry_delay: "10s",
+ read_poll_timeout: "30s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/90e06d5ec5e454832d8fbd2e73ec2248.asciidoc b/docs/doc_examples/90e06d5ec5e454832d8fbd2e73ec2248.asciidoc
new file mode 100644
index 000000000..59859c078
--- /dev/null
+++ b/docs/doc_examples/90e06d5ec5e454832d8fbd2e73ec2248.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.deleteAutoscalingPolicy({
+ name: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/90f1f5304922fb6d097846dd1444c075.asciidoc b/docs/doc_examples/90f1f5304922fb6d097846dd1444c075.asciidoc
new file mode 100644
index 000000000..9e800a478
--- /dev/null
+++ b/docs/doc_examples/90f1f5304922fb6d097846dd1444c075.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "cluster_health_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ http: {
+ request: {
+ host: "localhost",
+ port: 9200,
+ path: "/_cluster/health",
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.status": {
+ eq: "red",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9116ee8a5b00cc877291ed5559563f24.asciidoc b/docs/doc_examples/9116ee8a5b00cc877291ed5559563f24.asciidoc
new file mode 100644
index 000000000..9732b73ad
--- /dev/null
+++ b/docs/doc_examples/9116ee8a5b00cc877291ed5559563f24.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "my_watch",
+ trigger: {
+ schedule: {
+ yearly: {
+ in: "february",
+ on: 29,
+ at: "noon",
+ },
+ },
+ },
+ input: {
+ simple: {
+ payload: {
+ send: "yes",
+ },
+ },
+ },
+ condition: {
+ always: {},
+ },
+ actions: {
+ test_index: {
+ throttle_period: "15m",
+ index: {
+ index: "test",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/911c56114e50ce7440eb83efc91d28b8.asciidoc b/docs/doc_examples/911c56114e50ce7440eb83efc91d28b8.asciidoc
new file mode 100644
index 000000000..352dda611
--- /dev/null
+++ b/docs/doc_examples/911c56114e50ce7440eb83efc91d28b8.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-data-stream",
+ properties: {
+ host: {
+ properties: {
+ ip: {
+ type: "ip",
+ ignore_malformed: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9120b6a49ec39a1571339fddf8e1a26f.asciidoc b/docs/doc_examples/9120b6a49ec39a1571339fddf8e1a26f.asciidoc
new file mode 100644
index 000000000..00f36997e
--- /dev/null
+++ b/docs/doc_examples/9120b6a49ec39a1571339fddf8e1a26f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ field: "my-long-field",
+ value: 10,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/91270cef57ac455547ffd47839420887.asciidoc b/docs/doc_examples/91270cef57ac455547ffd47839420887.asciidoc
new file mode 100644
index 000000000..84f7381a4
--- /dev/null
+++ b/docs/doc_examples/91270cef57ac455547ffd47839420887.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ filter_path: "aggregations",
+ size: 0,
+ aggs: {
+ buckets: {
+ composite: {
+ sources: [
+ {
+ month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ },
+ },
+ {
+ type: {
+ terms: {
+ field: "type",
+ },
+ },
+ },
+ ],
+ },
+ aggs: {
+ avg_price: {
+ rate: {
+ field: "price",
+ unit: "day",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9129dec88d35571b3166c6677297f03b.asciidoc b/docs/doc_examples/9129dec88d35571b3166c6677297f03b.asciidoc
new file mode 100644
index 000000000..ac213dce2
--- /dev/null
+++ b/docs/doc_examples/9129dec88d35571b3166c6677297f03b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.getTransform({
+ transform_id: "ecommerce_transform1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9138550002cb26ab64918cce427963b8.asciidoc b/docs/doc_examples/9138550002cb26ab64918cce427963b8.asciidoc
new file mode 100644
index 000000000..41cdf5cb4
--- /dev/null
+++ b/docs/doc_examples/9138550002cb26ab64918cce427963b8.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["foo", "bar"],
+ priority: 0,
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ },
+ version: 123,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/913c163c197802078a8af72150178061.asciidoc b/docs/doc_examples/913c163c197802078a8af72150178061.asciidoc
new file mode 100644
index 000000000..bfc33ec56
--- /dev/null
+++ b/docs/doc_examples/913c163c197802078a8af72150178061.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ sales_deriv: {
+ derivative: {
+ buckets_path: "sales",
+ },
+ },
+ sales_2nd_deriv: {
+ derivative: {
+ buckets_path: "sales_deriv",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9143be4f137574271953a7a8107e175b.asciidoc b/docs/doc_examples/9143be4f137574271953a7a8107e175b.asciidoc
new file mode 100644
index 000000000..17b21295f
--- /dev/null
+++ b/docs/doc_examples/9143be4f137574271953a7a8107e175b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUserProfile({
+ uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc b/docs/doc_examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc
new file mode 100644
index 000000000..39f61a37a
--- /dev/null
+++ b/docs/doc_examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "restaurants",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ multi_match: {
+ query: "Austria",
+ fields: ["city", "region"],
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [10, 22, 77],
+ k: 10,
+ num_candidates: 10,
+ },
+ },
+ ],
+ rank_constant: 1,
+ rank_window_size: 50,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/91750571c195718f0ff246e058e4bc63.asciidoc b/docs/doc_examples/91750571c195718f0ff246e058e4bc63.asciidoc
new file mode 100644
index 000000000..4e86f61b8
--- /dev/null
+++ b/docs/doc_examples/91750571c195718f0ff246e058e4bc63.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "twitter",
+ query: {
+ match: {
+ title: "elasticsearch",
+ },
+ },
+ sort: [
+ {
+ date: "asc",
+ },
+ {
+ tie_breaker_id: "asc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/91c01fcad9bf341d039a15dfc593dcd7.asciidoc b/docs/doc_examples/91c01fcad9bf341d039a15dfc593dcd7.asciidoc
new file mode 100644
index 000000000..17cd435b2
--- /dev/null
+++ b/docs/doc_examples/91c01fcad9bf341d039a15dfc593dcd7.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ index: "my-index-*",
+ fields: "rating",
+ index_filter: {
+ range: {
+ "@timestamp": {
+ gte: "2018",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/91c925fc71abe0ddfe52457e9130363b.asciidoc b/docs/doc_examples/91c925fc71abe0ddfe52457e9130363b.asciidoc
new file mode 100644
index 000000000..ad067f7f4
--- /dev/null
+++ b/docs/doc_examples/91c925fc71abe0ddfe52457e9130363b.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.grantApiKey({
+ grant_type: "password",
+ username: "test_admin",
+ password: "x-pack-test-password",
+ run_as: "test_user",
+ api_key: {
+ name: "another-api-key",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/91cbeeda86b4e4e393fc79d4e3a4a781.asciidoc b/docs/doc_examples/91cbeeda86b4e4e393fc79d4e3a4a781.asciidoc
new file mode 100644
index 000000000..90c51d019
--- /dev/null
+++ b/docs/doc_examples/91cbeeda86b4e4e393fc79d4e3a4a781.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "stackoverflow",
+ size: 0,
+ query: {
+ query_string: {
+ query: "tags:kibana OR tags:javascript",
+ },
+ },
+ aggs: {
+ low_quality_keywords: {
+ significant_terms: {
+ field: "tags",
+ size: 3,
+ exclude: ["kibana", "javascript"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/91ed08faaed54cb5ace9a295af937439.asciidoc b/docs/doc_examples/91ed08faaed54cb5ace9a295af937439.asciidoc
new file mode 100644
index 000000000..8e51a524e
--- /dev/null
+++ b/docs/doc_examples/91ed08faaed54cb5ace9a295af937439.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ runtime_mappings: {
+ "message.length": {
+ type: "long",
+ script: "emit(doc['message.keyword'].value.length())",
+ },
+ },
+ aggs: {
+ message_length: {
+ histogram: {
+ interval: 10,
+ field: "message.length",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9200ed8d5f798a158def4c526e41269e.asciidoc b/docs/doc_examples/9200ed8d5f798a158def4c526e41269e.asciidoc
new file mode 100644
index 000000000..71d3f7824
--- /dev/null
+++ b/docs/doc_examples/9200ed8d5f798a158def4c526e41269e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ index: "my-index-000001",
+ fields: "rating",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/92035a2a62d01a511662af65606d5fc6.asciidoc b/docs/doc_examples/92035a2a62d01a511662af65606d5fc6.asciidoc
new file mode 100644
index 000000000..f5102d8e7
--- /dev/null
+++ b/docs/doc_examples/92035a2a62d01a511662af65606d5fc6.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ bucket_truncate: {
+ bucket_sort: {
+ from: 1,
+ size: 1,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9216e8e544e6d193eda1f59e9160a225.asciidoc b/docs/doc_examples/9216e8e544e6d193eda1f59e9160a225.asciidoc
new file mode 100644
index 000000000..e28ae08d9
--- /dev/null
+++ b/docs/doc_examples/9216e8e544e6d193eda1f59e9160a225.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_near: {
+ clauses: [
+ {
+ span_term: {
+ field: "value1",
+ },
+ },
+ {
+ span_term: {
+ field: "value2",
+ },
+ },
+ {
+ span_term: {
+ field: "value3",
+ },
+ },
+ ],
+ slop: 12,
+ in_order: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/922529276f87cb9d116be2468d108466.asciidoc b/docs/doc_examples/922529276f87cb9d116be2468d108466.asciidoc
new file mode 100644
index 000000000..1a1b6c4c6
--- /dev/null
+++ b/docs/doc_examples/922529276f87cb9d116be2468d108466.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ default: {
+ type: "simple",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9225841fdcddaf83ebdb90c2b0399e20.asciidoc b/docs/doc_examples/9225841fdcddaf83ebdb90c2b0399e20.asciidoc
new file mode 100644
index 000000000..b3d7c123d
--- /dev/null
+++ b/docs/doc_examples/9225841fdcddaf83ebdb90c2b0399e20.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getTrainedModelsStats();
+console.log(response);
+----
diff --git a/docs/doc_examples/92284d24bbb80ce6943f2ddcbf74b833.asciidoc b/docs/doc_examples/92284d24bbb80ce6943f2ddcbf74b833.asciidoc
new file mode 100644
index 000000000..dd0d0fa0a
--- /dev/null
+++ b/docs/doc_examples/92284d24bbb80ce6943f2ddcbf74b833.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ flattened_field: {
+ type: "flattened",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ flattened_field: {
+ subfield: "value",
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ fields: ["flattened_field.subfield"],
+ _source: false,
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/923aee95078219ee6eb321a252e1121b.asciidoc b/docs/doc_examples/923aee95078219ee6eb321a252e1121b.asciidoc
new file mode 100644
index 000000000..93158444f
--- /dev/null
+++ b/docs/doc_examples/923aee95078219ee6eb321a252e1121b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "ngram_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_ngram: {
+ tokenizer: "standard",
+ filter: ["ngram"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/926c0134aeaad53bd0f3bdad9c430217.asciidoc b/docs/doc_examples/926c0134aeaad53bd0f3bdad9c430217.asciidoc
new file mode 100644
index 000000000..d680c008d
--- /dev/null
+++ b/docs/doc_examples/926c0134aeaad53bd0f3bdad9c430217.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ text: "words words",
+ flag: "foo",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9270964d35d172ea5b193c5fc7a473dd.asciidoc b/docs/doc_examples/9270964d35d172ea5b193c5fc7a473dd.asciidoc
new file mode 100644
index 000000000..aba08bf33
--- /dev/null
+++ b/docs/doc_examples/9270964d35d172ea5b193c5fc7a473dd.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.templates({
+ name: "my-template-*",
+ v: "true",
+ s: "name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc b/docs/doc_examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc
new file mode 100644
index 000000000..446a2b57b
--- /dev/null
+++ b/docs/doc_examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query:
+ '\n FROM library\n | EVAL year = DATE_EXTRACT("year", release_date)\n | WHERE page_count > ? AND author == ?\n | STATS count = COUNT(*) by year\n | WHERE count > ?\n | LIMIT 5\n ',
+ params: [300, "Frank Herbert", 0],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9298aaf8232a819e79b3bf8471245e98.asciidoc b/docs/doc_examples/9298aaf8232a819e79b3bf8471245e98.asciidoc
new file mode 100644
index 000000000..df7ed68c4
--- /dev/null
+++ b/docs/doc_examples/9298aaf8232a819e79b3bf8471245e98.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getJobStats({
+ job_id: "low_request_rate",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/92d0c12d53a900308150d572c3f2f82f.asciidoc b/docs/doc_examples/92d0c12d53a900308150d572c3f2f82f.asciidoc
new file mode 100644
index 000000000..975c72f37
--- /dev/null
+++ b/docs/doc_examples/92d0c12d53a900308150d572c3f2f82f.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ strings_as_keywords: {
+ match_mapping_type: "string",
+ mapping: {
+ type: "keyword",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/92d343eb755971c44a939d0660bf5ac2.asciidoc b/docs/doc_examples/92d343eb755971c44a939d0660bf5ac2.asciidoc
new file mode 100644
index 000000000..3680cbd11
--- /dev/null
+++ b/docs/doc_examples/92d343eb755971c44a939d0660bf5ac2.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 1,
+ refresh: "true",
+ document: {
+ test: "test",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 2,
+ refresh: "true",
+ document: {
+ test: "test",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/92f073762634a4b2274f71002494192e.asciidoc b/docs/doc_examples/92f073762634a4b2274f71002494192e.asciidoc
new file mode 100644
index 000000000..5f45e9c3b
--- /dev/null
+++ b/docs/doc_examples/92f073762634a4b2274f71002494192e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ filter_path: "metadata.cluster_coordination.voting_config_exclusions",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc b/docs/doc_examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc
new file mode 100644
index 000000000..6f5ec0f73
--- /dev/null
+++ b/docs/doc_examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ range: {
+ timestamp: {
+ gte: "2020-04-30T14:31:27-05:00",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/92fe53019958ba466d1272da0834cf53.asciidoc b/docs/doc_examples/92fe53019958ba466d1272da0834cf53.asciidoc
new file mode 100644
index 000000000..0d9bdfb80
--- /dev/null
+++ b/docs/doc_examples/92fe53019958ba466d1272da0834cf53.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/930a3c5667e3bf47b4e8cc28e7bf8d5f.asciidoc b/docs/doc_examples/930a3c5667e3bf47b4e8cc28e7bf8d5f.asciidoc
new file mode 100644
index 000000000..7091b8d7b
--- /dev/null
+++ b/docs/doc_examples/930a3c5667e3bf47b4e8cc28e7bf8d5f.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "my_admin_role",
+ refresh: "true",
+ cluster: ["manage"],
+ indices: [
+ {
+ names: ["index1", "index2"],
+ privileges: ["manage"],
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["admin", "read"],
+ resources: ["*"],
+ },
+ ],
+ run_as: ["analyst_user"],
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/930ba37af73dd5ff0342ecfe6c60a4e9.asciidoc b/docs/doc_examples/930ba37af73dd5ff0342ecfe6c60a4e9.asciidoc
new file mode 100644
index 000000000..1f6f7cebc
--- /dev/null
+++ b/docs/doc_examples/930ba37af73dd5ff0342ecfe6c60a4e9.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ grades_stats: {
+ extended_stats: {
+ field: "grade",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc b/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc
new file mode 100644
index 000000000..86e737ce5
--- /dev/null
+++ b/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.put({
+ connector_id: "my-{service-name-stub}-connector",
+ index_name: "my-elasticsearch-index",
+ name: "Content synced from {service-name}",
+ service_type: "{service-name-stub}",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc b/docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc
new file mode 100644
index 000000000..3d34dce97
--- /dev/null
+++ b/docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "query_helper_pipeline",
+ processors: [
+ {
+ script: {
+ source:
+ "ctx.prompt = 'Please generate an elasticsearch search query on index `articles_index` for the following natural language query. Dates are in the field `@timestamp`, document types are in the field `type` (options are `news`, `publication`), categories in the field `category` and can be multiple (options are `medicine`, `pharmaceuticals`, `technology`), and document names are in the field `title` which should use a fuzzy match. Ignore fields which cannot be determined from the natural language query context: ' + ctx.content",
+ },
+ },
+ {
+ inference: {
+ model_id: "openai_chat_completions",
+ input_output: {
+ input_field: "prompt",
+ output_field: "query",
+ },
+ },
+ },
+ {
+ remove: {
+ field: "prompt",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/931da02a06953a768f4ad3fecfd7b2df.asciidoc b/docs/doc_examples/931da02a06953a768f4ad3fecfd7b2df.asciidoc
new file mode 100644
index 000000000..1401e6fff
--- /dev/null
+++ b/docs/doc_examples/931da02a06953a768f4ad3fecfd7b2df.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ name: "index.routing.allocation.total_shards_per_node",
+ flat_settings: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9326e323f7ffde678fa04d2d1de3d3bc.asciidoc b/docs/doc_examples/9326e323f7ffde678fa04d2d1de3d3bc.asciidoc
new file mode 100644
index 000000000..8ca628047
--- /dev/null
+++ b/docs/doc_examples/9326e323f7ffde678fa04d2d1de3d3bc.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "alibabacloud-ai-search-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "alibabacloud_ai_search_embeddings",
+ model_text: "Calculate fuel cost",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9334ccd09548b585cd637d7c66c5ae65.asciidoc b/docs/doc_examples/9334ccd09548b585cd637d7c66c5ae65.asciidoc
new file mode 100644
index 000000000..914fa5b5b
--- /dev/null
+++ b/docs/doc_examples/9334ccd09548b585cd637d7c66c5ae65.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: {
+ operator: "or",
+ query: "the quick brown",
+ },
+ },
+ },
+ rescore: [
+ {
+ window_size: 100,
+ query: {
+ rescore_query: {
+ match_phrase: {
+ message: {
+ query: "the quick brown",
+ slop: 2,
+ },
+ },
+ },
+ query_weight: 0.7,
+ rescore_query_weight: 1.2,
+ },
+ },
+ {
+ window_size: 10,
+ query: {
+ score_mode: "multiply",
+ rescore_query: {
+ function_score: {
+ script_score: {
+ script: {
+ source: "Math.log10(doc.count.value + 2)",
+ },
+ },
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/93429d2bfbc0a9b7a4854b27e34658cf.asciidoc b/docs/doc_examples/93429d2bfbc0a9b7a4854b27e34658cf.asciidoc
new file mode 100644
index 000000000..90418dd1a
--- /dev/null
+++ b/docs/doc_examples/93429d2bfbc0a9b7a4854b27e34658cf.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ message: {
+ type: "text",
+ },
+ query: {
+ type: "percolator",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/93444b445446c1a6033347d6267253d6.asciidoc b/docs/doc_examples/93444b445446c1a6033347d6267253d6.asciidoc
new file mode 100644
index 000000000..c06ee69df
--- /dev/null
+++ b/docs/doc_examples/93444b445446c1a6033347d6267253d6.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_phrase_prefix: {
+ message: {
+ query: "quick brown f",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/934aa38c3adcc4cf74ea40cd8736876c.asciidoc b/docs/doc_examples/934aa38c3adcc4cf74ea40cd8736876c.asciidoc
new file mode 100644
index 000000000..929aab1a1
--- /dev/null
+++ b/docs/doc_examples/934aa38c3adcc4cf74ea40cd8736876c.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ settings: {
+ number_of_shards: 1,
+ },
+ mappings: {
+ properties: {
+ field1: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/934ced0998552cc95a28e48554147e8b.asciidoc b/docs/doc_examples/934ced0998552cc95a28e48554147e8b.asciidoc
new file mode 100644
index 000000000..7b219da91
--- /dev/null
+++ b/docs/doc_examples/934ced0998552cc95a28e48554147e8b.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain({
+ index: "my-index",
+ shard: 0,
+ primary: false,
+ current_node: "my-node",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/935566d5426d44ade486a49ec5289741.asciidoc b/docs/doc_examples/935566d5426d44ade486a49ec5289741.asciidoc
new file mode 100644
index 000000000..197ace01b
--- /dev/null
+++ b/docs/doc_examples/935566d5426d44ade486a49ec5289741.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 10,
+ },
+ dest: {
+ index: "semantic-embeddings",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/935ee7c1b86ba9592604834bb673c7a3.asciidoc b/docs/doc_examples/935ee7c1b86ba9592604834bb673c7a3.asciidoc
new file mode 100644
index 000000000..c18b0521e
--- /dev/null
+++ b/docs/doc_examples/935ee7c1b86ba9592604834bb673c7a3.asciidoc
@@ -0,0 +1,93 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (4.405200 51.222900)",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (2.336389 48.861111)",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (2.327000 48.860000)",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "large-grid": {
+ geotile_grid: {
+ field: "location",
+ precision: 8,
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/936d809c848f8b77d5b55f57f0aab89a.asciidoc b/docs/doc_examples/936d809c848f8b77d5b55f57f0aab89a.asciidoc
new file mode 100644
index 000000000..d05a21ad8
--- /dev/null
+++ b/docs/doc_examples/936d809c848f8b77d5b55f57f0aab89a.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ date_detection: false,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ create_date: "2015/09/02",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/937089157fc82cf08b68a954d0e6d52c.asciidoc b/docs/doc_examples/937089157fc82cf08b68a954d0e6d52c.asciidoc
new file mode 100644
index 000000000..e8709d3b8
--- /dev/null
+++ b/docs/doc_examples/937089157fc82cf08b68a954d0e6d52c.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence with maxspan=1h\n [ process where process.name == "regsvr32.exe" ]\n [ file where stringContains(file.name, "scrobj.dll") ]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9370e4935ab6678571d3227973b8c830.asciidoc b/docs/doc_examples/9370e4935ab6678571d3227973b8c830.asciidoc
new file mode 100644
index 000000000..22384fd94
--- /dev/null
+++ b/docs/doc_examples/9370e4935ab6678571d3227973b8c830.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.get({
+ index: "_all",
+ filter_path: "*.aliases",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/937ffc65cbb20505a8aba25b37a796a5.asciidoc b/docs/doc_examples/937ffc65cbb20505a8aba25b37a796a5.asciidoc
new file mode 100644
index 000000000..a0bfc9691
--- /dev/null
+++ b/docs/doc_examples/937ffc65cbb20505a8aba25b37a796a5.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ is_published: {
+ type: "boolean",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ is_published: "true",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ is_published: true,
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/9382f022086c692ba05efb0acae65946.asciidoc b/docs/doc_examples/9382f022086c692ba05efb0acae65946.asciidoc
new file mode 100644
index 000000000..5b5333497
--- /dev/null
+++ b/docs/doc_examples/9382f022086c692ba05efb0acae65946.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ foo: [
+ {
+ bar: 1,
+ },
+ {
+ bar: 2,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9399cbbd133ec2b7aad2820fa617ae3a.asciidoc b/docs/doc_examples/9399cbbd133ec2b7aad2820fa617ae3a.asciidoc
new file mode 100644
index 000000000..c0d1061cf
--- /dev/null
+++ b/docs/doc_examples/9399cbbd133ec2b7aad2820fa617ae3a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "child_example",
+ mappings: {
+ properties: {
+ join: {
+ type: "join",
+ relations: {
+ question: "answer",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/93bd651aff81daa2b86f9f2089e6d088.asciidoc b/docs/doc_examples/93bd651aff81daa2b86f9f2089e6d088.asciidoc
new file mode 100644
index 000000000..ca7e7083d
--- /dev/null
+++ b/docs/doc_examples/93bd651aff81daa2b86f9f2089e6d088.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ my_id: "1",
+ text: "This is a question",
+ my_join_field: {
+ name: "question",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ my_id: "2",
+ text: "This is another question",
+ my_join_field: {
+ name: "question",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/93c77c65f1e11382f8043d0300e87b89.asciidoc b/docs/doc_examples/93c77c65f1e11382f8043d0300e87b89.asciidoc
new file mode 100644
index 000000000..7a9809243
--- /dev/null
+++ b/docs/doc_examples/93c77c65f1e11382f8043d0300e87b89.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test-index",
+ mappings: {
+ properties: {
+ infer_field: {
+ type: "semantic_text",
+ inference_id: ".elser-2-elasticsearch",
+ },
+ source_field: {
+ type: "text",
+ copy_to: "infer_field",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc b/docs/doc_examples/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc
new file mode 100644
index 000000000..bb5e1dd88
--- /dev/null
+++ b/docs/doc_examples/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "hugging-face-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "hugging_face_embeddings",
+ model_text: "What's margin of error?",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/93d7ba4130722cae04f9690e52a8f54f.asciidoc b/docs/doc_examples/93d7ba4130722cae04f9690e52a8f54f.asciidoc
new file mode 100644
index 000000000..94645c842
--- /dev/null
+++ b/docs/doc_examples/93d7ba4130722cae04f9690e52a8f54f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "envelope",
+ coordinates: [
+ [100, 1],
+ [101, 0],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/93fb59d3204f37af952198b331fb6bb7.asciidoc b/docs/doc_examples/93fb59d3204f37af952198b331fb6bb7.asciidoc
new file mode 100644
index 000000000..71a90d24f
--- /dev/null
+++ b/docs/doc_examples/93fb59d3204f37af952198b331fb6bb7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.get({
+ task_id: "oTUltX4IQMOUUVeiohTt8A:12345",
+ wait_for_completion: "true",
+ timeout: "10s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9403764e6eccad7b321b65e9a10c5727.asciidoc b/docs/doc_examples/9403764e6eccad7b321b65e9a10c5727.asciidoc
new file mode 100644
index 000000000..aabf664ea
--- /dev/null
+++ b/docs/doc_examples/9403764e6eccad7b321b65e9a10c5727.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ tags: {
+ terms: {
+ field: "tags",
+ include: ".*sport.*",
+ exclude: "water_.*",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/940e8c2c7ff92d71f489bdb7183c1ce6.asciidoc b/docs/doc_examples/940e8c2c7ff92d71f489bdb7183c1ce6.asciidoc
new file mode 100644
index 000000000..c96246fe5
--- /dev/null
+++ b/docs/doc_examples/940e8c2c7ff92d71f489bdb7183c1ce6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.segments({
+ index: "test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9410af79177dd1df9b7b16229a581e18.asciidoc b/docs/doc_examples/9410af79177dd1df9b7b16229a581e18.asciidoc
new file mode 100644
index 000000000..41587cc87
--- /dev/null
+++ b/docs/doc_examples/9410af79177dd1df9b7b16229a581e18.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.changePassword({
+ username: "jacknich",
+ password: "new-test-password",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/941c8d05486200e835d97642e4ee05d5.asciidoc b/docs/doc_examples/941c8d05486200e835d97642e4ee05d5.asciidoc
new file mode 100644
index 000000000..a185efe9b
--- /dev/null
+++ b/docs/doc_examples/941c8d05486200e835d97642e4ee05d5.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ term_vector: "with_positions_offsets_payloads",
+ store: true,
+ analyzer: "fulltext_analyzer",
+ },
+ fullname: {
+ type: "text",
+ term_vector: "with_positions_offsets_payloads",
+ analyzer: "fulltext_analyzer",
+ },
+ },
+ },
+ settings: {
+ index: {
+ number_of_shards: 1,
+ number_of_replicas: 0,
+ },
+ analysis: {
+ analyzer: {
+ fulltext_analyzer: {
+ type: "custom",
+ tokenizer: "whitespace",
+ filter: ["lowercase", "type_as_payload"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/94246f45025ed394cd6415ed8d7a0588.asciidoc b/docs/doc_examples/94246f45025ed394cd6415ed8d7a0588.asciidoc
new file mode 100644
index 000000000..44902fb96
--- /dev/null
+++ b/docs/doc_examples/94246f45025ed394cd6415ed8d7a0588.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.deleteJob({
+ id: "sensor",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/944806221eb89f5af2298ccdf2902277.asciidoc b/docs/doc_examples/944806221eb89f5af2298ccdf2902277.asciidoc
new file mode 100644
index 000000000..3770b06fb
--- /dev/null
+++ b/docs/doc_examples/944806221eb89f5af2298ccdf2902277.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.getRollupCaps({
+ id: "_all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/944a2dc22dae2a8503299926326a9c18.asciidoc b/docs/doc_examples/944a2dc22dae2a8503299926326a9c18.asciidoc
new file mode 100644
index 000000000..24ff68e5a
--- /dev/null
+++ b/docs/doc_examples/944a2dc22dae2a8503299926326a9c18.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ ip_addr: {
+ type: "ip",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ ip_addr: "192.168.1.1",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ ip_addr: "192.168.0.0/16",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/946522c26d02bebf5c527ba28e55c724.asciidoc b/docs/doc_examples/946522c26d02bebf5c527ba28e55c724.asciidoc
new file mode 100644
index 000000000..69e043fad
--- /dev/null
+++ b/docs/doc_examples/946522c26d02bebf5c527ba28e55c724.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ routing: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9467e52087a13b63b02d78c35ff6f798.asciidoc b/docs/doc_examples/9467e52087a13b63b02d78c35ff6f798.asciidoc
new file mode 100644
index 000000000..9c2ef9bd8
--- /dev/null
+++ b/docs/doc_examples/9467e52087a13b63b02d78c35ff6f798.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_phrase: {
+ message: "this is a test",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/94cd66bf93f99881c1bda547283a0357.asciidoc b/docs/doc_examples/94cd66bf93f99881c1bda547283a0357.asciidoc
new file mode 100644
index 000000000..4007f1b3d
--- /dev/null
+++ b/docs/doc_examples/94cd66bf93f99881c1bda547283a0357.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "quantized-image-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ "image-vector": [0.1, -2],
+ title: "moose family",
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ "image-vector": [0.75, -1],
+ title: "alpine lake",
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ "image-vector": [1.2, 0.1],
+ title: "full moon",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc b/docs/doc_examples/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc
new file mode 100644
index 000000000..bc6ad4ec1
--- /dev/null
+++ b/docs/doc_examples/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ term: {
+ "query.extraction_result": "failed",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/950f1230536422567f99a205ff4165ec.asciidoc b/docs/doc_examples/950f1230536422567f99a205ff4165ec.asciidoc
new file mode 100644
index 000000000..ff8b26755
--- /dev/null
+++ b/docs/doc_examples/950f1230536422567f99a205ff4165ec.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-write-alias",
+ conditions: {
+ max_age: "7d",
+ max_docs: 1000,
+ max_primary_shard_size: "50gb",
+ max_primary_shard_docs: "2000",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/95414139c7b1203e3c2d99a354415801.asciidoc b/docs/doc_examples/95414139c7b1203e3c2d99a354415801.asciidoc
new file mode 100644
index 000000000..dd746d18a
--- /dev/null
+++ b/docs/doc_examples/95414139c7b1203e3c2d99a354415801.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.recovery({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9559de0c2190f99fcc344887fc7b232a.asciidoc b/docs/doc_examples/9559de0c2190f99fcc344887fc7b232a.asciidoc
new file mode 100644
index 000000000..4b9fedd1f
--- /dev/null
+++ b/docs/doc_examples/9559de0c2190f99fcc344887fc7b232a.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "bicycles",
+ mappings: {
+ properties: {
+ cycle_type: {
+ type: "constant_keyword",
+ value: "bicycle",
+ },
+ name: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.create({
+ index: "other_cycles",
+ mappings: {
+ properties: {
+ cycle_type: {
+ type: "keyword",
+ },
+ name: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/956cb470258024af964cd2dabbaf7c7c.asciidoc b/docs/doc_examples/956cb470258024af964cd2dabbaf7c7c.asciidoc
new file mode 100644
index 000000000..f70c4bed1
--- /dev/null
+++ b/docs/doc_examples/956cb470258024af964cd2dabbaf7c7c.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index",
+ settings: {
+ "index.routing.allocation.require.data": null,
+ "index.routing.allocation.include._tier_preference": "data_warm,data_hot",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc b/docs/doc_examples/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc
new file mode 100644
index 000000000..53a2b96c5
--- /dev/null
+++ b/docs/doc_examples/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["content", "name"],
+ query: "this AND that",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9584b042223982e0bfde8d12d42c9705.asciidoc b/docs/doc_examples/9584b042223982e0bfde8d12d42c9705.asciidoc
new file mode 100644
index 000000000..9583fffb8
--- /dev/null
+++ b/docs/doc_examples/9584b042223982e0bfde8d12d42c9705.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "kerbrolemapping",
+ roles: ["monitoring_user"],
+ enabled: true,
+ rules: {
+ field: {
+ username: "user@REALM",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc b/docs/doc_examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc
new file mode 100644
index 000000000..de34c8968
--- /dev/null
+++ b/docs/doc_examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ color: ["blue", "green"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/95c03bdef4faf6bef039c986f4cb3aba.asciidoc b/docs/doc_examples/95c03bdef4faf6bef039c986f4cb3aba.asciidoc
new file mode 100644
index 000000000..aab4afc2b
--- /dev/null
+++ b/docs/doc_examples/95c03bdef4faf6bef039c986f4cb3aba.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: ".watcher-history*",
+ pretty: "true",
+ query: {
+ match: {
+ "result.condition.met": true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc b/docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc
new file mode 100644
index 000000000..4dcac513f
--- /dev/null
+++ b/docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryRole({
+ query: {
+ match: {
+ description: {
+ query: "user access",
+ },
+ },
+ },
+ size: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9606c271921cb800d5ea395b16d6ceaf.asciidoc b/docs/doc_examples/9606c271921cb800d5ea395b16d6ceaf.asciidoc
new file mode 100644
index 000000000..226313ea3
--- /dev/null
+++ b/docs/doc_examples/9606c271921cb800d5ea395b16d6ceaf.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "galician_example",
+ settings: {
+ analysis: {
+ filter: {
+ galician_stop: {
+ type: "stop",
+ stopwords: "_galician_",
+ },
+ galician_keywords: {
+ type: "keyword_marker",
+ keywords: ["exemplo"],
+ },
+ galician_stemmer: {
+ type: "stemmer",
+ language: "galician",
+ },
+ },
+ analyzer: {
+ rebuilt_galician: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "galician_stop",
+ "galician_keywords",
+ "galician_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9608820dbeac261ba53fb89bb9400560.asciidoc b/docs/doc_examples/9608820dbeac261ba53fb89bb9400560.asciidoc
new file mode 100644
index 000000000..116032d11
--- /dev/null
+++ b/docs/doc_examples/9608820dbeac261ba53fb89bb9400560.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ owner: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/962e6187bbd71c5749376efed04b65ba.asciidoc b/docs/doc_examples/962e6187bbd71c5749376efed04b65ba.asciidoc
new file mode 100644
index 000000000..eb3734014
--- /dev/null
+++ b/docs/doc_examples/962e6187bbd71c5749376efed04b65ba.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role6",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ except: ["customer.handle"],
+ grant: ["customer.*"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/966ff3a4c5b61ed1a36d44c17ce06157.asciidoc b/docs/doc_examples/966ff3a4c5b61ed1a36d44c17ce06157.asciidoc
new file mode 100644
index 000000000..bcb11e41e
--- /dev/null
+++ b/docs/doc_examples/966ff3a4c5b61ed1a36d44c17ce06157.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ analysis: {
+ char_filter: {
+ quote: {
+ type: "mapping",
+ mappings: ['« => "', '» => "'],
+ },
+ },
+ normalizer: {
+ my_normalizer: {
+ type: "custom",
+ char_filter: ["quote"],
+ filter: ["lowercase", "asciifolding"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ foo: {
+ type: "keyword",
+ normalizer: "my_normalizer",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9684e5fa8c22a07a372feb6fc1f5f7c0.asciidoc b/docs/doc_examples/9684e5fa8c22a07a372feb6fc1f5f7c0.asciidoc
new file mode 100644
index 000000000..20185078b
--- /dev/null
+++ b/docs/doc_examples/9684e5fa8c22a07a372feb6fc1f5f7c0.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.hasPrivileges({
+ cluster: ["monitor", "manage"],
+ index: [
+ {
+ names: ["suppliers", "products"],
+ privileges: ["read"],
+ },
+ {
+ names: ["inventory"],
+ privileges: ["read", "write"],
+ },
+ ],
+ application: [
+ {
+ application: "inventory_manager",
+ privileges: ["read", "data:write/inventory"],
+ resources: ["product/1852563"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/968fb5b92aa65af09544f7c002b0953e.asciidoc b/docs/doc_examples/968fb5b92aa65af09544f7c002b0953e.asciidoc
new file mode 100644
index 000000000..410d4fc38
--- /dev/null
+++ b/docs/doc_examples/968fb5b92aa65af09544f7c002b0953e.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "semantic-embeddings",
+ query: {
+ semantic: {
+ field: "content",
+ query: "How to avoid muscle soreness while running?",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc b/docs/doc_examples/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc
new file mode 100644
index 000000000..1be0187a6
--- /dev/null
+++ b/docs/doc_examples/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.max_shards_per_node": 1200,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/96e137e42d12c180e2c702db30714a9e.asciidoc b/docs/doc_examples/96e137e42d12c180e2c702db30714a9e.asciidoc
new file mode 100644
index 000000000..1f0fb8c86
--- /dev/null
+++ b/docs/doc_examples/96e137e42d12c180e2c702db30714a9e.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ full_name: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc b/docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc
new file mode 100644
index 000000000..d3786611f
--- /dev/null
+++ b/docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000002",
+ mappings: {
+ properties: {
+ inference_field: {
+ type: "semantic_text",
+ inference_id: "my-openai-endpoint",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/96ea0e80323d6d2d99964625c004a44d.asciidoc b/docs/doc_examples/96ea0e80323d6d2d99964625c004a44d.asciidoc
new file mode 100644
index 000000000..0ce997004
--- /dev/null
+++ b/docs/doc_examples/96ea0e80323d6d2d99964625c004a44d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putDataLifecycle({
+ name: "dsl-data-stream",
+ data_retention: "7d",
+ enabled: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/971c7a36ee79f2b3aa82c64ea338de70.asciidoc b/docs/doc_examples/971c7a36ee79f2b3aa82c64ea338de70.asciidoc
new file mode 100644
index 000000000..f3aa57240
--- /dev/null
+++ b/docs/doc_examples/971c7a36ee79f2b3aa82c64ea338de70.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ mappings: {
+ properties: {
+ foo: {
+ type: "keyword",
+ eager_global_ordinals: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/971fd23adb81bb5842c7750e0379336a.asciidoc b/docs/doc_examples/971fd23adb81bb5842c7750e0379336a.asciidoc
new file mode 100644
index 000000000..e1b27bc79
--- /dev/null
+++ b/docs/doc_examples/971fd23adb81bb5842c7750e0379336a.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "movies",
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ standard: {
+ query: {
+ match: {
+ genre: "drama",
+ },
+ },
+ },
+ },
+ field: "plot",
+ inference_id: "my-msmarco-minilm-model",
+ inference_text: "films that explore psychological depths",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc b/docs/doc_examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc
new file mode 100644
index 000000000..2620184e7
--- /dev/null
+++ b/docs/doc_examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "metricbeat-*",
+ },
+ dest: {
+ index: "metricbeat",
+ },
+ script: {
+ lang: "painless",
+ source:
+ "ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/975b4b92464d52068516aa2f0f955cc1.asciidoc b/docs/doc_examples/975b4b92464d52068516aa2f0f955cc1.asciidoc
new file mode 100644
index 000000000..0dc310f84
--- /dev/null
+++ b/docs/doc_examples/975b4b92464d52068516aa2f0f955cc1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.segments({
+ index: "test1,test2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/976e5f9baf81bd6ca0e9f80916a0a4f9.asciidoc b/docs/doc_examples/976e5f9baf81bd6ca0e9f80916a0a4f9.asciidoc
new file mode 100644
index 000000000..f47d5d772
--- /dev/null
+++ b/docs/doc_examples/976e5f9baf81bd6ca0e9f80916a0a4f9.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role1",
+ indices: [
+ {
+ names: ["events-*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["category", "@timestamp", "message"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/97916243f245478b735471a9e37f33d1.asciidoc b/docs/doc_examples/97916243f245478b735471a9e37f33d1.asciidoc
new file mode 100644
index 000000000..967dc2118
--- /dev/null
+++ b/docs/doc_examples/97916243f245478b735471a9e37f33d1.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "ip_addresses",
+ size: 10,
+ aggs: {
+ ip_ranges: {
+ ip_range: {
+ field: "ip",
+ ranges: [
+ {
+ to: "10.0.0.5",
+ },
+ {
+ from: "10.0.0.5",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/97a3216af3d4b4d805d467d9c715cb3e.asciidoc b/docs/doc_examples/97a3216af3d4b4d805d467d9c715cb3e.asciidoc
new file mode 100644
index 000000000..be8ac4caf
--- /dev/null
+++ b/docs/doc_examples/97a3216af3d4b4d805d467d9c715cb3e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_internal/desired_balance",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/97ae2b62aa372a955278be6f660356ba.asciidoc b/docs/doc_examples/97ae2b62aa372a955278be6f660356ba.asciidoc
new file mode 100644
index 000000000..b423d4033
--- /dev/null
+++ b/docs/doc_examples/97ae2b62aa372a955278be6f660356ba.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ combined_fields: {
+ query: "distributed consensus",
+ fields: ["title^2", "body"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/97babc8d19ef0866774576716eb6d19e.asciidoc b/docs/doc_examples/97babc8d19ef0866774576716eb6d19e.asciidoc
new file mode 100644
index 000000000..bc8757667
--- /dev/null
+++ b/docs/doc_examples/97babc8d19ef0866774576716eb6d19e.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "test",
+ refresh: "true",
+ conflicts: "proceed",
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "test",
+ filter_path: "hits.total",
+ query: {
+ match: {
+ flag: "foo",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc b/docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc
new file mode 100644
index 000000000..ae96b5501
--- /dev/null
+++ b/docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "(information retrieval) OR (artificial intelligence)",
+ default_field: "text",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/97da68c09c9f1a97a21780fd404e213a.asciidoc b/docs/doc_examples/97da68c09c9f1a97a21780fd404e213a.asciidoc
new file mode 100644
index 000000000..3ea9ccfc3
--- /dev/null
+++ b/docs/doc_examples/97da68c09c9f1a97a21780fd404e213a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "network-traffic",
+ size: 0,
+ aggs: {
+ "ipv4-subnets": {
+ ip_prefix: {
+ field: "ipv4",
+ prefix_length: 24,
+ append_prefix_length: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/97ea5ab17213cb1faaf6f3ea13607098.asciidoc b/docs/doc_examples/97ea5ab17213cb1faaf6f3ea13607098.asciidoc
new file mode 100644
index 000000000..76e056902
--- /dev/null
+++ b/docs/doc_examples/97ea5ab17213cb1faaf6f3ea13607098.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.start();
+console.log(response);
+----
diff --git a/docs/doc_examples/97f5df84efec655f479fad78bc392d4d.asciidoc b/docs/doc_examples/97f5df84efec655f479fad78bc392d4d.asciidoc
new file mode 100644
index 000000000..62eeaf223
--- /dev/null
+++ b/docs/doc_examples/97f5df84efec655f479fad78bc392d4d.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ profile: true,
+ query: {
+ term: {
+ "user.id": {
+ value: "elkbee",
+ },
+ },
+ },
+ aggs: {
+ my_scoped_agg: {
+ terms: {
+ field: "http.response.status_code",
+ },
+ },
+ my_global_agg: {
+ global: {},
+ aggs: {
+ my_level_agg: {
+ terms: {
+ field: "http.response.status_code",
+ },
+ },
+ },
+ },
+ },
+ post_filter: {
+ match: {
+ message: "search",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/983fbb78e57e8fe98db38cf2d217e943.asciidoc b/docs/doc_examples/983fbb78e57e8fe98db38cf2d217e943.asciidoc
new file mode 100644
index 000000000..375c8c058
--- /dev/null
+++ b/docs/doc_examples/983fbb78e57e8fe98db38cf2d217e943.asciidoc
@@ -0,0 +1,56 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ comments: {
+ type: "nested",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "test",
+ id: 1,
+ refresh: "true",
+ document: {
+ title: "Test title",
+ comments: [
+ {
+ author: "kimchy",
+ text: "comment text",
+ },
+ {
+ author: "nik9000",
+ text: "words words words",
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "test",
+ query: {
+ nested: {
+ path: "comments",
+ query: {
+ match: {
+ "comments.text": "words",
+ },
+ },
+ inner_hits: {
+ _source: false,
+ docvalue_fields: ["comments.text.keyword"],
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/9851f5225150bc032fb3b195cd447f4f.asciidoc b/docs/doc_examples/9851f5225150bc032fb3b195cd447f4f.asciidoc
new file mode 100644
index 000000000..1adf874ce
--- /dev/null
+++ b/docs/doc_examples/9851f5225150bc032fb3b195cd447f4f.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "byte-image-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ "byte-image-vector": [5, -20],
+ title: "moose family",
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ "byte-image-vector": [8, -15],
+ title: "alpine lake",
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ "byte-image-vector": [11, 23],
+ title: "full moon",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/98574a419b6be603a0af8f7f22a92d23.asciidoc b/docs/doc_examples/98574a419b6be603a0af8f7f22a92d23.asciidoc
new file mode 100644
index 000000000..bbfc2a28b
--- /dev/null
+++ b/docs/doc_examples/98574a419b6be603a0af8f7f22a92d23.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.processorGrok();
+console.log(response);
+----
diff --git a/docs/doc_examples/98621bea4765b1b838cc9daa914bf5c5.asciidoc b/docs/doc_examples/98621bea4765b1b838cc9daa914bf5c5.asciidoc
new file mode 100644
index 000000000..f7c866698
--- /dev/null
+++ b/docs/doc_examples/98621bea4765b1b838cc9daa914bf5c5.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence with maxspan=1h\n [ process where process.name == "regsvr32.exe" ] by process.pid\n [ file where stringContains(file.name, "scrobj.dll") ] by process.pid\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc b/docs/doc_examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc
new file mode 100644
index 000000000..570db554b
--- /dev/null
+++ b/docs/doc_examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "alibabacloud_ai_search_embeddings",
+ inference_config: {
+ service: "alibabacloud-ai-search",
+ service_settings: {
+ api_key: "",
+ service_id: "ops-text-embedding-001",
+ host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
+ workspace: "default",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/98855f4bda8726d5d123aeebf7869e47.asciidoc b/docs/doc_examples/98855f4bda8726d5d123aeebf7869e47.asciidoc
new file mode 100644
index 000000000..bc24781f2
--- /dev/null
+++ b/docs/doc_examples/98855f4bda8726d5d123aeebf7869e47.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodeattrs({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9887f65af249bbf09190b1153ea2597b.asciidoc b/docs/doc_examples/9887f65af249bbf09190b1153ea2597b.asciidoc
new file mode 100644
index 000000000..a37868f52
--- /dev/null
+++ b/docs/doc_examples/9887f65af249bbf09190b1153ea2597b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.getAsyncStatus({
+ id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/98b403c356a9b14544e9b9f646845e9f.asciidoc b/docs/doc_examples/98b403c356a9b14544e9b9f646845e9f.asciidoc
new file mode 100644
index 000000000..2054692fc
--- /dev/null
+++ b/docs/doc_examples/98b403c356a9b14544e9b9f646845e9f.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "my-search-template",
+ script: {
+ lang: "mustache",
+ source: {
+ query: {
+ multi_match: {
+ query: "{{query_string}}",
+ fields:
+ "[{{#text_fields}}{{user_name}}{{^last}},{{/last}}{{/text_fields}}]",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/98c1080d8630d3a18d564312300d020f.asciidoc b/docs/doc_examples/98c1080d8630d3a18d564312300d020f.asciidoc
new file mode 100644
index 000000000..962c58754
--- /dev/null
+++ b/docs/doc_examples/98c1080d8630d3a18d564312300d020f.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ network_direction: {
+ internal_networks: ["private"],
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ source: {
+ ip: "128.232.110.120",
+ },
+ destination: {
+ ip: "192.168.1.1",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/98f43710cedd28a464e8abf4b09bcc9a.asciidoc b/docs/doc_examples/98f43710cedd28a464e8abf4b09bcc9a.asciidoc
new file mode 100644
index 000000000..01c0b0b60
--- /dev/null
+++ b/docs/doc_examples/98f43710cedd28a464e8abf4b09bcc9a.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ range: {
+ "@timestamp": {
+ gte: "now-1d/d",
+ lt: "now/d",
+ },
+ },
+ },
+ aggs: {
+ "my-agg-name": {
+ terms: {
+ field: "my-field",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/98f7525ec0bc8945eafa008a5a9c50c0.asciidoc b/docs/doc_examples/98f7525ec0bc8945eafa008a5a9c50c0.asciidoc
new file mode 100644
index 000000000..c64fae279
--- /dev/null
+++ b/docs/doc_examples/98f7525ec0bc8945eafa008a5a9c50c0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ wait_for_completion_timeout: "2s",
+ query: '\n process where process.name == "cmd.exe"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc b/docs/doc_examples/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc
new file mode 100644
index 000000000..ac79f2a9d
--- /dev/null
+++ b/docs/doc_examples/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataLifecycle({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc b/docs/doc_examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc
new file mode 100644
index 000000000..cfffd248f
--- /dev/null
+++ b/docs/doc_examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ first_name: {
+ type: "text",
+ },
+ last_name: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ first_name: "Barry",
+ last_name: "White",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ script_fields: {
+ full_name: {
+ script: {
+ lang: "painless",
+ source: "params._source.first_name + ' ' + params._source.last_name",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc b/docs/doc_examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc
new file mode 100644
index 000000000..6d805dd85
--- /dev/null
+++ b/docs/doc_examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ fields: {
+ body: {},
+ "blog.title": {
+ number_of_fragments: 0,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/99474a7e7979816c874aeac4403be5d0.asciidoc b/docs/doc_examples/99474a7e7979816c874aeac4403be5d0.asciidoc
new file mode 100644
index 000000000..eebad0741
--- /dev/null
+++ b/docs/doc_examples/99474a7e7979816c874aeac4403be5d0.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ by_date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ avg_price: {
+ rate: {
+ field: "price",
+ unit: "day",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/996521cef7803ef363a49ac6321ea1de.asciidoc b/docs/doc_examples/996521cef7803ef363a49ac6321ea1de.asciidoc
new file mode 100644
index 000000000..673a49d35
--- /dev/null
+++ b/docs/doc_examples/996521cef7803ef363a49ac6321ea1de.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence with maxspan=1d\n [ process where process.name == "cmd.exe" ]\n ![ process where stringContains(process.command_line, "ocx") ]\n [ file where stringContains(file.name, "scrobj.dll") ]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc b/docs/doc_examples/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc
new file mode 100644
index 000000000..41212a2e2
--- /dev/null
+++ b/docs/doc_examples/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ query: {
+ match: {
+ message: "elasticsearch",
+ },
+ },
+ script_score: {
+ script: {
+ params: {
+ a: 5,
+ b: 1.2,
+ },
+ source: "params.a / Math.pow(params.b, doc['my-int'].value)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/99803d7b111b862c0c82e9908e549b16.asciidoc b/docs/doc_examples/99803d7b111b862c0c82e9908e549b16.asciidoc
new file mode 100644
index 000000000..620c04c62
--- /dev/null
+++ b/docs/doc_examples/99803d7b111b862c0c82e9908e549b16.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "mistral-embeddings-test",
+ inference_config: {
+ service: "mistral",
+ service_settings: {
+ api_key: "",
+ model: "mistral-embed",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/998651b98e152add530084a631a4ab5a.asciidoc b/docs/doc_examples/998651b98e152add530084a631a4ab5a.asciidoc
new file mode 100644
index 000000000..9b0378abb
--- /dev/null
+++ b/docs/doc_examples/998651b98e152add530084a631a4ab5a.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "indices.lifecycle.poll_interval": "1m",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc b/docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc
new file mode 100644
index 000000000..130ceb562
--- /dev/null
+++ b/docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.count({
+ index: "music",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/99a56f423df3a0e57b7f20146f0d33b5.asciidoc b/docs/doc_examples/99a56f423df3a0e57b7f20146f0d33b5.asciidoc
new file mode 100644
index 000000000..24b0adfe1
--- /dev/null
+++ b/docs/doc_examples/99a56f423df3a0e57b7f20146f0d33b5.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "logs",
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ message: {
+ type: "match_only_text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc b/docs/doc_examples/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc
new file mode 100644
index 000000000..74a851858
--- /dev/null
+++ b/docs/doc_examples/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "place_path_category",
+ id: 1,
+ document: {
+ suggest: ["timmy's", "starbucks", "dunkin donuts"],
+ cat: ["cafe", "food"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/99c1cfe60f3ccf5bf3abd24c31ed9034.asciidoc b/docs/doc_examples/99c1cfe60f3ccf5bf3abd24c31ed9034.asciidoc
new file mode 100644
index 000000000..e6e7c97af
--- /dev/null
+++ b/docs/doc_examples/99c1cfe60f3ccf5bf3abd24c31ed9034.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.putAutoFollowPattern({
+ name: "",
+ remote_cluster: "",
+ leader_index_patterns: [""],
+ leader_index_exclusion_patterns: [""],
+ follow_index_pattern: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9a02bd47c000a3d9a8911233c37c890f.asciidoc b/docs/doc_examples/9a02bd47c000a3d9a8911233c37c890f.asciidoc
new file mode 100644
index 000000000..4a993773e
--- /dev/null
+++ b/docs/doc_examples/9a02bd47c000a3d9a8911233c37c890f.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T00:30:00Z",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T01:30:00Z",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ by_day: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "day",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/9a036a792be1d39af9fd0d1adb5f3402.asciidoc b/docs/doc_examples/9a036a792be1d39af9fd0d1adb5f3402.asciidoc
new file mode 100644
index 000000000..fda0186bc
--- /dev/null
+++ b/docs/doc_examples/9a036a792be1d39af9fd0d1adb5f3402.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "keep",
+ keep_words: ["dog", "elephant", "fox"],
+ },
+ ],
+ text: "the quick fox jumps over the lazy dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9a05cc10eea1251e23b82a4549913536.asciidoc b/docs/doc_examples/9a05cc10eea1251e23b82a4549913536.asciidoc
new file mode 100644
index 000000000..e86a646f7
--- /dev/null
+++ b/docs/doc_examples/9a05cc10eea1251e23b82a4549913536.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.allocation({
+ v: "true",
+ s: "node",
+ h: "node,shards,disk.percent,disk.indices,disk.used",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9a09d33ec11e20b6081cae882282ca60.asciidoc b/docs/doc_examples/9a09d33ec11e20b6081cae882282ca60.asciidoc
new file mode 100644
index 000000000..64d3dfd53
--- /dev/null
+++ b/docs/doc_examples/9a09d33ec11e20b6081cae882282ca60.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedPrivileges({
+ application: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9a203aae3e1412d919546276fb52a5ca.asciidoc b/docs/doc_examples/9a203aae3e1412d919546276fb52a5ca.asciidoc
new file mode 100644
index 000000000..e1311ca66
--- /dev/null
+++ b/docs/doc_examples/9a203aae3e1412d919546276fb52a5ca.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "cohere-embeddings",
+ inference_config: {
+ service: "cohere",
+ service_settings: {
+ api_key: "",
+ model_id: "embed-english-light-v3.0",
+ embedding_type: "byte",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9a49b7572d571e00e20dbebdd30f9368.asciidoc b/docs/doc_examples/9a49b7572d571e00e20dbebdd30f9368.asciidoc
new file mode 100644
index 000000000..d0eb6f8e0
--- /dev/null
+++ b/docs/doc_examples/9a49b7572d571e00e20dbebdd30f9368.asciidoc
@@ -0,0 +1,50 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ size: 10000,
+ query: {
+ geo_bounding_box: {
+ "my-geo-field": {
+ top_left: {
+ lat: -40.979898069620134,
+ lon: -45,
+ },
+ bottom_right: {
+ lat: -66.51326044311186,
+ lon: 0,
+ },
+ },
+ },
+ },
+ aggregations: {
+ grid: {
+ geotile_grid: {
+ field: "my-geo-field",
+ precision: 11,
+ size: 65536,
+ bounds: {
+ top_left: {
+ lat: -40.979898069620134,
+ lon: -45,
+ },
+ bottom_right: {
+ lat: -66.51326044311186,
+ lon: 0,
+ },
+ },
+ },
+ },
+ bounds: {
+ geo_bounds: {
+ field: "my-geo-field",
+ wrap_longitude: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc b/docs/doc_examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc
new file mode 100644
index 000000000..cd2f894b2
--- /dev/null
+++ b/docs/doc_examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "metricbeat-2016.05.30",
+ id: 1,
+ refresh: "true",
+ document: {
+ "system.cpu.idle.pct": 0.908,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metricbeat-2016.05.31",
+ id: 1,
+ refresh: "true",
+ document: {
+ "system.cpu.idle.pct": 0.105,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/9a743b6575c6fe5acdf46024a7fda8a1.asciidoc b/docs/doc_examples/9a743b6575c6fe5acdf46024a7fda8a1.asciidoc
new file mode 100644
index 000000000..30ecd2bf5
--- /dev/null
+++ b/docs/doc_examples/9a743b6575c6fe5acdf46024a7fda8a1.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_test_scores_2",
+ query: {
+ term: {
+ grad_year: "2099",
+ },
+ },
+ sort: [
+ {
+ total_score: {
+ order: "desc",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc b/docs/doc_examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc
new file mode 100644
index 000000000..531a8e414
--- /dev/null
+++ b/docs/doc_examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "product-index",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ range: {
+ price: {
+ gte: 1000,
+ },
+ },
+ },
+ },
+ },
+ script: {
+ source: "cosineSimilarity(params.queryVector, 'product-vector') + 1.0",
+ params: {
+ queryVector: [-0.5, 90, -10, 14.8, -156],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc b/docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc
new file mode 100644
index 000000000..f553c8706
--- /dev/null
+++ b/docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "semantic-embeddings",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ match: {
+ content: "How to avoid muscle soreness while running?",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ semantic: {
+ field: "semantic_text",
+ query: "How to avoid muscle soreness while running?",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ad14a9d7bf2699e2d86b6a607d410c0.asciidoc b/docs/doc_examples/9ad14a9d7bf2699e2d86b6a607d410c0.asciidoc
new file mode 100644
index 000000000..aa641b73c
--- /dev/null
+++ b/docs/doc_examples/9ad14a9d7bf2699e2d86b6a607d410c0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.get({
+ name: "my_search_application",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ad38ab4d9c3983e97e8c38fec611f10.asciidoc b/docs/doc_examples/9ad38ab4d9c3983e97e8c38fec611f10.asciidoc
new file mode 100644
index 000000000..f2f4ae872
--- /dev/null
+++ b/docs/doc_examples/9ad38ab4d9c3983e97e8c38fec611f10.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ leader: {
+ seeds: ["127.0.0.1:9300"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ae268058c0ea32ef8926568e011c728.asciidoc b/docs/doc_examples/9ae268058c0ea32ef8926568e011c728.asciidoc
new file mode 100644
index 000000000..185a6a226
--- /dev/null
+++ b/docs/doc_examples/9ae268058c0ea32ef8926568e011c728.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/my-connector/_features",
+ body: {
+ features: {
+ document_level_security: {
+ enabled: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9aedc45f83e022732789e8d796f5a43c.asciidoc b/docs/doc_examples/9aedc45f83e022732789e8d796f5a43c.asciidoc
new file mode 100644
index 000000000..f4f4c1e5d
--- /dev/null
+++ b/docs/doc_examples/9aedc45f83e022732789e8d796f5a43c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.reroute({
+ commands: [
+ {
+ move: {
+ index: "test",
+ shard: 0,
+ from_node: "node1",
+ to_node: "node2",
+ },
+ },
+ {
+ allocate_replica: {
+ index: "test",
+ shard: 1,
+ node: "node3",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9af44592fb2e78fb17ad3e834bbef7a7.asciidoc b/docs/doc_examples/9af44592fb2e78fb17ad3e834bbef7a7.asciidoc
new file mode 100644
index 000000000..5e9aae7b4
--- /dev/null
+++ b/docs/doc_examples/9af44592fb2e78fb17ad3e834bbef7a7.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.geoIpStats();
+console.log(response);
+----
diff --git a/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc b/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc
new file mode 100644
index 000000000..46c6ad610
--- /dev/null
+++ b/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.postBehavioralAnalyticsEvent({
+ collection_name: "my_analytics_collection",
+ event_type: "search_click",
+ body: {
+ session: {
+ id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9",
+ },
+ user: {
+ id: "5f26f01a-bbee-4202-9298-81261067abbd",
+ },
+ search: {
+ query: "search term",
+ results: {
+ items: [
+ {
+ document: {
+ id: "123",
+ index: "products",
+ },
+ },
+ ],
+ total_results: 10,
+ },
+ sort: {
+ name: "relevance",
+ },
+ search_application: "website",
+ },
+ document: {
+ id: "123",
+ index: "products",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc b/docs/doc_examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc
new file mode 100644
index 000000000..2f79ad0e7
--- /dev/null
+++ b/docs/doc_examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/_sync_job/my-connector-sync-job-id/_cancel",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9b30a69fec54cf01f7af1b04a6e15239.asciidoc b/docs/doc_examples/9b30a69fec54cf01f7af1b04a6e15239.asciidoc
new file mode 100644
index 000000000..54a531e1a
--- /dev/null
+++ b/docs/doc_examples/9b30a69fec54cf01f7af1b04a6e15239.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.stats();
+console.log(response);
+----
diff --git a/docs/doc_examples/9b345e0bfd45f3a37194585ec9193478.asciidoc b/docs/doc_examples/9b345e0bfd45f3a37194585ec9193478.asciidoc
new file mode 100644
index 000000000..79d2f713b
--- /dev/null
+++ b/docs/doc_examples/9b345e0bfd45f3a37194585ec9193478.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9b68748c061b768c0153c1f2508ce207.asciidoc b/docs/doc_examples/9b68748c061b768c0153c1f2508ce207.asciidoc
new file mode 100644
index 000000000..889534c39
--- /dev/null
+++ b/docs/doc_examples/9b68748c061b768c0153c1f2508ce207.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ clusterA: {
+ mode: "proxy",
+ skip_unavailable: "true",
+ server_name: "clustera.es.region-a.gcp.elastic-cloud.com",
+ proxy_socket_connections: "18",
+ proxy_address: "clustera.es.region-a.gcp.elastic-cloud.com:9400",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9b92266d87170e93a84f9700596d9035.asciidoc b/docs/doc_examples/9b92266d87170e93a84f9700596d9035.asciidoc
new file mode 100644
index 000000000..b9c2e1dfe
--- /dev/null
+++ b/docs/doc_examples/9b92266d87170e93a84f9700596d9035.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "example",
+ refresh: "true",
+ document: {
+ name: "Wind & Wetter, Berlin, Germany",
+ location: {
+ type: "point",
+ coordinates: [13.400544, 52.530286],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/9ba6f1e64c1dfff5aac26eaa1d093f48.asciidoc b/docs/doc_examples/9ba6f1e64c1dfff5aac26eaa1d093f48.asciidoc
new file mode 100644
index 000000000..c124140d0
--- /dev/null
+++ b/docs/doc_examples/9ba6f1e64c1dfff5aac26eaa1d093f48.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["lowercase", "custom_stems", "porter_stem"],
+ },
+ },
+ filter: {
+ custom_stems: {
+ type: "stemmer_override",
+ rules: ["running, runs => run", "stemmer => stemmer"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ba868784f417a8d3679b3c8ed5939ad.asciidoc b/docs/doc_examples/9ba868784f417a8d3679b3c8ed5939ad.asciidoc
new file mode 100644
index 000000000..2a5963d6d
--- /dev/null
+++ b/docs/doc_examples/9ba868784f417a8d3679b3c8ed5939ad.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_size: "100gb",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9bae72e974bdeb56007d9104e73eff92.asciidoc b/docs/doc_examples/9bae72e974bdeb56007d9104e73eff92.asciidoc
new file mode 100644
index 000000000..9e58839bd
--- /dev/null
+++ b/docs/doc_examples/9bae72e974bdeb56007d9104e73eff92.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: "ctx._source.remove('new_field')",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9bb24fe09e3d1c73a71d00b994ba8cfb.asciidoc b/docs/doc_examples/9bb24fe09e3d1c73a71d00b994ba8cfb.asciidoc
new file mode 100644
index 000000000..5486c20ed
--- /dev/null
+++ b/docs/doc_examples/9bb24fe09e3d1c73a71d00b994ba8cfb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ index: "my-index-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc b/docs/doc_examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc
new file mode 100644
index 000000000..2a2b518d4
--- /dev/null
+++ b/docs/doc_examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: ".elastic-connectors",
+ id: "connector_id",
+ doc: {
+ configuration: {
+ tables: {
+ type: "list",
+ value: "*",
+ },
+ ssl_enabled: {
+ type: "bool",
+ value: false,
+ },
+ ssl_ca: {
+ type: "str",
+ value: "",
+ },
+ fetch_size: {
+ type: "int",
+ value: 50,
+ },
+ retry_count: {
+ type: "int",
+ value: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc b/docs/doc_examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc
new file mode 100644
index 000000000..87d69814b
--- /dev/null
+++ b/docs/doc_examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ _geo_distance: {
+ "pin.location": "drm3btev3e86",
+ order: "asc",
+ unit: "km",
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9bfdda207b701028a3439e495e800c02.asciidoc b/docs/doc_examples/9bfdda207b701028a3439e495e800c02.asciidoc
new file mode 100644
index 000000000..287a69f92
--- /dev/null
+++ b/docs/doc_examples/9bfdda207b701028a3439e495e800c02.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ format: "yyyy-MM-dd",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc b/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc
new file mode 100644
index 000000000..64e6db48e
--- /dev/null
+++ b/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.oidcAuthenticate({
+ body: {
+ redirect_uri:
+ "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
+ state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
+ nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
+ realm: "oidc1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9c021836acf7c0370e289f611325868d.asciidoc b/docs/doc_examples/9c021836acf7c0370e289f611325868d.asciidoc
new file mode 100644
index 000000000..ed4557890
--- /dev/null
+++ b/docs/doc_examples/9c021836acf7c0370e289f611325868d.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateConfiguration({
+ connector_id: "my-spo-connector",
+ values: {
+ tenant_id: "my-tenant-id",
+ tenant_name: "my-sharepoint-site",
+ client_id: "foo",
+ secret_value: "bar",
+ site_collections: "*",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9c2ce0132e4527077443f007d27b1158.asciidoc b/docs/doc_examples/9c2ce0132e4527077443f007d27b1158.asciidoc
new file mode 100644
index 000000000..a85d946d2
--- /dev/null
+++ b/docs/doc_examples/9c2ce0132e4527077443f007d27b1158.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ flattened: {
+ type: "flattened",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ flattened: {
+ field: ["foo"],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/9c4ac64e73141f6cbf2fb6da0743d9b7.asciidoc b/docs/doc_examples/9c4ac64e73141f6cbf2fb6da0743d9b7.asciidoc
new file mode 100644
index 000000000..6de7fa524
--- /dev/null
+++ b/docs/doc_examples/9c4ac64e73141f6cbf2fb6da0743d9b7.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: {
+ query: "Quick foxes",
+ analyzer: "stop",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9c5cbbdbe0075ab9c2611627fe4748fb.asciidoc b/docs/doc_examples/9c5cbbdbe0075ab9c2611627fe4748fb.asciidoc
new file mode 100644
index 000000000..221cdeaa1
--- /dev/null
+++ b/docs/doc_examples/9c5cbbdbe0075ab9c2611627fe4748fb.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "decimal_digit_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_decimal_digit: {
+ tokenizer: "whitespace",
+ filter: ["decimal_digit"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9c6ea5fe2339d6c7e5e4bf1b98990248.asciidoc b/docs/doc_examples/9c6ea5fe2339d6c7e5e4bf1b98990248.asciidoc
new file mode 100644
index 000000000..f1d5306fe
--- /dev/null
+++ b/docs/doc_examples/9c6ea5fe2339d6c7e5e4bf1b98990248.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "image-index",
+ knn: {
+ field: "image-vector",
+ query_vector: [-5, 9, -12],
+ k: 10,
+ num_candidates: 100,
+ },
+ fields: ["title", "file-type"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9c7c8051592b6af3adb5d7c490849068.asciidoc b/docs/doc_examples/9c7c8051592b6af3adb5d7c490849068.asciidoc
new file mode 100644
index 000000000..38e4630c1
--- /dev/null
+++ b/docs/doc_examples/9c7c8051592b6af3adb5d7c490849068.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDatafeed({
+ datafeed_id: "datafeed-test-job",
+ pretty: "true",
+ indices: ["kibana_sample_data_logs"],
+ query: {
+ bool: {
+ must: [
+ {
+ match_all: {},
+ },
+ ],
+ },
+ },
+ job_id: "test-job",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc b/docs/doc_examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc
new file mode 100644
index 000000000..d842bf3e9
--- /dev/null
+++ b/docs/doc_examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ filter_path: "*.settings.index.routing.allocation.include._tier_preference",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc b/docs/doc_examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc
new file mode 100644
index 000000000..2f7852343
--- /dev/null
+++ b/docs/doc_examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "model2",
+ docs: [
+ {
+ text_field: "This is a very happy person",
+ },
+ ],
+ inference_config: {
+ zero_shot_classification: {
+ labels: ["glad", "sad", "bad", "rad"],
+ multi_label: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9cc64ab2f60f995f5dbfaca67aa6dd41.asciidoc b/docs/doc_examples/9cc64ab2f60f995f5dbfaca67aa6dd41.asciidoc
new file mode 100644
index 000000000..25b3a01c8
--- /dev/null
+++ b/docs/doc_examples/9cc64ab2f60f995f5dbfaca67aa6dd41.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query:
+ "\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9cd37d0ccbc66ad47ddb626564b27cc8.asciidoc b/docs/doc_examples/9cd37d0ccbc66ad47ddb626564b27cc8.asciidoc
new file mode 100644
index 000000000..4c9ea62c8
--- /dev/null
+++ b/docs/doc_examples/9cd37d0ccbc66ad47ddb626564b27cc8.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ watch: {
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: ["logs"],
+ body: {
+ query: {
+ match: {
+ message: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+ actions: {
+ log_error: {
+ logging: {
+ text: "Found {{ctx.payload.hits.total}} errors in the logs",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9cf6c7012a4f2bb562bc256aa28c3409.asciidoc b/docs/doc_examples/9cf6c7012a4f2bb562bc256aa28c3409.asciidoc
new file mode 100644
index 000000000..9944c2a27
--- /dev/null
+++ b/docs/doc_examples/9cf6c7012a4f2bb562bc256aa28c3409.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ id: "my_watch",
+ action_modes: {
+ _all: "force_execute",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc b/docs/doc_examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc
new file mode 100644
index 000000000..72fdaf837
--- /dev/null
+++ b/docs/doc_examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ refresh: "true",
+ slices: 5,
+ query: {
+ range: {
+ "http.response.bytes": {
+ lt: 2000000,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d1fb129ac783355a20097effded1845.asciidoc b/docs/doc_examples/9d1fb129ac783355a20097effded1845.asciidoc
new file mode 100644
index 000000000..edbed6a51
--- /dev/null
+++ b/docs/doc_examples/9d1fb129ac783355a20097effded1845.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "test",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ s: 1,
+ m: 3.1415,
+ },
+ {
+ index: {},
+ },
+ {
+ s: 2,
+ m: 1,
+ },
+ {
+ index: {},
+ },
+ {
+ s: 3,
+ m: 2.71828,
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "test",
+ filter_path: "aggregations",
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ s: "desc",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/9d31c7eaf8c6b56cee2fdfdde8a442bb.asciidoc b/docs/doc_examples/9d31c7eaf8c6b56cee2fdfdde8a442bb.asciidoc
new file mode 100644
index 000000000..047504f75
--- /dev/null
+++ b/docs/doc_examples/9d31c7eaf8c6b56cee2fdfdde8a442bb.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ shrink: {
+ max_primary_shard_size: "50gb",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d396afad93782699d7a929578c85284.asciidoc b/docs/doc_examples/9d396afad93782699d7a929578c85284.asciidoc
new file mode 100644
index 000000000..2f0a85e90
--- /dev/null
+++ b/docs/doc_examples/9d396afad93782699d7a929578c85284.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "google_vertex_ai_embeddings",
+ inference_config: {
+ service: "googlevertexai",
+ service_settings: {
+ service_account_json: "",
+ model_id: "text-embedding-004",
+ location: "",
+ project_id: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d461ae140ddc018efd2650559800cd1.asciidoc b/docs/doc_examples/9d461ae140ddc018efd2650559800cd1.asciidoc
new file mode 100644
index 000000000..13f8b9c99
--- /dev/null
+++ b/docs/doc_examples/9d461ae140ddc018efd2650559800cd1.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ allocate: {
+ number_of_replicas: 1,
+ require: {
+ box_type: "cold",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d47f02a063444da9f098858a1830d28.asciidoc b/docs/doc_examples/9d47f02a063444da9f098858a1830d28.asciidoc
new file mode 100644
index 000000000..b10da9a05
--- /dev/null
+++ b/docs/doc_examples/9d47f02a063444da9f098858a1830d28.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.disk.watermark.low": "30gb",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d5855075e7008270459cc88c189043d.asciidoc b/docs/doc_examples/9d5855075e7008270459cc88c189043d.asciidoc
new file mode 100644
index 000000000..bd11081bd
--- /dev/null
+++ b/docs/doc_examples/9d5855075e7008270459cc88c189043d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "cross-cluster-user",
+ password: "l0ng-r4nd0m-p@ssw0rd",
+ roles: ["remote-replication"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d662fc9f943c287b7144f5e4e2ae358.asciidoc b/docs/doc_examples/9d662fc9f943c287b7144f5e4e2ae358.asciidoc
new file mode 100644
index 000000000..01c5e240c
--- /dev/null
+++ b/docs/doc_examples/9d662fc9f943c287b7144f5e4e2ae358.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "reviews",
+ size: 0,
+ aggs: {
+ review_variability: {
+ median_absolute_deviation: {
+ field: "rating",
+ compression: 100,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d66cb59711f24e6b4ff85608c9b5a1b.asciidoc b/docs/doc_examples/9d66cb59711f24e6b4ff85608c9b5a1b.asciidoc
new file mode 100644
index 000000000..8c361f48c
--- /dev/null
+++ b/docs/doc_examples/9d66cb59711f24e6b4ff85608c9b5a1b.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ pretty: "true",
+ human: "true",
+ detailed: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d67db8370a98854812d38ae73ee2a12.asciidoc b/docs/doc_examples/9d67db8370a98854812d38ae73ee2a12.asciidoc
new file mode 100644
index 000000000..357b432b0
--- /dev/null
+++ b/docs/doc_examples/9d67db8370a98854812d38ae73ee2a12.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index2",
+ query: {
+ query_string: {
+ query: "running with scissors",
+ fields: ["comment", "comment.english"],
+ },
+ },
+ highlight: {
+ order: "score",
+ fields: {
+ comment: {
+ type: "fvh",
+ matched_fields: ["comment", "comment.english"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9d79645ab3a9da3f63c54a1516214a5a.asciidoc b/docs/doc_examples/9d79645ab3a9da3f63c54a1516214a5a.asciidoc
new file mode 100644
index 000000000..08ce23ec8
--- /dev/null
+++ b/docs/doc_examples/9d79645ab3a9da3f63c54a1516214a5a.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.healthReport();
+console.log(response);
+----
diff --git a/docs/doc_examples/9d9c8d715b72ce336e604c2c8a2b540e.asciidoc b/docs/doc_examples/9d9c8d715b72ce336e604c2c8a2b540e.asciidoc
new file mode 100644
index 000000000..1cc661947
--- /dev/null
+++ b/docs/doc_examples/9d9c8d715b72ce336e604c2c8a2b540e.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ total_sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ sales_bucket_sort: {
+ bucket_sort: {
+ sort: [
+ {
+ total_sales: {
+ order: "desc",
+ },
+ },
+ ],
+ size: 3,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9de10a59a5f56dd0906be627896cc789.asciidoc b/docs/doc_examples/9de10a59a5f56dd0906be627896cc789.asciidoc
new file mode 100644
index 000000000..7e05930ac
--- /dev/null
+++ b/docs/doc_examples/9de10a59a5f56dd0906be627896cc789.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "bicycles,other_cycles",
+ query: {
+ match: {
+ description: "dutch",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9de4704d2f047dae1259249112488697.asciidoc b/docs/doc_examples/9de4704d2f047dae1259249112488697.asciidoc
new file mode 100644
index 000000000..68b58c208
--- /dev/null
+++ b/docs/doc_examples/9de4704d2f047dae1259249112488697.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_backup",
+ repository: {
+ type: "azure",
+ settings: {
+ client: "secondary",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9de4ea9d5f3d427a71ee07d998cb5611.asciidoc b/docs/doc_examples/9de4ea9d5f3d427a71ee07d998cb5611.asciidoc
new file mode 100644
index 000000000..f22be9ab8
--- /dev/null
+++ b/docs/doc_examples/9de4ea9d5f3d427a71ee07d998cb5611.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.addBlock({
+ index: "my-index-000001",
+ block: "write",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc b/docs/doc_examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc
new file mode 100644
index 000000000..f5015c526
--- /dev/null
+++ b/docs/doc_examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query:
+ '\n FROM library\n | EVAL year = DATE_EXTRACT("year", release_date)\n | WHERE page_count > ?1 AND author == ?2\n | STATS count = COUNT(*) by year\n | WHERE count > ?3\n | LIMIT 5\n ',
+ params: [300, "Frank Herbert", 0],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9e0e3ce27967f164f4585c5231ba9c75.asciidoc b/docs/doc_examples/9e0e3ce27967f164f4585c5231ba9c75.asciidoc
new file mode 100644
index 000000000..cbe2f22fa
--- /dev/null
+++ b/docs/doc_examples/9e0e3ce27967f164f4585c5231ba9c75.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ my_field: "quick brown fox jump lazy dog",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9e3c28d5820c38ea117eb2e9a5061089.asciidoc b/docs/doc_examples/9e3c28d5820c38ea117eb2e9a5061089.asciidoc
new file mode 100644
index 000000000..8b5d51237
--- /dev/null
+++ b/docs/doc_examples/9e3c28d5820c38ea117eb2e9a5061089.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ query: {
+ rank_feature: {
+ field: "pagerank",
+ sigmoid: {
+ pivot: 7,
+ exponent: 0.6,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc b/docs/doc_examples/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc
new file mode 100644
index 000000000..0baae0b73
--- /dev/null
+++ b/docs/doc_examples/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.putSynonym({
+ id: "my-synonyms-set",
+ synonyms_set: [
+ {
+ id: "test-1",
+ synonyms: "hello, hi",
+ },
+ {
+ synonyms: "bye, goodbye",
+ },
+ {
+ id: "test-2",
+ synonyms: "test => check",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9e5ae957fd0663662bfbed9d1effe99e.asciidoc b/docs/doc_examples/9e5ae957fd0663662bfbed9d1effe99e.asciidoc
new file mode 100644
index 000000000..51c64f7e8
--- /dev/null
+++ b/docs/doc_examples/9e5ae957fd0663662bfbed9d1effe99e.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ description: "Set '_routing' to 'geoip.country_iso_code' value",
+ field: "_routing",
+ value: "{{{geoip.country_iso_code}}}",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9e962baf1fb407c21d6c47dcd37cec29.asciidoc b/docs/doc_examples/9e962baf1fb407c21d6c47dcd37cec29.asciidoc
new file mode 100644
index 000000000..891d78d79
--- /dev/null
+++ b/docs/doc_examples/9e962baf1fb407c21d6c47dcd37cec29.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ match: {
+ message: "{{query_string}}",
+ },
+ },
+ from: "{{from}}{{^from}}0{{/from}}",
+ size: "{{size}}{{^size}}10{{/size}}",
+ },
+ params: {
+ query_string: "hello world",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9e9717d9108ae1425bfacf71c7c44539.asciidoc b/docs/doc_examples/9e9717d9108ae1425bfacf71c7c44539.asciidoc
new file mode 100644
index 000000000..5b700034d
--- /dev/null
+++ b/docs/doc_examples/9e9717d9108ae1425bfacf71c7c44539.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.indices({
+ bytes: "b",
+ s: "store.size:desc,index:asc",
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9eda9c39428b0c2c53cbd8ee7ae0f888.asciidoc b/docs/doc_examples/9eda9c39428b0c2c53cbd8ee7ae0f888.asciidoc
new file mode 100644
index 000000000..960e07320
--- /dev/null
+++ b/docs/doc_examples/9eda9c39428b0c2c53cbd8ee7ae0f888.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlAuthenticate({
+ content:
+ "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....",
+ ids: [],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9eef31d85ebaf6c27054d7375715dbe0.asciidoc b/docs/doc_examples/9eef31d85ebaf6c27054d7375715dbe0.asciidoc
new file mode 100644
index 000000000..3855ad705
--- /dev/null
+++ b/docs/doc_examples/9eef31d85ebaf6c27054d7375715dbe0.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_event_watch",
+ trigger: {
+ schedule: {
+ interval: "5m",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: "log-events",
+ body: {
+ query: {
+ match: {
+ status: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+ actions: {
+ log_hits: {
+ foreach: "ctx.payload.hits.hits",
+ max_iterations: 500,
+ logging: {
+ text: "Found id {{ctx.payload._id}} with field {{ctx.payload._source.my_field}}",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc b/docs/doc_examples/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc
new file mode 100644
index 000000000..98a85f208
--- /dev/null
+++ b/docs/doc_examples/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ tags: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f0a0029982d9b3423a2a3de1f1b5136.asciidoc b/docs/doc_examples/9f0a0029982d9b3423a2a3de1f1b5136.asciidoc
new file mode 100644
index 000000000..8beac4d25
--- /dev/null
+++ b/docs/doc_examples/9f0a0029982d9b3423a2a3de1f1b5136.asciidoc
@@ -0,0 +1,98 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (491.2350 5237.4081)",
+ city: "Amsterdam",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (490.1618 5236.9219)",
+ city: "Amsterdam",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (491.4722 5237.1667)",
+ city: "Amsterdam",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (440.5200 5122.2900)",
+ city: "Antwerp",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (233.6389 4886.1111)",
+ city: "Paris",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (232.7000 4886.0000)",
+ city: "Paris",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ centroid: {
+ cartesian_centroid: {
+ field: "location",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/9f22a0920cc763eefa233ced963d9624.asciidoc b/docs/doc_examples/9f22a0920cc763eefa233ced963d9624.asciidoc
new file mode 100644
index 000000000..873439e01
--- /dev/null
+++ b/docs/doc_examples/9f22a0920cc763eefa233ced963d9624.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_term: {
+ "user.id": {
+ term: "kimchy",
+ boost: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f286416f1b18940f13cb27ab5c8458e.asciidoc b/docs/doc_examples/9f286416f1b18940f13cb27ab5c8458e.asciidoc
new file mode 100644
index 000000000..b3b8507ef
--- /dev/null
+++ b/docs/doc_examples/9f286416f1b18940f13cb27ab5c8458e.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ filter: ["my_pattern_replace_filter"],
+ },
+ },
+ filter: {
+ my_pattern_replace_filter: {
+ type: "pattern_replace",
+ pattern: "[£|€]",
+ replacement: "",
+ all: false,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc b/docs/doc_examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc
new file mode 100644
index 000000000..173a6c38c
--- /dev/null
+++ b/docs/doc_examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "job-candidates",
+ query: {
+ terms_set: {
+ programming_languages: {
+ terms: ["c++", "java", "php"],
+ minimum_should_match_script: {
+ source: "Math.min(params.num_terms, doc['required_matches'].value)",
+ },
+ boost: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f66b5243050f71ed51bc787a7ac1218.asciidoc b/docs/doc_examples/9f66b5243050f71ed51bc787a7ac1218.asciidoc
new file mode 100644
index 000000000..7570912eb
--- /dev/null
+++ b/docs/doc_examples/9f66b5243050f71ed51bc787a7ac1218.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "index2",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "doc1",
+ },
+ },
+ {
+ comment: "run with scissors",
+ },
+ {
+ index: {
+ _id: "doc2",
+ },
+ },
+ {
+ comment: "running with scissors",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f7671119236423e0e40801ef6485af1.asciidoc b/docs/doc_examples/9f7671119236423e0e40801ef6485af1.asciidoc
new file mode 100644
index 000000000..0a1a681c9
--- /dev/null
+++ b/docs/doc_examples/9f7671119236423e0e40801ef6485af1.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["uppercase"],
+ text: "the Quick FoX JUMPs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9f99be2d58c48a6bf8e892aa24604197.asciidoc b/docs/doc_examples/9f99be2d58c48a6bf8e892aa24604197.asciidoc
new file mode 100644
index 000000000..7d840f8ed
--- /dev/null
+++ b/docs/doc_examples/9f99be2d58c48a6bf8e892aa24604197.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateDataFrameAnalytics({
+ id: "loganalytics",
+ model_memory_limit: "200mb",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9fa55fc76ec4bd81f372e9389f1da851.asciidoc b/docs/doc_examples/9fa55fc76ec4bd81f372e9389f1da851.asciidoc
new file mode 100644
index 000000000..96753281c
--- /dev/null
+++ b/docs/doc_examples/9fa55fc76ec4bd81f372e9389f1da851.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-data-stream",
+ settings: {
+ index: {
+ refresh_interval: "30s",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9fda516a5dc60ba477b970eaad4429db.asciidoc b/docs/doc_examples/9fda516a5dc60ba477b970eaad4429db.asciidoc
new file mode 100644
index 000000000..00673e725
--- /dev/null
+++ b/docs/doc_examples/9fda516a5dc60ba477b970eaad4429db.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataLifecycle({
+ name: "my-data-stream*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9feff356f302ea4915347ab71cc4887a.asciidoc b/docs/doc_examples/9feff356f302ea4915347ab71cc4887a.asciidoc
new file mode 100644
index 000000000..28f39bf5a
--- /dev/null
+++ b/docs/doc_examples/9feff356f302ea4915347ab71cc4887a.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.simulateTemplate({
+ index_patterns: ["my-index-*"],
+ composed_of: ["ct2"],
+ priority: 10,
+ template: {
+ settings: {
+ "index.number_of_replicas": 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ff9b2a73419a6c82f17a358b4991499.asciidoc b/docs/doc_examples/9ff9b2a73419a6c82f17a358b4991499.asciidoc
new file mode 100644
index 000000000..972ad5d5e
--- /dev/null
+++ b/docs/doc_examples/9ff9b2a73419a6c82f17a358b4991499.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.closePointInTime({
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/9ffe41322c095af1b6ea45a79b640a6f.asciidoc b/docs/doc_examples/9ffe41322c095af1b6ea45a79b640a6f.asciidoc
new file mode 100644
index 000000000..7742b99dd
--- /dev/null
+++ b/docs/doc_examples/9ffe41322c095af1b6ea45a79b640a6f.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_within: {
+ little: {
+ span_term: {
+ field1: "foo",
+ },
+ },
+ big: {
+ span_near: {
+ clauses: [
+ {
+ span_term: {
+ field1: "bar",
+ },
+ },
+ {
+ span_term: {
+ field1: "baz",
+ },
+ },
+ ],
+ slop: 5,
+ in_order: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc b/docs/doc_examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc
new file mode 100644
index 000000000..df7650ac2
--- /dev/null
+++ b/docs/doc_examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.getRollupCaps({
+ id: "sensor-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a008f42379930edc354b4074e0a33344.asciidoc b/docs/doc_examples/a008f42379930edc354b4074e0a33344.asciidoc
new file mode 100644
index 000000000..3f2438447
--- /dev/null
+++ b/docs/doc_examples/a008f42379930edc354b4074e0a33344.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "index",
+ id: 1,
+ document: {
+ designation: "spoon",
+ price: 13,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a01753fa7b4ba6dc19054f4f42d91cd9.asciidoc b/docs/doc_examples/a01753fa7b4ba6dc19054f4f42d91cd9.asciidoc
new file mode 100644
index 000000000..9461dd6d9
--- /dev/null
+++ b/docs/doc_examples/a01753fa7b4ba6dc19054f4f42d91cd9.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source:
+ '{ "query": { "bool": { "filter": [ { "range": { "@timestamp": { "gte": {{#year_scope}} "now-1y/d" {{/year_scope}} {{^year_scope}} "now-1d/d" {{/year_scope}} , "lt": "now/d" }}}, { "term": { "user.id": "{{user_id}}" }}]}}}',
+ params: {
+ year_scope: true,
+ user_id: "kimchy",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a037beb3d02296e1d36dd43ef5c935dd.asciidoc b/docs/doc_examples/a037beb3d02296e1d36dd43ef5c935dd.asciidoc
new file mode 100644
index 000000000..c584944c7
--- /dev/null
+++ b/docs/doc_examples/a037beb3d02296e1d36dd43ef5c935dd.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["keyword_repeat"],
+ text: "fox running and jumping",
+ explain: true,
+ attributes: "keyword",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a0497157fdefecd04e597edb800a1a95.asciidoc b/docs/doc_examples/a0497157fdefecd04e597edb800a1a95.asciidoc
new file mode 100644
index 000000000..2c2bb2bdd
--- /dev/null
+++ b/docs/doc_examples/a0497157fdefecd04e597edb800a1a95.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ _source: "obj.*",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a04a8d90f8245ff5f30a9983909faa1d.asciidoc b/docs/doc_examples/a04a8d90f8245ff5f30a9983909faa1d.asciidoc
new file mode 100644
index 000000000..a035737b6
--- /dev/null
+++ b/docs/doc_examples/a04a8d90f8245ff5f30a9983909faa1d.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_queries1",
+ settings: {
+ analysis: {
+ analyzer: {
+ wildcard_prefix: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "wildcard_edge_ngram"],
+ },
+ },
+ filter: {
+ wildcard_edge_ngram: {
+ type: "edge_ngram",
+ min_gram: 1,
+ max_gram: 32,
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ query: {
+ type: "percolator",
+ },
+ my_field: {
+ type: "text",
+ fields: {
+ prefix: {
+ type: "text",
+ analyzer: "wildcard_prefix",
+ search_analyzer: "standard",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a0871be90badeecd2f8d8ec90230e248.asciidoc b/docs/doc_examples/a0871be90badeecd2f8d8ec90230e248.asciidoc
new file mode 100644
index 000000000..288ddcba7
--- /dev/null
+++ b/docs/doc_examples/a0871be90badeecd2f8d8ec90230e248.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ char_filter: ["my_char_filter"],
+ filter: ["lowercase"],
+ },
+ },
+ char_filter: {
+ my_char_filter: {
+ type: "pattern_replace",
+ pattern: "(?<=\\p{Lower})(?=\\p{Upper})",
+ replacement: " ",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ analyzer: "my_analyzer",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "The fooBarBaz method",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a0a7557bb7e2aff7918557cd648f41af.asciidoc b/docs/doc_examples/a0a7557bb7e2aff7918557cd648f41af.asciidoc
new file mode 100644
index 000000000..036309628
--- /dev/null
+++ b/docs/doc_examples/a0a7557bb7e2aff7918557cd648f41af.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ aggs: {
+ price_ranges: {
+ range: {
+ field: "price",
+ ranges: [
+ {
+ to: 10,
+ },
+ {
+ from: 10,
+ to: 100,
+ },
+ {
+ from: 100,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a0c64894f14d28b7e0c902add71d2e9a.asciidoc b/docs/doc_examples/a0c64894f14d28b7e0c902add71d2e9a.asciidoc
new file mode 100644
index 000000000..de2db6d50
--- /dev/null
+++ b/docs/doc_examples/a0c64894f14d28b7e0c902add71d2e9a.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "xpack.profiling.templates.enabled": true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a0c868282c0514a342ad04998cdc2175.asciidoc b/docs/doc_examples/a0c868282c0514a342ad04998cdc2175.asciidoc
new file mode 100644
index 000000000..500a4aa86
--- /dev/null
+++ b/docs/doc_examples/a0c868282c0514a342ad04998cdc2175.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ conflicts: "proceed",
+ query: {
+ match_all: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a0d53dcb3df938fc0a01d248571a41e4.asciidoc b/docs/doc_examples/a0d53dcb3df938fc0a01d248571a41e4.asciidoc
new file mode 100644
index 000000000..d8c564f74
--- /dev/null
+++ b/docs/doc_examples/a0d53dcb3df938fc0a01d248571a41e4.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ runtime_mappings: {
+ "price.discounted": {
+ type: "double",
+ script:
+ "\n double price = doc['price'].value;\n if (doc['product'].value == 'mad max') {\n price *= 0.8;\n }\n emit(price);\n ",
+ },
+ },
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ price: {
+ histogram: {
+ interval: 5,
+ field: "price.discounted",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a0f4e902d18460337684d74ea932fbe9.asciidoc b/docs/doc_examples/a0f4e902d18460337684d74ea932fbe9.asciidoc
new file mode 100644
index 000000000..8e8910255
--- /dev/null
+++ b/docs/doc_examples/a0f4e902d18460337684d74ea932fbe9.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ doc: {
+ name: "new_name",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1070cf2f5969d42d71cda057223f152.asciidoc b/docs/doc_examples/a1070cf2f5969d42d71cda057223f152.asciidoc
new file mode 100644
index 000000000..945dcb537
--- /dev/null
+++ b/docs/doc_examples/a1070cf2f5969d42d71cda057223f152.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1377b32d7fe3680079ae0df73009b0e.asciidoc b/docs/doc_examples/a1377b32d7fe3680079ae0df73009b0e.asciidoc
new file mode 100644
index 000000000..619608a67
--- /dev/null
+++ b/docs/doc_examples/a1377b32d7fe3680079ae0df73009b0e.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ query: {
+ term: {
+ tags: "car",
+ },
+ },
+ aggs: {
+ by_sale: {
+ nested: {
+ path: "comments",
+ },
+ aggs: {
+ by_user: {
+ terms: {
+ field: "comments.username",
+ size: 1,
+ },
+ aggs: {
+ by_nested: {
+ top_hits: {},
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1490f71d705053951870fd2d3bceb39.asciidoc b/docs/doc_examples/a1490f71d705053951870fd2d3bceb39.asciidoc
new file mode 100644
index 000000000..19c475da7
--- /dev/null
+++ b/docs/doc_examples/a1490f71d705053951870fd2d3bceb39.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ session_data: {
+ type: "object",
+ enabled: false,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "session_1",
+ document: {
+ session_data: "foo bar",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a159143bb578403bb9c7ff37d635d7ad.asciidoc b/docs/doc_examples/a159143bb578403bb9c7ff37d635d7ad.asciidoc
new file mode 100644
index 000000000..2f4c0b3b7
--- /dev/null
+++ b/docs/doc_examples/a159143bb578403bb9c7ff37d635d7ad.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "predicate_token_filter",
+ script: {
+ source: "\n token.term.length() > 3\n ",
+ },
+ },
+ ],
+ text: "the fox jumps the lazy dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a159e1ce0cba7a35ce44db9bebad22f3.asciidoc b/docs/doc_examples/a159e1ce0cba7a35ce44db9bebad22f3.asciidoc
new file mode 100644
index 000000000..668b41dfa
--- /dev/null
+++ b/docs/doc_examples/a159e1ce0cba7a35ce44db9bebad22f3.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getLifecycle();
+console.log(response);
+----
diff --git a/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc b/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc
new file mode 100644
index 000000000..6b9a54625
--- /dev/null
+++ b/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.renderQuery({
+ name: "my_search_application",
+ body: {
+ params: {
+ query_string: "rock climbing",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a180c97f8298fb2388fdcaf7b2e1b81e.asciidoc b/docs/doc_examples/a180c97f8298fb2388fdcaf7b2e1b81e.asciidoc
new file mode 100644
index 000000000..d2545c390
--- /dev/null
+++ b/docs/doc_examples/a180c97f8298fb2388fdcaf7b2e1b81e.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "nightly-snapshots",
+ schedule: "0 30 2 * * ?",
+ name: "",
+ repository: "my_repository",
+ config: {
+ indices: "*",
+ include_global_state: true,
+ feature_states: ["kibana", "security"],
+ },
+ retention: {
+ expire_after: "30d",
+ min_count: 5,
+ max_count: 50,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1879930c1dac36a57d7f094a680420b.asciidoc b/docs/doc_examples/a1879930c1dac36a57d7f094a680420b.asciidoc
new file mode 100644
index 000000000..f7f63fea4
--- /dev/null
+++ b/docs/doc_examples/a1879930c1dac36a57d7f094a680420b.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "zoomed-in": {
+ filter: {
+ geo_bounding_box: {
+ location: {
+ top_left: "u17",
+ bottom_right: "u17",
+ },
+ },
+ },
+ aggregations: {
+ zoom1: {
+ geohash_grid: {
+ field: "location",
+ precision: 8,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a197076e0e74951ea88f20309ec257e2.asciidoc b/docs/doc_examples/a197076e0e74951ea88f20309ec257e2.asciidoc
new file mode 100644
index 000000000..9b7a0457a
--- /dev/null
+++ b/docs/doc_examples/a197076e0e74951ea88f20309ec257e2.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "palindrome_list",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_reverse_first_token: {
+ tokenizer: "whitespace",
+ filter: ["reverse_first_token"],
+ },
+ },
+ filter: {
+ reverse_first_token: {
+ type: "condition",
+ filter: ["reverse"],
+ script: {
+ source: "token.getPosition() === 0",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1acf454bd6477183ce27ace872deb46.asciidoc b/docs/doc_examples/a1acf454bd6477183ce27ace872deb46.asciidoc
new file mode 100644
index 000000000..7bae40744
--- /dev/null
+++ b/docs/doc_examples/a1acf454bd6477183ce27ace872deb46.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role7",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["a.*"],
+ except: ["a.b*"],
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.security.putRole({
+ name: "test_role8",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["a.b*"],
+ except: ["a.b.c*"],
+ },
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a1b668795243398f5bc40bcc9bead884.asciidoc b/docs/doc_examples/a1b668795243398f5bc40bcc9bead884.asciidoc
new file mode 100644
index 000000000..31d504f3c
--- /dev/null
+++ b/docs/doc_examples/a1b668795243398f5bc40bcc9bead884.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_range: {
+ type: "long_range",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ my_range: [
+ {
+ gte: 200,
+ lte: 300,
+ },
+ {
+ gte: 1,
+ lte: 100,
+ },
+ {
+ gte: 200,
+ lte: 300,
+ },
+ {
+ gte: 200,
+ lte: 500,
+ },
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a1ccd51eef37e43c935a047b0ee15daa.asciidoc b/docs/doc_examples/a1ccd51eef37e43c935a047b0ee15daa.asciidoc
new file mode 100644
index 000000000..4d6375dbb
--- /dev/null
+++ b/docs/doc_examples/a1ccd51eef37e43c935a047b0ee15daa.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1d0603b24a5b048f0959975d8057534.asciidoc b/docs/doc_examples/a1d0603b24a5b048f0959975d8057534.asciidoc
new file mode 100644
index 000000000..0d951cbb3
--- /dev/null
+++ b/docs/doc_examples/a1d0603b24a5b048f0959975d8057534.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "my-index-000001",
+ doc: {
+ fullname: "John Doe",
+ text: "test test test",
+ },
+ fields: ["fullname"],
+ per_field_analyzer: {
+ fullname: "keyword",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1dcc6668d13271c8207ff5ff1d35492.asciidoc b/docs/doc_examples/a1dcc6668d13271c8207ff5ff1d35492.asciidoc
new file mode 100644
index 000000000..47f0b8b89
--- /dev/null
+++ b/docs/doc_examples/a1dcc6668d13271c8207ff5ff1d35492.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.get({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc b/docs/doc_examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc
new file mode 100644
index 000000000..fffbd6549
--- /dev/null
+++ b/docs/doc_examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ standard: {
+ query: {
+ match_phrase: {
+ text: "landmark in Paris",
+ },
+ },
+ },
+ },
+ field: "text",
+ inference_id: "my-cohere-rerank-model",
+ inference_text: "Most famous landmark in Paris",
+ rank_window_size: 100,
+ min_score: 0.5,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1e5884051755b5a5f4d7549f319f4c7.asciidoc b/docs/doc_examples/a1e5884051755b5a5f4d7549f319f4c7.asciidoc
new file mode 100644
index 000000000..1442efa7b
--- /dev/null
+++ b/docs/doc_examples/a1e5884051755b5a5f4d7549f319f4c7.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "products",
+ mappings: {
+ properties: {
+ resellers: {
+ type: "nested",
+ properties: {
+ reseller: {
+ type: "keyword",
+ },
+ price: {
+ type: "double",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1e5f3956f9a697e79478fc9a6e30e1f.asciidoc b/docs/doc_examples/a1e5f3956f9a697e79478fc9a6e30e1f.asciidoc
new file mode 100644
index 000000000..3ffa26e73
--- /dev/null
+++ b/docs/doc_examples/a1e5f3956f9a697e79478fc9a6e30e1f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "thai",
+ text: "การที่ได้ต้องแสดงว่างานดี",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a1f70bc71b763b58206814c40a7440e7.asciidoc b/docs/doc_examples/a1f70bc71b763b58206814c40a7440e7.asciidoc
new file mode 100644
index 000000000..e8b0d8042
--- /dev/null
+++ b/docs/doc_examples/a1f70bc71b763b58206814c40a7440e7.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_watcher/settings",
+ body: {
+ "index.auto_expand_replicas": "0-4",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a21319c9eff1ac47d7fe7490f1ef2efa.asciidoc b/docs/doc_examples/a21319c9eff1ac47d7fe7490f1ef2efa.asciidoc
new file mode 100644
index 000000000..51e111829
--- /dev/null
+++ b/docs/doc_examples/a21319c9eff1ac47d7fe7490f1ef2efa.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["decimal_digit"],
+ text: "१-one two-२ ३",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a21a7bf052b41f5b996dc58f7b69770f.asciidoc b/docs/doc_examples/a21a7bf052b41f5b996dc58f7b69770f.asciidoc
new file mode 100644
index 000000000..3d5c6a62d
--- /dev/null
+++ b/docs/doc_examples/a21a7bf052b41f5b996dc58f7b69770f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.setUpgradeMode({
+ enabled: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc b/docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc
new file mode 100644
index 000000000..da9071e2c
--- /dev/null
+++ b/docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "elser_embeddings",
+ inference_config: {
+ service: "elser",
+ service_settings: {
+ num_allocations: 1,
+ num_threads: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a253a1712953f7292bdd646c48ec7fd2.asciidoc b/docs/doc_examples/a253a1712953f7292bdd646c48ec7fd2.asciidoc
new file mode 100644
index 000000000..7ef15ed42
--- /dev/null
+++ b/docs/doc_examples/a253a1712953f7292bdd646c48ec7fd2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ sort: "@timestamp:desc",
+ size: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a28111cdd9b5aaea96c779cbfbf38780.asciidoc b/docs/doc_examples/a28111cdd9b5aaea96c779cbfbf38780.asciidoc
new file mode 100644
index 000000000..9a5a812a7
--- /dev/null
+++ b/docs/doc_examples/a28111cdd9b5aaea96c779cbfbf38780.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "czech_example",
+ settings: {
+ analysis: {
+ filter: {
+ czech_stop: {
+ type: "stop",
+ stopwords: "_czech_",
+ },
+ czech_keywords: {
+ type: "keyword_marker",
+ keywords: ["příklad"],
+ },
+ czech_stemmer: {
+ type: "stemmer",
+ language: "czech",
+ },
+ },
+ analyzer: {
+ rebuilt_czech: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "czech_stop",
+ "czech_keywords",
+ "czech_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a2abd6b6b6b6df7c574a557b5468b5e1.asciidoc b/docs/doc_examples/a2abd6b6b6b6df7c574a557b5468b5e1.asciidoc
new file mode 100644
index 000000000..721f3efb9
--- /dev/null
+++ b/docs/doc_examples/a2abd6b6b6b6df7c574a557b5468b5e1.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index2",
+ mappings: {
+ properties: {
+ comment: {
+ type: "text",
+ analyzer: "standard",
+ term_vector: "with_positions_offsets",
+ fields: {
+ english: {
+ type: "text",
+ analyzer: "english",
+ term_vector: "with_positions_offsets",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a2b2ce031120dac49b5120b26eea8758.asciidoc b/docs/doc_examples/a2b2ce031120dac49b5120b26eea8758.asciidoc
new file mode 100644
index 000000000..ce99834e7
--- /dev/null
+++ b/docs/doc_examples/a2b2ce031120dac49b5120b26eea8758.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.indices({
+ index: "my-index-*",
+ v: "true",
+ s: "index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a2bab367f0e598ae27a2f4ec82e778e9.asciidoc b/docs/doc_examples/a2bab367f0e598ae27a2f4ec82e778e9.asciidoc
new file mode 100644
index 000000000..c88eacc13
--- /dev/null
+++ b/docs/doc_examples/a2bab367f0e598ae27a2f4ec82e778e9.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.putJob({
+ id: "sensor",
+ index_pattern: "sensor-*",
+ rollup_index: "sensor_rollup",
+ cron: "0 0 * * * *",
+ page_size: 1000,
+ groups: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "60m",
+ },
+ terms: {
+ fields: ["node"],
+ },
+ },
+ metrics: [
+ {
+ field: "temperature",
+ metrics: ["min", "max", "sum"],
+ },
+ {
+ field: "voltage",
+ metrics: ["avg"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc b/docs/doc_examples/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc
new file mode 100644
index 000000000..1432ddcbb
--- /dev/null
+++ b/docs/doc_examples/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "sparse_vector",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a2c3e284354e8d49cf51bb8dd5ef3613.asciidoc b/docs/doc_examples/a2c3e284354e8d49cf51bb8dd5ef3613.asciidoc
new file mode 100644
index 000000000..98b41d8fb
--- /dev/null
+++ b/docs/doc_examples/a2c3e284354e8d49cf51bb8dd5ef3613.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.upgradeTransforms();
+console.log(response);
+----
diff --git a/docs/doc_examples/a2dabdcbb661e7690166ae6d0de27e46.asciidoc b/docs/doc_examples/a2dabdcbb661e7690166ae6d0de27e46.asciidoc
new file mode 100644
index 000000000..5aa8a5c4d
--- /dev/null
+++ b/docs/doc_examples/a2dabdcbb661e7690166ae6d0de27e46.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ index: "trips",
+ fields: "route_*,transit_mode",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a322c8c73d6f2f5e1e375588ed20b636.asciidoc b/docs/doc_examples/a322c8c73d6f2f5e1e375588ed20b636.asciidoc
new file mode 100644
index 000000000..58862e58f
--- /dev/null
+++ b/docs/doc_examples/a322c8c73d6f2f5e1e375588ed20b636.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote-search",
+ indices: [
+ {
+ names: ["target-indices"],
+ privileges: ["read", "read_cross_cluster"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a325f31e94fb1e8739258910593504a8.asciidoc b/docs/doc_examples/a325f31e94fb1e8739258910593504a8.asciidoc
new file mode 100644
index 000000000..47b557307
--- /dev/null
+++ b/docs/doc_examples/a325f31e94fb1e8739258910593504a8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "facilitator-role",
+ cluster: ["manage_oidc", "manage_token"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3464bd6f0a61623562162859566b078.asciidoc b/docs/doc_examples/a3464bd6f0a61623562162859566b078.asciidoc
new file mode 100644
index 000000000..088a60324
--- /dev/null
+++ b/docs/doc_examples/a3464bd6f0a61623562162859566b078.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.follow({
+ index: "kibana_sample_data_ecommerce2",
+ wait_for_active_shards: 1,
+ remote_cluster: "clusterA",
+ leader_index: "kibana_sample_data_ecommerce",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a34d70d7022eb4ba48909d440c80390f.asciidoc b/docs/doc_examples/a34d70d7022eb4ba48909d440c80390f.asciidoc
new file mode 100644
index 000000000..6202751e6
--- /dev/null
+++ b/docs/doc_examples/a34d70d7022eb4ba48909d440c80390f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: ",,",
+ query: {
+ match: {
+ test: "data",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc b/docs/doc_examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc
new file mode 100644
index 000000000..fff9d8917
--- /dev/null
+++ b/docs/doc_examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getAlias({
+ index: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc b/docs/doc_examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc
new file mode 100644
index 000000000..abe4e885c
--- /dev/null
+++ b/docs/doc_examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "restaurants",
+ retriever: {
+ standard: {
+ query: {
+ bool: {
+ should: [
+ {
+ match: {
+ region: "Austria",
+ },
+ },
+ ],
+ filter: [
+ {
+ term: {
+ year: "2019",
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc b/docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc
new file mode 100644
index 000000000..aa591634b
--- /dev/null
+++ b/docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "ip_location",
+ description: "Add ip geolocation info",
+ processors: [
+ {
+ ip_location: {
+ field: "ip",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "ip_location",
+ document: {
+ ip: "89.160.20.128",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/a38f29375eabd0103f8d7c00b17bb0ab.asciidoc b/docs/doc_examples/a38f29375eabd0103f8d7c00b17bb0ab.asciidoc
new file mode 100644
index 000000000..f3456d0d4
--- /dev/null
+++ b/docs/doc_examples/a38f29375eabd0103f8d7c00b17bb0ab.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.health();
+console.log(response);
+----
diff --git a/docs/doc_examples/a3a14f7f0e80725f695a901a7e1d579d.asciidoc b/docs/doc_examples/a3a14f7f0e80725f695a901a7e1d579d.asciidoc
new file mode 100644
index 000000000..c0eaf8801
--- /dev/null
+++ b/docs/doc_examples/a3a14f7f0e80725f695a901a7e1d579d.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ filter: ["trim"],
+ text: " fox ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3a2856ac2338a624a1fa5f31aec4db4.asciidoc b/docs/doc_examples/a3a2856ac2338a624a1fa5f31aec4db4.asciidoc
new file mode 100644
index 000000000..31dec62e6
--- /dev/null
+++ b/docs/doc_examples/a3a2856ac2338a624a1fa5f31aec4db4.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-api-key",
+ role_descriptors: {},
+ metadata: {
+ application: "myapp",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3a64d568fe93a22b042a8b31b9905b0.asciidoc b/docs/doc_examples/a3a64d568fe93a22b042a8b31b9905b0.asciidoc
new file mode 100644
index 000000000..932cd80ac
--- /dev/null
+++ b/docs/doc_examples/a3a64d568fe93a22b042a8b31b9905b0.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ verbose: "true",
+ pipeline: {
+ description: "_description",
+ processors: [
+ {
+ set: {
+ field: "field2",
+ value: "_value2",
+ },
+ },
+ {
+ set: {
+ field: "field3",
+ value: "_value3",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ foo: "bar",
+ },
+ },
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ foo: "rab",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3c8f474b0700711a356682f37e62b39.asciidoc b/docs/doc_examples/a3c8f474b0700711a356682f37e62b39.asciidoc
new file mode 100644
index 000000000..b99d50485
--- /dev/null
+++ b/docs/doc_examples/a3c8f474b0700711a356682f37e62b39.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "azure-ai-studio-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1536,
+ element_type: "float",
+ similarity: "dot_product",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3ce0cfe2176f3d8a36959a5916995f0.asciidoc b/docs/doc_examples/a3ce0cfe2176f3d8a36959a5916995f0.asciidoc
new file mode 100644
index 000000000..82ca0c679
--- /dev/null
+++ b/docs/doc_examples/a3ce0cfe2176f3d8a36959a5916995f0.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ group_by: "none",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3cfd350c73a104b99a998c6be931408.asciidoc b/docs/doc_examples/a3cfd350c73a104b99a998c6be931408.asciidoc
new file mode 100644
index 000000000..5c3d07b1c
--- /dev/null
+++ b/docs/doc_examples/a3cfd350c73a104b99a998c6be931408.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ metric: "blocks",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3d13833714f9bb918e5e0f62a49bd0e.asciidoc b/docs/doc_examples/a3d13833714f9bb918e5e0f62a49bd0e.asciidoc
new file mode 100644
index 000000000..43d3aadd4
--- /dev/null
+++ b/docs/doc_examples/a3d13833714f9bb918e5e0f62a49bd0e.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "ip_addresses",
+ size: 0,
+ aggs: {
+ ip_ranges: {
+ ip_range: {
+ field: "ip",
+ ranges: [
+ {
+ to: "10.0.0.5",
+ },
+ {
+ from: "10.0.0.5",
+ },
+ ],
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3d943ac9d45b4eff4aa0c679b4eceb3.asciidoc b/docs/doc_examples/a3d943ac9d45b4eff4aa0c679b4eceb3.asciidoc
new file mode 100644
index 000000000..2a294fe3f
--- /dev/null
+++ b/docs/doc_examples/a3d943ac9d45b4eff4aa0c679b4eceb3.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.danglingIndices.importDanglingIndex({
+ index_uuid: "",
+ accept_data_loss: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc b/docs/doc_examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc
new file mode 100644
index 000000000..869dc012e
--- /dev/null
+++ b/docs/doc_examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.existsSource({
+ index: "my-index-000001",
+ id: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3f19f3787cb331f230cdac67ff578e8.asciidoc b/docs/doc_examples/a3f19f3787cb331f230cdac67ff578e8.asciidoc
new file mode 100644
index 000000000..457176790
--- /dev/null
+++ b/docs/doc_examples/a3f19f3787cb331f230cdac67ff578e8.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ tags: {
+ significant_terms: {
+ field: "tags",
+ execution_hint: "map",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3f3c1f3f31dbd225da5fd14633bc4a0.asciidoc b/docs/doc_examples/a3f3c1f3f31dbd225da5fd14633bc4a0.asciidoc
new file mode 100644
index 000000000..3d954b8f4
--- /dev/null
+++ b/docs/doc_examples/a3f3c1f3f31dbd225da5fd14633bc4a0.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "users",
+ id: 0,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3f56fa16c6cc67c2db31a4ba9ca11a7.asciidoc b/docs/doc_examples/a3f56fa16c6cc67c2db31a4ba9ca11a7.asciidoc
new file mode 100644
index 000000000..07806845c
--- /dev/null
+++ b/docs/doc_examples/a3f56fa16c6cc67c2db31a4ba9ca11a7.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.putPolicy({
+ name: "networks-policy",
+ range: {
+ indices: "networks",
+ match_field: "range",
+ enrich_fields: ["name", "department"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a3f66deb467df86edbf66e1dca31da51.asciidoc b/docs/doc_examples/a3f66deb467df86edbf66e1dca31da51.asciidoc
new file mode 100644
index 000000000..56afe492c
--- /dev/null
+++ b/docs/doc_examples/a3f66deb467df86edbf66e1dca31da51.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "music",
+ _source: "suggest",
+ suggest: {
+ "song-suggest": {
+ prefix: "nir",
+ completion: {
+ field: "suggest",
+ size: 5,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a412fe22a74900c72434391ed75139dc.asciidoc b/docs/doc_examples/a412fe22a74900c72434391ed75139dc.asciidoc
new file mode 100644
index 000000000..868cabb01
--- /dev/null
+++ b/docs/doc_examples/a412fe22a74900c72434391ed75139dc.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "zoomed-in": {
+ filter: {
+ geo_bounding_box: {
+ location: {
+ top_left: "POINT (4.9 52.4)",
+ bottom_right: "POINT (5.0 52.3)",
+ },
+ },
+ },
+ aggregations: {
+ zoom1: {
+ geohex_grid: {
+ field: "location",
+ precision: 12,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a425fcab60f603504becee7d001f0a4b.asciidoc b/docs/doc_examples/a425fcab60f603504becee7d001f0a4b.asciidoc
new file mode 100644
index 000000000..c2c279354
--- /dev/null
+++ b/docs/doc_examples/a425fcab60f603504becee7d001f0a4b.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "index_4",
+ settings: {
+ "index.priority": 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a428d518162918733d49261ffd65cfc1.asciidoc b/docs/doc_examples/a428d518162918733d49261ffd65cfc1.asciidoc
new file mode 100644
index 000000000..8d45447a2
--- /dev/null
+++ b/docs/doc_examples/a428d518162918733d49261ffd65cfc1.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "custom_unique_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_truncate: {
+ tokenizer: "standard",
+ filter: ["unique"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a43954d055f042d625a905513821f5f0.asciidoc b/docs/doc_examples/a43954d055f042d625a905513821f5f0.asciidoc
new file mode 100644
index 000000000..0ecb3df45
--- /dev/null
+++ b/docs/doc_examples/a43954d055f042d625a905513821f5f0.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ knn_field: "image-vector",
+ query_vector: [-5, 9, -12],
+ k: 10,
+ num_candidates: 100,
+ fields: ["title", "file-type"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a45244aa3adbf3c793fede100786d1f5.asciidoc b/docs/doc_examples/a45244aa3adbf3c793fede100786d1f5.asciidoc
new file mode 100644
index 000000000..7d7c8a339
--- /dev/null
+++ b/docs/doc_examples/a45244aa3adbf3c793fede100786d1f5.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ auto_date_histogram: {
+ field: "date",
+ buckets: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a45605347d6438e7aecdf3b37198616d.asciidoc b/docs/doc_examples/a45605347d6438e7aecdf3b37198616d.asciidoc
new file mode 100644
index 000000000..802f482f4
--- /dev/null
+++ b/docs/doc_examples/a45605347d6438e7aecdf3b37198616d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.moveToStep({
+ index: "my-index-000001",
+ current_step: {
+ phase: "new",
+ action: "complete",
+ name: "complete",
+ },
+ next_step: {
+ phase: "warm",
+ action: "forcemerge",
+ name: "forcemerge",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a45810722dc4f468f81b1e8a451d21be.asciidoc b/docs/doc_examples/a45810722dc4f468f81b1e8a451d21be.asciidoc
new file mode 100644
index 000000000..faefa6933
--- /dev/null
+++ b/docs/doc_examples/a45810722dc4f468f81b1e8a451d21be.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.http.HttpTracer": "TRACE",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc b/docs/doc_examples/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc
new file mode 100644
index 000000000..4ef252dfd
--- /dev/null
+++ b/docs/doc_examples/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "multipoint",
+ coordinates: [
+ [1002, 1002],
+ [1003, 2000],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a45eb0cdd138d9c894ca2de9352549a1.asciidoc b/docs/doc_examples/a45eb0cdd138d9c894ca2de9352549a1.asciidoc
new file mode 100644
index 000000000..61cfb9a95
--- /dev/null
+++ b/docs/doc_examples/a45eb0cdd138d9c894ca2de9352549a1.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_error_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: ["logs"],
+ body: {
+ query: {
+ match: {
+ message: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a49acb27f56fe799a9b1342f85cba0f3.asciidoc b/docs/doc_examples/a49acb27f56fe799a9b1342f85cba0f3.asciidoc
new file mode 100644
index 000000000..cda76bd30
--- /dev/null
+++ b/docs/doc_examples/a49acb27f56fe799a9b1342f85cba0f3.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ filter: ["word_delimiter_graph"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc b/docs/doc_examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc
new file mode 100644
index 000000000..b03688330
--- /dev/null
+++ b/docs/doc_examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.get({
+ task_type: "sparse_embedding",
+ inference_id: "my-elser-model",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a4bae4d956bc0a663f42cfec36bf8e0b.asciidoc b/docs/doc_examples/a4bae4d956bc0a663f42cfec36bf8e0b.asciidoc
new file mode 100644
index 000000000..3c2b0c7bf
--- /dev/null
+++ b/docs/doc_examples/a4bae4d956bc0a663f42cfec36bf8e0b.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ mappings: {
+ properties: {
+ price_range: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "index",
+ id: 1,
+ document: {
+ designation: "spoon",
+ price: 13,
+ price_range: "10-100",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a4bd9bf52b4f098838d12bcb8dfc3482.asciidoc b/docs/doc_examples/a4bd9bf52b4f098838d12bcb8dfc3482.asciidoc
new file mode 100644
index 000000000..c58479347
--- /dev/null
+++ b/docs/doc_examples/a4bd9bf52b4f098838d12bcb8dfc3482.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ min_monthly_sales: {
+ min_bucket: {
+ buckets_path: "sales_per_month>sales",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a4dbd52004f3ab1580eb73997f77dcab.asciidoc b/docs/doc_examples/a4dbd52004f3ab1580eb73997f77dcab.asciidoc
new file mode 100644
index 000000000..b7eab397b
--- /dev/null
+++ b/docs/doc_examples/a4dbd52004f3ab1580eb73997f77dcab.asciidoc
@@ -0,0 +1,62 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.putTransform({
+ transform_id: "ecommerce-customer-transform",
+ source: {
+ index: ["kibana_sample_data_ecommerce"],
+ query: {
+ bool: {
+ filter: {
+ term: {
+ currency: "EUR",
+ },
+ },
+ },
+ },
+ },
+ pivot: {
+ group_by: {
+ customer_id: {
+ terms: {
+ field: "customer_id",
+ },
+ },
+ },
+ aggregations: {
+ "total_quantity.sum": {
+ sum: {
+ field: "total_quantity",
+ },
+ },
+ "taxless_total_price.sum": {
+ sum: {
+ field: "taxless_total_price",
+ },
+ },
+ "total_quantity.max": {
+ max: {
+ field: "total_quantity",
+ },
+ },
+ "order_id.cardinality": {
+ cardinality: {
+ field: "order_id",
+ },
+ },
+ },
+ },
+ dest: {
+ index: "ecommerce-customers",
+ },
+ retention_policy: {
+ time: {
+ field: "order_date",
+ max_age: "60d",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a4e510aa9145ccedae151c4a6634f0a4.asciidoc b/docs/doc_examples/a4e510aa9145ccedae151c4a6634f0a4.asciidoc
new file mode 100644
index 000000000..e51f6e91e
--- /dev/null
+++ b/docs/doc_examples/a4e510aa9145ccedae151c4a6634f0a4.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["stemmer"],
+ text: "the foxes jumping quickly",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a4ee2214d621bcfaf768c46d21325958.asciidoc b/docs/doc_examples/a4ee2214d621bcfaf768c46d21325958.asciidoc
new file mode 100644
index 000000000..1b51b6936
--- /dev/null
+++ b/docs/doc_examples/a4ee2214d621bcfaf768c46d21325958.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "hugging_face_embeddings",
+ inference_config: {
+ service: "hugging_face",
+ service_settings: {
+ api_key: "",
+ url: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a4f259522b4dc10a0323aff58236c2c2.asciidoc b/docs/doc_examples/a4f259522b4dc10a0323aff58236c2c2.asciidoc
new file mode 100644
index 000000000..bcfc419b0
--- /dev/null
+++ b/docs/doc_examples/a4f259522b4dc10a0323aff58236c2c2.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "music",
+ id: 1,
+ refresh: "true",
+ document: {
+ suggest: {
+ input: ["Nevermind", "Nirvana"],
+ weight: 34,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a512e4dd8880ce0395937db1bab1d205.asciidoc b/docs/doc_examples/a512e4dd8880ce0395937db1bab1d205.asciidoc
new file mode 100644
index 000000000..40db80a05
--- /dev/null
+++ b/docs/doc_examples/a512e4dd8880ce0395937db1bab1d205.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "edge_ngram",
+ text: "Quick Fox",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a520168c1c8b454a8f102d6a13027c73.asciidoc b/docs/doc_examples/a520168c1c8b454a8f102d6a13027c73.asciidoc
new file mode 100644
index 000000000..b99501640
--- /dev/null
+++ b/docs/doc_examples/a520168c1c8b454a8f102d6a13027c73.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.followInfo({
+ index: "follower_index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5217a93efabceee9be19949e484f930.asciidoc b/docs/doc_examples/a5217a93efabceee9be19949e484f930.asciidoc
new file mode 100644
index 000000000..8566229cb
--- /dev/null
+++ b/docs/doc_examples/a5217a93efabceee9be19949e484f930.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "music",
+ id: 1,
+ refresh: "true",
+ document: {
+ suggest: [
+ {
+ input: "Nevermind",
+ weight: 10,
+ },
+ {
+ input: "Nirvana",
+ weight: 3,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a547bb926c25f670078b98fbe67de3cc.asciidoc b/docs/doc_examples/a547bb926c25f670078b98fbe67de3cc.asciidoc
new file mode 100644
index 000000000..0a9165a6e
--- /dev/null
+++ b/docs/doc_examples/a547bb926c25f670078b98fbe67de3cc.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.deleteSynonymRule({
+ set_id: "my-synonyms-set",
+ rule_id: "test-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a56c20a733a350673d41829c8daaafbe.asciidoc b/docs/doc_examples/a56c20a733a350673d41829c8daaafbe.asciidoc
new file mode 100644
index 000000000..c577e3576
--- /dev/null
+++ b/docs/doc_examples/a56c20a733a350673d41829c8daaafbe.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.putAutoscalingPolicy({
+ name: "my_autoscaling_policy",
+ policy: {
+ roles: ["data_hot"],
+ deciders: {
+ fixed: {
+ storage: "1tb",
+ memory: "32gb",
+ processors: 2.3,
+ nodes: 8,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a594f05459d9eecc8050c73fc8da336f.asciidoc b/docs/doc_examples/a594f05459d9eecc8050c73fc8da336f.asciidoc
new file mode 100644
index 000000000..08570d5c6
--- /dev/null
+++ b/docs/doc_examples/a594f05459d9eecc8050c73fc8da336f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "azure_openai_embeddings",
+ inference_config: {
+ service: "azureopenai",
+ service_settings: {
+ api_key: "",
+ resource_name: "",
+ deployment_id: "",
+ api_version: "2024-02-01",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5a58e8ad66afe831bc295500e3e8739.asciidoc b/docs/doc_examples/a5a58e8ad66afe831bc295500e3e8739.asciidoc
new file mode 100644
index 000000000..8a9680f82
--- /dev/null
+++ b/docs/doc_examples/a5a58e8ad66afe831bc295500e3e8739.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ unfollow: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5a5fb129de2f492e8fd33043a73439c.asciidoc b/docs/doc_examples/a5a5fb129de2f492e8fd33043a73439c.asciidoc
new file mode 100644
index 000000000..74eaa913d
--- /dev/null
+++ b/docs/doc_examples/a5a5fb129de2f492e8fd33043a73439c.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "dictionary_decompound_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_dictionary_decompound: {
+ tokenizer: "standard",
+ filter: ["22_char_dictionary_decompound"],
+ },
+ },
+ filter: {
+ "22_char_dictionary_decompound": {
+ type: "dictionary_decompounder",
+ word_list_path: "analysis/example_word_list.txt",
+ max_subword_size: 22,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5aeb2c8bdf91f6146026ec8edc476b6.asciidoc b/docs/doc_examples/a5aeb2c8bdf91f6146026ec8edc476b6.asciidoc
new file mode 100644
index 000000000..43cce7452
--- /dev/null
+++ b/docs/doc_examples/a5aeb2c8bdf91f6146026ec8edc476b6.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ date: {
+ type: "date_nanos",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ date: ["2015-01-01T12:10:30.000Z", "2014-01-01T12:10:30.000Z"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a5b59f0170a2feaa39e40243fd7ae359.asciidoc b/docs/doc_examples/a5b59f0170a2feaa39e40243fd7ae359.asciidoc
new file mode 100644
index 000000000..5ed800291
--- /dev/null
+++ b/docs/doc_examples/a5b59f0170a2feaa39e40243fd7ae359.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my-example-app",
+ search_application: {
+ indices: ["my-example-app"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n {\n "query_string": {\n "query": "{{query}}",\n "search_fields": {{#toJson}}search_fields{{/toJson}}\n }\n }\n {{/query}}\n ]\n }\n }\n }\n ',
+ params: {
+ query: "",
+ search_fields: "",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5dfcfd1cfb3558e7912456669c92eee.asciidoc b/docs/doc_examples/a5dfcfd1cfb3558e7912456669c92eee.asciidoc
new file mode 100644
index 000000000..c2645790d
--- /dev/null
+++ b/docs/doc_examples/a5dfcfd1cfb3558e7912456669c92eee.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlPrepareAuthentication({
+ realm: "saml1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5e2b3588258430f2e595abda98e3943.asciidoc b/docs/doc_examples/a5e2b3588258430f2e595abda98e3943.asciidoc
new file mode 100644
index 000000000..5dc12ff3d
--- /dev/null
+++ b/docs/doc_examples/a5e2b3588258430f2e595abda98e3943.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRealms({
+ realms: "default_file",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5e6ad9e65615f6f92ae6a19674dd742.asciidoc b/docs/doc_examples/a5e6ad9e65615f6f92ae6a19674dd742.asciidoc
new file mode 100644
index 000000000..312d22490
--- /dev/null
+++ b/docs/doc_examples/a5e6ad9e65615f6f92ae6a19674dd742.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ percolate: {
+ field: "query",
+ documents: [
+ {
+ message: "Japanse art",
+ },
+ {
+ message: "Holand culture",
+ },
+ {
+ message: "Japanese art and Holand culture",
+ },
+ {
+ message: "no-match",
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5e6ccfb6019238e6db602373b9af147.asciidoc b/docs/doc_examples/a5e6ccfb6019238e6db602373b9af147.asciidoc
new file mode 100644
index 000000000..8ef447ce8
--- /dev/null
+++ b/docs/doc_examples/a5e6ccfb6019238e6db602373b9af147.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putDataLifecycle({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5e793d82a4455cf4105dac82a156617.asciidoc b/docs/doc_examples/a5e793d82a4455cf4105dac82a156617.asciidoc
new file mode 100644
index 000000000..5ffed26d1
--- /dev/null
+++ b/docs/doc_examples/a5e793d82a4455cf4105dac82a156617.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ rewrite: "true",
+ query: {
+ more_like_this: {
+ like: {
+ _id: "2",
+ },
+ boost_terms: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5ebcd70c34d1ece77a4fb27cc050917.asciidoc b/docs/doc_examples/a5ebcd70c34d1ece77a4fb27cc050917.asciidoc
new file mode 100644
index 000000000..634516cec
--- /dev/null
+++ b/docs/doc_examples/a5ebcd70c34d1ece77a4fb27cc050917.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_ranks: {
+ percentile_ranks: {
+ field: "load_time",
+ values: [500, 600],
+ keyed: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a5f9eb40087921e67d820775acf71522.asciidoc b/docs/doc_examples/a5f9eb40087921e67d820775acf71522.asciidoc
new file mode 100644
index 000000000..041de0d6c
--- /dev/null
+++ b/docs/doc_examples/a5f9eb40087921e67d820775acf71522.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ city: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6169bc057ce8654bd306ff4b062081b.asciidoc b/docs/doc_examples/a6169bc057ce8654bd306ff4b062081b.asciidoc
new file mode 100644
index 000000000..da8f00888
--- /dev/null
+++ b/docs/doc_examples/a6169bc057ce8654bd306ff4b062081b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "music",
+ pretty: "true",
+ suggest: {
+ "song-suggest": {
+ prefix: "nor",
+ completion: {
+ field: "suggest",
+ skip_duplicates: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6204edaa0bcf7b82a89ab4f6bda0914.asciidoc b/docs/doc_examples/a6204edaa0bcf7b82a89ab4f6bda0914.asciidoc
new file mode 100644
index 000000000..5fafb3e42
--- /dev/null
+++ b/docs/doc_examples/a6204edaa0bcf7b82a89ab4f6bda0914.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.openJob({
+ job_id: "low_request_rate",
+ timeout: "35m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a62833baf15f2c9ac094a9289e56a012.asciidoc b/docs/doc_examples/a62833baf15f2c9ac094a9289e56a012.asciidoc
new file mode 100644
index 000000000..38c0b3ec4
--- /dev/null
+++ b/docs/doc_examples/a62833baf15f2c9ac094a9289e56a012.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "timeseries",
+ document: {
+ message: "logged the request",
+ "@timestamp": "1591890611",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a63e0d0504e0c9313814b7f4e2641353.asciidoc b/docs/doc_examples/a63e0d0504e0c9313814b7f4e2641353.asciidoc
new file mode 100644
index 000000000..be5a9a106
--- /dev/null
+++ b/docs/doc_examples/a63e0d0504e0c9313814b7f4e2641353.asciidoc
@@ -0,0 +1,82 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "metrics_index",
+ mappings: {
+ properties: {
+ network: {
+ properties: {
+ name: {
+ type: "keyword",
+ },
+ },
+ },
+ latency_histo: {
+ type: "histogram",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [1, 3, 8, 12, 15],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ refresh: "true",
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [1, 6, 8, 12, 14],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ latency_ranges: {
+ range: {
+ field: "latency_histo",
+ ranges: [
+ {
+ to: 2,
+ },
+ {
+ from: 2,
+ to: 3,
+ },
+ {
+ from: 3,
+ to: 10,
+ },
+ {
+ from: 10,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/a669e9d56e34c95ef4c780e92ed307f1.asciidoc b/docs/doc_examples/a669e9d56e34c95ef4c780e92ed307f1.asciidoc
new file mode 100644
index 000000000..2b4f275e8
--- /dev/null
+++ b/docs/doc_examples/a669e9d56e34c95ef4c780e92ed307f1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.get({
+ id: "FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUToxMDY=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a692b4c0ca7825c467880b346841f5a5.asciidoc b/docs/doc_examples/a692b4c0ca7825c467880b346841f5a5.asciidoc
new file mode 100644
index 000000000..04148381f
--- /dev/null
+++ b/docs/doc_examples/a692b4c0ca7825c467880b346841f5a5.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ name: {
+ properties: {
+ first: {
+ type: "text",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a699189c8d1a7573beeaea768f2fc618.asciidoc b/docs/doc_examples/a699189c8d1a7573beeaea768f2fc618.asciidoc
new file mode 100644
index 000000000..c1836d6f8
--- /dev/null
+++ b/docs/doc_examples/a699189c8d1a7573beeaea768f2fc618.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "snapshot-20200617",
+ indices: "kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001",
+ include_aliases: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a69b1ce5cc9528fb3639185eaf241ae3.asciidoc b/docs/doc_examples/a69b1ce5cc9528fb3639185eaf241ae3.asciidoc
new file mode 100644
index 000000000..44f85408c
--- /dev/null
+++ b/docs/doc_examples/a69b1ce5cc9528fb3639185eaf241ae3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.clearScroll({
+ scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc b/docs/doc_examples/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc
new file mode 100644
index 000000000..3781991c0
--- /dev/null
+++ b/docs/doc_examples/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ "my_embeddings.predicted_value": {
+ type: "dense_vector",
+ dims: 384,
+ },
+ my_text_field: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6bb306ca250cf651f19cae808b97012.asciidoc b/docs/doc_examples/a6bb306ca250cf651f19cae808b97012.asciidoc
new file mode 100644
index 000000000..ab06f18be
--- /dev/null
+++ b/docs/doc_examples/a6bb306ca250cf651f19cae808b97012.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.get({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6be6c1cb4a556866fdccb0dee2f1dea.asciidoc b/docs/doc_examples/a6be6c1cb4a556866fdccb0dee2f1dea.asciidoc
new file mode 100644
index 000000000..c088b4ada
--- /dev/null
+++ b/docs/doc_examples/a6be6c1cb4a556866fdccb0dee2f1dea.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.existsTemplate({
+ name: "template_1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc b/docs/doc_examples/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc
new file mode 100644
index 000000000..830812cdf
--- /dev/null
+++ b/docs/doc_examples/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getDataStream({
+ name: "dsl-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6ef8cd8c8218d547727ffc5485bfbd7.asciidoc b/docs/doc_examples/a6ef8cd8c8218d547727ffc5485bfbd7.asciidoc
new file mode 100644
index 000000000..5be7e17bc
--- /dev/null
+++ b/docs/doc_examples/a6ef8cd8c8218d547727ffc5485bfbd7.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ range: {
+ date_range: {
+ field: "date",
+ missing: "1976/11/30",
+ ranges: [
+ {
+ key: "Older",
+ to: "2016/02/01",
+ },
+ {
+ key: "Newer",
+ from: "2016/02/01",
+ to: "now/d",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc b/docs/doc_examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc
new file mode 100644
index 000000000..c37e742e2
--- /dev/null
+++ b/docs/doc_examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a71154ea11a5214f409ecfd118e9b5e3.asciidoc b/docs/doc_examples/a71154ea11a5214f409ecfd118e9b5e3.asciidoc
new file mode 100644
index 000000000..176ffa5d0
--- /dev/null
+++ b/docs/doc_examples/a71154ea11a5214f409ecfd118e9b5e3.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlInvalidate({
+ query:
+ "SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D",
+ realm: "saml1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a72613de3774571ba24def4b495161b5.asciidoc b/docs/doc_examples/a72613de3774571ba24def4b495161b5.asciidoc
new file mode 100644
index 000000000..453cf9649
--- /dev/null
+++ b/docs/doc_examples/a72613de3774571ba24def4b495161b5.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ user_id: {
+ type: "alias",
+ path: "user_identifier",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a735081e715d385b4d471eea0f2b57da.asciidoc b/docs/doc_examples/a735081e715d385b4d471eea0f2b57da.asciidoc
new file mode 100644
index 000000000..7f1c054ed
--- /dev/null
+++ b/docs/doc_examples/a735081e715d385b4d471eea0f2b57da.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "slm.retention_schedule": "0 30 1 * * ?",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a73a9a6f19516b8ead63182a9ae5b540.asciidoc b/docs/doc_examples/a73a9a6f19516b8ead63182a9ae5b540.asciidoc
new file mode 100644
index 000000000..7ffc8de28
--- /dev/null
+++ b/docs/doc_examples/a73a9a6f19516b8ead63182a9ae5b540.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc b/docs/doc_examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc
new file mode 100644
index 000000000..7faea78a5
--- /dev/null
+++ b/docs/doc_examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_connector/_sync_job/my-connector-sync-job-id/_claim",
+ body: {
+ worker_hostname: "some-machine",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a769d696bf12f5e9de4b3250646d250c.asciidoc b/docs/doc_examples/a769d696bf12f5e9de4b3250646d250c.asciidoc
new file mode 100644
index 000000000..6bce3ee50
--- /dev/null
+++ b/docs/doc_examples/a769d696bf12f5e9de4b3250646d250c.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "alibabacloud-ai-search-embeddings",
+ pipeline: "alibabacloud_ai_search_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc b/docs/doc_examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc
new file mode 100644
index 000000000..998774ae8
--- /dev/null
+++ b/docs/doc_examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: "ctx._source['my-object'].remove('my-subfield')",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a799477dff04578b200788a63f9cff71.asciidoc b/docs/doc_examples/a799477dff04578b200788a63f9cff71.asciidoc
new file mode 100644
index 000000000..23f5982b1
--- /dev/null
+++ b/docs/doc_examples/a799477dff04578b200788a63f9cff71.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "ip_addresses",
+ size: 0,
+ aggs: {
+ ip_ranges: {
+ ip_range: {
+ field: "ip",
+ ranges: [
+ {
+ key: "infinity",
+ to: "10.0.0.5",
+ },
+ {
+ key: "and-beyond",
+ from: "10.0.0.5",
+ },
+ ],
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a7cf31f4b907e4c00132aca75f55790c.asciidoc b/docs/doc_examples/a7cf31f4b907e4c00132aca75f55790c.asciidoc
new file mode 100644
index 000000000..6fbda91b6
--- /dev/null
+++ b/docs/doc_examples/a7cf31f4b907e4c00132aca75f55790c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.deletePipeline({
+ id: "pipeline-one",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a7d814caf2a995d2aeadecc3495011be.asciidoc b/docs/doc_examples/a7d814caf2a995d2aeadecc3495011be.asciidoc
new file mode 100644
index 000000000..782a1c3cd
--- /dev/null
+++ b/docs/doc_examples/a7d814caf2a995d2aeadecc3495011be.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ bool: {
+ type: "boolean",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ bool: [true, false, true, false],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a7e58d4dc477a84c1306fd5749aafd8b.asciidoc b/docs/doc_examples/a7e58d4dc477a84c1306fd5749aafd8b.asciidoc
new file mode 100644
index 000000000..b7b0aec7a
--- /dev/null
+++ b/docs/doc_examples/a7e58d4dc477a84c1306fd5749aafd8b.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ age: {
+ type: "integer",
+ },
+ email: {
+ type: "keyword",
+ },
+ name: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a7fb1c0d0827d66bfa66016f2564b10c.asciidoc b/docs/doc_examples/a7fb1c0d0827d66bfa66016f2564b10c.asciidoc
new file mode 100644
index 000000000..7a38525fe
--- /dev/null
+++ b/docs/doc_examples/a7fb1c0d0827d66bfa66016f2564b10c.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n process where process.name == "regsvr32.exe" and process.command_line.keyword != null\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a8019280dab5b04211ae3b21e5e08223.asciidoc b/docs/doc_examples/a8019280dab5b04211ae3b21e5e08223.asciidoc
new file mode 100644
index 000000000..8c7d9b215
--- /dev/null
+++ b/docs/doc_examples/a8019280dab5b04211ae3b21e5e08223.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_fs_backup",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "My_fs_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a810da963d3b28d79dcd17be829bb271.asciidoc b/docs/doc_examples/a810da963d3b28d79dcd17be829bb271.asciidoc
new file mode 100644
index 000000000..d242bfba4
--- /dev/null
+++ b/docs/doc_examples/a810da963d3b28d79dcd17be829bb271.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ docvalue_fields: [
+ "user.id",
+ "http.response.*",
+ {
+ field: "date",
+ format: "epoch_millis",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a811b82ba4632bdd9065829085188bc9.asciidoc b/docs/doc_examples/a811b82ba4632bdd9065829085188bc9.asciidoc
new file mode 100644
index 000000000..175e7cf13
--- /dev/null
+++ b/docs/doc_examples/a811b82ba4632bdd9065829085188bc9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "my_snapshot",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a84bc239eb2f607e8bed1fdb70d63823.asciidoc b/docs/doc_examples/a84bc239eb2f607e8bed1fdb70d63823.asciidoc
new file mode 100644
index 000000000..6074505da
--- /dev/null
+++ b/docs/doc_examples/a84bc239eb2f607e8bed1fdb70d63823.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.putAutoscalingPolicy({
+ name: "my_autoscaling_policy",
+ policy: {
+ roles: ["data_hot"],
+ deciders: {
+ proactive_storage: {
+ forecast_window: "10m",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a861a89f52008610e813b9f073951c58.asciidoc b/docs/doc_examples/a861a89f52008610e813b9f073951c58.asciidoc
new file mode 100644
index 000000000..8199b57eb
--- /dev/null
+++ b/docs/doc_examples/a861a89f52008610e813b9f073951c58.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ metric: "merge,refresh",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a89052bcdfe40e604a98d12be6ae59d2.asciidoc b/docs/doc_examples/a89052bcdfe40e604a98d12be6ae59d2.asciidoc
new file mode 100644
index 000000000..a7161f96f
--- /dev/null
+++ b/docs/doc_examples/a89052bcdfe40e604a98d12be6ae59d2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "BBOX (100.0, 102.0, 2.0, 0.0)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a8add749c3f41ad1308a45308df14103.asciidoc b/docs/doc_examples/a8add749c3f41ad1308a45308df14103.asciidoc
new file mode 100644
index 000000000..4246c611a
--- /dev/null
+++ b/docs/doc_examples/a8add749c3f41ad1308a45308df14103.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "sales",
+ id: 1,
+ refresh: "true",
+ document: {
+ tags: ["car", "auto"],
+ comments: [
+ {
+ username: "baddriver007",
+ comment: "This car could have better brakes",
+ },
+ {
+ username: "dr_who",
+ comment: "Where's the autopilot? Can't find it",
+ },
+ {
+ username: "ilovemotorbikes",
+ comment: "This car has two extra wheels",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a8dff54362184b2732b9bd248cf6df8a.asciidoc b/docs/doc_examples/a8dff54362184b2732b9bd248cf6df8a.asciidoc
new file mode 100644
index 000000000..e9c4ba6ea
--- /dev/null
+++ b/docs/doc_examples/a8dff54362184b2732b9bd248cf6df8a.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_range: {
+ type: "integer_range",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ my_range: {
+ lte: 2147483647,
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a9280b55a7284952f604ec7bece712f6.asciidoc b/docs/doc_examples/a9280b55a7284952f604ec7bece712f6.asciidoc
new file mode 100644
index 000000000..9dde4fa2f
--- /dev/null
+++ b/docs/doc_examples/a9280b55a7284952f604ec7bece712f6.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ range: {
+ voltage_corrected: {
+ gte: 16,
+ lte: 20,
+ boost: 1,
+ },
+ },
+ },
+ fields: ["voltage_corrected", "node"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a941fd568f2e20e13df909ab24506073.asciidoc b/docs/doc_examples/a941fd568f2e20e13df909ab24506073.asciidoc
new file mode 100644
index 000000000..9803d3ef9
--- /dev/null
+++ b/docs/doc_examples/a941fd568f2e20e13df909ab24506073.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings();
+console.log(response);
+
+const response1 = await client.cluster.putSettings({
+ persistent: {
+ "xpack.monitoring.collection.enabled": false,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/a9541c64512ebc5fcff2dc48487dc0b7.asciidoc b/docs/doc_examples/a9541c64512ebc5fcff2dc48487dc0b7.asciidoc
new file mode 100644
index 000000000..52fedcb9b
--- /dev/null
+++ b/docs/doc_examples/a9541c64512ebc5fcff2dc48487dc0b7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ format: "txt",
+ query:
+ "FROM library | KEEP author, name, page_count, release_date | SORT page_count DESC | LIMIT 5",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9554396506888e392a1aee0ca28e6fc.asciidoc b/docs/doc_examples/a9554396506888e392a1aee0ca28e6fc.asciidoc
new file mode 100644
index 000000000..bf07ef824
--- /dev/null
+++ b/docs/doc_examples/a9554396506888e392a1aee0ca28e6fc.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "my-index-2099.05.06-000001",
+ alias: "my-alias",
+ filter: {
+ bool: {
+ filter: [
+ {
+ range: {
+ "@timestamp": {
+ gte: "now-1d/d",
+ lt: "now/d",
+ },
+ },
+ },
+ {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a95a123b9f862e52ab1e8f875961c852.asciidoc b/docs/doc_examples/a95a123b9f862e52ab1e8f875961c852.asciidoc
new file mode 100644
index 000000000..2a6be34f4
--- /dev/null
+++ b/docs/doc_examples/a95a123b9f862e52ab1e8f875961c852.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ indices_boost: [
+ {
+ "my-index-000001": 1.4,
+ },
+ {
+ "my-index-000002": 1.3,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a95ae76fca7c3e273e4bd10323b3caa6.asciidoc b/docs/doc_examples/a95ae76fca7c3e273e4bd10323b3caa6.asciidoc
new file mode 100644
index 000000000..fbff6cd91
--- /dev/null
+++ b/docs/doc_examples/a95ae76fca7c3e273e4bd10323b3caa6.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "azure_openai_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "azure_openai_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a960b43e720b4934edb74ab4b085ca77.asciidoc b/docs/doc_examples/a960b43e720b4934edb74ab4b085ca77.asciidoc
new file mode 100644
index 000000000..8e7ed5f3d
--- /dev/null
+++ b/docs/doc_examples/a960b43e720b4934edb74ab4b085ca77.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.list();
+console.log(response);
+----
diff --git a/docs/doc_examples/a97aace57c6442bbb90e1e14effbcda3.asciidoc b/docs/doc_examples/a97aace57c6442bbb90e1e14effbcda3.asciidoc
new file mode 100644
index 000000000..330a2fead
--- /dev/null
+++ b/docs/doc_examples/a97aace57c6442bbb90e1e14effbcda3.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "csv",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a97f984c01fa1d96e6d33a0e8e2cb90f.asciidoc b/docs/doc_examples/a97f984c01fa1d96e6d33a0e8e2cb90f.asciidoc
new file mode 100644
index 000000000..b9768bb41
--- /dev/null
+++ b/docs/doc_examples/a97f984c01fa1d96e6d33a0e8e2cb90f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ query: {
+ type: "percolator",
+ },
+ field: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a985e6b7b2ead9c3f30a9bc97d8b598e.asciidoc b/docs/doc_examples/a985e6b7b2ead9c3f30a9bc97d8b598e.asciidoc
new file mode 100644
index 000000000..dc93cfbe7
--- /dev/null
+++ b/docs/doc_examples/a985e6b7b2ead9c3f30a9bc97d8b598e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ fields: "rating,title",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a98692a565904ec0783884d81a7b71fc.asciidoc b/docs/doc_examples/a98692a565904ec0783884d81a7b71fc.asciidoc
new file mode 100644
index 000000000..d8bba8dc5
--- /dev/null
+++ b/docs/doc_examples/a98692a565904ec0783884d81a7b71fc.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.health({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a999b5661bebb802bbbfe04faacf1971.asciidoc b/docs/doc_examples/a999b5661bebb802bbbfe04faacf1971.asciidoc
new file mode 100644
index 000000000..1102705e5
--- /dev/null
+++ b/docs/doc_examples/a999b5661bebb802bbbfe04faacf1971.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-2099.10.*",
+ },
+ dest: {
+ index: "my-index-2099.10",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a99bc141066ef673e35f306157750ec9.asciidoc b/docs/doc_examples/a99bc141066ef673e35f306157750ec9.asciidoc
new file mode 100644
index 000000000..1d26fbdef
--- /dev/null
+++ b/docs/doc_examples/a99bc141066ef673e35f306157750ec9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "lowercase",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a99bf70ae38bdf1c6f350140b25e0422.asciidoc b/docs/doc_examples/a99bf70ae38bdf1c6f350140b25e0422.asciidoc
new file mode 100644
index 000000000..42c77b7ae
--- /dev/null
+++ b/docs/doc_examples/a99bf70ae38bdf1c6f350140b25e0422.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ routing: "my-routing-value",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9c08023354aa9b9023807962df71d13.asciidoc b/docs/doc_examples/a9c08023354aa9b9023807962df71d13.asciidoc
new file mode 100644
index 000000000..1a765c0b6
--- /dev/null
+++ b/docs/doc_examples/a9c08023354aa9b9023807962df71d13.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9d44463dcea3cb0ea4c8f8460cea524.asciidoc b/docs/doc_examples/a9d44463dcea3cb0ea4c8f8460cea524.asciidoc
new file mode 100644
index 000000000..c5129e611
--- /dev/null
+++ b/docs/doc_examples/a9d44463dcea3cb0ea4c8f8460cea524.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "tiles-in-bounds": {
+ geohex_grid: {
+ field: "location",
+ precision: 12,
+ bounds: {
+ top_left: "POINT (4.9 52.4)",
+ bottom_right: "POINT (5.0 52.3)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9dd5cd3f2b31e7c8129ea63bab868b4.asciidoc b/docs/doc_examples/a9dd5cd3f2b31e7c8129ea63bab868b4.asciidoc
new file mode 100644
index 000000000..da7520e11
--- /dev/null
+++ b/docs/doc_examples/a9dd5cd3f2b31e7c8129ea63bab868b4.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["index1", "index2"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "bool": {\n "should": [\n {{#elser_fields}}\n {\n "sparse_vector": {\n "field": "ml.inference.{{.}}_expanded.predicted_value",\n "inference_id": "",\n "query": "{{query_string}}"\n }\n },\n {{/elser_fields}}\n ]\n }\n },\n "min_score": "{{min_score}}"\n }\n ',
+ params: {
+ query_string: "*",
+ min_score: "10",
+ elser_fields: [
+ {
+ name: "title",
+ },
+ {
+ name: "description",
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9dd9595e96c307b8c798beaeb571521.asciidoc b/docs/doc_examples/a9dd9595e96c307b8c798beaeb571521.asciidoc
new file mode 100644
index 000000000..c7a9de6be
--- /dev/null
+++ b/docs/doc_examples/a9dd9595e96c307b8c798beaeb571521.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.upgradeJobSnapshot({
+ job_id: "low_request_rate",
+ snapshot_id: 1828371,
+ timeout: "45m",
+ wait_for_completion: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc b/docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc
new file mode 100644
index 000000000..488fb5205
--- /dev/null
+++ b/docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ standard: {
+ query: {
+ match: {
+ text: "How often does the moon hide the sun?",
+ },
+ },
+ },
+ },
+ field: "text",
+ inference_id: "my-elastic-rerank",
+ inference_text: "How often does the moon hide the sun?",
+ rank_window_size: 100,
+ min_score: 0.5,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/a9fe70387d9c96a07830e1859c57efbb.asciidoc b/docs/doc_examples/a9fe70387d9c96a07830e1859c57efbb.asciidoc
new file mode 100644
index 000000000..3f53a8934
--- /dev/null
+++ b/docs/doc_examples/a9fe70387d9c96a07830e1859c57efbb.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ number_of_shards: 3,
+ number_of_replicas: 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa1771b702f4b771491ba4ab743a9197.asciidoc b/docs/doc_examples/aa1771b702f4b771491ba4ab743a9197.asciidoc
new file mode 100644
index 000000000..3ef343b39
--- /dev/null
+++ b/docs/doc_examples/aa1771b702f4b771491ba4ab743a9197.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ name: "index.number_of_replicas",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa3284717241ed79d3d1d3bdbbdce598.asciidoc b/docs/doc_examples/aa3284717241ed79d3d1d3bdbbdce598.asciidoc
new file mode 100644
index 000000000..7f33df8f8
--- /dev/null
+++ b/docs/doc_examples/aa3284717241ed79d3d1d3bdbbdce598.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["lowercase"],
+ text: "THE Quick FoX JUMPs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa5c0fa51a3553ce7caa763c3832120d.asciidoc b/docs/doc_examples/aa5c0fa51a3553ce7caa763c3832120d.asciidoc
new file mode 100644
index 000000000..753eecfad
--- /dev/null
+++ b/docs/doc_examples/aa5c0fa51a3553ce7caa763c3832120d.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "monthly-snapshots",
+ name: "",
+ schedule: "0 56 23 1 * ?",
+ repository: "my_repository",
+ config: {
+ indices: "*",
+ include_global_state: true,
+ },
+ retention: {
+ expire_after: "366d",
+ min_count: 1,
+ max_count: 12,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa5fbb68d3a8e0d0c894791cb6cf0b13.asciidoc b/docs/doc_examples/aa5fbb68d3a8e0d0c894791cb6cf0b13.asciidoc
new file mode 100644
index 000000000..09182d892
--- /dev/null
+++ b/docs/doc_examples/aa5fbb68d3a8e0d0c894791cb6cf0b13.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "reverse_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_reverse: {
+ tokenizer: "whitespace",
+ filter: ["reverse"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa6282d4bc92c753c4bd7a5b166abece.asciidoc b/docs/doc_examples/aa6282d4bc92c753c4bd7a5b166abece.asciidoc
new file mode 100644
index 000000000..ee105f278
--- /dev/null
+++ b/docs/doc_examples/aa6282d4bc92c753c4bd7a5b166abece.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.startTrainedModelDeployment({
+ model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
+ wait_for: "started",
+ timeout: "1m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc b/docs/doc_examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc
new file mode 100644
index 000000000..a9bcf22e7
--- /dev/null
+++ b/docs/doc_examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "rerank",
+ inference_id: "alibabacloud_ai_search_rerank",
+ inference_config: {
+ service: "alibabacloud-ai-search",
+ service_settings: {
+ api_key: "",
+ service_id: "ops-bge-reranker-larger",
+ host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
+ workspace: "default",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa699ff3234f54d091575a38e859a627.asciidoc b/docs/doc_examples/aa699ff3234f54d091575a38e859a627.asciidoc
new file mode 100644
index 000000000..f05fd0730
--- /dev/null
+++ b/docs/doc_examples/aa699ff3234f54d091575a38e859a627.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ typed_keys: "true",
+ aggs: {
+ "my-agg-name": {
+ histogram: {
+ field: "my-field",
+ interval: 1000,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa7cf5df36b867aee5e3314ac4b4fa68.asciidoc b/docs/doc_examples/aa7cf5df36b867aee5e3314ac4b4fa68.asciidoc
new file mode 100644
index 000000000..d6cff373f
--- /dev/null
+++ b/docs/doc_examples/aa7cf5df36b867aee5e3314ac4b4fa68.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "daily-snapshots",
+ schedule: "0 30 1 * * ?",
+ name: "",
+ repository: "my_repository",
+ config: {
+ indices: ["data-*", "important"],
+ ignore_unavailable: false,
+ include_global_state: false,
+ },
+ retention: {
+ expire_after: "30d",
+ min_count: 5,
+ max_count: 50,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa7f62279b487989440d423c1ed4a1c0.asciidoc b/docs/doc_examples/aa7f62279b487989440d423c1ed4a1c0.asciidoc
new file mode 100644
index 000000000..d9523d9b3
--- /dev/null
+++ b/docs/doc_examples/aa7f62279b487989440d423c1ed4a1c0.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getIndexTemplate({
+ name: "*",
+ filter_path:
+ "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aa814309ad5f1630886ba75255b444f5.asciidoc b/docs/doc_examples/aa814309ad5f1630886ba75255b444f5.asciidoc
new file mode 100644
index 000000000..736d58e62
--- /dev/null
+++ b/docs/doc_examples/aa814309ad5f1630886ba75255b444f5.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.pendingTasks();
+console.log(response);
+----
diff --git a/docs/doc_examples/aaa7a61b07861235fb6e489b946c705c.asciidoc b/docs/doc_examples/aaa7a61b07861235fb6e489b946c705c.asciidoc
new file mode 100644
index 000000000..e391c4895
--- /dev/null
+++ b/docs/doc_examples/aaa7a61b07861235fb6e489b946c705c.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ version: 2,
+ version_type: "external",
+ document: {
+ user: {
+ id: "elkbee",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aab3de5a8a3fefbe012fc2ed50dfe4d6.asciidoc b/docs/doc_examples/aab3de5a8a3fefbe012fc2ed50dfe4d6.asciidoc
new file mode 100644
index 000000000..3d38f131d
--- /dev/null
+++ b/docs/doc_examples/aab3de5a8a3fefbe012fc2ed50dfe4d6.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchableSnapshots.cacheStats();
+console.log(response);
+----
diff --git a/docs/doc_examples/aab810de3314d5e11bd564ea096785b8.asciidoc b/docs/doc_examples/aab810de3314d5e11bd564ea096785b8.asciidoc
new file mode 100644
index 000000000..5ab6d8d6d
--- /dev/null
+++ b/docs/doc_examples/aab810de3314d5e11bd564ea096785b8.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ "category.keyword": "Breakfast",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aaba346e0becdf12db13658296e0b8a1.asciidoc b/docs/doc_examples/aaba346e0becdf12db13658296e0b8a1.asciidoc
new file mode 100644
index 000000000..528068982
--- /dev/null
+++ b/docs/doc_examples/aaba346e0becdf12db13658296e0b8a1.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.number_of_shards": 2,
+ "index.lifecycle.name": "shrink-index",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aac5996a8398cc8f7701a063df0b2346.asciidoc b/docs/doc_examples/aac5996a8398cc8f7701a063df0b2346.asciidoc
new file mode 100644
index 000000000..f5d21c1c6
--- /dev/null
+++ b/docs/doc_examples/aac5996a8398cc8f7701a063df0b2346.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "saml-finance",
+ roles: ["finance_data"],
+ enabled: true,
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "saml1",
+ },
+ },
+ {
+ field: {
+ groups: "finance-team",
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aad7d80990a6a3c391ff555ce09ae9dc.asciidoc b/docs/doc_examples/aad7d80990a6a3c391ff555ce09ae9dc.asciidoc
new file mode 100644
index 000000000..bc29bce3b
--- /dev/null
+++ b/docs/doc_examples/aad7d80990a6a3c391ff555ce09ae9dc.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ f: {
+ type: "scaled_float",
+ scaling_factor: 0.01,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ f: 123,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/aadf36ae37460a735e06b953b4cee494.asciidoc b/docs/doc_examples/aadf36ae37460a735e06b953b4cee494.asciidoc
new file mode 100644
index 000000000..3b1270415
--- /dev/null
+++ b/docs/doc_examples/aadf36ae37460a735e06b953b4cee494.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "kibana_sample_data_ecommerce",
+ runtime_mappings: {
+ price_range: {
+ type: "keyword",
+ script: {
+ source:
+ "\n def bucket_start = (long) Math.floor(doc['taxful_total_price'].value / 50) * 50;\n def bucket_end = bucket_start + 50;\n emit(bucket_start.toString() + \"-\" + bucket_end.toString());\n ",
+ },
+ },
+ },
+ size: 0,
+ aggs: {
+ my_agg: {
+ frequent_item_sets: {
+ minimum_set_size: 4,
+ fields: [
+ {
+ field: "category.keyword",
+ },
+ {
+ field: "price_range",
+ },
+ {
+ field: "geoip.city_name",
+ },
+ ],
+ size: 3,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ab0fd1908c9957cc7f63165c156e48cd.asciidoc b/docs/doc_examples/ab0fd1908c9957cc7f63165c156e48cd.asciidoc
new file mode 100644
index 000000000..6cedc3adc
--- /dev/null
+++ b/docs/doc_examples/ab0fd1908c9957cc7f63165c156e48cd.asciidoc
@@ -0,0 +1,56 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ user_id: {
+ type: "keyword",
+ },
+ last_updated: {
+ type: "date",
+ },
+ session_data: {
+ type: "object",
+ enabled: false,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "session_1",
+ document: {
+ user_id: "kimchy",
+ session_data: {
+ arbitrary_object: {
+ some_array: [
+ "foo",
+ "bar",
+ {
+ baz: 2,
+ },
+ ],
+ },
+ },
+ last_updated: "2015-12-06T18:20:22",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: "session_2",
+ document: {
+ user_id: "jpountz",
+ session_data: "none",
+ last_updated: "2015-12-06T18:22:13",
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ab1372270c11bcd6f36d1a13e6c69276.asciidoc b/docs/doc_examples/ab1372270c11bcd6f36d1a13e6c69276.asciidoc
new file mode 100644
index 000000000..bf78c663c
--- /dev/null
+++ b/docs/doc_examples/ab1372270c11bcd6f36d1a13e6c69276.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index:
+ "my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001",
+ ccs_minimize_roundtrips: "true",
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ _source: ["user.id", "message", "http.response.status_code"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc b/docs/doc_examples/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc
new file mode 100644
index 000000000..08cd07a68
--- /dev/null
+++ b/docs/doc_examples/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc b/docs/doc_examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc
new file mode 100644
index 000000000..6a968f8e5
--- /dev/null
+++ b/docs/doc_examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ cost_price: 100,
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-index-000001",
+ script_fields: {
+ sales_price: {
+ script: {
+ lang: "expression",
+ source: "doc['cost_price'] * markup",
+ params: {
+ markup: 0.2,
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/ab29bfbd35ee482cf54052b03d62cd31.asciidoc b/docs/doc_examples/ab29bfbd35ee482cf54052b03d62cd31.asciidoc
new file mode 100644
index 000000000..338d6cf21
--- /dev/null
+++ b/docs/doc_examples/ab29bfbd35ee482cf54052b03d62cd31.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ rings: {
+ geo_distance: {
+ field: "location",
+ origin: "POINT (4.894 52.3760)",
+ unit: "km",
+ ranges: [
+ {
+ to: 100,
+ },
+ {
+ from: 100,
+ to: 300,
+ },
+ {
+ from: 300,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ab317aa09c4bd44abbf02517141e37ef.asciidoc b/docs/doc_examples/ab317aa09c4bd44abbf02517141e37ef.asciidoc
new file mode 100644
index 000000000..fa9f0fb4c
--- /dev/null
+++ b/docs/doc_examples/ab317aa09c4bd44abbf02517141e37ef.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ term_vector: "with_positions_offsets",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Quick brown fox",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ text: "brown fox",
+ },
+ },
+ highlight: {
+ fields: {
+ text: {},
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ab3c36b70459093beafbfd3a7ae75b9b.asciidoc b/docs/doc_examples/ab3c36b70459093beafbfd3a7ae75b9b.asciidoc
new file mode 100644
index 000000000..2e5783745
--- /dev/null
+++ b/docs/doc_examples/ab3c36b70459093beafbfd3a7ae75b9b.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T05:30:00Z",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "true",
+ document: {
+ date: "2015-10-01T06:30:00Z",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "day",
+ offset: "+6h",
+ format: "iso8601",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ab8b4537fad80107bc88f633d4039a52.asciidoc b/docs/doc_examples/ab8b4537fad80107bc88f633d4039a52.asciidoc
new file mode 100644
index 000000000..54ed0255c
--- /dev/null
+++ b/docs/doc_examples/ab8b4537fad80107bc88f633d4039a52.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "logs",
+ aliases: {
+ "": {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ab8de34fcfc0277901cb39618ecfc9d5.asciidoc b/docs/doc_examples/ab8de34fcfc0277901cb39618ecfc9d5.asciidoc
new file mode 100644
index 000000000..520c175f2
--- /dev/null
+++ b/docs/doc_examples/ab8de34fcfc0277901cb39618ecfc9d5.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.allocationExplain({
+ index: "my-index-000001",
+ shard: 0,
+ primary: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/abb4a58089574211d434946a923e5725.asciidoc b/docs/doc_examples/abb4a58089574211d434946a923e5725.asciidoc
new file mode 100644
index 000000000..705d8bb1f
--- /dev/null
+++ b/docs/doc_examples/abb4a58089574211d434946a923e5725.asciidoc
@@ -0,0 +1,89 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "kibana_sample_data_logs",
+ size: 0,
+ aggs: {
+ client_ip: {
+ composite: {
+ sources: [
+ {
+ client_ip: {
+ terms: {
+ field: "clientip",
+ },
+ },
+ },
+ ],
+ },
+ aggs: {
+ url_dc: {
+ cardinality: {
+ field: "url.keyword",
+ },
+ },
+ bytes_sum: {
+ sum: {
+ field: "bytes",
+ },
+ },
+ geo_src_dc: {
+ cardinality: {
+ field: "geo.src",
+ },
+ },
+ geo_dest_dc: {
+ cardinality: {
+ field: "geo.dest",
+ },
+ },
+ responses_total: {
+ value_count: {
+ field: "timestamp",
+ },
+ },
+ success: {
+ filter: {
+ term: {
+ response: "200",
+ },
+ },
+ },
+ error404: {
+ filter: {
+ term: {
+ response: "404",
+ },
+ },
+ },
+ error503: {
+ filter: {
+ term: {
+ response: "503",
+ },
+ },
+ },
+ malicious_client_ip: {
+ inference: {
+ model_id: "malicious_clients_model",
+ buckets_path: {
+ response_count: "responses_total",
+ url_dc: "url_dc",
+ bytes_sum: "bytes_sum",
+ geo_src_dc: "geo_src_dc",
+ geo_dest_dc: "geo_dest_dc",
+ success: "success._count",
+ error404: "error404._count",
+ error503: "error503._count",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/abc280775734daa6cf2c28868e155d10.asciidoc b/docs/doc_examples/abc280775734daa6cf2c28868e155d10.asciidoc
new file mode 100644
index 000000000..3ea4cf6b5
--- /dev/null
+++ b/docs/doc_examples/abc280775734daa6cf2c28868e155d10.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "exams",
+ refresh: "true",
+ document: {
+ grade: [1, 2, 3],
+ weight: 2,
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ weighted_grade: {
+ weighted_avg: {
+ value: {
+ field: "grade",
+ },
+ weight: {
+ field: "weight",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/abc496de5fd013099a134db369b34a8b.asciidoc b/docs/doc_examples/abc496de5fd013099a134db369b34a8b.asciidoc
new file mode 100644
index 000000000..014375370
--- /dev/null
+++ b/docs/doc_examples/abc496de5fd013099a134db369b34a8b.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ query: {
+ constant_score: {
+ filter: {
+ match: {
+ type: "hat",
+ },
+ },
+ },
+ },
+ aggs: {
+ hat_prices: {
+ sum: {
+ field: "price",
+ missing: 100,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/abc7a670a47516b58b6b07d7497b140c.asciidoc b/docs/doc_examples/abc7a670a47516b58b6b07d7497b140c.asciidoc
new file mode 100644
index 000000000..061bd7255
--- /dev/null
+++ b/docs/doc_examples/abc7a670a47516b58b6b07d7497b140c.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ query: {
+ constant_score: {
+ filter: {
+ bool: {
+ should: [
+ {
+ range: {
+ my_date: {
+ gte: "now-1h",
+ lte: "now-1h/m",
+ },
+ },
+ },
+ {
+ range: {
+ my_date: {
+ gt: "now-1h/m",
+ lt: "now/m",
+ },
+ },
+ },
+ {
+ range: {
+ my_date: {
+ gte: "now/m",
+ lte: "now",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc b/docs/doc_examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc
new file mode 100644
index 000000000..f8ef5375f
--- /dev/null
+++ b/docs/doc_examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ filter_path: "hits.total",
+ query: {
+ match: {
+ flag: "foo",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/abdbc81e799e28c833556b1c29f03ba6.asciidoc b/docs/doc_examples/abdbc81e799e28c833556b1c29f03ba6.asciidoc
new file mode 100644
index 000000000..6963bfe68
--- /dev/null
+++ b/docs/doc_examples/abdbc81e799e28c833556b1c29f03ba6.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getUser();
+console.log(response);
+----
diff --git a/docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc b/docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc
new file mode 100644
index 000000000..0e3921a75
--- /dev/null
+++ b/docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ text_similarity_reranker: {
+ retriever: {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ rank_window_size: 100,
+ field: "text",
+ inference_id: "my-rerank-model",
+ inference_text:
+ "What are the state of the art applications of AI in information retrieval?",
+ },
+ },
+ rank_window_size: 10,
+ field: "text",
+ inference_id: "my-other-more-expensive-rerank-model",
+ inference_text:
+ "Applications of Large Language Models in technology and their impact on user satisfaction",
+ },
+ },
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ac366b9dda7040e743dee85335354094.asciidoc b/docs/doc_examples/ac366b9dda7040e743dee85335354094.asciidoc
new file mode 100644
index 000000000..67c8ca406
--- /dev/null
+++ b/docs/doc_examples/ac366b9dda7040e743dee85335354094.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: [
+ {
+ type: "shingle",
+ min_shingle_size: 2,
+ max_shingle_size: 3,
+ },
+ ],
+ text: "quick brown fox jumps",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ac483996d479946d57c374c3a86b2621.asciidoc b/docs/doc_examples/ac483996d479946d57c374c3a86b2621.asciidoc
new file mode 100644
index 000000000..efaf6b96b
--- /dev/null
+++ b/docs/doc_examples/ac483996d479946d57c374c3a86b2621.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_field: {
+ type: "search_as_you_type",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ac497917ef707538198a8458ae3d5c6b.asciidoc b/docs/doc_examples/ac497917ef707538198a8458ae3d5c6b.asciidoc
new file mode 100644
index 000000000..f89e8cf0d
--- /dev/null
+++ b/docs/doc_examples/ac497917ef707538198a8458ae3d5c6b.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ message: "this is a test",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ac5b91aa75696f9880451c9439fd9eec.asciidoc b/docs/doc_examples/ac5b91aa75696f9880451c9439fd9eec.asciidoc
new file mode 100644
index 000000000..08b6a99c8
--- /dev/null
+++ b/docs/doc_examples/ac5b91aa75696f9880451c9439fd9eec.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_range: {
+ type: "date_range",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ my_range: [
+ {
+ gte: 1504224000000,
+ lte: 1504569600000,
+ },
+ {
+ gte: "2017-09-01",
+ lte: "2017-09-10",
+ },
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc b/docs/doc_examples/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc
new file mode 100644
index 000000000..7edc35273
--- /dev/null
+++ b/docs/doc_examples/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ac8328bc51fd396b3ce5f7ef3e1e73df.asciidoc b/docs/doc_examples/ac8328bc51fd396b3ce5f7ef3e1e73df.asciidoc
new file mode 100644
index 000000000..b0ca64df0
--- /dev/null
+++ b/docs/doc_examples/ac8328bc51fd396b3ce5f7ef3e1e73df.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.getRepository();
+console.log(response);
+----
diff --git a/docs/doc_examples/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc b/docs/doc_examples/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc
new file mode 100644
index 000000000..d3ec042d7
--- /dev/null
+++ b/docs/doc_examples/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ flat_settings: "true",
+ transient: {
+ "indices.recovery.max_bytes_per_sec": "20mb",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc b/docs/doc_examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc
new file mode 100644
index 000000000..38ee3b575
--- /dev/null
+++ b/docs/doc_examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_src_only_repository",
+ repository: {
+ type: "source",
+ settings: {
+ delegate_type: "fs",
+ location: "my_backup_repository",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/acb10091ad335ddd15d71021aaf23c62.asciidoc b/docs/doc_examples/acb10091ad335ddd15d71021aaf23c62.asciidoc
new file mode 100644
index 000000000..af0bba0f8
--- /dev/null
+++ b/docs/doc_examples/acb10091ad335ddd15d71021aaf23c62.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ track_scores: true,
+ sort: [
+ {
+ post_date: {
+ order: "desc",
+ },
+ },
+ {
+ name: "desc",
+ },
+ {
+ age: "desc",
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/acb850c08f51226eadb75be09e336076.asciidoc b/docs/doc_examples/acb850c08f51226eadb75be09e336076.asciidoc
new file mode 100644
index 000000000..9c0903785
--- /dev/null
+++ b/docs/doc_examples/acb850c08f51226eadb75be09e336076.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.status({
+ id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/acc44366a9908684b2c8c2b119a4fb2b.asciidoc b/docs/doc_examples/acc44366a9908684b2c8c2b119a4fb2b.asciidoc
new file mode 100644
index 000000000..2dcd961c6
--- /dev/null
+++ b/docs/doc_examples/acc44366a9908684b2c8c2b119a4fb2b.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ retriever: {
+ rule: {
+ retriever: {
+ standard: {
+ query: {
+ query_string: {
+ query: "puggles",
+ },
+ },
+ },
+ },
+ match_criteria: {
+ query_string: "puggles",
+ user_country: "us",
+ },
+ ruleset_ids: ["my-ruleset"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/acc52da725a996ae696b00d9f818dfde.asciidoc b/docs/doc_examples/acc52da725a996ae696b00d9f818dfde.asciidoc
new file mode 100644
index 000000000..17e1e0a8a
--- /dev/null
+++ b/docs/doc_examples/acc52da725a996ae696b00d9f818dfde.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "file-path-test",
+ analyzer: "custom_path_tree",
+ text: "/User/alice/photos/2017/05/16/my_photo1.jpg",
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "file-path-test",
+ analyzer: "custom_path_tree_reversed",
+ text: "/User/alice/photos/2017/05/16/my_photo1.jpg",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/acc6cd860032167e34fa5e0c043ab3b0.asciidoc b/docs/doc_examples/acc6cd860032167e34fa5e0c043ab3b0.asciidoc
new file mode 100644
index 000000000..3224e514b
--- /dev/null
+++ b/docs/doc_examples/acc6cd860032167e34fa5e0c043ab3b0.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ query: "city.\\*:(this AND that OR thus)",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc b/docs/doc_examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc
new file mode 100644
index 000000000..36fb42740
--- /dev/null
+++ b/docs/doc_examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "Jon",
+ type: "cross_fields",
+ fields: ["first", "first.edge", "last", "last.edge"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad2416ca0581316cee6c63129685bca5.asciidoc b/docs/doc_examples/ad2416ca0581316cee6c63129685bca5.asciidoc
new file mode 100644
index 000000000..8b68bcfdb
--- /dev/null
+++ b/docs/doc_examples/ad2416ca0581316cee6c63129685bca5.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["title", "content"],
+ query: "this OR that OR thus",
+ minimum_should_match: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc b/docs/doc_examples/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc
new file mode 100644
index 000000000..3768cd346
--- /dev/null
+++ b/docs/doc_examples/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-image-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ "image-vector": [1, 5, -20],
+ "file-type": "jpg",
+ title: "mountain lake",
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ "image-vector": [42, 8, -15],
+ "file-type": "png",
+ title: "frozen lake",
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ "image-vector": [15, 11, 23],
+ "file-type": "jpg",
+ title: "mountain lake lodge",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc b/docs/doc_examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc
new file mode 100644
index 000000000..d855f164e
--- /dev/null
+++ b/docs/doc_examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.count({
+ index: "my-index-000001",
+ q: "user:kimchy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad57ccba0a060da4f5313692fa26a235.asciidoc b/docs/doc_examples/ad57ccba0a060da4f5313692fa26a235.asciidoc
new file mode 100644
index 000000000..9a83c4ccd
--- /dev/null
+++ b/docs/doc_examples/ad57ccba0a060da4f5313692fa26a235.asciidoc
@@ -0,0 +1,72 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ date: {
+ type: "date_nanos",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ date: "2015-01-01",
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ date: "2015-01-01T12:10:30.123456789Z",
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ date: 1420070400000,
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ sort: {
+ date: "asc",
+ },
+ runtime_mappings: {
+ date_has_nanos: {
+ type: "boolean",
+ script: "emit(doc['date'].value.nano != 0)",
+ },
+ },
+ fields: [
+ {
+ field: "date",
+ format: "strict_date_optional_time_nanos",
+ },
+ {
+ field: "date_has_nanos",
+ },
+ ],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ad63eca6829a25293c9be589c1870547.asciidoc b/docs/doc_examples/ad63eca6829a25293c9be589c1870547.asciidoc
new file mode 100644
index 000000000..c3d0e495e
--- /dev/null
+++ b/docs/doc_examples/ad63eca6829a25293c9be589c1870547.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_moving_sum: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.sum(values)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad6d81be5fad4bad87486b699454dce5.asciidoc b/docs/doc_examples/ad6d81be5fad4bad87486b699454dce5.asciidoc
new file mode 100644
index 000000000..6abd80ac6
--- /dev/null
+++ b/docs/doc_examples/ad6d81be5fad4bad87486b699454dce5.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "node_upgrade",
+ size: 0,
+ aggs: {
+ startup_time_ttest: {
+ t_test: {
+ a: {
+ field: "startup_time_before",
+ },
+ b: {
+ field: "startup_time_after",
+ },
+ type: "paired",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad88e46bb06739991498dee248850223.asciidoc b/docs/doc_examples/ad88e46bb06739991498dee248850223.asciidoc
new file mode 100644
index 000000000..e9db96801
--- /dev/null
+++ b/docs/doc_examples/ad88e46bb06739991498dee248850223.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.threadPool();
+console.log(response);
+----
diff --git a/docs/doc_examples/ad92a1a8bb1b0f26d1536fe8ba4ffd17.asciidoc b/docs/doc_examples/ad92a1a8bb1b0f26d1536fe8ba4ffd17.asciidoc
new file mode 100644
index 000000000..03f452f53
--- /dev/null
+++ b/docs/doc_examples/ad92a1a8bb1b0f26d1536fe8ba4ffd17.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ id: "my-search-template",
+ params: {
+ query_string: "hello world",
+ from: 20,
+ size: 10,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc b/docs/doc_examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc
new file mode 100644
index 000000000..ca15245b8
--- /dev/null
+++ b/docs/doc_examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "my-elser-model",
+ inference_config: {
+ service: "elasticsearch",
+ service_settings: {
+ adaptive_allocations: {
+ enabled: true,
+ min_number_of_allocations: 1,
+ max_number_of_allocations: 4,
+ },
+ num_threads: 1,
+ model_id: ".elser_model_2",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ada2675a9c631da2bfe627fc2618f5ed.asciidoc b/docs/doc_examples/ada2675a9c631da2bfe627fc2618f5ed.asciidoc
new file mode 100644
index 000000000..a7f2f8f65
--- /dev/null
+++ b/docs/doc_examples/ada2675a9c631da2bfe627fc2618f5ed.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ script_score: {
+ query: {
+ match: {
+ message: "elasticsearch",
+ },
+ },
+ script: {
+ source: "doc['my-int'].value / 10 ",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/adc18ca0c344d81d68ec3b9422b54ff5.asciidoc b/docs/doc_examples/adc18ca0c344d81d68ec3b9422b54ff5.asciidoc
new file mode 100644
index 000000000..27998d47c
--- /dev/null
+++ b/docs/doc_examples/adc18ca0c344d81d68ec3b9422b54ff5.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.msearch({
+ index: "my-index-000001",
+ searches: [
+ {},
+ {
+ query: {
+ match_all: {},
+ },
+ from: 0,
+ size: 10,
+ },
+ {},
+ {
+ query: {
+ match_all: {},
+ },
+ },
+ {
+ index: "my-index-000002",
+ },
+ {
+ query: {
+ match_all: {},
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/add240aa149d8b11139947502b279ee0.asciidoc b/docs/doc_examples/add240aa149d8b11139947502b279ee0.asciidoc
new file mode 100644
index 000000000..c77295769
--- /dev/null
+++ b/docs/doc_examples/add240aa149d8b11139947502b279ee0.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.scroll({
+ scroll: "1m",
+ scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc b/docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc
new file mode 100644
index 000000000..f924148c0
--- /dev/null
+++ b/docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ multi_match: {
+ query: "vegetarian curry",
+ fields: ["title^3", "description^2", "tags"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/adf36e2d8fc05c3719c91912481c4e19.asciidoc b/docs/doc_examples/adf36e2d8fc05c3719c91912481c4e19.asciidoc
new file mode 100644
index 000000000..a5724dbaa
--- /dev/null
+++ b/docs/doc_examples/adf36e2d8fc05c3719c91912481c4e19.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.enableUser({
+ username: "jacknich",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/adf728b0c11c5c309c730205609a379d.asciidoc b/docs/doc_examples/adf728b0c11c5c309c730205609a379d.asciidoc
new file mode 100644
index 000000000..dcdc44c12
--- /dev/null
+++ b/docs/doc_examples/adf728b0c11c5c309c730205609a379d.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ description: "Set dynamic '' field to 'code' value",
+ field: "{{{service}}}",
+ value: "{{{code}}}",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ae0d20c2ebb59278e08a26c9634d90c9.asciidoc b/docs/doc_examples/ae0d20c2ebb59278e08a26c9634d90c9.asciidoc
new file mode 100644
index 000000000..da6f2a257
--- /dev/null
+++ b/docs/doc_examples/ae0d20c2ebb59278e08a26c9634d90c9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.create({
+ repository: "my_repository",
+ snapshot: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc b/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc
new file mode 100644
index 000000000..67a3d5d75
--- /dev/null
+++ b/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.put({
+ connector_id: "my-{service-name-stub}-connector",
+ index_name: "my-elasticsearch-index",
+ name: "Content synced from {service-name}",
+ service_type: "{service-name-stub}",
+ is_native: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ae398a6b6494e7982ef2549fc2cd2d8e.asciidoc b/docs/doc_examples/ae398a6b6494e7982ef2549fc2cd2d8e.asciidoc
new file mode 100644
index 000000000..b3ba17b23
--- /dev/null
+++ b/docs/doc_examples/ae398a6b6494e7982ef2549fc2cd2d8e.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ full_name: {
+ path_match: ["name.*", "user.name.*"],
+ path_unmatch: ["*.middle", "*.midinitial"],
+ mapping: {
+ type: "text",
+ copy_to: "full_name",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ name: {
+ first: "John",
+ middle: "Winston",
+ last: "Lennon",
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ user: {
+ name: {
+ first: "Jane",
+ midinitial: "M",
+ last: "Salazar",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ae4aa368617637a390074535df86e64b.asciidoc b/docs/doc_examples/ae4aa368617637a390074535df86e64b.asciidoc
new file mode 100644
index 000000000..4c1c1e246
--- /dev/null
+++ b/docs/doc_examples/ae4aa368617637a390074535df86e64b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.setUpgradeMode({
+ enabled: "true",
+ timeout: "10m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ae591d49e54b838c15cdcf64a8dee9c2.asciidoc b/docs/doc_examples/ae591d49e54b838c15cdcf64a8dee9c2.asciidoc
new file mode 100644
index 000000000..0f73de942
--- /dev/null
+++ b/docs/doc_examples/ae591d49e54b838c15cdcf64a8dee9c2.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_docs: 10000000,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ae82eb17c23cb8e5761cb6240a5ed0a6.asciidoc b/docs/doc_examples/ae82eb17c23cb8e5761cb6240a5ed0a6.asciidoc
new file mode 100644
index 000000000..4404c4b26
--- /dev/null
+++ b/docs/doc_examples/ae82eb17c23cb8e5761cb6240a5ed0a6.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDataFrameAnalytics({
+ id: "student_performance_mathematics_0.3",
+ source: {
+ index: "student_performance_mathematics",
+ },
+ dest: {
+ index: "student_performance_mathematics_reg",
+ },
+ analysis: {
+ regression: {
+ dependent_variable: "G3",
+ training_percent: 70,
+ randomize_seed: 19673948271,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc b/docs/doc_examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc
new file mode 100644
index 000000000..5b92e389a
--- /dev/null
+++ b/docs/doc_examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ operations: [
+ {
+ index: {
+ _index: "test",
+ _id: "1",
+ },
+ },
+ {
+ field1: "value1",
+ },
+ {
+ delete: {
+ _index: "test",
+ _id: "2",
+ },
+ },
+ {
+ create: {
+ _index: "test",
+ _id: "3",
+ },
+ },
+ {
+ field1: "value3",
+ },
+ {
+ update: {
+ _id: "1",
+ _index: "test",
+ },
+ },
+ {
+ doc: {
+ field2: "value2",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aeaa97939a05f5b2f3f2c43b771f35e3.asciidoc b/docs/doc_examples/aeaa97939a05f5b2f3f2c43b771f35e3.asciidoc
new file mode 100644
index 000000000..0c43a303d
--- /dev/null
+++ b/docs/doc_examples/aeaa97939a05f5b2f3f2c43b771f35e3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "my-index-000001",
+ id: 1,
+ fields: ["text", "some_field_without_term_vectors"],
+ offsets: true,
+ positions: true,
+ term_statistics: true,
+ field_statistics: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc b/docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc
new file mode 100644
index 000000000..af5ed0954
--- /dev/null
+++ b/docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_backup",
+ repository: {
+ type: "azure",
+ settings: {
+ client: "secondary",
+ container: "my_container",
+ base_path: "snapshots_prefix",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aee26dd62fbb6d614a0798f3344c0598.asciidoc b/docs/doc_examples/aee26dd62fbb6d614a0798f3344c0598.asciidoc
new file mode 100644
index 000000000..8b4ea58cc
--- /dev/null
+++ b/docs/doc_examples/aee26dd62fbb6d614a0798f3344c0598.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "issues",
+ query: {
+ match_all: {},
+ },
+ aggs: {
+ comments: {
+ nested: {
+ path: "comments",
+ },
+ aggs: {
+ top_usernames: {
+ terms: {
+ field: "comments.username",
+ },
+ aggs: {
+ comment_to_issue: {
+ reverse_nested: {},
+ aggs: {
+ top_tags_per_comment: {
+ terms: {
+ field: "tags",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc b/docs/doc_examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc
new file mode 100644
index 000000000..36cbdb71c
--- /dev/null
+++ b/docs/doc_examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ _geo_distance: {
+ "pin.location": [-70, 40],
+ order: "asc",
+ unit: "km",
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af00a58d9171d32f6efe52d94e51e526.asciidoc b/docs/doc_examples/af00a58d9171d32f6efe52d94e51e526.asciidoc
new file mode 100644
index 000000000..bc40fbb31
--- /dev/null
+++ b/docs/doc_examples/af00a58d9171d32f6efe52d94e51e526.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "hindi_example",
+ settings: {
+ analysis: {
+ filter: {
+ hindi_stop: {
+ type: "stop",
+ stopwords: "_hindi_",
+ },
+ hindi_keywords: {
+ type: "keyword_marker",
+ keywords: ["उदाहरण"],
+ },
+ hindi_stemmer: {
+ type: "stemmer",
+ language: "hindi",
+ },
+ },
+ analyzer: {
+ rebuilt_hindi: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "decimal_digit",
+ "hindi_keywords",
+ "indic_normalization",
+ "hindi_normalization",
+ "hindi_stop",
+ "hindi_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af18f5c5fb2364ae23c6a14431820aba.asciidoc b/docs/doc_examples/af18f5c5fb2364ae23c6a14431820aba.asciidoc
new file mode 100644
index 000000000..73aaca9ec
--- /dev/null
+++ b/docs/doc_examples/af18f5c5fb2364ae23c6a14431820aba.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.getPolicy({
+ name: "my-policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af44cc7fb0c435d4497c77baf904bf5e.asciidoc b/docs/doc_examples/af44cc7fb0c435d4497c77baf904bf5e.asciidoc
new file mode 100644
index 000000000..b56c54770
--- /dev/null
+++ b/docs/doc_examples/af44cc7fb0c435d4497c77baf904bf5e.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af517b6936fa41d124d68b107b2efdc3.asciidoc b/docs/doc_examples/af517b6936fa41d124d68b107b2efdc3.asciidoc
new file mode 100644
index 000000000..e43a41a04
--- /dev/null
+++ b/docs/doc_examples/af517b6936fa41d124d68b107b2efdc3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.deleteLifecycle({
+ name: "my_policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af607715d0693587dd12962266359a96.asciidoc b/docs/doc_examples/af607715d0693587dd12962266359a96.asciidoc
new file mode 100644
index 000000000..cb25ed36d
--- /dev/null
+++ b/docs/doc_examples/af607715d0693587dd12962266359a96.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_s3_repository",
+ repository: {
+ type: "s3",
+ settings: {
+ bucket: "my-bucket",
+ another_setting: "setting-value",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af746266a49a693ff6170c88da8a8c04.asciidoc b/docs/doc_examples/af746266a49a693ff6170c88da8a8c04.asciidoc
new file mode 100644
index 000000000..0cb4cb18f
--- /dev/null
+++ b/docs/doc_examples/af746266a49a693ff6170c88da8a8c04.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ default: {
+ tokenizer: "whitespace",
+ filter: ["my_custom_stop_words_filter"],
+ },
+ },
+ filter: {
+ my_custom_stop_words_filter: {
+ type: "stop",
+ ignore_case: true,
+ stopwords: ["and", "is", "the"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af7c5add165b005aefb552d79130fed6.asciidoc b/docs/doc_examples/af7c5add165b005aefb552d79130fed6.asciidoc
new file mode 100644
index 000000000..b1d4507ce
--- /dev/null
+++ b/docs/doc_examples/af7c5add165b005aefb552d79130fed6.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ geo_grid: {
+ location: {
+ geotile: "6/32/22",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af84b3995564a7ca84360a526a4ac896.asciidoc b/docs/doc_examples/af84b3995564a7ca84360a526a4ac896.asciidoc
new file mode 100644
index 000000000..ff6a42618
--- /dev/null
+++ b/docs/doc_examples/af84b3995564a7ca84360a526a4ac896.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "5_char_words_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ lowercase_5_char: {
+ tokenizer: "lowercase",
+ filter: ["5_char_trunc"],
+ },
+ },
+ filter: {
+ "5_char_trunc": {
+ type: "truncate",
+ length: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af85ad2551d1cc6742c6521d71c889cc.asciidoc b/docs/doc_examples/af85ad2551d1cc6742c6521d71c889cc.asciidoc
new file mode 100644
index 000000000..ef4dfe564
--- /dev/null
+++ b/docs/doc_examples/af85ad2551d1cc6742c6521d71c889cc.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ analyzer: "whitespace",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af91019991bee136df5460e2fd4ac72a.asciidoc b/docs/doc_examples/af91019991bee136df5460e2fd4ac72a.asciidoc
new file mode 100644
index 000000000..c45e9cde5
--- /dev/null
+++ b/docs/doc_examples/af91019991bee136df5460e2fd4ac72a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-data-stream",
+ lazy: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/af970eb8b93cdea52209e1256eba9d8c.asciidoc b/docs/doc_examples/af970eb8b93cdea52209e1256eba9d8c.asciidoc
new file mode 100644
index 000000000..a107b8955
--- /dev/null
+++ b/docs/doc_examples/af970eb8b93cdea52209e1256eba9d8c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shardStores({
+ index: "test1,test2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc b/docs/doc_examples/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc
new file mode 100644
index 000000000..663d97eb6
--- /dev/null
+++ b/docs/doc_examples/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-data-stream",
+ size: 0,
+ aggs: {
+ tsid: {
+ terms: {
+ field: "_tsid",
+ },
+ aggs: {
+ over_time: {
+ date_histogram: {
+ field: "@timestamp",
+ fixed_interval: "1d",
+ },
+ aggs: {
+ min: {
+ min: {
+ field: "kubernetes.container.memory.usage.bytes",
+ },
+ },
+ max: {
+ max: {
+ field: "kubernetes.container.memory.usage.bytes",
+ },
+ },
+ avg: {
+ avg: {
+ field: "kubernetes.container.memory.usage.bytes",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afa24b7d72c2d9f586023a49bd655ec7.asciidoc b/docs/doc_examples/afa24b7d72c2d9f586023a49bd655ec7.asciidoc
new file mode 100644
index 000000000..0ed57946a
--- /dev/null
+++ b/docs/doc_examples/afa24b7d72c2d9f586023a49bd655ec7.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index: "my-data-stream",
+ runtime_mappings: {
+ "source.ip": {
+ type: "ip",
+ script:
+ "\n String sourceip=grok('%{IPORHOST:sourceip} .*').extract(doc[ \"message\" ].value)?.sourceip;\n if (sourceip != null) emit(sourceip);\n ",
+ },
+ },
+ query: {
+ bool: {
+ filter: [
+ {
+ range: {
+ "@timestamp": {
+ gte: "now-2y/d",
+ lt: "now/d",
+ },
+ },
+ },
+ {
+ range: {
+ "source.ip": {
+ gte: "192.0.2.0",
+ lte: "192.0.2.255",
+ },
+ },
+ },
+ ],
+ },
+ },
+ fields: ["*"],
+ _source: false,
+ sort: [
+ {
+ "@timestamp": "desc",
+ },
+ {
+ "source.ip": "desc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afadb6bb7d0fa5a4531708af1ea8f9f8.asciidoc b/docs/doc_examples/afadb6bb7d0fa5a4531708af1ea8f9f8.asciidoc
new file mode 100644
index 000000000..3ee21ca53
--- /dev/null
+++ b/docs/doc_examples/afadb6bb7d0fa5a4531708af1ea8f9f8.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "mylogs-*",
+ },
+ dest: {
+ index: "mylogs",
+ op_type: "create",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afbea723c4ba0d50c67d04ebb73a4101.asciidoc b/docs/doc_examples/afbea723c4ba0d50c67d04ebb73a4101.asciidoc
new file mode 100644
index 000000000..6e0d97dd7
--- /dev/null
+++ b/docs/doc_examples/afbea723c4ba0d50c67d04ebb73a4101.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.delete({
+ name: "my-app",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afc0a9cffc0100797a3f093094394763.asciidoc b/docs/doc_examples/afc0a9cffc0100797a3f093094394763.asciidoc
new file mode 100644
index 000000000..9129b70e3
--- /dev/null
+++ b/docs/doc_examples/afc0a9cffc0100797a3f093094394763.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlInvalidate({
+ query_string:
+ "SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D",
+ realm: "saml1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afcacd742d18bf220e02f0bc6891526d.asciidoc b/docs/doc_examples/afcacd742d18bf220e02f0bc6891526d.asciidoc
new file mode 100644
index 000000000..2fb8b47c3
--- /dev/null
+++ b/docs/doc_examples/afcacd742d18bf220e02f0bc6891526d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sale_date: {
+ auto_date_histogram: {
+ field: "date",
+ buckets: 10,
+ minimum_interval: "minute",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afd90d268187f995dc002abc189f818d.asciidoc b/docs/doc_examples/afd90d268187f995dc002abc189f818d.asciidoc
new file mode 100644
index 000000000..ce066008c
--- /dev/null
+++ b/docs/doc_examples/afd90d268187f995dc002abc189f818d.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ format: "yyyy-MM-dd",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afdb19ad1ebb4f64e235528b640817b6.asciidoc b/docs/doc_examples/afdb19ad1ebb4f64e235528b640817b6.asciidoc
new file mode 100644
index 000000000..8ed6c634a
--- /dev/null
+++ b/docs/doc_examples/afdb19ad1ebb4f64e235528b640817b6.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ drop: {
+ description: "Drop documents with 'network.name' of 'Guest'",
+ if: "ctx?.network?.name == 'Guest'",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afe30f159937b38d74c869570cfcd369.asciidoc b/docs/doc_examples/afe30f159937b38d74c869570cfcd369.asciidoc
new file mode 100644
index 000000000..699718a56
--- /dev/null
+++ b/docs/doc_examples/afe30f159937b38d74c869570cfcd369.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.close({
+ index: "index_1",
+});
+console.log(response);
+
+const response1 = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "snapshot_2",
+ wait_for_completion: "true",
+ indices: "index_1",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/afe5aeb9317f0ae470b28e85a8d98274.asciidoc b/docs/doc_examples/afe5aeb9317f0ae470b28e85a8d98274.asciidoc
new file mode 100644
index 000000000..e5cb83536
--- /dev/null
+++ b/docs/doc_examples/afe5aeb9317f0ae470b28e85a8d98274.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ status_code: {
+ type: "keyword",
+ null_value: "NULL",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ status_code: null,
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ status_code: [],
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ status_code: "NULL",
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/afe87a2850326e0328fbebbefec2e839.asciidoc b/docs/doc_examples/afe87a2850326e0328fbebbefec2e839.asciidoc
new file mode 100644
index 000000000..4cdf9bf3e
--- /dev/null
+++ b/docs/doc_examples/afe87a2850326e0328fbebbefec2e839.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchShards({
+ index: "my-index-000001",
+ routing: "foo,bar",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/afef5cac988592b97ae289ab39c2f437.asciidoc b/docs/doc_examples/afef5cac988592b97ae289ab39c2f437.asciidoc
new file mode 100644
index 000000000..95eab5366
--- /dev/null
+++ b/docs/doc_examples/afef5cac988592b97ae289ab39c2f437.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_field: {
+ type: "text",
+ fields: {
+ keyword: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/affc7ff234dc3acccb2bf7dc51f54813.asciidoc b/docs/doc_examples/affc7ff234dc3acccb2bf7dc51f54813.asciidoc
new file mode 100644
index 000000000..e7f29a690
--- /dev/null
+++ b/docs/doc_examples/affc7ff234dc3acccb2bf7dc51f54813.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ char_filter: ["html_strip"],
+ text: "I'm so happy!
",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b00ac39faf96785e89be8d4205fb984d.asciidoc b/docs/doc_examples/b00ac39faf96785e89be8d4205fb984d.asciidoc
new file mode 100644
index 000000000..3aa692211
--- /dev/null
+++ b/docs/doc_examples/b00ac39faf96785e89be8d4205fb984d.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+ params: {
+ text: true,
+ size: 5,
+ query_string: "mountain climbing",
+ text_fields: [
+ {
+ name: "title",
+ boost: 10,
+ },
+ {
+ name: "description",
+ boost: 5,
+ },
+ {
+ name: "state",
+ boost: 1,
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b00d74eed431a272c829c0f798e3a539.asciidoc b/docs/doc_examples/b00d74eed431a272c829c0f798e3a539.asciidoc
new file mode 100644
index 000000000..01b12cb2d
--- /dev/null
+++ b/docs/doc_examples/b00d74eed431a272c829c0f798e3a539.asciidoc
@@ -0,0 +1,84 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ d: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "test",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ s: 1,
+ m: 3.1415,
+ i: 1,
+ d: "2020-01-01T00:12:12Z",
+ t: "cat",
+ },
+ {
+ index: {},
+ },
+ {
+ s: 2,
+ m: 1,
+ i: 6,
+ d: "2020-01-02T00:12:12Z",
+ t: "dog",
+ },
+ {
+ index: {},
+ },
+ {
+ s: 3,
+ m: 2.71828,
+ i: -12,
+ d: "2019-12-31T00:12:12Z",
+ t: "chicken",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "test",
+ filter_path: "aggregations",
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: [
+ {
+ field: "m",
+ },
+ {
+ field: "i",
+ },
+ {
+ field: "d",
+ },
+ {
+ field: "t.keyword",
+ },
+ ],
+ sort: {
+ s: "desc",
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b00f3bc0e47905aaa2124d6a025c75d4.asciidoc b/docs/doc_examples/b00f3bc0e47905aaa2124d6a025c75d4.asciidoc
new file mode 100644
index 000000000..7e6d9a983
--- /dev/null
+++ b/docs/doc_examples/b00f3bc0e47905aaa2124d6a025c75d4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query: "SELECT * FROM library ORDER BY page_count DESC LIMIT 5",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc b/docs/doc_examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc
new file mode 100644
index 000000000..f3456d0d4
--- /dev/null
+++ b/docs/doc_examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.health();
+console.log(response);
+----
diff --git a/docs/doc_examples/b09f155602f9b2a6c40fe7c4a5436b7a.asciidoc b/docs/doc_examples/b09f155602f9b2a6c40fe7c4a5436b7a.asciidoc
new file mode 100644
index 000000000..ef0a0529b
--- /dev/null
+++ b/docs/doc_examples/b09f155602f9b2a6c40fe7c4a5436b7a.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ runtime_mappings: {
+ day_of_week: {
+ type: "keyword",
+ script:
+ "\n emit(doc['timestamp'].value.dayOfWeekEnum\n .getDisplayName(TextStyle.FULL, Locale.ENGLISH))\n ",
+ },
+ },
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ dow: {
+ terms: {
+ field: "day_of_week",
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b0b1ae9582599f501f3b3ed8a42ea2af.asciidoc b/docs/doc_examples/b0b1ae9582599f501f3b3ed8a42ea2af.asciidoc
new file mode 100644
index 000000000..98f315c75
--- /dev/null
+++ b/docs/doc_examples/b0b1ae9582599f501f3b3ed8a42ea2af.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "circles",
+ id: 1,
+ pipeline: "polygonize_circles",
+ document: {
+ circle: "CIRCLE (30 10 40)",
+ },
+});
+console.log(response);
+
+const response1 = await client.get({
+ index: "circles",
+ id: 1,
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc b/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc
new file mode 100644
index 000000000..6ce163623
--- /dev/null
+++ b/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.renderQuery({
+ name: "my_search_application",
+ body: null,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b0ce54ff4fec0b0c712506eb81e633f4.asciidoc b/docs/doc_examples/b0ce54ff4fec0b0c712506eb81e633f4.asciidoc
new file mode 100644
index 000000000..ec64702c5
--- /dev/null
+++ b/docs/doc_examples/b0ce54ff4fec0b0c712506eb81e633f4.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ description: "monthly date-time index naming",
+ processors: [
+ {
+ date_index_name: {
+ field: "date1",
+ index_name_prefix: "my-index-",
+ date_rounding: "M",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ date1: "2016-04-25T12:02:01.789Z",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b0d3f839237fabf8cdc2221734c668ad.asciidoc b/docs/doc_examples/b0d3f839237fabf8cdc2221734c668ad.asciidoc
new file mode 100644
index 000000000..58041fb5e
--- /dev/null
+++ b/docs/doc_examples/b0d3f839237fabf8cdc2221734c668ad.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "items",
+ id: 1,
+ refresh: "true",
+ document: {
+ name: "chocolate",
+ production_date: "2018-02-01",
+ location: [-71.34, 41.12],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "items",
+ id: 2,
+ refresh: "true",
+ document: {
+ name: "chocolate",
+ production_date: "2018-01-01",
+ location: [-71.3, 41.15],
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "items",
+ id: 3,
+ refresh: "true",
+ document: {
+ name: "chocolate",
+ production_date: "2017-12-01",
+ location: [-71.3, 41.12],
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc b/docs/doc_examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc
new file mode 100644
index 000000000..a3b9fd534
--- /dev/null
+++ b/docs/doc_examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ dis_max: {
+ queries: [
+ {
+ match: {
+ subject: "brown fox",
+ },
+ },
+ {
+ match: {
+ message: "brown fox",
+ },
+ },
+ ],
+ tie_breaker: 0.3,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc b/docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc
new file mode 100644
index 000000000..abe2a362d
--- /dev/null
+++ b/docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "geoip",
+ description: "Add ip geolocation info",
+ processors: [
+ {
+ geoip: {
+ field: "ip",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "geoip",
+ document: {
+ ip: "89.160.20.128",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc b/docs/doc_examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc
new file mode 100644
index 000000000..8c4ef9868
--- /dev/null
+++ b/docs/doc_examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 1,
+ document: {
+ counter: 1,
+ tags: ["red"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc b/docs/doc_examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc
new file mode 100644
index 000000000..4137f344f
--- /dev/null
+++ b/docs/doc_examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.cancel({
+ task_id: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b109d0141ec8a0aed5d3805abc349a20.asciidoc b/docs/doc_examples/b109d0141ec8a0aed5d3805abc349a20.asciidoc
new file mode 100644
index 000000000..5a3bb37ba
--- /dev/null
+++ b/docs/doc_examples/b109d0141ec8a0aed5d3805abc349a20.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movavg: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.linearWeightedAvg(values)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b11a0675e49df0709be693297ca73a2c.asciidoc b/docs/doc_examples/b11a0675e49df0709be693297ca73a2c.asciidoc
new file mode 100644
index 000000000..85c89bc6f
--- /dev/null
+++ b/docs/doc_examples/b11a0675e49df0709be693297ca73a2c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.xpack.info({
+ categories: "build,features",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b14122481ae1f158f1a9a1bfbc4a41b1.asciidoc b/docs/doc_examples/b14122481ae1f158f1a9a1bfbc4a41b1.asciidoc
new file mode 100644
index 000000000..09bd844ad
--- /dev/null
+++ b/docs/doc_examples/b14122481ae1f158f1a9a1bfbc4a41b1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.reloadSecureSettings({
+ secure_settings_password: "keystore-password",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b16700002af3aa70639f3e88c733bf35.asciidoc b/docs/doc_examples/b16700002af3aa70639f3e88c733bf35.asciidoc
new file mode 100644
index 000000000..87a17c886
--- /dev/null
+++ b/docs/doc_examples/b16700002af3aa70639f3e88c733bf35.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.openPointInTime({
+ index: "my-index-000001",
+ keep_alive: "1m",
+ allow_partial_search_results: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b17143780e9904bfc1e1c53436497fa1.asciidoc b/docs/doc_examples/b17143780e9904bfc1e1c53436497fa1.asciidoc
new file mode 100644
index 000000000..91bbd6972
--- /dev/null
+++ b/docs/doc_examples/b17143780e9904bfc1e1c53436497fa1.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ wait_for_completion_timeout: "2s",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b176e0d428726705298184ef39ad5cb2.asciidoc b/docs/doc_examples/b176e0d428726705298184ef39ad5cb2.asciidoc
new file mode 100644
index 000000000..06c244807
--- /dev/null
+++ b/docs/doc_examples/b176e0d428726705298184ef39ad5cb2.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping2",
+ roles: ["user", "admin"],
+ enabled: true,
+ rules: {
+ field: {
+ username: ["esadmin01", "esadmin02"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b195068563b1dc0f721f5f8c8d172312.asciidoc b/docs/doc_examples/b195068563b1dc0f721f5f8c8d172312.asciidoc
new file mode 100644
index 000000000..894dc8c79
--- /dev/null
+++ b/docs/doc_examples/b195068563b1dc0f721f5f8c8d172312.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: "MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b1ee1b0b5f7af596e5f81743cfd3755f.asciidoc b/docs/doc_examples/b1ee1b0b5f7af596e5f81743cfd3755f.asciidoc
new file mode 100644
index 000000000..58a34e6ca
--- /dev/null
+++ b/docs/doc_examples/b1ee1b0b5f7af596e5f81743cfd3755f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: ",,",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc b/docs/doc_examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc
new file mode 100644
index 000000000..096b0c769
--- /dev/null
+++ b/docs/doc_examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "source",
+ },
+ dest: {
+ index: "dest",
+ pipeline: "some_ingest_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b1f7cb4157b13368373383abd7d2b8cb.asciidoc b/docs/doc_examples/b1f7cb4157b13368373383abd7d2b8cb.asciidoc
new file mode 100644
index 000000000..0243ebab2
--- /dev/null
+++ b/docs/doc_examples/b1f7cb4157b13368373383abd7d2b8cb.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ cluster_two: {
+ "transport.compress": false,
+ },
+ cluster_three: {
+ "transport.compress": true,
+ "transport.ping_schedule": "60s",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b22559a7c319f90bc63a41cac1c39b4c.asciidoc b/docs/doc_examples/b22559a7c319f90bc63a41cac1c39b4c.asciidoc
new file mode 100644
index 000000000..2ec43a9b9
--- /dev/null
+++ b/docs/doc_examples/b22559a7c319f90bc63a41cac1c39b4c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ ids: ["VuaCfGcBCdbkQm-e5aOx"],
+ owner: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b23ed357dce8ec0014708b7b2850a8fb.asciidoc b/docs/doc_examples/b23ed357dce8ec0014708b7b2850a8fb.asciidoc
new file mode 100644
index 000000000..cbb851c0f
--- /dev/null
+++ b/docs/doc_examples/b23ed357dce8ec0014708b7b2850a8fb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.tasks({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b2440b492149b705ef107137fdccb0c2.asciidoc b/docs/doc_examples/b2440b492149b705ef107137fdccb0c2.asciidoc
new file mode 100644
index 000000000..86f16baba
--- /dev/null
+++ b/docs/doc_examples/b2440b492149b705ef107137fdccb0c2.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.followInfo({
+ index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b24a374c0ad264abbcacb5686f5ed61c.asciidoc b/docs/doc_examples/b24a374c0ad264abbcacb5686f5ed61c.asciidoc
new file mode 100644
index 000000000..4d4945469
--- /dev/null
+++ b/docs/doc_examples/b24a374c0ad264abbcacb5686f5ed61c.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "text_payloads",
+ id: 1,
+ fields: ["text"],
+ payloads: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b25256ed615cd837461b0bfa590526b7.asciidoc b/docs/doc_examples/b25256ed615cd837461b0bfa590526b7.asciidoc
new file mode 100644
index 000000000..9def5bea5
--- /dev/null
+++ b/docs/doc_examples/b25256ed615cd837461b0bfa590526b7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.pauseAutoFollowPattern({
+ name: "my_auto_follow_pattern",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b2652b1763a5fd31e95c983869b433bd.asciidoc b/docs/doc_examples/b2652b1763a5fd31e95c983869b433bd.asciidoc
new file mode 100644
index 000000000..5e97578d6
--- /dev/null
+++ b/docs/doc_examples/b2652b1763a5fd31e95c983869b433bd.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "metrics_index",
+ id: 1,
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ aggs: {
+ avg_latency: {
+ avg: {
+ field: "latency_histo",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b2b26f8568c5dba7649e79f09b859272.asciidoc b/docs/doc_examples/b2b26f8568c5dba7649e79f09b859272.asciidoc
new file mode 100644
index 000000000..461b239ec
--- /dev/null
+++ b/docs/doc_examples/b2b26f8568c5dba7649e79f09b859272.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "saml-service-user",
+ password: "",
+ roles: ["saml-service-role"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b2dec193082462c775169db438308bc3.asciidoc b/docs/doc_examples/b2dec193082462c775169db438308bc3.asciidoc
new file mode 100644
index 000000000..99396dabc
--- /dev/null
+++ b/docs/doc_examples/b2dec193082462c775169db438308bc3.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote-replication",
+ cluster: ["read_ccr"],
+ indices: [
+ {
+ names: ["leader-index-name"],
+ privileges: ["monitor", "read"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc b/docs/doc_examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc
new file mode 100644
index 000000000..3b6862fdc
--- /dev/null
+++ b/docs/doc_examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ document: {
+ "@timestamp": "2099-11-15T13:12:00",
+ message: "GET /search HTTP/1.1 200 1070000",
+ user: {
+ id: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b2e20bca1846d7d584626b12eae9f6dc.asciidoc b/docs/doc_examples/b2e20bca1846d7d584626b12eae9f6dc.asciidoc
new file mode 100644
index 000000000..c48370b26
--- /dev/null
+++ b/docs/doc_examples/b2e20bca1846d7d584626b12eae9f6dc.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ h: "name,node.role,disk.used_percent,disk.used,disk.avail,disk.total",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc b/docs/doc_examples/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc
new file mode 100644
index 000000000..afabda5ab
--- /dev/null
+++ b/docs/doc_examples/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index",
+ settings: {
+ "index.routing.allocation.require.data": null,
+ "index.routing.allocation.include._tier_preference": "data_hot",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b3479ee4586c15020549afae58d94d65.asciidoc b/docs/doc_examples/b3479ee4586c15020549afae58d94d65.asciidoc
new file mode 100644
index 000000000..68cc5ab9c
--- /dev/null
+++ b/docs/doc_examples/b3479ee4586c15020549afae58d94d65.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ point: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ point: [
+ {
+ lat: -90,
+ lon: -80,
+ },
+ {
+ lat: 10,
+ lon: 30,
+ },
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b3623b8c7f3e7650f52b6fb8b050f583.asciidoc b/docs/doc_examples/b3623b8c7f3e7650f52b6fb8b050f583.asciidoc
new file mode 100644
index 000000000..2f0e298e1
--- /dev/null
+++ b/docs/doc_examples/b3623b8c7f3e7650f52b6fb8b050f583.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.features.getFeatures();
+console.log(response);
+----
diff --git a/docs/doc_examples/b3685560cb328f179d96ffe7c2668f72.asciidoc b/docs/doc_examples/b3685560cb328f179d96ffe7c2668f72.asciidoc
new file mode 100644
index 000000000..1e269e68b
--- /dev/null
+++ b/docs/doc_examples/b3685560cb328f179d96ffe7c2668f72.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movavg: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script:
+ "if (values.length > 5*2) {MovingFunctions.holtWinters(values, 0.3, 0.1, 0.1, 5, false)}",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc b/docs/doc_examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc
new file mode 100644
index 000000000..8d51c8bb6
--- /dev/null
+++ b/docs/doc_examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "DELETE",
+ path: "/_internal/desired_balance",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b37919cc438b47477343833b4e522408.asciidoc b/docs/doc_examples/b37919cc438b47477343833b4e522408.asciidoc
new file mode 100644
index 000000000..111b4f7a6
--- /dev/null
+++ b/docs/doc_examples/b37919cc438b47477343833b4e522408.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "imdb",
+ doc: {
+ plot: "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.",
+ },
+ term_statistics: true,
+ field_statistics: true,
+ positions: false,
+ offsets: false,
+ filter: {
+ max_num_terms: 3,
+ min_term_freq: 1,
+ min_doc_freq: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b3a1c4220617ded67ed43fff2051d324.asciidoc b/docs/doc_examples/b3a1c4220617ded67ed43fff2051d324.asciidoc
new file mode 100644
index 000000000..b0861175a
--- /dev/null
+++ b/docs/doc_examples/b3a1c4220617ded67ed43fff2051d324.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ tags: {
+ type: "keyword",
+ eager_global_ordinals: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b3a711c3deddcdb8a3f6623184a8b794.asciidoc b/docs/doc_examples/b3a711c3deddcdb8a3f6623184a8b794.asciidoc
new file mode 100644
index 000000000..89cd2af13
--- /dev/null
+++ b/docs/doc_examples/b3a711c3deddcdb8a3f6623184a8b794.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: {
+ source: "ctx._source.counter += params.count",
+ lang: "painless",
+ params: {
+ count: 4,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b3cd07f02059165fd62a2f148be3dc58.asciidoc b/docs/doc_examples/b3cd07f02059165fd62a2f148be3dc58.asciidoc
new file mode 100644
index 000000000..98b1807e4
--- /dev/null
+++ b/docs/doc_examples/b3cd07f02059165fd62a2f148be3dc58.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ long: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ long: [0, 0, -123466, 87612],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b3ed567d2c0915a280b6b15f7a37539b.asciidoc b/docs/doc_examples/b3ed567d2c0915a280b6b15f7a37539b.asciidoc
new file mode 100644
index 000000000..184318927
--- /dev/null
+++ b/docs/doc_examples/b3ed567d2c0915a280b6b15f7a37539b.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ percentiles_monthly_sales: {
+ percentiles_bucket: {
+ buckets_path: "sales_per_month>sales",
+ percents: [25, 50, 75],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b3f442a7d9eb391121dcab991787f9d6.asciidoc b/docs/doc_examples/b3f442a7d9eb391121dcab991787f9d6.asciidoc
new file mode 100644
index 000000000..15dcc7ae9
--- /dev/null
+++ b/docs/doc_examples/b3f442a7d9eb391121dcab991787f9d6.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ binary: {
+ type: "binary",
+ doc_values: true,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ binary: ["IAA=", "EAA="],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b3fffd96fdb118cd059b5f1d67d928de.asciidoc b/docs/doc_examples/b3fffd96fdb118cd059b5f1d67d928de.asciidoc
new file mode 100644
index 000000000..02f50769a
--- /dev/null
+++ b/docs/doc_examples/b3fffd96fdb118cd059b5f1d67d928de.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "MultiPoint",
+ coordinates: [
+ [102, 2],
+ [103, 2],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b42e7d627cd79e4c5e7a4a3cd8b19ce0.asciidoc b/docs/doc_examples/b42e7d627cd79e4c5e7a4a3cd8b19ce0.asciidoc
new file mode 100644
index 000000000..2709e0881
--- /dev/null
+++ b/docs/doc_examples/b42e7d627cd79e4c5e7a4a3cd8b19ce0.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "one-pipeline-to-rule-them-all",
+ processors: [
+ {
+ pipeline: {
+ description:
+ "If 'service.name' is 'apache_httpd', use 'httpd_pipeline'",
+ if: "ctx.service?.name == 'apache_httpd'",
+ name: "httpd_pipeline",
+ },
+ },
+ {
+ pipeline: {
+ description: "If 'service.name' is 'syslog', use 'syslog_pipeline'",
+ if: "ctx.service?.name == 'syslog'",
+ name: "syslog_pipeline",
+ },
+ },
+ {
+ fail: {
+ description:
+ "If 'service.name' is not 'apache_httpd' or 'syslog', return a failure message",
+ if: "ctx.service?.name != 'apache_httpd' && ctx.service?.name != 'syslog'",
+ message:
+ "This pipeline requires service.name to be either `syslog` or `apache_httpd`",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b430122345d560bbd2a77826f5c475f7.asciidoc b/docs/doc_examples/b430122345d560bbd2a77826f5c475f7.asciidoc
new file mode 100644
index 000000000..3d767067b
--- /dev/null
+++ b/docs/doc_examples/b430122345d560bbd2a77826f5c475f7.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ ip_fields: {
+ match: ["ip_*", "*_ip"],
+ unmatch: ["one*", "*two"],
+ mapping: {
+ type: "ip",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index",
+ id: 1,
+ document: {
+ one_ip: "will not match",
+ ip_two: "will not match",
+ three_ip: "12.12.12.12",
+ ip_four: "13.13.13.13",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc b/docs/doc_examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc
new file mode 100644
index 000000000..876b182d2
--- /dev/null
+++ b/docs/doc_examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.inference({
+ task_type: "completion",
+ inference_id: "openai_chat_completions",
+ input: "What is Elastic?",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b45c60f908b329835ab40609423f378e.asciidoc b/docs/doc_examples/b45c60f908b329835ab40609423f378e.asciidoc
new file mode 100644
index 000000000..d97a8f4a6
--- /dev/null
+++ b/docs/doc_examples/b45c60f908b329835ab40609423f378e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ h: "node.role",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4693f2aa9fa65db04ab2499355c54fc.asciidoc b/docs/doc_examples/b4693f2aa9fa65db04ab2499355c54fc.asciidoc
new file mode 100644
index 000000000..aef48d3ba
--- /dev/null
+++ b/docs/doc_examples/b4693f2aa9fa65db04ab2499355c54fc.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cohere-embeddings",
+ knn: {
+ field: "content_embedding",
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "cohere_embeddings",
+ model_text: "Muscles in human body",
+ },
+ },
+ k: 10,
+ num_candidates: 100,
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b47945c7db8868dd36ba079b742f2a90.asciidoc b/docs/doc_examples/b47945c7db8868dd36ba079b742f2a90.asciidoc
new file mode 100644
index 000000000..5ab2dad91
--- /dev/null
+++ b/docs/doc_examples/b47945c7db8868dd36ba079b742f2a90.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my-app",
+ params: {
+ default_field: "author",
+ query_string: "Jane",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4946ecc9101b97102a1c5bcb19e5607.asciidoc b/docs/doc_examples/b4946ecc9101b97102a1c5bcb19e5607.asciidoc
new file mode 100644
index 000000000..2bda8fc41
--- /dev/null
+++ b/docs/doc_examples/b4946ecc9101b97102a1c5bcb19e5607.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source:
+ '{ "query": { "bool": { "filter": [ {{#year_scope}} { "range": { "@timestamp": { "gte": "now-1y/d", "lt": "now/d" } } }, {{/year_scope}} { "term": { "user.id": "{{user_id}}" }}]}}}',
+ params: {
+ year_scope: true,
+ user_id: "kimchy",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4aec2a1d353852507c091bdb629b765.asciidoc b/docs/doc_examples/b4aec2a1d353852507c091bdb629b765.asciidoc
new file mode 100644
index 000000000..0840b621e
--- /dev/null
+++ b/docs/doc_examples/b4aec2a1d353852507c091bdb629b765.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putFilter({
+ filter_id: "safe_domains",
+ description: "A list of safe domains",
+ items: ["*.google.com", "wikipedia.org"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc b/docs/doc_examples/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc
new file mode 100644
index 000000000..77651c802
--- /dev/null
+++ b/docs/doc_examples/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_multi: {
+ match: {
+ prefix: {
+ "user.id": {
+ value: "ki",
+ boost: 1.08,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4d9d5017d42f27281e734e969949623.asciidoc b/docs/doc_examples/b4d9d5017d42f27281e734e969949623.asciidoc
new file mode 100644
index 000000000..6e8f104ef
--- /dev/null
+++ b/docs/doc_examples/b4d9d5017d42f27281e734e969949623.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.getRepository({
+ name: "my-repo",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4da132cb934c33d61e2b60988c6d4a3.asciidoc b/docs/doc_examples/b4da132cb934c33d61e2b60988c6d4a3.asciidoc
new file mode 100644
index 000000000..6e6b62677
--- /dev/null
+++ b/docs/doc_examples/b4da132cb934c33d61e2b60988c6d4a3.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "day",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "lemmings",
+ },
+ },
+ thirtieth_difference: {
+ serial_diff: {
+ buckets_path: "the_sum",
+ lag: 30,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b4f3165e873f551fbaa03945877eb370.asciidoc b/docs/doc_examples/b4f3165e873f551fbaa03945877eb370.asciidoc
new file mode 100644
index 000000000..604cc5327
--- /dev/null
+++ b/docs/doc_examples/b4f3165e873f551fbaa03945877eb370.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_date_formats: ["yyyy/MM", "MM/dd/yyyy"],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ create_date: "09/25/2015",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b4f4c9ad3301c97fb3c38d108a3bc453.asciidoc b/docs/doc_examples/b4f4c9ad3301c97fb3c38d108a3bc453.asciidoc
new file mode 100644
index 000000000..60c5ddca6
--- /dev/null
+++ b/docs/doc_examples/b4f4c9ad3301c97fb3c38d108a3bc453.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ cluster_one: {
+ seeds: ["127.0.0.1:{remote-interface-default-port}"],
+ },
+ cluster_two: {
+ mode: "sniff",
+ seeds: ["127.0.0.1:{remote-interface-default-port-plus1}"],
+ "transport.compress": true,
+ skip_unavailable: true,
+ },
+ cluster_three: {
+ mode: "proxy",
+ proxy_address: "127.0.0.1:{remote-interface-default-port-plus2}",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b504119238b44cddd3b5944da20a498d.asciidoc b/docs/doc_examples/b504119238b44cddd3b5944da20a498d.asciidoc
new file mode 100644
index 000000000..858440978
--- /dev/null
+++ b/docs/doc_examples/b504119238b44cddd3b5944da20a498d.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b515427f8685ca7d79176def672d19fa.asciidoc b/docs/doc_examples/b515427f8685ca7d79176def672d19fa.asciidoc
new file mode 100644
index 000000000..6d63883b0
--- /dev/null
+++ b/docs/doc_examples/b515427f8685ca7d79176def672d19fa.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.refresh();
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ q: "extra:test",
+ filter_path: "hits.total",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc b/docs/doc_examples/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc
new file mode 100644
index 000000000..869f73861
--- /dev/null
+++ b/docs/doc_examples/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ wildcard: {
+ "user.id": {
+ value: "ki*y",
+ boost: 1,
+ rewrite: "constant_score_blended",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b557f114e21dbc6f531d4e7621a08e8f.asciidoc b/docs/doc_examples/b557f114e21dbc6f531d4e7621a08e8f.asciidoc
new file mode 100644
index 000000000..052d3a53f
--- /dev/null
+++ b/docs/doc_examples/b557f114e21dbc6f531d4e7621a08e8f.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "logs",
+ mappings: {
+ _source: {
+ includes: ["*.count", "meta.*"],
+ excludes: ["meta.description", "meta.other.*"],
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "logs",
+ id: 1,
+ document: {
+ requests: {
+ count: 10,
+ foo: "bar",
+ },
+ meta: {
+ name: "Some metric",
+ description: "Some metric description",
+ other: {
+ foo: "one",
+ baz: "two",
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "logs",
+ query: {
+ match: {
+ "meta.other.foo": "one",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b573e893de0d5f92d67f4f5eb7f0c353.asciidoc b/docs/doc_examples/b573e893de0d5f92d67f4f5eb7f0c353.asciidoc
new file mode 100644
index 000000000..64bf78362
--- /dev/null
+++ b/docs/doc_examples/b573e893de0d5f92d67f4f5eb7f0c353.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ stats_monthly_sales: {
+ stats_bucket: {
+ buckets_path: "sales_per_month>sales",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc b/docs/doc_examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc
new file mode 100644
index 000000000..17ee6fcc0
--- /dev/null
+++ b/docs/doc_examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "template_1",
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ aliases: {
+ alias1: {},
+ alias2: {
+ filter: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ routing: "shard-1",
+ },
+ "{index}-alias": {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b58b17975bbce307b2ccce5051a449e8.asciidoc b/docs/doc_examples/b58b17975bbce307b2ccce5051a449e8.asciidoc
new file mode 100644
index 000000000..6276393a4
--- /dev/null
+++ b/docs/doc_examples/b58b17975bbce307b2ccce5051a449e8.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ filter_path: "hits.total",
+ query: {
+ range: {
+ "http.response.bytes": {
+ lt: 2000000,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc b/docs/doc_examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc
new file mode 100644
index 000000000..1e2a0ed25
--- /dev/null
+++ b/docs/doc_examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.putJob({
+ id: "sensor2",
+ index_pattern: "sensor-*",
+ rollup_index: "sensor_rollup",
+ cron: "*/30 * * * * ?",
+ page_size: 1000,
+ groups: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "1h",
+ delay: "7d",
+ },
+ terms: {
+ fields: ["node"],
+ },
+ },
+ metrics: [
+ {
+ field: "temperature",
+ metrics: ["min", "max", "sum"],
+ },
+ {
+ field: "voltage",
+ metrics: ["avg"],
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.rollup.getJobs({
+ id: "_all",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b5e5cd4eccc40d7c5f2a1fcb654bd4a4.asciidoc b/docs/doc_examples/b5e5cd4eccc40d7c5f2a1fcb654bd4a4.asciidoc
new file mode 100644
index 000000000..b346dff5b
--- /dev/null
+++ b/docs/doc_examples/b5e5cd4eccc40d7c5f2a1fcb654bd4a4.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "stackoverflow",
+ size: 0,
+ query: {
+ query_string: {
+ query: "tags:elasticsearch",
+ },
+ },
+ aggs: {
+ my_unbiased_sample: {
+ diversified_sampler: {
+ shard_size: 200,
+ field: "author",
+ },
+ aggs: {
+ keywords: {
+ significant_terms: {
+ field: "tags",
+ exclude: ["elasticsearch"],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b601bc78fb69e15a42e0783219ddc38d.asciidoc b/docs/doc_examples/b601bc78fb69e15a42e0783219ddc38d.asciidoc
new file mode 100644
index 000000000..4f33f0da1
--- /dev/null
+++ b/docs/doc_examples/b601bc78fb69e15a42e0783219ddc38d.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ max_monthly_sales: {
+ max_bucket: {
+ buckets_path: "sales_per_month>sales",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc b/docs/doc_examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc
new file mode 100644
index 000000000..34e45f1b9
--- /dev/null
+++ b/docs/doc_examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ price: {
+ missing: "_last",
+ },
+ },
+ ],
+ query: {
+ term: {
+ product: "chocolate",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b61afb7ca29a11243232ffcc8b5a43cf.asciidoc b/docs/doc_examples/b61afb7ca29a11243232ffcc8b5a43cf.asciidoc
new file mode 100644
index 000000000..c872c534b
--- /dev/null
+++ b/docs/doc_examples/b61afb7ca29a11243232ffcc8b5a43cf.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "publications",
+ fields: "a*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b620ef4400d2f660fe2c67835938442c.asciidoc b/docs/doc_examples/b620ef4400d2f660fe2c67835938442c.asciidoc
new file mode 100644
index 000000000..d756cff94
--- /dev/null
+++ b/docs/doc_examples/b620ef4400d2f660fe2c67835938442c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.deleteAutoscalingPolicy({
+ name: "my_autoscaling_policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc b/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc
new file mode 100644
index 000000000..30687161f
--- /dev/null
+++ b/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc
@@ -0,0 +1,217 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized",
+ },
+ {
+ index: {
+ _index: "test-logs",
+ },
+ },
+ {
+ message:
+ "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...",
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.textStructure.findFieldStructure({
+ index: "test-logs",
+ field: "message",
+ body: null,
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b638e11d6a8a084290f8934d224abd52.asciidoc b/docs/doc_examples/b638e11d6a8a084290f8934d224abd52.asciidoc
new file mode 100644
index 000000000..9e193f94e
--- /dev/null
+++ b/docs/doc_examples/b638e11d6a8a084290f8934d224abd52.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.max_shards_per_node.frozen": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b63ce79ce4fa1bb9b99a789f4dcfef4e.asciidoc b/docs/doc_examples/b63ce79ce4fa1bb9b99a789f4dcfef4e.asciidoc
new file mode 100644
index 000000000..d787e9a7f
--- /dev/null
+++ b/docs/doc_examples/b63ce79ce4fa1bb9b99a789f4dcfef4e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "test",
+ settings: {
+ top_metrics_max_size: 100,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b65dbb51ddd496189c65a9326a53480c.asciidoc b/docs/doc_examples/b65dbb51ddd496189c65a9326a53480c.asciidoc
new file mode 100644
index 000000000..cd9fd0281
--- /dev/null
+++ b/docs/doc_examples/b65dbb51ddd496189c65a9326a53480c.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_read_only_url_repository",
+ repository: {
+ type: "url",
+ settings: {
+ url: "file:/mount/backups/my_fs_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b66be1daf6c220eb66d94e708b2fae39.asciidoc b/docs/doc_examples/b66be1daf6c220eb66d94e708b2fae39.asciidoc
new file mode 100644
index 000000000..47fff6913
--- /dev/null
+++ b/docs/doc_examples/b66be1daf6c220eb66d94e708b2fae39.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.state({
+ metric: "metadata,routing_table",
+ index: "foo,bar",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b67fa8c560dd10a8e6f226048cd21562.asciidoc b/docs/doc_examples/b67fa8c560dd10a8e6f226048cd21562.asciidoc
new file mode 100644
index 000000000..3bd3fc327
--- /dev/null
+++ b/docs/doc_examples/b67fa8c560dd10a8e6f226048cd21562.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: '{ "query": { "bool": { "must": {{#toJson}}clauses{{/toJson}} }}}',
+ params: {
+ clauses: [
+ {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ {
+ term: {
+ "url.domain": "example.com",
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b68ed7037042719945a2452d23e64c78.asciidoc b/docs/doc_examples/b68ed7037042719945a2452d23e64c78.asciidoc
new file mode 100644
index 000000000..8ec894868
--- /dev/null
+++ b/docs/doc_examples/b68ed7037042719945a2452d23e64c78.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ refresh: "true",
+ document: {
+ query: {
+ match: {
+ message: "brown fox",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b691d41f84b5b46e9051b51db22a46af.asciidoc b/docs/doc_examples/b691d41f84b5b46e9051b51db22a46af.asciidoc
new file mode 100644
index 000000000..e026fbdb7
--- /dev/null
+++ b/docs/doc_examples/b691d41f84b5b46e9051b51db22a46af.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ rare_terms: {
+ field: "genre",
+ include: ["swing", "rock"],
+ exclude: ["jazz"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc b/docs/doc_examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc
new file mode 100644
index 000000000..363f0407f
--- /dev/null
+++ b/docs/doc_examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings({
+ filter_path: "persistent.cluster.remote",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc b/docs/doc_examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc
new file mode 100644
index 000000000..c0ceba90e
--- /dev/null
+++ b/docs/doc_examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ bool: {
+ should: [
+ {
+ sparse_vector: {
+ field: "content_embedding",
+ inference_id: "my-elser-endpoint",
+ query: "How to avoid muscle soreness after running?",
+ boost: 1,
+ },
+ },
+ {
+ query_string: {
+ query: "toxins",
+ boost: 4,
+ },
+ },
+ ],
+ },
+ },
+ min_score: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc b/docs/doc_examples/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc
new file mode 100644
index 000000000..0d1ab73b0
--- /dev/null
+++ b/docs/doc_examples/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ tags: {
+ terms: {
+ field: "tags",
+ min_doc_count: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b6e29a0e14b611d4aaafb3051220ea56.asciidoc b/docs/doc_examples/b6e29a0e14b611d4aaafb3051220ea56.asciidoc
new file mode 100644
index 000000000..e7faa2968
--- /dev/null
+++ b/docs/doc_examples/b6e29a0e14b611d4aaafb3051220ea56.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ analyzer: "whitespace",
+ search_analyzer: "simple",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b6e385760e036e36827f719b540d9c11.asciidoc b/docs/doc_examples/b6e385760e036e36827f719b540d9c11.asciidoc
new file mode 100644
index 000000000..55fd2549a
--- /dev/null
+++ b/docs/doc_examples/b6e385760e036e36827f719b540d9c11.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-dfs-index",
+ search_type: "dfs_query_then_fetch",
+ pretty: "true",
+ size: 0,
+ profile: true,
+ query: {
+ term: {
+ "my-keyword": {
+ value: "a",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc b/docs/doc_examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc
new file mode 100644
index 000000000..bddd8cdb6
--- /dev/null
+++ b/docs/doc_examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-byte-quantized-index",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 4,
+ index: true,
+ index_options: {
+ type: "int4_hnsw",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b717a583b5165e5c6caafc42fdfd9086.asciidoc b/docs/doc_examples/b717a583b5165e5c6caafc42fdfd9086.asciidoc
new file mode 100644
index 000000000..7f2287489
--- /dev/null
+++ b/docs/doc_examples/b717a583b5165e5c6caafc42fdfd9086.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "places",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "places",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ name: "NEMO Science Museum",
+ geometry: "POINT(491.2350 5237.4081)",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ name: "Sportpark De Weeren",
+ geometry: {
+ type: "Polygon",
+ coordinates: [
+ [
+ [496.5305328369141, 5239.347642069457],
+ [496.6979026794433, 5239.172175893484],
+ [496.9425201416015, 5239.238958618537],
+ [496.7944622039794, 5239.420969150824],
+ [496.5305328369141, 5239.347642069457],
+ ],
+ ],
+ },
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "places",
+ size: 0,
+ aggs: {
+ viewport: {
+ cartesian_bounds: {
+ field: "geometry",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b724f547c5d67e95bbc0a9920e47033c.asciidoc b/docs/doc_examples/b724f547c5d67e95bbc0a9920e47033c.asciidoc
new file mode 100644
index 000000000..d283de54e
--- /dev/null
+++ b/docs/doc_examples/b724f547c5d67e95bbc0a9920e47033c.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "file-path-test",
+ query: {
+ term: {
+ "file_path.tree": "/User/alice/photos/2017/05/16",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc b/docs/doc_examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc
new file mode 100644
index 000000000..9138df541
--- /dev/null
+++ b/docs/doc_examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.allocation({
+ v: "true",
+ h: "node,shards,disk.*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7a4f5b9a93eff44268a1ee38ee1c6d3.asciidoc b/docs/doc_examples/b7a4f5b9a93eff44268a1ee38ee1c6d3.asciidoc
new file mode 100644
index 000000000..e911c937e
--- /dev/null
+++ b/docs/doc_examples/b7a4f5b9a93eff44268a1ee38ee1c6d3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "archive",
+ },
+ dest: {
+ index: "my-data-stream",
+ op_type: "create",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc b/docs/doc_examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc
new file mode 100644
index 000000000..4674047c2
--- /dev/null
+++ b/docs/doc_examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "logger.org.elasticsearch.discovery": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7ad394975863a8f5ee29627c3ab738b.asciidoc b/docs/doc_examples/b7ad394975863a8f5ee29627c3ab738b.asciidoc
new file mode 100644
index 000000000..9f14e1098
--- /dev/null
+++ b/docs/doc_examples/b7ad394975863a8f5ee29627c3ab738b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ prices: {
+ histogram: {
+ field: "price",
+ interval: 50,
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7bb5503e64bd869b2ac1c46c434a079.asciidoc b/docs/doc_examples/b7bb5503e64bd869b2ac1c46c434a079.asciidoc
new file mode 100644
index 000000000..b560ec837
--- /dev/null
+++ b/docs/doc_examples/b7bb5503e64bd869b2ac1c46c434a079.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ histo: {
+ histogram: {
+ field: "price",
+ interval: 5,
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7c99eb38d4b37e22de1ffcb0e88ae4c.asciidoc b/docs/doc_examples/b7c99eb38d4b37e22de1ffcb0e88ae4c.asciidoc
new file mode 100644
index 000000000..d82a47006
--- /dev/null
+++ b/docs/doc_examples/b7c99eb38d4b37e22de1ffcb0e88ae4c.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ message: "A new bonsai tree in the office",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc b/docs/doc_examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc
new file mode 100644
index 000000000..0bb694919
--- /dev/null
+++ b/docs/doc_examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.health({
+ filter_path: "status,*_shards",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b7f8bd33c22f3c93336ab57c2e091f73.asciidoc b/docs/doc_examples/b7f8bd33c22f3c93336ab57c2e091f73.asciidoc
new file mode 100644
index 000000000..a89aac295
--- /dev/null
+++ b/docs/doc_examples/b7f8bd33c22f3c93336ab57c2e091f73.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "DELETE",
+ path: "/_query_rules/my-ruleset/_rule/my-rule1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b80e1f5b26bae4f3c2f8a604b7caaf17.asciidoc b/docs/doc_examples/b80e1f5b26bae4f3c2f8a604b7caaf17.asciidoc
new file mode 100644
index 000000000..55e88724b
--- /dev/null
+++ b/docs/doc_examples/b80e1f5b26bae4f3c2f8a604b7caaf17.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping7",
+ roles: ["ldap-example-user"],
+ enabled: true,
+ rules: {
+ all: [
+ {
+ field: {
+ dn: "*,ou=subtree,dc=example,dc=com",
+ },
+ },
+ {
+ field: {
+ "realm.name": "ldap1",
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b81a7b5f5ef19553f9cd49196f31018c.asciidoc b/docs/doc_examples/b81a7b5f5ef19553f9cd49196f31018c.asciidoc
new file mode 100644
index 000000000..e7be5898e
--- /dev/null
+++ b/docs/doc_examples/b81a7b5f5ef19553f9cd49196f31018c.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "items",
+ mappings: {
+ properties: {
+ name: {
+ type: "keyword",
+ },
+ production_date: {
+ type: "date",
+ },
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b82b156c7b9d1d78054577a6947a6cdd.asciidoc b/docs/doc_examples/b82b156c7b9d1d78054577a6947a6cdd.asciidoc
new file mode 100644
index 000000000..8eb0ebc1a
--- /dev/null
+++ b/docs/doc_examples/b82b156c7b9d1d78054577a6947a6cdd.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "geocells",
+ id: 1,
+ pipeline: "geotile2shape",
+ document: {
+ geocell: "4/8/5",
+ },
+});
+console.log(response);
+
+const response1 = await client.get({
+ index: "geocells",
+ id: 1,
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b839f79a5d58506baed5714f1876ab55.asciidoc b/docs/doc_examples/b839f79a5d58506baed5714f1876ab55.asciidoc
new file mode 100644
index 000000000..6a88cfba7
--- /dev/null
+++ b/docs/doc_examples/b839f79a5d58506baed5714f1876ab55.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query: '\n process where process.name == "regsvr32.exe"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b8400dbe39215705060500f0e569f452.asciidoc b/docs/doc_examples/b8400dbe39215705060500f0e569f452.asciidoc
new file mode 100644
index 000000000..efd531967
--- /dev/null
+++ b/docs/doc_examples/b8400dbe39215705060500f0e569f452.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.get({
+ connector_id: "my-connector-id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b84932030e60a2cd58884b9dc6d3147f.asciidoc b/docs/doc_examples/b84932030e60a2cd58884b9dc6d3147f.asciidoc
new file mode 100644
index 000000000..51159b730
--- /dev/null
+++ b/docs/doc_examples/b84932030e60a2cd58884b9dc6d3147f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.search({
+ name: "my_search_application",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b85716ba42a57096452665c38995da7d.asciidoc b/docs/doc_examples/b85716ba42a57096452665c38995da7d.asciidoc
new file mode 100644
index 000000000..71f3584f3
--- /dev/null
+++ b/docs/doc_examples/b85716ba42a57096452665c38995da7d.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.previewDataFrameAnalytics({
+ config: {
+ source: {
+ index: "houses_sold_last_10_yrs",
+ },
+ analysis: {
+ regression: {
+ dependent_variable: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b857abedc64e367def172bd07075e5c7.asciidoc b/docs/doc_examples/b857abedc64e367def172bd07075e5c7.asciidoc
new file mode 100644
index 000000000..b4250ac7a
--- /dev/null
+++ b/docs/doc_examples/b857abedc64e367def172bd07075e5c7.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_fingerprint_analyzer: {
+ type: "fingerprint",
+ stopwords: "_english_",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_fingerprint_analyzer",
+ text: "Yes yes, Gödel said this sentence is consistent and.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/b87438263ccd68624b1d69d8750f9432.asciidoc b/docs/doc_examples/b87438263ccd68624b1d69d8750f9432.asciidoc
new file mode 100644
index 000000000..ded6c67e6
--- /dev/null
+++ b/docs/doc_examples/b87438263ccd68624b1d69d8750f9432.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ status_code: {
+ type: "long",
+ },
+ session_id: {
+ type: "long",
+ index: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b87bc8a521995051c7e7395f9c047e1c.asciidoc b/docs/doc_examples/b87bc8a521995051c7e7395f9c047e1c.asciidoc
new file mode 100644
index 000000000..51f2cdbe2
--- /dev/null
+++ b/docs/doc_examples/b87bc8a521995051c7e7395f9c047e1c.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ number_one: {
+ type: "integer",
+ ignore_malformed: true,
+ },
+ number_two: {
+ type: "integer",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Some text value",
+ number_one: "foo",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ text: "Some text value",
+ number_two: "foo",
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b88a2d96da1401d548a4540cca223d27.asciidoc b/docs/doc_examples/b88a2d96da1401d548a4540cca223d27.asciidoc
new file mode 100644
index 000000000..dd71f035a
--- /dev/null
+++ b/docs/doc_examples/b88a2d96da1401d548a4540cca223d27.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchMvt({
+ index: "museums",
+ field: "location",
+ zoom: 13,
+ x: 4207,
+ y: 2692,
+ grid_agg: "geotile",
+ grid_precision: 2,
+ fields: ["name", "price"],
+ query: {
+ term: {
+ included: true,
+ },
+ },
+ aggs: {
+ min_price: {
+ min: {
+ field: "price",
+ },
+ },
+ max_price: {
+ max: {
+ field: "price",
+ },
+ },
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b8c03bbd917d0cf5474a3e46ebdd7aad.asciidoc b/docs/doc_examples/b8c03bbd917d0cf5474a3e46ebdd7aad.asciidoc
new file mode 100644
index 000000000..752be7fd7
--- /dev/null
+++ b/docs/doc_examples/b8c03bbd917d0cf5474a3e46ebdd7aad.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["cjk_bigram"],
+ text: "東京都は、日本の首都であり",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b8cc74a92bac837bfd8ba6d5935350ed.asciidoc b/docs/doc_examples/b8cc74a92bac837bfd8ba6d5935350ed.asciidoc
new file mode 100644
index 000000000..d818285db
--- /dev/null
+++ b/docs/doc_examples/b8cc74a92bac837bfd8ba6d5935350ed.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ enabled: false,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ user_id: "kimchy",
+ session_data: {
+ object: {
+ some_field: "some_value",
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ fields: [
+ "user_id",
+ {
+ field: "session_data.object.*",
+ include_unmapped: true,
+ },
+ ],
+ _source: false,
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b8dc3764c4467922474b2cdec74bb86b.asciidoc b/docs/doc_examples/b8dc3764c4467922474b2cdec74bb86b.asciidoc
new file mode 100644
index 000000000..c04dca75e
--- /dev/null
+++ b/docs/doc_examples/b8dc3764c4467922474b2cdec74bb86b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.startTransform({
+ transform_id: "last-log-from-clientip",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b8e6e320a19936f6edfc242ccb5cde43.asciidoc b/docs/doc_examples/b8e6e320a19936f6edfc242ccb5cde43.asciidoc
new file mode 100644
index 000000000..fe98fe20a
--- /dev/null
+++ b/docs/doc_examples/b8e6e320a19936f6edfc242ccb5cde43.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ names: ["John Abraham", "Lincoln Smith"],
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_phrase: {
+ names: {
+ query: "Abraham Lincoln",
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_phrase: {
+ names: {
+ query: "Abraham Lincoln",
+ slop: 101,
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc b/docs/doc_examples/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc
new file mode 100644
index 000000000..25f68fae7
--- /dev/null
+++ b/docs/doc_examples/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["city.*"],
+ query: "this AND that OR thus",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc b/docs/doc_examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc
new file mode 100644
index 000000000..3445735bc
--- /dev/null
+++ b/docs/doc_examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.clearScroll({
+ scroll_id:
+ "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b968853454b4416f7baa3209eb335957.asciidoc b/docs/doc_examples/b968853454b4416f7baa3209eb335957.asciidoc
new file mode 100644
index 000000000..fbd141a5c
--- /dev/null
+++ b/docs/doc_examples/b968853454b4416f7baa3209eb335957.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ cities: {
+ terms: {
+ field: "city.keyword",
+ },
+ aggs: {
+ centroid: {
+ cartesian_centroid: {
+ field: "location",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b96f465abb658fe32889c3d183f159a3.asciidoc b/docs/doc_examples/b96f465abb658fe32889c3d183f159a3.asciidoc
new file mode 100644
index 000000000..8d6be0bbe
--- /dev/null
+++ b/docs/doc_examples/b96f465abb658fe32889c3d183f159a3.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "limit_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_one_token_limit: {
+ tokenizer: "standard",
+ filter: ["limit"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b9a8f39ab9b1ed18c6c1db61ac4e6a9e.asciidoc b/docs/doc_examples/b9a8f39ab9b1ed18c6c1db61ac4e6a9e.asciidoc
new file mode 100644
index 000000000..b68c2dadb
--- /dev/null
+++ b/docs/doc_examples/b9a8f39ab9b1ed18c6c1db61ac4e6a9e.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "_current",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc b/docs/doc_examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc
new file mode 100644
index 000000000..61939766d
--- /dev/null
+++ b/docs/doc_examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ attributes: {
+ id: "foo",
+ },
+ id: "bar",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/b9f716219359a6c973dafc50b348de33.asciidoc b/docs/doc_examples/b9f716219359a6c973dafc50b348de33.asciidoc
new file mode 100644
index 000000000..4e8a2557e
--- /dev/null
+++ b/docs/doc_examples/b9f716219359a6c973dafc50b348de33.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ _source: {
+ enabled: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba07330ed3291b3970f4eb01dacd8086.asciidoc b/docs/doc_examples/ba07330ed3291b3970f4eb01dacd8086.asciidoc
new file mode 100644
index 000000000..f9c560d5f
--- /dev/null
+++ b/docs/doc_examples/ba07330ed3291b3970f4eb01dacd8086.asciidoc
@@ -0,0 +1,105 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (4.405200 51.222900)",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (2.336389 48.861111)",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (2.327000 48.860000)",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ rings_around_amsterdam: {
+ geo_distance: {
+ field: "location",
+ origin: "POINT (4.894 52.3760)",
+ ranges: [
+ {
+ to: 100000,
+ },
+ {
+ from: 100000,
+ to: 300000,
+ },
+ {
+ from: 300000,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ba10b644a4e9a2e7d78744ca607355d0.asciidoc b/docs/doc_examples/ba10b644a4e9a2e7d78744ca607355d0.asciidoc
new file mode 100644
index 000000000..647beec9d
--- /dev/null
+++ b/docs/doc_examples/ba10b644a4e9a2e7d78744ca607355d0.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.follow({
+ index: ".ds-logs-mysql-default_copy-2022-01-01-000001",
+ remote_cluster: "remote_cluster",
+ leader_index: ".ds-logs-mysql-default-2022-01-01-000001",
+ data_stream_name: "logs-mysql-default_copy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba21a7fbb74180ff138d97032f28ace7.asciidoc b/docs/doc_examples/ba21a7fbb74180ff138d97032f28ace7.asciidoc
new file mode 100644
index 000000000..e5f5724e2
--- /dev/null
+++ b/docs/doc_examples/ba21a7fbb74180ff138d97032f28ace7.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.updateUserProfileData({
+ uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0",
+ labels: {
+ direction: "east",
+ },
+ data: {
+ app1: {
+ theme: "default",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba3b9783aa188c6841e1926c5ab1472d.asciidoc b/docs/doc_examples/ba3b9783aa188c6841e1926c5ab1472d.asciidoc
new file mode 100644
index 000000000..3fbe7f25e
--- /dev/null
+++ b/docs/doc_examples/ba3b9783aa188c6841e1926c5ab1472d.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["index1", "index2"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba5dc6fb9bbe1406714da5d641462a23.asciidoc b/docs/doc_examples/ba5dc6fb9bbe1406714da5d641462a23.asciidoc
new file mode 100644
index 000000000..4287d506e
--- /dev/null
+++ b/docs/doc_examples/ba5dc6fb9bbe1406714da5d641462a23.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ strings_as_ip: {
+ match_mapping_type: "string",
+ match: "ip*",
+ runtime: {
+ type: "ip",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba6040de55afb2c8fb9e5b24bb038820.asciidoc b/docs/doc_examples/ba6040de55afb2c8fb9e5b24bb038820.asciidoc
new file mode 100644
index 000000000..3fd0c946f
--- /dev/null
+++ b/docs/doc_examples/ba6040de55afb2c8fb9e5b24bb038820.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getTemplate({
+ name: "temp*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba650046f9063f6c43d76f47e0f94403.asciidoc b/docs/doc_examples/ba650046f9063f6c43d76f47e0f94403.asciidoc
new file mode 100644
index 000000000..ec556c8dc
--- /dev/null
+++ b/docs/doc_examples/ba650046f9063f6c43d76f47e0f94403.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ date: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ date: ["2015-01-01T12:10:30Z", "2014-01-01T12:10:30Z"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/ba66768ed04f7b87906badff40ff40ed.asciidoc b/docs/doc_examples/ba66768ed04f7b87906badff40ff40ed.asciidoc
new file mode 100644
index 000000000..5e98e21e6
--- /dev/null
+++ b/docs/doc_examples/ba66768ed04f7b87906badff40ff40ed.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "50gb",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba8c3578613ae0bf890f6a05706ce776.asciidoc b/docs/doc_examples/ba8c3578613ae0bf890f6a05706ce776.asciidoc
new file mode 100644
index 000000000..46ae56d49
--- /dev/null
+++ b/docs/doc_examples/ba8c3578613ae0bf890f6a05706ce776.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ filter_path: "-hits.events._source",
+ query: '\n process where process.name == "regsvr32.exe"\n ',
+ fields: [
+ "event.type",
+ "process.*",
+ {
+ field: "@timestamp",
+ format: "epoch_millis",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ba9a5f66a6148612de0ad2491fd6c90d.asciidoc b/docs/doc_examples/ba9a5f66a6148612de0ad2491fd6c90d.asciidoc
new file mode 100644
index 000000000..c56554773
--- /dev/null
+++ b/docs/doc_examples/ba9a5f66a6148612de0ad2491fd6c90d.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "classic",
+ max_token_length: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/baadbfffcd0c16f51eb3537f516dc3ed.asciidoc b/docs/doc_examples/baadbfffcd0c16f51eb3537f516dc3ed.asciidoc
new file mode 100644
index 000000000..6dc62aec5
--- /dev/null
+++ b/docs/doc_examples/baadbfffcd0c16f51eb3537f516dc3ed.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.disableUserProfile({
+ uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bab4c3b22c1768fcc7153345e4096dfb.asciidoc b/docs/doc_examples/bab4c3b22c1768fcc7153345e4096dfb.asciidoc
new file mode 100644
index 000000000..0cdc5da85
--- /dev/null
+++ b/docs/doc_examples/bab4c3b22c1768fcc7153345e4096dfb.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["keyword_repeat", "stemmer", "remove_duplicates"],
+ text: "jumping dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb067c049331cc850a77b18bdfff81b5.asciidoc b/docs/doc_examples/bb067c049331cc850a77b18bdfff81b5.asciidoc
new file mode 100644
index 000000000..a2845c63c
--- /dev/null
+++ b/docs/doc_examples/bb067c049331cc850a77b18bdfff81b5.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "lithuanian_example",
+ settings: {
+ analysis: {
+ filter: {
+ lithuanian_stop: {
+ type: "stop",
+ stopwords: "_lithuanian_",
+ },
+ lithuanian_keywords: {
+ type: "keyword_marker",
+ keywords: ["pavyzdys"],
+ },
+ lithuanian_stemmer: {
+ type: "stemmer",
+ language: "lithuanian",
+ },
+ },
+ analyzer: {
+ rebuilt_lithuanian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "lithuanian_stop",
+ "lithuanian_keywords",
+ "lithuanian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb28d1f7f3f09f5061d7f4351aee89fc.asciidoc b/docs/doc_examples/bb28d1f7f3f09f5061d7f4351aee89fc.asciidoc
new file mode 100644
index 000000000..8fb900dc0
--- /dev/null
+++ b/docs/doc_examples/bb28d1f7f3f09f5061d7f4351aee89fc.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role4",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["customer.*"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb293e1bdf0c6f6d9069eeb7edc9d399.asciidoc b/docs/doc_examples/bb293e1bdf0c6f6d9069eeb7edc9d399.asciidoc
new file mode 100644
index 000000000..a8bb92321
--- /dev/null
+++ b/docs/doc_examples/bb293e1bdf0c6f6d9069eeb7edc9d399.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.disableUser({
+ username: "jacknich",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc b/docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc
new file mode 100644
index 000000000..ac5f2bf5b
--- /dev/null
+++ b/docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "(information retrieval) OR (artificial intelligence)",
+ default_field: "text",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ highlight: {
+ fields: {
+ text: {
+ fragment_size: 150,
+ number_of_fragments: 3,
+ },
+ },
+ },
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc b/docs/doc_examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc
new file mode 100644
index 000000000..d73057f5b
--- /dev/null
+++ b/docs/doc_examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc
@@ -0,0 +1,88 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "cooking_blog",
+ refresh: "wait_for",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ title: "Perfect Pancakes: A Fluffy Breakfast Delight",
+ description:
+ "Learn the secrets to making the fluffiest pancakes, so amazing you won't believe your tastebuds. This recipe uses buttermilk and a special folding technique to create light, airy pancakes that are perfect for lazy Sunday mornings.",
+ author: "Maria Rodriguez",
+ date: "2023-05-01",
+ category: "Breakfast",
+ tags: ["pancakes", "breakfast", "easy recipes"],
+ rating: 4.8,
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ title: "Spicy Thai Green Curry: A Vegetarian Adventure",
+ description:
+ "Dive into the flavors of Thailand with this vibrant green curry. Packed with vegetables and aromatic herbs, this dish is both healthy and satisfying. Don't worry about the heat - you can easily adjust the spice level to your liking.",
+ author: "Liam Chen",
+ date: "2023-05-05",
+ category: "Main Course",
+ tags: ["thai", "vegetarian", "curry", "spicy"],
+ rating: 4.6,
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ title: "Classic Beef Stroganoff: A Creamy Comfort Food",
+ description:
+ "Indulge in this rich and creamy beef stroganoff. Tender strips of beef in a savory mushroom sauce, served over a bed of egg noodles. It's the ultimate comfort food for chilly evenings.",
+ author: "Emma Watson",
+ date: "2023-05-10",
+ category: "Main Course",
+ tags: ["beef", "pasta", "comfort food"],
+ rating: 4.7,
+ },
+ {
+ index: {
+ _id: "4",
+ },
+ },
+ {
+ title: "Vegan Chocolate Avocado Mousse",
+ description:
+ "Discover the magic of avocado in this rich, vegan chocolate mousse. Creamy, indulgent, and secretly healthy, it's the perfect guilt-free dessert for chocolate lovers.",
+ author: "Alex Green",
+ date: "2023-05-15",
+ category: "Dessert",
+ tags: ["vegan", "chocolate", "avocado", "healthy dessert"],
+ rating: 4.5,
+ },
+ {
+ index: {
+ _id: "5",
+ },
+ },
+ {
+ title: "Crispy Oven-Fried Chicken",
+ description:
+ "Get that perfect crunch without the deep fryer! This oven-fried chicken recipe delivers crispy, juicy results every time. A healthier take on the classic comfort food.",
+ author: "Maria Rodriguez",
+ date: "2023-05-20",
+ category: "Main Course",
+ tags: ["chicken", "oven-fried", "healthy"],
+ rating: 4.9,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb64a7228a479f6aeeaccaf7560e11ee.asciidoc b/docs/doc_examples/bb64a7228a479f6aeeaccaf7560e11ee.asciidoc
new file mode 100644
index 000000000..ddbfb6569
--- /dev/null
+++ b/docs/doc_examples/bb64a7228a479f6aeeaccaf7560e11ee.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.putTransform({
+ transform_id: "last-log-from-clientip",
+ source: {
+ index: ["kibana_sample_data_logs"],
+ },
+ latest: {
+ unique_key: ["clientip"],
+ sort: "timestamp",
+ },
+ frequency: "1m",
+ dest: {
+ index: "last-log-from-clientip",
+ },
+ sync: {
+ time: {
+ field: "timestamp",
+ delay: "60s",
+ },
+ },
+ retention_policy: {
+ time: {
+ field: "timestamp",
+ max_age: "30d",
+ },
+ },
+ settings: {
+ max_page_search_size: 500,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb792e64a4c1f872296073b457aa03c8.asciidoc b/docs/doc_examples/bb792e64a4c1f872296073b457aa03c8.asciidoc
new file mode 100644
index 000000000..0c98668fa
--- /dev/null
+++ b/docs/doc_examples/bb792e64a4c1f872296073b457aa03c8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.delete({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb975b342de7e838ebf6a36aaa1a8749.asciidoc b/docs/doc_examples/bb975b342de7e838ebf6a36aaa1a8749.asciidoc
new file mode 100644
index 000000000..6d510961d
--- /dev/null
+++ b/docs/doc_examples/bb975b342de7e838ebf6a36aaa1a8749.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ routing: 1,
+ refresh: "true",
+ document: {
+ text: "This is a vote",
+ my_join_field: {
+ name: "vote",
+ parent: "2",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bb9e268ec62d19ca2a6366cbb48fae68.asciidoc b/docs/doc_examples/bb9e268ec62d19ca2a6366cbb48fae68.asciidoc
new file mode 100644
index 000000000..f733254ab
--- /dev/null
+++ b/docs/doc_examples/bb9e268ec62d19ca2a6366cbb48fae68.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.count({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc b/docs/doc_examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc
new file mode 100644
index 000000000..59eabf7be
--- /dev/null
+++ b/docs/doc_examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cooking_blog",
+ query: {
+ multi_match: {
+ query: "vegetarian curry",
+ fields: ["title", "description", "tags"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bc4d308069af23929a49d856f6bc3008.asciidoc b/docs/doc_examples/bc4d308069af23929a49d856f6bc3008.asciidoc
new file mode 100644
index 000000000..0f34216b6
--- /dev/null
+++ b/docs/doc_examples/bc4d308069af23929a49d856f6bc3008.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ rings: {
+ geo_distance: {
+ field: "location",
+ origin: "POINT (4.894 52.3760)",
+ unit: "km",
+ distance_type: "plane",
+ ranges: [
+ {
+ to: 100,
+ },
+ {
+ from: 100,
+ to: 300,
+ },
+ {
+ from: 300,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bcae0f00ae1e6f08fa395ca741fe84f9.asciidoc b/docs/doc_examples/bcae0f00ae1e6f08fa395ca741fe84f9.asciidoc
new file mode 100644
index 000000000..6463ea56c
--- /dev/null
+++ b/docs/doc_examples/bcae0f00ae1e6f08fa395ca741fe84f9.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rankEval({
+ index: "my-index-000001",
+ requests: [
+ {
+ id: "JFK query",
+ request: {
+ query: {
+ match_all: {},
+ },
+ },
+ ratings: [],
+ },
+ ],
+ metric: {
+ dcg: {
+ k: 20,
+ normalize: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bcb572658986d69ae17c28ddd7e4bfd8.asciidoc b/docs/doc_examples/bcb572658986d69ae17c28ddd7e4bfd8.asciidoc
new file mode 100644
index 000000000..e0bcddedd
--- /dev/null
+++ b/docs/doc_examples/bcb572658986d69ae17c28ddd7e4bfd8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.fieldUsageStats({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bcbd4d4749126837723438ff4faeb0f6.asciidoc b/docs/doc_examples/bcbd4d4749126837723438ff4faeb0f6.asciidoc
new file mode 100644
index 000000000..d4b74e787
--- /dev/null
+++ b/docs/doc_examples/bcbd4d4749126837723438ff4faeb0f6.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ filter_path: "aggregations",
+ size: 0,
+ aggs: {
+ top_values: {
+ terms: {
+ field: "my-field",
+ size: 10,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc b/docs/doc_examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc
new file mode 100644
index 000000000..22c9c01d9
--- /dev/null
+++ b/docs/doc_examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "books",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc
new file mode 100644
index 000000000..06b5f58ec
--- /dev/null
+++ b/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.simulate.ingest({
+ body: {
+ docs: [
+ {
+ _index: "my-index",
+ _id: "123",
+ _source: {
+ foo: "bar",
+ },
+ },
+ {
+ _index: "my-index",
+ _id: "456",
+ _source: {
+ foo: "rab",
+ },
+ },
+ ],
+ pipeline_substitutions: {
+ "my-pipeline": {
+ processors: [
+ {
+ uppercase: {
+ field: "foo",
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd0d30a7683037e1ebadd163514765d4.asciidoc b/docs/doc_examples/bd0d30a7683037e1ebadd163514765d4.asciidoc
new file mode 100644
index 000000000..dfc485635
--- /dev/null
+++ b/docs/doc_examples/bd0d30a7683037e1ebadd163514765d4.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "basic_users",
+ roles: ["user"],
+ rules: {
+ any: [
+ {
+ field: {
+ groups: "cn=users,dc=example,dc=com",
+ },
+ },
+ {
+ field: {
+ dn: "cn=John Doe,cn=contractors,dc=example,dc=com",
+ },
+ },
+ ],
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd1e55b8cb2ca9e496e223e717d76640.asciidoc b/docs/doc_examples/bd1e55b8cb2ca9e496e223e717d76640.asciidoc
new file mode 100644
index 000000000..a175b8350
--- /dev/null
+++ b/docs/doc_examples/bd1e55b8cb2ca9e496e223e717d76640.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_polygon: {
+ "person.location": {
+ points: ["40, -70", "30, -80", "20, -90"],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc b/docs/doc_examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc
new file mode 100644
index 000000000..05746a7fc
--- /dev/null
+++ b/docs/doc_examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ scroll_size: 100,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd298b11933605c641626750c981d70b.asciidoc b/docs/doc_examples/bd298b11933605c641626750c981d70b.asciidoc
new file mode 100644
index 000000000..c2ca58040
--- /dev/null
+++ b/docs/doc_examples/bd298b11933605c641626750c981d70b.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "ct1",
+ template: {
+ settings: {
+ "index.number_of_shards": 2,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putComponentTemplate({
+ name: "ct2",
+ template: {
+ settings: {
+ "index.number_of_replicas": 0,
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.simulateTemplate({
+ index_patterns: ["my*"],
+ template: {
+ settings: {
+ "index.number_of_shards": 3,
+ },
+ },
+ composed_of: ["ct1", "ct2"],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/bd2a387e8c21bf01a1039e81d7602921.asciidoc b/docs/doc_examples/bd2a387e8c21bf01a1039e81d7602921.asciidoc
new file mode 100644
index 000000000..f1f4feed3
--- /dev/null
+++ b/docs/doc_examples/bd2a387e8c21bf01a1039e81d7602921.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "my-search-template",
+ script: {
+ lang: "mustache",
+ source: {
+ query: {
+ multi_match: {
+ query: "{{query_string}}",
+ fields: "[{{#text_fields}}{{user_name}},{{/text_fields}}]",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd3d710ec50a151453e141691163af72.asciidoc b/docs/doc_examples/bd3d710ec50a151453e141691163af72.asciidoc
new file mode 100644
index 000000000..fad53bf5d
--- /dev/null
+++ b/docs/doc_examples/bd3d710ec50a151453e141691163af72.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ group_by: "parents",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd458073196a19ecdeb24a8016488c20.asciidoc b/docs/doc_examples/bd458073196a19ecdeb24a8016488c20.asciidoc
new file mode 100644
index 000000000..e41d391d0
--- /dev/null
+++ b/docs/doc_examples/bd458073196a19ecdeb24a8016488c20.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteIndexTemplate({
+ name: "my-index-template",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd57976bc93ca64b2d3e001df9f06c82.asciidoc b/docs/doc_examples/bd57976bc93ca64b2d3e001df9f06c82.asciidoc
new file mode 100644
index 000000000..920798532
--- /dev/null
+++ b/docs/doc_examples/bd57976bc93ca64b2d3e001df9f06c82.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.resolveIndex({
+ name: "f*,remoteCluster1:bar*",
+ expand_wildcards: "all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc b/docs/doc_examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc
new file mode 100644
index 000000000..fa54a3549
--- /dev/null
+++ b/docs/doc_examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "shrink-index",
+ policy: {
+ phases: {
+ warm: {
+ min_age: "5d",
+ actions: {
+ shrink: {
+ number_of_shards: 1,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd68666ca2e0be12f7624016317a62bc.asciidoc b/docs/doc_examples/bd68666ca2e0be12f7624016317a62bc.asciidoc
new file mode 100644
index 000000000..821f169b6
--- /dev/null
+++ b/docs/doc_examples/bd68666ca2e0be12f7624016317a62bc.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ groups: "_all",
+});
+console.log(response);
+
+const response1 = await client.nodes.stats({
+ metric: "indices",
+ groups: "foo,bar",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/bd6f30e3caa3632260da42d9ff82c98c.asciidoc b/docs/doc_examples/bd6f30e3caa3632260da42d9ff82c98c.asciidoc
new file mode 100644
index 000000000..d40a96760
--- /dev/null
+++ b/docs/doc_examples/bd6f30e3caa3632260da42d9ff82c98c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearApiKeyCache({
+ ids: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd7330af2609bdd8aa10958f5e640b93.asciidoc b/docs/doc_examples/bd7330af2609bdd8aa10958f5e640b93.asciidoc
new file mode 100644
index 000000000..a063913c0
--- /dev/null
+++ b/docs/doc_examples/bd7330af2609bdd8aa10958f5e640b93.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my_queries2",
+ id: 2,
+ refresh: "true",
+ document: {
+ query: {
+ match: {
+ "my_field.suffix": "xyz",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd767ea03171fe71c73f58f16d5da92f.asciidoc b/docs/doc_examples/bd767ea03171fe71c73f58f16d5da92f.asciidoc
new file mode 100644
index 000000000..810d4a7cd
--- /dev/null
+++ b/docs/doc_examples/bd767ea03171fe71c73f58f16d5da92f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "file-path-test",
+ query: {
+ match: {
+ file_path: "/User/bob/photos/2017/05",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd7a1417fc27b5a801334ec44462b376.asciidoc b/docs/doc_examples/bd7a1417fc27b5a801334ec44462b376.asciidoc
new file mode 100644
index 000000000..d1fd5b125
--- /dev/null
+++ b/docs/doc_examples/bd7a1417fc27b5a801334ec44462b376.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.mlDatafeeds({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bd7fa2f122ab861cd00e0b9154d120b3.asciidoc b/docs/doc_examples/bd7fa2f122ab861cd00e0b9154d120b3.asciidoc
new file mode 100644
index 000000000..47d5b8d52
--- /dev/null
+++ b/docs/doc_examples/bd7fa2f122ab861cd00e0b9154d120b3.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ "@timestamp": {
+ format: "strict_date_optional_time||epoch_second",
+ type: "date",
+ },
+ message: {
+ type: "wildcard",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bdaf00d791706d7fde25fd65d3735b94.asciidoc b/docs/doc_examples/bdaf00d791706d7fde25fd65d3735b94.asciidoc
new file mode 100644
index 000000000..f8485a4c3
--- /dev/null
+++ b/docs/doc_examples/bdaf00d791706d7fde25fd65d3735b94.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ kwd: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ kwd: ["foo", "foo", "bar", "baz"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc b/docs/doc_examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc
new file mode 100644
index 000000000..961cd52e4
--- /dev/null
+++ b/docs/doc_examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQueryRethrottle({
+ task_id: "r1A2WoRbTwKZ516z6NEs5A:36619",
+ requests_per_second: "-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bdc1afd2181154bb78797360f9dbb1a0.asciidoc b/docs/doc_examples/bdc1afd2181154bb78797360f9dbb1a0.asciidoc
new file mode 100644
index 000000000..5d422bbb9
--- /dev/null
+++ b/docs/doc_examples/bdc1afd2181154bb78797360f9dbb1a0.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ id: "my_watch",
+ record_execution: true,
+});
+console.log(response);
+
+const response1 = await client.watcher.getWatch({
+ id: "my_watch",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/bdc68012c121062628d6d73468bf4866.asciidoc b/docs/doc_examples/bdc68012c121062628d6d73468bf4866.asciidoc
new file mode 100644
index 000000000..63445d9ea
--- /dev/null
+++ b/docs/doc_examples/bdc68012c121062628d6d73468bf4866.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.cleanupRepository({
+ name: "my_repository",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bde74dbbcef8ebf8541cae2c1711255f.asciidoc b/docs/doc_examples/bde74dbbcef8ebf8541cae2c1711255f.asciidoc
new file mode 100644
index 000000000..4da9dfa63
--- /dev/null
+++ b/docs/doc_examples/bde74dbbcef8ebf8541cae2c1711255f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.get({
+ name: "my-app",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc b/docs/doc_examples/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc
new file mode 100644
index 000000000..fd79781de
--- /dev/null
+++ b/docs/doc_examples/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test*",
+ filter_path: "aggregations",
+ aggs: {
+ ip: {
+ terms: {
+ field: "ip",
+ },
+ aggs: {
+ tm: {
+ top_metrics: {
+ metrics: {
+ field: "m",
+ },
+ sort: {
+ s: "desc",
+ },
+ size: 1,
+ },
+ },
+ having_tm: {
+ bucket_selector: {
+ buckets_path: {
+ top_m: "tm[m]",
+ },
+ script: "params.top_m < 1000",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be285eef1d2df0dfcf876e2d4b361f1e.asciidoc b/docs/doc_examples/be285eef1d2df0dfcf876e2d4b361f1e.asciidoc
new file mode 100644
index 000000000..78b727a26
--- /dev/null
+++ b/docs/doc_examples/be285eef1d2df0dfcf876e2d4b361f1e.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "common_grams_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ index_grams: {
+ tokenizer: "whitespace",
+ filter: ["common_grams_query"],
+ },
+ },
+ filter: {
+ common_grams_query: {
+ type: "common_grams",
+ common_words: ["a", "is", "the"],
+ ignore_case: true,
+ query_mode: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc b/docs/doc_examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc
new file mode 100644
index 000000000..61e1776a5
--- /dev/null
+++ b/docs/doc_examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.get({
+ task_id: "r1A2WoRbTwKZ516z6NEs5A:36619",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc b/docs/doc_examples/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc
new file mode 100644
index 000000000..27b13645c
--- /dev/null
+++ b/docs/doc_examples/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ refresh: "true",
+ slices: 5,
+ script: {
+ source: "ctx._source['extra'] = 'test'",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be5c5a9c25901737585e4fff9195da3c.asciidoc b/docs/doc_examples/be5c5a9c25901737585e4fff9195da3c.asciidoc
new file mode 100644
index 000000000..7cbd2aa06
--- /dev/null
+++ b/docs/doc_examples/be5c5a9c25901737585e4fff9195da3c.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-bit-vectors",
+ filter_path: "hits.hits",
+ query: {
+ knn: {
+ query_vector: [127, -127, 0, 1, 42],
+ field: "my_vector",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be5d62e7c8f63687c585305fbe70d7d0.asciidoc b/docs/doc_examples/be5d62e7c8f63687c585305fbe70d7d0.asciidoc
new file mode 100644
index 000000000..818de22d5
--- /dev/null
+++ b/docs/doc_examples/be5d62e7c8f63687c585305fbe70d7d0.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time",
+ tdigest: {
+ compression: 200,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc b/docs/doc_examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc
new file mode 100644
index 000000000..a988440a3
--- /dev/null
+++ b/docs/doc_examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ scripted_upsert: true,
+ script: {
+ source:
+ "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ",
+ params: {
+ count: 4,
+ },
+ },
+ upsert: {},
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be6b0bfcdce1ef100af89f74da5d4748.asciidoc b/docs/doc_examples/be6b0bfcdce1ef100af89f74da5d4748.asciidoc
new file mode 100644
index 000000000..42e3fb761
--- /dev/null
+++ b/docs/doc_examples/be6b0bfcdce1ef100af89f74da5d4748.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putTrainedModelDefinitionPart({
+ model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
+ part: 0,
+ definition: "...",
+ total_definition_length: 265632637,
+ total_parts: 64,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be9376b1e354ad9c6bdad83f6a0ce5ad.asciidoc b/docs/doc_examples/be9376b1e354ad9c6bdad83f6a0ce5ad.asciidoc
new file mode 100644
index 000000000..b76dc5c90
--- /dev/null
+++ b/docs/doc_examples/be9376b1e354ad9c6bdad83f6a0ce5ad.asciidoc
@@ -0,0 +1,61 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_flights",
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ Cancelled: false,
+ },
+ },
+ ],
+ },
+ },
+ },
+ dest: {
+ index: "sample_flight_delays_by_carrier",
+ },
+ pivot: {
+ group_by: {
+ carrier: {
+ terms: {
+ field: "Carrier",
+ },
+ },
+ },
+ aggregations: {
+ flights_count: {
+ value_count: {
+ field: "FlightNum",
+ },
+ },
+ delay_mins_total: {
+ sum: {
+ field: "FlightDelayMin",
+ },
+ },
+ flight_mins_total: {
+ sum: {
+ field: "FlightTimeMin",
+ },
+ },
+ delay_time_percentage: {
+ bucket_script: {
+ buckets_path: {
+ delay_time: "delay_mins_total.value",
+ flight_time: "flight_mins_total.value",
+ },
+ script: "(params.delay_time / params.flight_time) * 100",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/be9836fe55c5fada404a2adc1663d832.asciidoc b/docs/doc_examples/be9836fe55c5fada404a2adc1663d832.asciidoc
new file mode 100644
index 000000000..e8b24cc01
--- /dev/null
+++ b/docs/doc_examples/be9836fe55c5fada404a2adc1663d832.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ http: {
+ type: "composite",
+ script: 'emit(grok("%{COMMONAPACHELOG}").extract(doc["message"].value))',
+ fields: {
+ clientip: {
+ type: "ip",
+ },
+ verb: {
+ type: "keyword",
+ },
+ response: {
+ type: "long",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/beaf43b274b0f32cf3cf48f59e5cb1f2.asciidoc b/docs/doc_examples/beaf43b274b0f32cf3cf48f59e5cb1f2.asciidoc
new file mode 100644
index 000000000..5a0da457f
--- /dev/null
+++ b/docs/doc_examples/beaf43b274b0f32cf3cf48f59e5cb1f2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "snapshot_*",
+ sort: "start_time",
+ from_sort_value: 1577833200000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/beb0b9ff4f68672273fcff1b7bae706b.asciidoc b/docs/doc_examples/beb0b9ff4f68672273fcff1b7bae706b.asciidoc
new file mode 100644
index 000000000..ae9b3f6f0
--- /dev/null
+++ b/docs/doc_examples/beb0b9ff4f68672273fcff1b7bae706b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ user_identifier: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/beba2a9795c8a13653e1edf64eec4357.asciidoc b/docs/doc_examples/beba2a9795c8a13653e1edf64eec4357.asciidoc
new file mode 100644
index 000000000..dcf66fbd5
--- /dev/null
+++ b/docs/doc_examples/beba2a9795c8a13653e1edf64eec4357.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "test",
+ settings: {
+ "index.routing.allocation.require.size": "big",
+ "index.routing.allocation.require.rack": "rack1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bed14cc152522ca0726ac3746ebc31db.asciidoc b/docs/doc_examples/bed14cc152522ca0726ac3746ebc31db.asciidoc
new file mode 100644
index 000000000..6b1fa92ed
--- /dev/null
+++ b/docs/doc_examples/bed14cc152522ca0726ac3746ebc31db.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my_index",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ my_counter: 0,
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ my_counter: 9223372036854776000,
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ my_counter: 18446744073709552000,
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ my_counter: 18446744073709552000,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc b/docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc
new file mode 100644
index 000000000..9ab13275d
--- /dev/null
+++ b/docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc
@@ -0,0 +1,83 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "retrievers_example_nested",
+ mappings: {
+ properties: {
+ nested_field: {
+ type: "nested",
+ properties: {
+ paragraph_id: {
+ type: "keyword",
+ },
+ nested_vector: {
+ type: "dense_vector",
+ dims: 3,
+ similarity: "l2_norm",
+ index: true,
+ },
+ },
+ },
+ topic: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "retrievers_example_nested",
+ id: 1,
+ document: {
+ nested_field: [
+ {
+ paragraph_id: "1a",
+ nested_vector: [-1.12, -0.59, 0.78],
+ },
+ {
+ paragraph_id: "1b",
+ nested_vector: [-0.12, 1.56, 0.42],
+ },
+ {
+ paragraph_id: "1c",
+ nested_vector: [1, -1, 0],
+ },
+ ],
+ topic: ["ai"],
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "retrievers_example_nested",
+ id: 2,
+ document: {
+ nested_field: [
+ {
+ paragraph_id: "2a",
+ nested_vector: [0.23, 1.24, 0.65],
+ },
+ ],
+ topic: ["information_retrieval"],
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "retrievers_example_nested",
+ id: 3,
+ document: {
+ topic: ["ai"],
+ },
+});
+console.log(response3);
+
+const response4 = await client.indices.refresh({
+ index: "retrievers_example_nested",
+});
+console.log(response4);
+----
diff --git a/docs/doc_examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc b/docs/doc_examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc
new file mode 100644
index 000000000..2e7e049df
--- /dev/null
+++ b/docs/doc_examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ size: 10,
+ knn: {
+ query_vector: [0.04283529, 0.85670587, -0.51402352, 0],
+ field: "my_int4_vector",
+ k: 20,
+ num_candidates: 50,
+ },
+ rescore: {
+ window_size: 20,
+ query: {
+ rescore_query: {
+ script_score: {
+ query: {
+ match_all: {},
+ },
+ script: {
+ source: "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)",
+ params: {
+ queryVector: [0.04283529, 0.85670587, -0.51402352, 0],
+ },
+ },
+ },
+ },
+ query_weight: 0,
+ rescore_query_weight: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf17440ac178d2ef5f5be643d033920b.asciidoc b/docs/doc_examples/bf17440ac178d2ef5f5be643d033920b.asciidoc
new file mode 100644
index 000000000..240f711b1
--- /dev/null
+++ b/docs/doc_examples/bf17440ac178d2ef5f5be643d033920b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "my-index",
+ pipeline: "elser-v2-test",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc b/docs/doc_examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc
new file mode 100644
index 000000000..5af1d209c
--- /dev/null
+++ b/docs/doc_examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "remote_user",
+ password: "",
+ roles: ["remote1"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf2e6ea2bae621b9b2fee7003e891f86.asciidoc b/docs/doc_examples/bf2e6ea2bae621b9b2fee7003e891f86.asciidoc
new file mode 100644
index 000000000..bfc119d2c
--- /dev/null
+++ b/docs/doc_examples/bf2e6ea2bae621b9b2fee7003e891f86.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ query: {
+ simple_query_string: {
+ fields: ["body"],
+ query: "ski",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf3f520b47581d861e802730aaf2a519.asciidoc b/docs/doc_examples/bf3f520b47581d861e802730aaf2a519.asciidoc
new file mode 100644
index 000000000..a2f8a7bfd
--- /dev/null
+++ b/docs/doc_examples/bf3f520b47581d861e802730aaf2a519.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.updateAliases({
+ actions: [
+ {
+ add: {
+ index: "logs-nginx.access-prod",
+ alias: "logs",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf448c3889c18266e2e6d3af4f614da2.asciidoc b/docs/doc_examples/bf448c3889c18266e2e6d3af4f614da2.asciidoc
new file mode 100644
index 000000000..98dc289b4
--- /dev/null
+++ b/docs/doc_examples/bf448c3889c18266e2e6d3af4f614da2.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: ".ds-my-data-stream-2099-03-08-000003",
+ id: "bfspvnIBr7VVZlfp2lqX",
+ if_seq_no: 0,
+ if_primary_term: 1,
+ document: {
+ "@timestamp": "2099-03-08T11:06:07.000Z",
+ user: {
+ id: "8a4f500d",
+ },
+ message: "Login successful",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf639275d0818be04317ee5ab6075da6.asciidoc b/docs/doc_examples/bf639275d0818be04317ee5ab6075da6.asciidoc
new file mode 100644
index 000000000..b6894f8b7
--- /dev/null
+++ b/docs/doc_examples/bf639275d0818be04317ee5ab6075da6.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ has_parent: {
+ parent_type: "parent",
+ query: {
+ term: {
+ tag: {
+ value: "Elasticsearch",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bf8680d940c84e43a9483a25548dea57.asciidoc b/docs/doc_examples/bf8680d940c84e43a9483a25548dea57.asciidoc
new file mode 100644
index 000000000..312348bb9
--- /dev/null
+++ b/docs/doc_examples/bf8680d940c84e43a9483a25548dea57.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ filter: {
+ autocomplete_filter: {
+ type: "edge_ngram",
+ min_gram: 1,
+ max_gram: 20,
+ },
+ },
+ analyzer: {
+ autocomplete: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["lowercase", "autocomplete_filter"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ analyzer: "autocomplete",
+ search_analyzer: "standard",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Quick Brown Fox",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ text: {
+ query: "Quick Br",
+ operator: "and",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/bf9f13dc6c24cc225a72e32177e9ee02.asciidoc b/docs/doc_examples/bf9f13dc6c24cc225a72e32177e9ee02.asciidoc
new file mode 100644
index 000000000..822b94914
--- /dev/null
+++ b/docs/doc_examples/bf9f13dc6c24cc225a72e32177e9ee02.asciidoc
@@ -0,0 +1,73 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_locations",
+ mappings: {
+ properties: {
+ pin: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my_locations",
+ id: 1,
+ document: {
+ pin: {
+ location: {
+ lat: 40.12,
+ lon: -71.34,
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.create({
+ index: "my_geoshapes",
+ mappings: {
+ properties: {
+ pin: {
+ properties: {
+ location: {
+ type: "geo_shape",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my_geoshapes",
+ id: 1,
+ document: {
+ pin: {
+ location: {
+ type: "polygon",
+ coordinates: [
+ [
+ [13, 51.5],
+ [15, 51.5],
+ [15, 54],
+ [13, 54],
+ [13, 51.5],
+ ],
+ ],
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc b/docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc
new file mode 100644
index 000000000..6936bb686
--- /dev/null
+++ b/docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "elser-embeddings",
+ query: {
+ sparse_vector: {
+ field: "content_embedding",
+ inference_id: "elser_embeddings",
+ query: "How to avoid muscle soreness after running?",
+ },
+ },
+ _source: ["id", "content"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bfb1aa83da8e3f414d50b5ed7894ed33.asciidoc b/docs/doc_examples/bfb1aa83da8e3f414d50b5ed7894ed33.asciidoc
new file mode 100644
index 000000000..1d21a7fb7
--- /dev/null
+++ b/docs/doc_examples/bfb1aa83da8e3f414d50b5ed7894ed33.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ script_fields: {
+ my_doubled_field: {
+ script: {
+ source: "field('my_field').get(null) * params['multiplier']",
+ params: {
+ multiplier: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bfb8a15cd05b43094ffbce8078bad3e1.asciidoc b/docs/doc_examples/bfb8a15cd05b43094ffbce8078bad3e1.asciidoc
new file mode 100644
index 000000000..2a993db0b
--- /dev/null
+++ b/docs/doc_examples/bfb8a15cd05b43094ffbce8078bad3e1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "snapshot_2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bfd6fa3f44e6165f8999102f5a8e24d6.asciidoc b/docs/doc_examples/bfd6fa3f44e6165f8999102f5a8e24d6.asciidoc
new file mode 100644
index 000000000..77ceb7753
--- /dev/null
+++ b/docs/doc_examples/bfd6fa3f44e6165f8999102f5a8e24d6.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index1",
+ query: {
+ query_string: {
+ query: "running with scissors",
+ fields: ["comment", "comment.english"],
+ },
+ },
+ highlight: {
+ order: "score",
+ fields: {
+ comment: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc b/docs/doc_examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc
new file mode 100644
index 000000000..518894b96
--- /dev/null
+++ b/docs/doc_examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ filter_path: "items.*.error",
+ operations: [
+ {
+ update: {
+ _id: "5",
+ _index: "index1",
+ },
+ },
+ {
+ doc: {
+ my_field: "baz",
+ },
+ },
+ {
+ update: {
+ _id: "6",
+ _index: "index1",
+ },
+ },
+ {
+ doc: {
+ my_field: "baz",
+ },
+ },
+ {
+ update: {
+ _id: "7",
+ _index: "index1",
+ },
+ },
+ {
+ doc: {
+ my_field: "baz",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c00c9412609832ebceb9e786dd9542df.asciidoc b/docs/doc_examples/c00c9412609832ebceb9e786dd9542df.asciidoc
new file mode 100644
index 000000000..f2b49ad8b
--- /dev/null
+++ b/docs/doc_examples/c00c9412609832ebceb9e786dd9542df.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateName({
+ connector_id: "my-connector",
+ name: "Custom connector",
+ description: "This is my customized connector",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c012f42b26eb8dd9b197644c3ed954cf.asciidoc b/docs/doc_examples/c012f42b26eb8dd9b197644c3ed954cf.asciidoc
new file mode 100644
index 000000000..74becb406
--- /dev/null
+++ b/docs/doc_examples/c012f42b26eb8dd9b197644c3ed954cf.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ name: {
+ first: "Paul",
+ last: "McCartney",
+ title: {
+ value: "Sir",
+ category: "order of chivalry",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c03ce952de42eae4b522cedc9fd3d14a.asciidoc b/docs/doc_examples/c03ce952de42eae4b522cedc9fd3d14a.asciidoc
new file mode 100644
index 000000000..7ddfea214
--- /dev/null
+++ b/docs/doc_examples/c03ce952de42eae4b522cedc9fd3d14a.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c065a200c00e2005d88ec2f0c10c908a.asciidoc b/docs/doc_examples/c065a200c00e2005d88ec2f0c10c908a.asciidoc
new file mode 100644
index 000000000..37c356419
--- /dev/null
+++ b/docs/doc_examples/c065a200c00e2005d88ec2f0c10c908a.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["shingle"],
+ text: "quick brown fox jumps",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c067182d385f59ce5952fb9a716fbf05.asciidoc b/docs/doc_examples/c067182d385f59ce5952fb9a716fbf05.asciidoc
new file mode 100644
index 000000000..45c34f74e
--- /dev/null
+++ b/docs/doc_examples/c067182d385f59ce5952fb9a716fbf05.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.postCalendarEvents({
+ calendar_id: "planned-outages",
+ events: [
+ {
+ description: "event 1",
+ start_time: 1513641600000,
+ end_time: 1513728000000,
+ },
+ {
+ description: "event 2",
+ start_time: 1513814400000,
+ end_time: 1513900800000,
+ },
+ {
+ description: "event 3",
+ start_time: 1514160000000,
+ end_time: 1514246400000,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c088ce5291ae28650b6091cdec489398.asciidoc b/docs/doc_examples/c088ce5291ae28650b6091cdec489398.asciidoc
new file mode 100644
index 000000000..c555add24
--- /dev/null
+++ b/docs/doc_examples/c088ce5291ae28650b6091cdec489398.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 100,
+ query: {
+ match: {
+ title: "elasticsearch",
+ },
+ },
+ pit: {
+ id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
+ keep_alive: "1m",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c0a4b0c1c6eff14da8b152ceb19c1c31.asciidoc b/docs/doc_examples/c0a4b0c1c6eff14da8b152ceb19c1c31.asciidoc
new file mode 100644
index 000000000..49f017323
--- /dev/null
+++ b/docs/doc_examples/c0a4b0c1c6eff14da8b152ceb19c1c31.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.health();
+console.log(response);
+
+const response1 = await client.cat.nodes();
+console.log(response1);
+----
diff --git a/docs/doc_examples/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc b/docs/doc_examples/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc
new file mode 100644
index 000000000..6ade03c9c
--- /dev/null
+++ b/docs/doc_examples/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ term: {
+ "user.id": {
+ value: "kimchy",
+ boost: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc b/docs/doc_examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc
new file mode 100644
index 000000000..c0190ee1c
--- /dev/null
+++ b/docs/doc_examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateConfiguration({
+ connector_id: "my-spo-connector",
+ values: {
+ secret_value: "foo-bar",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c0ebaa33e750b87555dc352073f692e8.asciidoc b/docs/doc_examples/c0ebaa33e750b87555dc352073f692e8.asciidoc
new file mode 100644
index 000000000..2adf4c42e
--- /dev/null
+++ b/docs/doc_examples/c0ebaa33e750b87555dc352073f692e8.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.close({
+ index: "my-index-000001",
+});
+console.log(response);
+
+const response1 = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ content: {
+ type: "custom",
+ tokenizer: "whitespace",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.open({
+ index: "my-index-000001",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/c0ff8b3db994c4736f7579dde18097d2.asciidoc b/docs/doc_examples/c0ff8b3db994c4736f7579dde18097d2.asciidoc
new file mode 100644
index 000000000..8227fad3c
--- /dev/null
+++ b/docs/doc_examples/c0ff8b3db994c4736f7579dde18097d2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getSource({
+ index: "my-index-000001",
+ id: 1,
+ _source_includes: "*.id",
+ _source_excludes: "entities",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c10a486a28cbc5b2f15c3474ae31a431.asciidoc b/docs/doc_examples/c10a486a28cbc5b2f15c3474ae31a431.asciidoc
new file mode 100644
index 000000000..d2009383f
--- /dev/null
+++ b/docs/doc_examples/c10a486a28cbc5b2f15c3474ae31a431.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "nightly-snapshots",
+ schedule: "0 30 1 * * ?",
+ name: "",
+ repository: "my_repository",
+ config: {
+ indices: "*",
+ include_global_state: true,
+ },
+ retention: {
+ expire_after: "30d",
+ min_count: 5,
+ max_count: 50,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c11c4d6b30e882871bf0074f407149bd.asciidoc b/docs/doc_examples/c11c4d6b30e882871bf0074f407149bd.asciidoc
new file mode 100644
index 000000000..7067915ee
--- /dev/null
+++ b/docs/doc_examples/c11c4d6b30e882871bf0074f407149bd.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ text: "This is a parent document.",
+ "my-join-field": "my-parent",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c12d6e962f083c728f9397932f05202e.asciidoc b/docs/doc_examples/c12d6e962f083c728f9397932f05202e.asciidoc
new file mode 100644
index 000000000..8dc0ab1c1
--- /dev/null
+++ b/docs/doc_examples/c12d6e962f083c728f9397932f05202e.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job",
+ querystring: {
+ connector_id: "connector-1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c1409f591a01589638d9b00436ce42c0.asciidoc b/docs/doc_examples/c1409f591a01589638d9b00436ce42c0.asciidoc
new file mode 100644
index 000000000..e33cc36cb
--- /dev/null
+++ b/docs/doc_examples/c1409f591a01589638d9b00436ce42c0.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRealms({
+ realms: "default_file",
+ usernames: "rdeniro,alpacino",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc b/docs/doc_examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc
new file mode 100644
index 000000000..f823fda2b
--- /dev/null
+++ b/docs/doc_examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ fields: {
+ comment: {
+ type: "plain",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c155d2670ff82b135c7dcec0fc8a3f23.asciidoc b/docs/doc_examples/c155d2670ff82b135c7dcec0fc8a3f23.asciidoc
new file mode 100644
index 000000000..b214d0ee9
--- /dev/null
+++ b/docs/doc_examples/c155d2670ff82b135c7dcec0fc8a3f23.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.delete({
+ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc b/docs/doc_examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc
new file mode 100644
index 000000000..54f13ca9d
--- /dev/null
+++ b/docs/doc_examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.list({
+ index_name: "search-google-drive",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c186ecf6f799ddff7add1abdecea5821.asciidoc b/docs/doc_examples/c186ecf6f799ddff7add1abdecea5821.asciidoc
new file mode 100644
index 000000000..9d4fb8338
--- /dev/null
+++ b/docs/doc_examples/c186ecf6f799ddff7add1abdecea5821.asciidoc
@@ -0,0 +1,47 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ full_name: {
+ type: "text",
+ store: true,
+ },
+ title: {
+ type: "text",
+ store: true,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ full_name: "Alice Ball",
+ title: "Professor",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ script_fields: {
+ name_with_title: {
+ script: {
+ lang: "painless",
+ source:
+ "params._fields['title'].value + ' ' + params._fields['full_name'].value",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/c187b52646cedeebe0716327add65642.asciidoc b/docs/doc_examples/c187b52646cedeebe0716327add65642.asciidoc
new file mode 100644
index 000000000..f599f4825
--- /dev/null
+++ b/docs/doc_examples/c187b52646cedeebe0716327add65642.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.getAsync({
+ id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
+ format: "json",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c1a39c2628ada04c3ddd61a303b65d44.asciidoc b/docs/doc_examples/c1a39c2628ada04c3ddd61a303b65d44.asciidoc
new file mode 100644
index 000000000..b4564c6f3
--- /dev/null
+++ b/docs/doc_examples/c1a39c2628ada04c3ddd61a303b65d44.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "published",
+ },
+ },
+ },
+ },
+ script: {
+ source:
+ "(24 - hamming(params.queryVector, 'my_byte_dense_vector')) / 24",
+ params: {
+ queryVector: [4, 3, 0],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c1a895497066a3dac674d4b1a119048d.asciidoc b/docs/doc_examples/c1a895497066a3dac674d4b1a119048d.asciidoc
new file mode 100644
index 000000000..08d37316d
--- /dev/null
+++ b/docs/doc_examples/c1a895497066a3dac674d4b1a119048d.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ pretty: "true",
+ query: {
+ term: {
+ full_text: "Quick Brown Foxes!",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c1ac9e53b04f7acee4b4933969d6b574.asciidoc b/docs/doc_examples/c1ac9e53b04f7acee4b4933969d6b574.asciidoc
new file mode 100644
index 000000000..dc95c58bc
--- /dev/null
+++ b/docs/doc_examples/c1ac9e53b04f7acee4b4933969d6b574.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.previewTransform({
+ source: {
+ index: "kibana_sample_data_ecommerce",
+ },
+ pivot: {
+ group_by: {
+ customer_id: {
+ terms: {
+ field: "customer_id",
+ missing_bucket: true,
+ },
+ },
+ },
+ aggregations: {
+ max_price: {
+ max: {
+ field: "taxful_total_price",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c1ad9ff64728a5bfeeb485e60ec694a1.asciidoc b/docs/doc_examples/c1ad9ff64728a5bfeeb485e60ec694a1.asciidoc
new file mode 100644
index 000000000..7f6259118
--- /dev/null
+++ b/docs/doc_examples/c1ad9ff64728a5bfeeb485e60ec694a1.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rankEval({
+ index: "my-index-000001",
+ requests: [
+ {
+ id: "JFK query",
+ request: {
+ query: {
+ match_all: {},
+ },
+ },
+ ratings: [],
+ },
+ ],
+ metric: {
+ expected_reciprocal_rank: {
+ maximum_relevance: 3,
+ k: 20,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c1efc5cfcb3c29711bfe118f1baa28b0.asciidoc b/docs/doc_examples/c1efc5cfcb3c29711bfe118f1baa28b0.asciidoc
new file mode 100644
index 000000000..7d4d534cd
--- /dev/null
+++ b/docs/doc_examples/c1efc5cfcb3c29711bfe118f1baa28b0.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "keyword_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ rebuilt_keyword: {
+ tokenizer: "keyword",
+ filter: [],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c208a06212dc0cf6ac413d4f2c154296.asciidoc b/docs/doc_examples/c208a06212dc0cf6ac413d4f2c154296.asciidoc
new file mode 100644
index 000000000..e9e3a968d
--- /dev/null
+++ b/docs/doc_examples/c208a06212dc0cf6ac413d4f2c154296.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.flush({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c208de54369379e8d78ab201be18b6be.asciidoc b/docs/doc_examples/c208de54369379e8d78ab201be18b6be.asciidoc
new file mode 100644
index 000000000..79835e938
--- /dev/null
+++ b/docs/doc_examples/c208de54369379e8d78ab201be18b6be.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ longs_as_strings: {
+ match_mapping_type: "string",
+ match: "long_*",
+ unmatch: "*_text",
+ mapping: {
+ type: "long",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ long_num: "5",
+ long_text: "foo",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/c21aaedb5752a83489476fa3b5e2e9ff.asciidoc b/docs/doc_examples/c21aaedb5752a83489476fa3b5e2e9ff.asciidoc
new file mode 100644
index 000000000..cdde2a100
--- /dev/null
+++ b/docs/doc_examples/c21aaedb5752a83489476fa3b5e2e9ff.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_query_rules/my-ruleset/_rule/my-rule1",
+ body: {
+ type: "pinned",
+ criteria: [
+ {
+ type: "contains",
+ metadata: "user_query",
+ values: ["pugs", "puggles"],
+ },
+ {
+ type: "exact",
+ metadata: "user_country",
+ values: ["us"],
+ },
+ ],
+ actions: {
+ ids: ["id1", "id2"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c21eb4bc30087188241cbba6b6b89999.asciidoc b/docs/doc_examples/c21eb4bc30087188241cbba6b6b89999.asciidoc
new file mode 100644
index 000000000..c33aa6f65
--- /dev/null
+++ b/docs/doc_examples/c21eb4bc30087188241cbba6b6b89999.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateServiceType({
+ connector_id: "my-connector",
+ service_type: "sharepoint_online",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c23e32775340d7bc6f46820313014d8a.asciidoc b/docs/doc_examples/c23e32775340d7bc6f46820313014d8a.asciidoc
new file mode 100644
index 000000000..4b72af338
--- /dev/null
+++ b/docs/doc_examples/c23e32775340d7bc6f46820313014d8a.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my_test_scores_2",
+ pipeline: "my_test_scores_pipeline",
+ document: {
+ student: "kimchy",
+ grad_year: "2099",
+ math_score: 1200,
+ verbal_score: 800,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c267e90b7873a7c8c8af06f01e958e69.asciidoc b/docs/doc_examples/c267e90b7873a7c8c8af06f01e958e69.asciidoc
new file mode 100644
index 000000000..ede289d19
--- /dev/null
+++ b/docs/doc_examples/c267e90b7873a7c8c8af06f01e958e69.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "logs*",
+ size: 0,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c26b185952ddf9842e18493aca2de147.asciidoc b/docs/doc_examples/c26b185952ddf9842e18493aca2de147.asciidoc
new file mode 100644
index 000000000..b37a39ab7
--- /dev/null
+++ b/docs/doc_examples/c26b185952ddf9842e18493aca2de147.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "books",
+ document: {
+ name: "Snow Crash",
+ author: "Neal Stephenson",
+ release_date: "1992-06-01",
+ page_count: 470,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c27b7d9836aa4ea756f59e9c42911721.asciidoc b/docs/doc_examples/c27b7d9836aa4ea756f59e9c42911721.asciidoc
new file mode 100644
index 000000000..1b989add3
--- /dev/null
+++ b/docs/doc_examples/c27b7d9836aa4ea756f59e9c42911721.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.scroll({
+ scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c28f0b0dd3246cb91d6facb3295a61d7.asciidoc b/docs/doc_examples/c28f0b0dd3246cb91d6facb3295a61d7.asciidoc
new file mode 100644
index 000000000..d47342e95
--- /dev/null
+++ b/docs/doc_examples/c28f0b0dd3246cb91d6facb3295a61d7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.close({
+ index: "kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc b/docs/doc_examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc
new file mode 100644
index 000000000..125fe122d
--- /dev/null
+++ b/docs/doc_examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.clearScroll({
+ scroll_id: "_all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c2d7c36daac8608d2515c549b2c82436.asciidoc b/docs/doc_examples/c2d7c36daac8608d2515c549b2c82436.asciidoc
new file mode 100644
index 000000000..b8646e655
--- /dev/null
+++ b/docs/doc_examples/c2d7c36daac8608d2515c549b2c82436.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ tile: {
+ geotile_grid: {
+ field: "location",
+ precision: 22,
+ bounds: {
+ top_left: "POINT (4.9 52.4)",
+ bottom_right: "POINT (5.0 52.3)",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c318fde926842722825a51e5c9c326a9.asciidoc b/docs/doc_examples/c318fde926842722825a51e5c9c326a9.asciidoc
new file mode 100644
index 000000000..20508d4c1
--- /dev/null
+++ b/docs/doc_examples/c318fde926842722825a51e5c9c326a9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ text: " fox ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc b/docs/doc_examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc
new file mode 100644
index 000000000..7c02bc9da
--- /dev/null
+++ b/docs/doc_examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_phrase_prefix: {
+ my_field: "brown f",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c4272ad0309ffbcbe9ce96bf9fb4352a.asciidoc b/docs/doc_examples/c4272ad0309ffbcbe9ce96bf9fb4352a.asciidoc
new file mode 100644
index 000000000..368f20c7d
--- /dev/null
+++ b/docs/doc_examples/c4272ad0309ffbcbe9ce96bf9fb4352a.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "place",
+ pretty: "true",
+ suggest: {
+ place_suggestion: {
+ prefix: "tim",
+ completion: {
+ field: "suggest",
+ size: 10,
+ contexts: {
+ place_type: ["cafe", "restaurants"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c42bc6e74afc3d43cd032ec2bfd77385.asciidoc b/docs/doc_examples/c42bc6e74afc3d43cd032ec2bfd77385.asciidoc
new file mode 100644
index 000000000..78ec45236
--- /dev/null
+++ b/docs/doc_examples/c42bc6e74afc3d43cd032ec2bfd77385.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ filter: ["word_delimiter"],
+ text: "Neil's-Super-Duper-XL500--42+AutoCoder",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc b/docs/doc_examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc
new file mode 100644
index 000000000..f5e4eeae0
--- /dev/null
+++ b/docs/doc_examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ locale: "fr-FR",
+ query:
+ '\n ROW birth_date_string = "2023-01-15T00:00:00.000Z"\n | EVAL birth_date = date_parse(birth_date_string)\n | EVAL month_of_birth = DATE_FORMAT("MMMM",birth_date)\n | LIMIT 5\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c464ed2001d66a1446f37659dc9efc2a.asciidoc b/docs/doc_examples/c464ed2001d66a1446f37659dc9efc2a.asciidoc
new file mode 100644
index 000000000..de2646cd4
--- /dev/null
+++ b/docs/doc_examples/c464ed2001d66a1446f37659dc9efc2a.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ range: {
+ date_range: {
+ field: "date",
+ format: "MM-yyyy",
+ ranges: [
+ {
+ to: "now-10M/M",
+ },
+ {
+ from: "now-10M/M",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c47f030216a3c89f92f31787fc4d5df5.asciidoc b/docs/doc_examples/c47f030216a3c89f92f31787fc4d5df5.asciidoc
new file mode 100644
index 000000000..a698efa88
--- /dev/null
+++ b/docs/doc_examples/c47f030216a3c89f92f31787fc4d5df5.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.plugins({
+ v: "true",
+ s: "component",
+ h: "name,component,version,description",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c48b8bcd6f41e0d12b58e854e09ea893.asciidoc b/docs/doc_examples/c48b8bcd6f41e0d12b58e854e09ea893.asciidoc
new file mode 100644
index 000000000..9f1c29078
--- /dev/null
+++ b/docs/doc_examples/c48b8bcd6f41e0d12b58e854e09ea893.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "MULTIPOLYGON (((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0, 102.0 200.0)), ((1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0, 1000.0 100.0), (1000.2 100.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8, 1000.2 100.2)))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c4a1d03dcfb82913d0724a42b0a89f20.asciidoc b/docs/doc_examples/c4a1d03dcfb82913d0724a42b0a89f20.asciidoc
new file mode 100644
index 000000000..41ee348ba
--- /dev/null
+++ b/docs/doc_examples/c4a1d03dcfb82913d0724a42b0a89f20.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache();
+console.log(response);
+----
diff --git a/docs/doc_examples/c4b727723b57052b6504bb74fe09abc6.asciidoc b/docs/doc_examples/c4b727723b57052b6504bb74fe09abc6.asciidoc
new file mode 100644
index 000000000..19ee3e92b
--- /dev/null
+++ b/docs/doc_examples/c4b727723b57052b6504bb74fe09abc6.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["template*"],
+ priority: 1,
+ template: {
+ settings: {
+ number_of_shards: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c4c1a87414741a678f6cb91804daf095.asciidoc b/docs/doc_examples/c4c1a87414741a678f6cb91804daf095.asciidoc
new file mode 100644
index 000000000..693a16ba0
--- /dev/null
+++ b/docs/doc_examples/c4c1a87414741a678f6cb91804daf095.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ query: {
+ rank_feature: {
+ field: "pagerank",
+ linear: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c4fadbb7f61e5f83ab3fc9cd4b82b5e5.asciidoc b/docs/doc_examples/c4fadbb7f61e5f83ab3fc9cd4b82b5e5.asciidoc
new file mode 100644
index 000000000..745d088b2
--- /dev/null
+++ b/docs/doc_examples/c4fadbb7f61e5f83ab3fc9cd4b82b5e5.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+ feature_states: ["geoip"],
+ include_global_state: false,
+ indices: "-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc b/docs/doc_examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc
new file mode 100644
index 000000000..198997e4a
--- /dev/null
+++ b/docs/doc_examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c54597143ac86540726f6422fd98b22e.asciidoc b/docs/doc_examples/c54597143ac86540726f6422fd98b22e.asciidoc
new file mode 100644
index 000000000..8de8f5661
--- /dev/null
+++ b/docs/doc_examples/c54597143ac86540726f6422fd98b22e.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_security/settings",
+ body: {
+ security: {
+ "index.auto_expand_replicas": "0-all",
+ },
+ "security-tokens": {
+ "index.auto_expand_replicas": "0-all",
+ },
+ "security-profile": {
+ "index.auto_expand_replicas": "0-all",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c554a1791f29bbbcddda84c64deaba6f.asciidoc b/docs/doc_examples/c554a1791f29bbbcddda84c64deaba6f.asciidoc
new file mode 100644
index 000000000..93d08c3c2
--- /dev/null
+++ b/docs/doc_examples/c554a1791f29bbbcddda84c64deaba6f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c580092fd3d36c32b09d63921708a67b.asciidoc b/docs/doc_examples/c580092fd3d36c32b09d63921708a67b.asciidoc
new file mode 100644
index 000000000..91be3581e
--- /dev/null
+++ b/docs/doc_examples/c580092fd3d36c32b09d63921708a67b.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ dis_max: {
+ queries: [
+ {
+ term: {
+ title: "Quick pets",
+ },
+ },
+ {
+ term: {
+ body: "Quick pets",
+ },
+ },
+ ],
+ tie_breaker: 0.7,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c5802e9f3f4068fcecb6937b867b270d.asciidoc b/docs/doc_examples/c5802e9f3f4068fcecb6937b867b270d.asciidoc
new file mode 100644
index 000000000..a55b94c8b
--- /dev/null
+++ b/docs/doc_examples/c5802e9f3f4068fcecb6937b867b270d.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ terms: {
+ field: "genre",
+ order: {
+ _count: "asc",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc b/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc
new file mode 100644
index 000000000..2a14bb328
--- /dev/null
+++ b/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkUpdateApiKeys({
+ body: {
+ ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
+ role_descriptors: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c5ba7c4badb5ef5ca32740106e4aa6b6.asciidoc b/docs/doc_examples/c5ba7c4badb5ef5ca32740106e4aa6b6.asciidoc
new file mode 100644
index 000000000..18b3c84e7
--- /dev/null
+++ b/docs/doc_examples/c5ba7c4badb5ef5ca32740106e4aa6b6.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "my-index-000001",
+ id: 1,
+ fields: "message",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c5bc577ff92f889225b0d2617adcb48c.asciidoc b/docs/doc_examples/c5bc577ff92f889225b0d2617adcb48c.asciidoc
new file mode 100644
index 000000000..9144b19a6
--- /dev/null
+++ b/docs/doc_examples/c5bc577ff92f889225b0d2617adcb48c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "process",
+ filter_path: "**.max_file_descriptors",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c5cc19e48549fbc5327a9d46874bbeee.asciidoc b/docs/doc_examples/c5cc19e48549fbc5327a9d46874bbeee.asciidoc
new file mode 100644
index 000000000..fc07f2f81
--- /dev/null
+++ b/docs/doc_examples/c5cc19e48549fbc5327a9d46874bbeee.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "quantized-image-index",
+ knn: {
+ field: "image-vector",
+ query_vector: [0.1, -2],
+ k: 10,
+ num_candidates: 100,
+ },
+ fields: ["title"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c5ed7d83ade97a417aef28b9e2871e5d.asciidoc b/docs/doc_examples/c5ed7d83ade97a417aef28b9e2871e5d.asciidoc
new file mode 100644
index 000000000..31134e4a0
--- /dev/null
+++ b/docs/doc_examples/c5ed7d83ade97a417aef28b9e2871e5d.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-data-stream",
+ filter_path: "hits.hits._source",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6151a0788a10a7f40da684d72c3255c.asciidoc b/docs/doc_examples/c6151a0788a10a7f40da684d72c3255c.asciidoc
new file mode 100644
index 000000000..e865fbce5
--- /dev/null
+++ b/docs/doc_examples/c6151a0788a10a7f40da684d72c3255c.asciidoc
@@ -0,0 +1,55 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ title: "Something really urgent",
+ labels: {
+ priority: "urgent",
+ release: ["v1.2.5", "v1.3.0"],
+ timestamp: {
+ created: 1541458026,
+ closed: 1541457010,
+ },
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ title: "Somewhat less urgent",
+ labels: {
+ priority: "high",
+ release: ["v1.3.0"],
+ timestamp: {
+ created: 1541458026,
+ closed: 1541457010,
+ },
+ },
+ },
+ {
+ index: {},
+ },
+ {
+ title: "Not urgent",
+ labels: {
+ priority: "low",
+ release: ["v1.2.0"],
+ timestamp: {
+ created: 1541458026,
+ closed: 1541457010,
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c630a1f891aa9aa651f9982b832a42e1.asciidoc b/docs/doc_examples/c630a1f891aa9aa651f9982b832a42e1.asciidoc
new file mode 100644
index 000000000..bb7f521f2
--- /dev/null
+++ b/docs/doc_examples/c630a1f891aa9aa651f9982b832a42e1.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ drop: {
+ description: "Drop documents that contain 'network.name' of 'Guest'",
+ if: "ctx.network?.name != null && ctx.network.name.contains('Guest')",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc b/docs/doc_examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc
new file mode 100644
index 000000000..f24162ad8
--- /dev/null
+++ b/docs/doc_examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "template_1",
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ },
+ version: 123,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c639036b87d02fb864e27c4ca29ef833.asciidoc b/docs/doc_examples/c639036b87d02fb864e27c4ca29ef833.asciidoc
new file mode 100644
index 000000000..8bd9633cf
--- /dev/null
+++ b/docs/doc_examples/c639036b87d02fb864e27c4ca29ef833.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "stackoverflow",
+ size: 0,
+ query: {
+ query_string: {
+ query: "tags:kibana",
+ },
+ },
+ runtime_mappings: {
+ "tags.hash": {
+ type: "long",
+ script: "emit(doc['tags'].hashCode())",
+ },
+ },
+ aggs: {
+ my_unbiased_sample: {
+ diversified_sampler: {
+ shard_size: 200,
+ max_docs_per_value: 3,
+ field: "tags.hash",
+ },
+ aggs: {
+ keywords: {
+ significant_terms: {
+ field: "tags",
+ exclude: ["kibana"],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c64b61bedb21b9def8fce5092e677af9.asciidoc b/docs/doc_examples/c64b61bedb21b9def8fce5092e677af9.asciidoc
new file mode 100644
index 000000000..4e2637039
--- /dev/null
+++ b/docs/doc_examples/c64b61bedb21b9def8fce5092e677af9.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ suggest: {
+ "my-suggest-1": {
+ text: "tring out Elasticsearch",
+ term: {
+ field: "message",
+ },
+ },
+ "my-suggest-2": {
+ text: "kmichy",
+ term: {
+ field: "user.id",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c654b09be981be12fc7be0ba33f8652b.asciidoc b/docs/doc_examples/c654b09be981be12fc7be0ba33f8652b.asciidoc
new file mode 100644
index 000000000..ed2a6cc50
--- /dev/null
+++ b/docs/doc_examples/c654b09be981be12fc7be0ba33f8652b.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "multilinestring",
+ coordinates: [
+ [
+ [1002, 200],
+ [1003, 200],
+ [1003, 300],
+ [1002, 300],
+ ],
+ [
+ [1000, 100],
+ [1001, 100],
+ [1001, 100],
+ [1000, 100],
+ ],
+ [
+ [1000.2, 100.2],
+ [1000.8, 100.2],
+ [1000.8, 100.8],
+ [1000.2, 100.8],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c65b00a285f510dcd2865aa3539b4e03.asciidoc b/docs/doc_examples/c65b00a285f510dcd2865aa3539b4e03.asciidoc
new file mode 100644
index 000000000..236a07a74
--- /dev/null
+++ b/docs/doc_examples/c65b00a285f510dcd2865aa3539b4e03.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.getTransform({
+ size: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c66dab0b114fa3e228e1c0e0e5a99b60.asciidoc b/docs/doc_examples/c66dab0b114fa3e228e1c0e0e5a99b60.asciidoc
new file mode 100644
index 000000000..4ba09eeaf
--- /dev/null
+++ b/docs/doc_examples/c66dab0b114fa3e228e1c0e0e5a99b60.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ fields: ["user.first"],
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc b/docs/doc_examples/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc
new file mode 100644
index 000000000..3dc3bcdf4
--- /dev/null
+++ b/docs/doc_examples/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ message: "tring out Elasticsearch",
+ },
+ },
+ suggest: {
+ "my-suggestion": {
+ text: "tring out Elasticsearch",
+ term: {
+ field: "message",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6abe91b5527870face2b826f37ba1da.asciidoc b/docs/doc_examples/c6abe91b5527870face2b826f37ba1da.asciidoc
new file mode 100644
index 000000000..926646068
--- /dev/null
+++ b/docs/doc_examples/c6abe91b5527870face2b826f37ba1da.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "image-index",
+ query: {
+ match: {
+ title: {
+ query: "mountain lake",
+ boost: 0.9,
+ },
+ },
+ },
+ knn: {
+ field: "image-vector",
+ query_vector: [54, 10, -2],
+ k: 5,
+ num_candidates: 50,
+ boost: 0.1,
+ },
+ size: 10,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6b365c7da97d7e50f36820a7d36f548.asciidoc b/docs/doc_examples/c6b365c7da97d7e50f36820a7d36f548.asciidoc
new file mode 100644
index 000000000..cfd0cc222
--- /dev/null
+++ b/docs/doc_examples/c6b365c7da97d7e50f36820a7d36f548.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my_index,my_other_index",
+ settings: {
+ "index.number_of_replicas": 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6b5c695a9b757b5e7325345b206bde5.asciidoc b/docs/doc_examples/c6b5c695a9b757b5e7325345b206bde5.asciidoc
new file mode 100644
index 000000000..788794cca
--- /dev/null
+++ b/docs/doc_examples/c6b5c695a9b757b5e7325345b206bde5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.deletePipeline({
+ id: "pipeline-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6b8713bd49661d69d6b868f5b991d17.asciidoc b/docs/doc_examples/c6b8713bd49661d69d6b868f5b991d17.asciidoc
new file mode 100644
index 000000000..7bdb10fe5
--- /dev/null
+++ b/docs/doc_examples/c6b8713bd49661d69d6b868f5b991d17.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "job-candidates",
+ id: 1,
+ refresh: "true",
+ document: {
+ name: "Jane Smith",
+ programming_languages: ["c++", "java"],
+ required_matches: 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc b/docs/doc_examples/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc
new file mode 100644
index 000000000..51e78e61c
--- /dev/null
+++ b/docs/doc_examples/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ user_id: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6d39d22188dc7bbfdad811a94cbcc2b.asciidoc b/docs/doc_examples/c6d39d22188dc7bbfdad811a94cbcc2b.asciidoc
new file mode 100644
index 000000000..7f81cd4b5
--- /dev/null
+++ b/docs/doc_examples/c6d39d22188dc7bbfdad811a94cbcc2b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "classic",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc b/docs/doc_examples/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc
new file mode 100644
index 000000000..06f36c1fe
--- /dev/null
+++ b/docs/doc_examples/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "transport.tracer.include": "*",
+ "transport.tracer.exclude": "internal:coordination/fault_detection/*",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c733f20641b20e124f26198534755d6d.asciidoc b/docs/doc_examples/c733f20641b20e124f26198534755d6d.asciidoc
new file mode 100644
index 000000000..4c0759c44
--- /dev/null
+++ b/docs/doc_examples/c733f20641b20e124f26198534755d6d.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ "my-first-agg-name": {
+ terms: {
+ field: "my-field",
+ },
+ },
+ "my-second-agg-name": {
+ avg: {
+ field: "my-other-field",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c765ce78f3605c0e70d213f22aac8a53.asciidoc b/docs/doc_examples/c765ce78f3605c0e70d213f22aac8a53.asciidoc
new file mode 100644
index 000000000..ec92cc77c
--- /dev/null
+++ b/docs/doc_examples/c765ce78f3605c0e70d213f22aac8a53.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.putAutoscalingPolicy({
+ name: "my_autoscaling_policy",
+ policy: {
+ roles: ["data_hot"],
+ deciders: {
+ fixed: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c76cb6a080959b0d87afd780cf814be2.asciidoc b/docs/doc_examples/c76cb6a080959b0d87afd780cf814be2.asciidoc
new file mode 100644
index 000000000..6226ba7c2
--- /dev/null
+++ b/docs/doc_examples/c76cb6a080959b0d87afd780cf814be2.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ should: [
+ {
+ term: {
+ message: "quick",
+ },
+ },
+ {
+ term: {
+ message: "brown",
+ },
+ },
+ {
+ prefix: {
+ message: "f",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c793efe7280e9b6e09981c4d4f832348.asciidoc b/docs/doc_examples/c793efe7280e9b6e09981c4d4f832348.asciidoc
new file mode 100644
index 000000000..ca162517a
--- /dev/null
+++ b/docs/doc_examples/c793efe7280e9b6e09981c4d4f832348.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ ip: {
+ type: "ip",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ ip: [
+ "192.168.0.1",
+ "192.168.0.1",
+ "10.10.12.123",
+ "2001:db8::1:0:0:1",
+ "::afff:4567:890a",
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/c79b284fa7a5d7421c6daae62bc697f9.asciidoc b/docs/doc_examples/c79b284fa7a5d7421c6daae62bc697f9.asciidoc
new file mode 100644
index 000000000..2cf87b5b5
--- /dev/null
+++ b/docs/doc_examples/c79b284fa7a5d7421c6daae62bc697f9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "kibana_sample_data_ecommerce",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c79e8ee86b332302b25c5c1f5f4f89d7.asciidoc b/docs/doc_examples/c79e8ee86b332302b25c5c1f5f4f89d7.asciidoc
new file mode 100644
index 000000000..a8aabae5a
--- /dev/null
+++ b/docs/doc_examples/c79e8ee86b332302b25c5c1f5f4f89d7.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "dept_role",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ query: {
+ term: {
+ department_id: 12,
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c8210f23c10d0642f24c1e43faa4deda.asciidoc b/docs/doc_examples/c8210f23c10d0642f24c1e43faa4deda.asciidoc
new file mode 100644
index 000000000..4de7de316
--- /dev/null
+++ b/docs/doc_examples/c8210f23c10d0642f24c1e43faa4deda.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "my-mappings",
+ template: {
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ format: "date_optional_time||epoch_millis",
+ },
+ message: {
+ type: "wildcard",
+ },
+ },
+ },
+ },
+ _meta: {
+ description: "Mappings for @timestamp and message fields",
+ "my-custom-meta-field": "More arbitrary metadata",
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putComponentTemplate({
+ name: "my-settings",
+ template: {
+ settings: {
+ "index.lifecycle.name": "my-lifecycle-policy",
+ },
+ },
+ _meta: {
+ description: "Settings for ILM",
+ "my-custom-meta-field": "More arbitrary metadata",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/c87038b96ab06d9a741a130f94de4f02.asciidoc b/docs/doc_examples/c87038b96ab06d9a741a130f94de4f02.asciidoc
new file mode 100644
index 000000000..b3691d8b5
--- /dev/null
+++ b/docs/doc_examples/c87038b96ab06d9a741a130f94de4f02.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.delete({
+ index: "my-index-000001",
+ id: 1,
+ timeout: "5m",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c873f9cd093e26515148f052e28c7805.asciidoc b/docs/doc_examples/c873f9cd093e26515148f052e28c7805.asciidoc
new file mode 100644
index 000000000..56f09eb18
--- /dev/null
+++ b/docs/doc_examples/c873f9cd093e26515148f052e28c7805.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getModelSnapshots({
+ job_id: "high_sum_total_sales",
+ start: 1575402236000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c8aa8e8c0ac160b8c4efd1ac3b9f48f3.asciidoc b/docs/doc_examples/c8aa8e8c0ac160b8c4efd1ac3b9f48f3.asciidoc
new file mode 100644
index 000000000..1bd714230
--- /dev/null
+++ b/docs/doc_examples/c8aa8e8c0ac160b8c4efd1ac3b9f48f3.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "amazon-reviews",
+ mappings: {
+ properties: {
+ review_vector: {
+ type: "dense_vector",
+ dims: 8,
+ index: true,
+ similarity: "cosine",
+ },
+ review_text: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c8bbf362f06a0d8dab33ec0d99743343.asciidoc b/docs/doc_examples/c8bbf362f06a0d8dab33ec0d99743343.asciidoc
new file mode 100644
index 000000000..333d095ab
--- /dev/null
+++ b/docs/doc_examples/c8bbf362f06a0d8dab33ec0d99743343.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "classic",
+ filter: ["classic"],
+ text: "The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c8e2109b19d50467ab83a40006462e9f.asciidoc b/docs/doc_examples/c8e2109b19d50467ab83a40006462e9f.asciidoc
new file mode 100644
index 000000000..e83d550e1
--- /dev/null
+++ b/docs/doc_examples/c8e2109b19d50467ab83a40006462e9f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.executePolicy({
+ name: "my-policy",
+ wait_for_completion: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c92b761c18d8e1c3df75c04a21503e16.asciidoc b/docs/doc_examples/c92b761c18d8e1c3df75c04a21503e16.asciidoc
new file mode 100644
index 000000000..ae890cd27
--- /dev/null
+++ b/docs/doc_examples/c92b761c18d8e1c3df75c04a21503e16.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "logs-my_app-settings",
+ template: {
+ settings: {
+ "index.default_pipeline": "logs-my_app-default",
+ "index.lifecycle.name": "logs",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putIndexTemplate({
+ name: "logs-my_app-template",
+ index_patterns: ["logs-my_app-*"],
+ data_stream: {},
+ priority: 500,
+ composed_of: ["logs-my_app-settings", "logs-my_app-mappings"],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/c956bf1f0829a5f0357c0494ed8b6ca3.asciidoc b/docs/doc_examples/c956bf1f0829a5f0357c0494ed8b6ca3.asciidoc
new file mode 100644
index 000000000..89b64a70b
--- /dev/null
+++ b/docs/doc_examples/c956bf1f0829a5f0357c0494ed8b6ca3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchTemplate({
+ index: "my-index",
+ id: "my-search-template",
+ params: {
+ query_string: "hello world",
+ from: 0,
+ size: 10,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c95d5317525c2ff625e6971c277247af.asciidoc b/docs/doc_examples/c95d5317525c2ff625e6971c277247af.asciidoc
new file mode 100644
index 000000000..655ad864e
--- /dev/null
+++ b/docs/doc_examples/c95d5317525c2ff625e6971c277247af.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ filter: ["lowercase"],
+ text: "john.SMITH@example.COM",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c96669604d0e66a097ddf3093b025ccd.asciidoc b/docs/doc_examples/c96669604d0e66a097ddf3093b025ccd.asciidoc
new file mode 100644
index 000000000..37d2b65d7
--- /dev/null
+++ b/docs/doc_examples/c96669604d0e66a097ddf3093b025ccd.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ "my-agg-name": {
+ terms: {
+ field: "my-field",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c96e5740b79f703c5b77e3ddc9fdf3a0.asciidoc b/docs/doc_examples/c96e5740b79f703c5b77e3ddc9fdf3a0.asciidoc
new file mode 100644
index 000000000..bbc28e291
--- /dev/null
+++ b/docs/doc_examples/c96e5740b79f703c5b77e3ddc9fdf3a0.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "my-index-template",
+ index_patterns: ["my-data-stream*"],
+ data_stream: {},
+ composed_of: ["my-mappings", "my-settings"],
+ priority: 500,
+ _meta: {
+ description: "Template for my time series data",
+ "my-custom-meta-field": "More arbitrary metadata",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c97fd95ebdcf56cc973582e37f732ed2.asciidoc b/docs/doc_examples/c97fd95ebdcf56cc973582e37f732ed2.asciidoc
new file mode 100644
index 000000000..673c7aac1
--- /dev/null
+++ b/docs/doc_examples/c97fd95ebdcf56cc973582e37f732ed2.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.getPolicy();
+console.log(response);
+----
diff --git a/docs/doc_examples/c9a6ab0a56bb0177f158277185f68302.asciidoc b/docs/doc_examples/c9a6ab0a56bb0177f158277185f68302.asciidoc
new file mode 100644
index 000000000..ad55541b1
--- /dev/null
+++ b/docs/doc_examples/c9a6ab0a56bb0177f158277185f68302.asciidoc
@@ -0,0 +1,58 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ metrics: {
+ type: "object",
+ subobjects: false,
+ properties: {
+ time: {
+ type: "long",
+ },
+ "time.min": {
+ type: "long",
+ },
+ "time.max": {
+ type: "long",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "metric_1",
+ document: {
+ "metrics.time": 100,
+ "metrics.time.min": 10,
+ "metrics.time.max": 900,
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: "metric_2",
+ document: {
+ metrics: {
+ time: 100,
+ "time.min": 10,
+ "time.max": 900,
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/c9afa715021f2e6450e72ac73271960c.asciidoc b/docs/doc_examples/c9afa715021f2e6450e72ac73271960c.asciidoc
new file mode 100644
index 000000000..1d51cd87e
--- /dev/null
+++ b/docs/doc_examples/c9afa715021f2e6450e72ac73271960c.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "parent_example",
+ id: 1,
+ document: {
+ join: {
+ name: "question",
+ },
+ body: "I have Windows 2003 server and i bought a new Windows 2008 server...",
+ title:
+ "Whats the best way to file transfer my site from server to a newer one?",
+ tags: ["windows-server-2003", "windows-server-2008", "file-transfer"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c9b6cbe93c8bd23e3f658c3af4e70092.asciidoc b/docs/doc_examples/c9b6cbe93c8bd23e3f658c3af4e70092.asciidoc
new file mode 100644
index 000000000..4d40dcc30
--- /dev/null
+++ b/docs/doc_examples/c9b6cbe93c8bd23e3f658c3af4e70092.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ autocomplete: {
+ tokenizer: "autocomplete",
+ filter: ["lowercase"],
+ },
+ autocomplete_search: {
+ tokenizer: "lowercase",
+ },
+ },
+ tokenizer: {
+ autocomplete: {
+ type: "edge_ngram",
+ min_gram: 2,
+ max_gram: 10,
+ token_chars: ["letter"],
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ analyzer: "autocomplete",
+ search_analyzer: "autocomplete_search",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ title: "Quick Foxes",
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.refresh({
+ index: "my-index-000001",
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ title: {
+ query: "Quick Fo",
+ operator: "and",
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc b/docs/doc_examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc
new file mode 100644
index 000000000..819634ad8
--- /dev/null
+++ b/docs/doc_examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc
@@ -0,0 +1,54 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ dynamic_templates: [
+ {
+ geo_point: {
+ mapping: {
+ type: "geo_point",
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ operations: [
+ {
+ index: {
+ _index: "my_index",
+ _id: "1",
+ dynamic_templates: {
+ work_location: "geo_point",
+ },
+ },
+ },
+ {
+ field: "value1",
+ work_location: "41.12,-71.34",
+ raw_location: "41.12,-71.34",
+ },
+ {
+ create: {
+ _index: "my_index",
+ _id: "2",
+ dynamic_templates: {
+ home_location: "geo_point",
+ },
+ },
+ },
+ {
+ field: "value2",
+ home_location: "41.12,-71.34",
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc b/docs/doc_examples/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc
new file mode 100644
index 000000000..d4f5c37d2
--- /dev/null
+++ b/docs/doc_examples/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: {
+ source:
+ "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }",
+ lang: "painless",
+ params: {
+ tag: "green",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc b/docs/doc_examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc
new file mode 100644
index 000000000..52d6e5890
--- /dev/null
+++ b/docs/doc_examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ terms: {
+ "user.id": ["kimchy", "elkbee"],
+ boost: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ca06db2aa4747910278f96315f7be94b.asciidoc b/docs/doc_examples/ca06db2aa4747910278f96315f7be94b.asciidoc
new file mode 100644
index 000000000..4b2d56fb3
--- /dev/null
+++ b/docs/doc_examples/ca06db2aa4747910278f96315f7be94b.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top: 40.73,
+ left: -74.1,
+ bottom: 40.01,
+ right: -71.12,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ca08e511e5907d258081b10a1a9f0072.asciidoc b/docs/doc_examples/ca08e511e5907d258081b10a1a9f0072.asciidoc
new file mode 100644
index 000000000..f8cc1818e
--- /dev/null
+++ b/docs/doc_examples/ca08e511e5907d258081b10a1a9f0072.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "new-data-stream-template",
+ index_patterns: ["new-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date_nanos",
+ },
+ },
+ },
+ settings: {
+ "sort.field": ["@timestamp"],
+ "sort.order": ["desc"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ca1cc4bcef22fdf9153833bfe6a55294.asciidoc b/docs/doc_examples/ca1cc4bcef22fdf9153833bfe6a55294.asciidoc
new file mode 100644
index 000000000..ce21a8a26
--- /dev/null
+++ b/docs/doc_examples/ca1cc4bcef22fdf9153833bfe6a55294.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _index: ".ds-my-data-stream-2099.03.08-000003",
+ _id: "bfspvnIBr7VVZlfp2lqX",
+ if_seq_no: 0,
+ if_primary_term: 1,
+ },
+ },
+ {
+ "@timestamp": "2099-03-08T11:06:07.000Z",
+ user: {
+ id: "8a4f500d",
+ },
+ message: "Login successful",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ca3bcd6278510ebced5f74484033cb36.asciidoc b/docs/doc_examples/ca3bcd6278510ebced5f74484033cb36.asciidoc
new file mode 100644
index 000000000..79282a804
--- /dev/null
+++ b/docs/doc_examples/ca3bcd6278510ebced5f74484033cb36.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getScriptLanguages();
+console.log(response);
+----
diff --git a/docs/doc_examples/ca5ae0eb7709f3807bc6239cd4bd9141.asciidoc b/docs/doc_examples/ca5ae0eb7709f3807bc6239cd4bd9141.asciidoc
new file mode 100644
index 000000000..6fa3241c9
--- /dev/null
+++ b/docs/doc_examples/ca5ae0eb7709f3807bc6239cd4bd9141.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey();
+console.log(response);
+----
diff --git a/docs/doc_examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc b/docs/doc_examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc
new file mode 100644
index 000000000..6b66ad338
--- /dev/null
+++ b/docs/doc_examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ sparse_vector: {
+ field: "ml.tokens",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ca98afbd6a90f63e02f62239d225313b.asciidoc b/docs/doc_examples/ca98afbd6a90f63e02f62239d225313b.asciidoc
new file mode 100644
index 000000000..9f401ce83
--- /dev/null
+++ b/docs/doc_examples/ca98afbd6a90f63e02f62239d225313b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.danglingIndices.importDanglingIndex({
+ index_uuid: "zmM4e0JtBkeUjiHD-MihPQ",
+ accept_data_loss: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/caaafef1a76c2bec677704c2dc233218.asciidoc b/docs/doc_examples/caaafef1a76c2bec677704c2dc233218.asciidoc
new file mode 100644
index 000000000..d19897921
--- /dev/null
+++ b/docs/doc_examples/caaafef1a76c2bec677704c2dc233218.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.simulateIndexTemplate({
+ name: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/caab99520d3fe41f6154d74a7f696057.asciidoc b/docs/doc_examples/caab99520d3fe41f6154d74a7f696057.asciidoc
new file mode 100644
index 000000000..d4a98b60b
--- /dev/null
+++ b/docs/doc_examples/caab99520d3fe41f6154d74a7f696057.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cac74a85c6b352a6e23d8673abae126f.asciidoc b/docs/doc_examples/cac74a85c6b352a6e23d8673abae126f.asciidoc
new file mode 100644
index 000000000..3741af149
--- /dev/null
+++ b/docs/doc_examples/cac74a85c6b352a6e23d8673abae126f.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index: "kibana_sample_data_ecommerce",
+ size: 0,
+ aggs: {
+ my_agg: {
+ frequent_item_sets: {
+ minimum_set_size: 3,
+ fields: [
+ {
+ field: "category.keyword",
+ },
+ {
+ field: "geoip.city_name",
+ },
+ ],
+ size: 3,
+ filter: {
+ term: {
+ "geoip.continent_name": "Europe",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc b/docs/doc_examples/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc
new file mode 100644
index 000000000..366ef7e6a
--- /dev/null
+++ b/docs/doc_examples/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.split({
+ index: "my-index-000001",
+ target: "split-my-index-000001",
+ settings: {
+ "index.number_of_shards": 2,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc b/docs/doc_examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc
new file mode 100644
index 000000000..62d570c80
--- /dev/null
+++ b/docs/doc_examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb16f1ff85399ddaa418834be580c9de.asciidoc b/docs/doc_examples/cb16f1ff85399ddaa418834be580c9de.asciidoc
new file mode 100644
index 000000000..15951883c
--- /dev/null
+++ b/docs/doc_examples/cb16f1ff85399ddaa418834be580c9de.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "slm-admin",
+ cluster: ["manage_slm", "cluster:admin/snapshot/*"],
+ indices: [
+ {
+ names: [".slm-history-*"],
+ privileges: ["all"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb1d2a787bbe88974cfc5f132556a51c.asciidoc b/docs/doc_examples/cb1d2a787bbe88974cfc5f132556a51c.asciidoc
new file mode 100644
index 000000000..9d4169eb7
--- /dev/null
+++ b/docs/doc_examples/cb1d2a787bbe88974cfc5f132556a51c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteDataStream({
+ name: "*",
+ expand_wildcards: "all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb2f70601cb004b9ece9b0b43a9dc21a.asciidoc b/docs/doc_examples/cb2f70601cb004b9ece9b0b43a9dc21a.asciidoc
new file mode 100644
index 000000000..43c87dda3
--- /dev/null
+++ b/docs/doc_examples/cb2f70601cb004b9ece9b0b43a9dc21a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache({
+ index: "my-index-000001,my-index-000002",
+ request: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb3c483816b6ea150ff6c559fa144d32.asciidoc b/docs/doc_examples/cb3c483816b6ea150ff6c559fa144d32.asciidoc
new file mode 100644
index 000000000..93090861b
--- /dev/null
+++ b/docs/doc_examples/cb3c483816b6ea150ff6c559fa144d32.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "timeseries_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_primary_shard_size: "50GB",
+ max_age: "30d",
+ },
+ },
+ },
+ delete: {
+ min_age: "90d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb4388b72d41c431ec9ca8255b2f65fb.asciidoc b/docs/doc_examples/cb4388b72d41c431ec9ca8255b2f65fb.asciidoc
new file mode 100644
index 000000000..4c0f31631
--- /dev/null
+++ b/docs/doc_examples/cb4388b72d41c431ec9ca8255b2f65fb.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "example",
+ id: 1,
+ refresh: "wait_for",
+ document: {
+ name: "Lucky Landing",
+ geometry: {
+ type: "point",
+ coordinates: [1355.400544, 5255.530286],
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/cb71332115c92cfb89375abd30b8bbbb.asciidoc b/docs/doc_examples/cb71332115c92cfb89375abd30b8bbbb.asciidoc
new file mode 100644
index 000000000..dfa1e1323
--- /dev/null
+++ b/docs/doc_examples/cb71332115c92cfb89375abd30b8bbbb.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.master({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cb71c6ecfb8b19725c374572444e5d32.asciidoc b/docs/doc_examples/cb71c6ecfb8b19725c374572444e5d32.asciidoc
new file mode 100644
index 000000000..ca22d0ffd
--- /dev/null
+++ b/docs/doc_examples/cb71c6ecfb8b19725c374572444e5d32.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ avg_start: {
+ avg: {
+ field: "measures.start",
+ },
+ },
+ avg_end: {
+ avg: {
+ field: "measures.end",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cba3462a307e2483c14e3e198f6960e3.asciidoc b/docs/doc_examples/cba3462a307e2483c14e3e198f6960e3.asciidoc
new file mode 100644
index 000000000..70b810179
--- /dev/null
+++ b/docs/doc_examples/cba3462a307e2483c14e3e198f6960e3.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ _meta: {
+ description: "used for nginx log",
+ project: {
+ name: "myProject",
+ department: "myDepartment",
+ },
+ },
+ phases: {
+ warm: {
+ min_age: "10d",
+ actions: {
+ forcemerge: {
+ max_num_segments: 1,
+ },
+ },
+ },
+ delete: {
+ min_age: "30d",
+ actions: {
+ delete: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cbc2b5595890f87165aab1a741b1d22c.asciidoc b/docs/doc_examples/cbc2b5595890f87165aab1a741b1d22c.asciidoc
new file mode 100644
index 000000000..f58997869
--- /dev/null
+++ b/docs/doc_examples/cbc2b5595890f87165aab1a741b1d22c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-timestamp-pipeline",
+ description: "Shifts the @timestamp to the last 15 minutes",
+ processors: [
+ {
+ set: {
+ field: "ingest_time",
+ value: "{{_ingest.timestamp}}",
+ },
+ },
+ {
+ script: {
+ lang: "painless",
+ source:
+ '\n def delta = ChronoUnit.SECONDS.between(\n ZonedDateTime.parse("2022-06-21T15:49:00Z"),\n ZonedDateTime.parse(ctx["ingest_time"])\n );\n ctx["@timestamp"] = ZonedDateTime.parse(ctx["@timestamp"]).plus(delta,ChronoUnit.SECONDS).toString();\n ',
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cbfd6f23f8283e64ec3157c65bb722c4.asciidoc b/docs/doc_examples/cbfd6f23f8283e64ec3157c65bb722c4.asciidoc
new file mode 100644
index 000000000..310baf041
--- /dev/null
+++ b/docs/doc_examples/cbfd6f23f8283e64ec3157c65bb722c4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.templates({
+ v: "true",
+ s: "order:desc,index_patterns",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cc0cca5556ec6224c7134c233734beed.asciidoc b/docs/doc_examples/cc0cca5556ec6224c7134c233734beed.asciidoc
new file mode 100644
index 000000000..0985386a9
--- /dev/null
+++ b/docs/doc_examples/cc0cca5556ec6224c7134c233734beed.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.remoteInfo();
+console.log(response);
+----
diff --git a/docs/doc_examples/cc56be758d5d75febbd975786187c861.asciidoc b/docs/doc_examples/cc56be758d5d75febbd975786187c861.asciidoc
new file mode 100644
index 000000000..b453c2cd4
--- /dev/null
+++ b/docs/doc_examples/cc56be758d5d75febbd975786187c861.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createServiceToken({
+ namespace: "elastic",
+ service: "fleet-server",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc b/docs/doc_examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc
new file mode 100644
index 000000000..b9bbc5172
--- /dev/null
+++ b/docs/doc_examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "mv",
+ mappings: {
+ properties: {
+ b: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "mv",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ a: 1,
+ b: ["foo", "foo", "bar"],
+ },
+ {
+ index: {},
+ },
+ {
+ a: 2,
+ b: ["bar", "bar"],
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.esql.query({
+ query: "FROM mv | LIMIT 2",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/cc7f1c74ede6810e2c9db19256d6b653.asciidoc b/docs/doc_examples/cc7f1c74ede6810e2c9db19256d6b653.asciidoc
new file mode 100644
index 000000000..d193cb365
--- /dev/null
+++ b/docs/doc_examples/cc7f1c74ede6810e2c9db19256d6b653.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ match: {
+ "http.response": "304",
+ },
+ },
+ fields: ["http.response"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cc90639f2e65bd89cb73296cac6135cf.asciidoc b/docs/doc_examples/cc90639f2e65bd89cb73296cac6135cf.asciidoc
new file mode 100644
index 000000000..c5bd1a7ef
--- /dev/null
+++ b/docs/doc_examples/cc90639f2e65bd89cb73296cac6135cf.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteTrainedModel({
+ model_id: "regression-job-one-1574775307356",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cc9dac8db7a1482e2fbe3235197c3de1.asciidoc b/docs/doc_examples/cc9dac8db7a1482e2fbe3235197c3de1.asciidoc
new file mode 100644
index 000000000..b90fcd491
--- /dev/null
+++ b/docs/doc_examples/cc9dac8db7a1482e2fbe3235197c3de1.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "snapshot_2",
+ wait_for_completion: "true",
+ indices: "index_1,index_2",
+ ignore_unavailable: true,
+ include_global_state: false,
+ rename_pattern: "index_(.+)",
+ rename_replacement: "restored_index_$1",
+ include_aliases: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc b/docs/doc_examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc
new file mode 100644
index 000000000..c97a5d54f
--- /dev/null
+++ b/docs/doc_examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc
@@ -0,0 +1,72 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.simulate.ingest({
+ body: {
+ docs: [
+ {
+ _index: "my-index",
+ _id: "id",
+ _source: {
+ foo: "bar",
+ },
+ },
+ {
+ _index: "my-index",
+ _id: "id",
+ _source: {
+ foo: "rab",
+ },
+ },
+ ],
+ pipeline_substitutions: {
+ "my-pipeline": {
+ processors: [
+ {
+ set: {
+ field: "field3",
+ value: "value3",
+ },
+ },
+ ],
+ },
+ },
+ component_template_substitutions: {
+ "my-component-template": {
+ template: {
+ mappings: {
+ dynamic: "true",
+ properties: {
+ field3: {
+ type: "keyword",
+ },
+ },
+ },
+ settings: {
+ index: {
+ default_pipeline: "my-pipeline",
+ },
+ },
+ },
+ },
+ },
+ index_template_substitutions: {
+ "my-index-template": {
+ index_patterns: ["my-index-*"],
+ composed_of: ["component_template_1", "component_template_2"],
+ },
+ },
+ mapping_addition: {
+ dynamic: "strict",
+ properties: {
+ foo: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ccec66fb20d5ede6c691e0890cfe402a.asciidoc b/docs/doc_examples/ccec66fb20d5ede6c691e0890cfe402a.asciidoc
new file mode 100644
index 000000000..a606b3cd3
--- /dev/null
+++ b/docs/doc_examples/ccec66fb20d5ede6c691e0890cfe402a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteJob({
+ job_id: "total-requests",
+ wait_for_completion: "false",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ccf84c1e5e5602a9e841cb8f7e3bb29f.asciidoc b/docs/doc_examples/ccf84c1e5e5602a9e841cb8f7e3bb29f.asciidoc
new file mode 100644
index 000000000..1bd50f8c4
--- /dev/null
+++ b/docs/doc_examples/ccf84c1e5e5602a9e841cb8f7e3bb29f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "standard_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ rebuilt_standard: {
+ tokenizer: "standard",
+ filter: ["lowercase"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd16538654e0f834ff19fe6cf329c398.asciidoc b/docs/doc_examples/cd16538654e0f834ff19fe6cf329c398.asciidoc
new file mode 100644
index 000000000..2b2407cee
--- /dev/null
+++ b/docs/doc_examples/cd16538654e0f834ff19fe6cf329c398.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "hugging-face-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 768,
+ element_type: "float",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd373a6eb1ef4748616500b26fab3006.asciidoc b/docs/doc_examples/cd373a6eb1ef4748616500b26fab3006.asciidoc
new file mode 100644
index 000000000..68187df30
--- /dev/null
+++ b/docs/doc_examples/cd373a6eb1ef4748616500b26fab3006.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.submit({
+ index: "sales*",
+ size: 0,
+ sort: [
+ {
+ date: {
+ order: "asc",
+ },
+ },
+ ],
+ aggs: {
+ sale_date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1d",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc b/docs/doc_examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc
new file mode 100644
index 000000000..26a5401c2
--- /dev/null
+++ b/docs/doc_examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "template_with_2_shards",
+ template: {
+ settings: {
+ "index.number_of_shards": 2,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putComponentTemplate({
+ name: "template_with_3_shards",
+ template: {
+ settings: {
+ "index.number_of_shards": 3,
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.putIndexTemplate({
+ name: "template_1",
+ index_patterns: ["t*"],
+ composed_of: ["template_with_2_shards", "template_with_3_shards"],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/cd67ad2c09fafef2d441c3502d0bb3d7.asciidoc b/docs/doc_examples/cd67ad2c09fafef2d441c3502d0bb3d7.asciidoc
new file mode 100644
index 000000000..14d8971a1
--- /dev/null
+++ b/docs/doc_examples/cd67ad2c09fafef2d441c3502d0bb3d7.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putDataLifecycle({
+ name: "my-data-stream",
+ data_retention: "7d",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd6eee201a233b989ac1f2794fa6d640.asciidoc b/docs/doc_examples/cd6eee201a233b989ac1f2794fa6d640.asciidoc
new file mode 100644
index 000000000..d6447e49e
--- /dev/null
+++ b/docs/doc_examples/cd6eee201a233b989ac1f2794fa6d640.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ filter_path: "-hits.events._source",
+ runtime_mappings: {
+ day_of_week: {
+ type: "keyword",
+ script: "emit(doc['@timestamp'].value.dayOfWeekEnum.toString())",
+ },
+ },
+ query: '\n process where process.name == "regsvr32.exe"\n ',
+ fields: ["@timestamp", "day_of_week"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd6fa7f63c93bb04824acd3a7d1f8de3.asciidoc b/docs/doc_examples/cd6fa7f63c93bb04824acd3a7d1f8de3.asciidoc
new file mode 100644
index 000000000..0cd77f88f
--- /dev/null
+++ b/docs/doc_examples/cd6fa7f63c93bb04824acd3a7d1f8de3.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_not: {
+ include: {
+ span_term: {
+ field1: "hoya",
+ },
+ },
+ exclude: {
+ span_near: {
+ clauses: [
+ {
+ span_term: {
+ field1: "la",
+ },
+ },
+ {
+ span_term: {
+ field1: "hoya",
+ },
+ },
+ ],
+ slop: 0,
+ in_order: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd7da0c3769682f546cc1888e569382e.asciidoc b/docs/doc_examples/cd7da0c3769682f546cc1888e569382e.asciidoc
new file mode 100644
index 000000000..7505626c3
--- /dev/null
+++ b/docs/doc_examples/cd7da0c3769682f546cc1888e569382e.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_phrase: {
+ message: "number 1",
+ },
+ },
+ highlight: {
+ fields: {
+ message: {
+ type: "plain",
+ fragment_size: 15,
+ number_of_fragments: 3,
+ fragmenter: "span",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd8006165ac64f1ef99af48e5a35a25b.asciidoc b/docs/doc_examples/cd8006165ac64f1ef99af48e5a35a25b.asciidoc
new file mode 100644
index 000000000..329ea0d48
--- /dev/null
+++ b/docs/doc_examples/cd8006165ac64f1ef99af48e5a35a25b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getPrivileges({
+ application: "myapp",
+ name: "read",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cd93919e13f656ad2e6629f45c579b93.asciidoc b/docs/doc_examples/cd93919e13f656ad2e6629f45c579b93.asciidoc
new file mode 100644
index 000000000..85109f792
--- /dev/null
+++ b/docs/doc_examples/cd93919e13f656ad2e6629f45c579b93.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shardStores({
+ index: "test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cda045dfd79acd160ed8668f2ee17ea7.asciidoc b/docs/doc_examples/cda045dfd79acd160ed8668f2ee17ea7.asciidoc
new file mode 100644
index 000000000..393db177b
--- /dev/null
+++ b/docs/doc_examples/cda045dfd79acd160ed8668f2ee17ea7.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ pretty: "true",
+ query: {
+ match: {
+ full_text: "Quick Brown Foxes!",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdb68b3f565df7c85e52a55864b37d40.asciidoc b/docs/doc_examples/cdb68b3f565df7c85e52a55864b37d40.asciidoc
new file mode 100644
index 000000000..75ecf1530
--- /dev/null
+++ b/docs/doc_examples/cdb68b3f565df7c85e52a55864b37d40.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-new-index-000001",
+ mappings: {
+ properties: {
+ user_id: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdc04e6d3d37f036c7045ee4a582ef06.asciidoc b/docs/doc_examples/cdc04e6d3d37f036c7045ee4a582ef06.asciidoc
new file mode 100644
index 000000000..db4342fe6
--- /dev/null
+++ b/docs/doc_examples/cdc04e6d3d37f036c7045ee4a582ef06.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ strings_as_keywords: {
+ match_mapping_type: "string",
+ mapping: {
+ type: "text",
+ norms: false,
+ fields: {
+ keyword: {
+ type: "keyword",
+ ignore_above: 256,
+ },
+ },
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdc38c98320a0df705ec8d173c725375.asciidoc b/docs/doc_examples/cdc38c98320a0df705ec8d173c725375.asciidoc
new file mode 100644
index 000000000..b17259566
--- /dev/null
+++ b/docs/doc_examples/cdc38c98320a0df705ec8d173c725375.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ size: 0,
+ aggs: {
+ grouped: {
+ geohex_grid: {
+ field: "location",
+ precision: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc b/docs/doc_examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc
new file mode 100644
index 000000000..1eabbfa9a
--- /dev/null
+++ b/docs/doc_examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdd29b01e730b3996de68a2788050021.asciidoc b/docs/doc_examples/cdd29b01e730b3996de68a2788050021.asciidoc
new file mode 100644
index 000000000..f1425e5c3
--- /dev/null
+++ b/docs/doc_examples/cdd29b01e730b3996de68a2788050021.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.deletePolicy({
+ name: "my-policy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc b/docs/doc_examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc
new file mode 100644
index 000000000..8f3de891a
--- /dev/null
+++ b/docs/doc_examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ max_docs: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cde19d110a58317610033ea3dcb0eb80.asciidoc b/docs/doc_examples/cde19d110a58317610033ea3dcb0eb80.asciidoc
new file mode 100644
index 000000000..9d5aacd3a
--- /dev/null
+++ b/docs/doc_examples/cde19d110a58317610033ea3dcb0eb80.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source:
+ '\n {\n "query": {\n "match": {\n {{#query_message}}\n {{#query_string}}\n "message": "Hello {{#first_name_section}}{{first_name}}{{/first_name_section}} {{#last_name_section}}{{last_name}}{{/last_name_section}}"\n {{/query_string}}\n {{/query_message}}\n }\n }\n }\n ',
+ params: {
+ query_message: {
+ query_string: {
+ first_name_section: {
+ first_name: "John",
+ },
+ last_name_section: {
+ last_name: "kimchy",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cde4104a29dfe942d55863cdd8718627.asciidoc b/docs/doc_examples/cde4104a29dfe942d55863cdd8718627.asciidoc
new file mode 100644
index 000000000..baab28e94
--- /dev/null
+++ b/docs/doc_examples/cde4104a29dfe942d55863cdd8718627.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getStatus();
+console.log(response);
+----
diff --git a/docs/doc_examples/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc b/docs/doc_examples/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc
new file mode 100644
index 000000000..044a77056
--- /dev/null
+++ b/docs/doc_examples/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: {
+ source: "ctx._source.tags.add(params.tag)",
+ lang: "painless",
+ params: {
+ tag: "blue",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc b/docs/doc_examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc
new file mode 100644
index 000000000..235c96478
--- /dev/null
+++ b/docs/doc_examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ settings: {
+ "index.number_of_replicas": 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce0a1aba713b0448b0c6a504af7b3a08.asciidoc b/docs/doc_examples/ce0a1aba713b0448b0c6a504af7b3a08.asciidoc
new file mode 100644
index 000000000..7e7984e2e
--- /dev/null
+++ b/docs/doc_examples/ce0a1aba713b0448b0c6a504af7b3a08.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getStats();
+console.log(response);
+----
diff --git a/docs/doc_examples/ce0c3d7330727f7673cf68fc9a1cfb86.asciidoc b/docs/doc_examples/ce0c3d7330727f7673cf68fc9a1cfb86.asciidoc
new file mode 100644
index 000000000..11032c855
--- /dev/null
+++ b/docs/doc_examples/ce0c3d7330727f7673cf68fc9a1cfb86.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce247fc08371e1b30cb52195e521c076.asciidoc b/docs/doc_examples/ce247fc08371e1b30cb52195e521c076.asciidoc
new file mode 100644
index 000000000..da117c77f
--- /dev/null
+++ b/docs/doc_examples/ce247fc08371e1b30cb52195e521c076.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: [-74.1, 40.73],
+ bottom_right: [-71.12, 40.01],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc b/docs/doc_examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc
new file mode 100644
index 000000000..b59f93b68
--- /dev/null
+++ b/docs/doc_examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ text_embedding: {
+ type: "dense_vector",
+ dims: 384,
+ index_options: {
+ type: "int4_hnsw",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce3c391c2b1915cfc44a2917bca71d19.asciidoc b/docs/doc_examples/ce3c391c2b1915cfc44a2917bca71d19.asciidoc
new file mode 100644
index 000000000..b9f5d4012
--- /dev/null
+++ b/docs/doc_examples/ce3c391c2b1915cfc44a2917bca71d19.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDataFrameAnalytics({
+ id: "loganalytics",
+ description: "Outlier detection on log data",
+ source: {
+ index: "logdata",
+ },
+ dest: {
+ index: "logdata_out",
+ },
+ analysis: {
+ outlier_detection: {
+ compute_feature_influence: true,
+ outlier_fraction: 0.05,
+ standardization_enabled: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce725697f93b3eebb3a266314568565a.asciidoc b/docs/doc_examples/ce725697f93b3eebb3a266314568565a.asciidoc
new file mode 100644
index 000000000..c47955a54
--- /dev/null
+++ b/docs/doc_examples/ce725697f93b3eebb3a266314568565a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "fingerprint_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ rebuilt_fingerprint: {
+ tokenizer: "standard",
+ filter: ["lowercase", "asciifolding", "fingerprint"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce8471d31e5d60309e142feb040fd2f8.asciidoc b/docs/doc_examples/ce8471d31e5d60309e142feb040fd2f8.asciidoc
new file mode 100644
index 000000000..d5a91c659
--- /dev/null
+++ b/docs/doc_examples/ce8471d31e5d60309e142feb040fd2f8.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.queryWatches();
+console.log(response);
+----
diff --git a/docs/doc_examples/ce899fcf55da72fc32e623d1ad88b301.asciidoc b/docs/doc_examples/ce899fcf55da72fc32e623d1ad88b301.asciidoc
new file mode 100644
index 000000000..9a217bfec
--- /dev/null
+++ b/docs/doc_examples/ce899fcf55da72fc32e623d1ad88b301.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "logs-foo_component2",
+ template: {
+ mappings: {
+ properties: {
+ "host.ip": {
+ type: "ip",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ce8eebfb810335803630abe83278bee7.asciidoc b/docs/doc_examples/ce8eebfb810335803630abe83278bee7.asciidoc
new file mode 100644
index 000000000..2ae4c207b
--- /dev/null
+++ b/docs/doc_examples/ce8eebfb810335803630abe83278bee7.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ active_only: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc b/docs/doc_examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc
new file mode 100644
index 000000000..bae03c0ff
--- /dev/null
+++ b/docs/doc_examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc
@@ -0,0 +1,50 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "attachment",
+ description: "Extract attachment information from arrays",
+ processors: [
+ {
+ foreach: {
+ field: "attachments",
+ processor: {
+ attachment: {
+ target_field: "_ingest._value.attachment",
+ field: "_ingest._value.data",
+ remove_binary: true,
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "attachment",
+ document: {
+ attachments: [
+ {
+ filename: "ipsum.txt",
+ data: "dGhpcyBpcwpqdXN0IHNvbWUgdGV4dAo=",
+ },
+ {
+ filename: "test.txt",
+ data: "VGhpcyBpcyBhIHRlc3QK",
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/cedb56a71cc743d80263ce352bb21720.asciidoc b/docs/doc_examples/cedb56a71cc743d80263ce352bb21720.asciidoc
new file mode 100644
index 000000000..c36f080a5
--- /dev/null
+++ b/docs/doc_examples/cedb56a71cc743d80263ce352bb21720.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "sparse_embedding",
+ inference_id: "my-elser-model",
+ inference_config: {
+ service: "elser",
+ service_settings: {
+ num_allocations: 1,
+ num_threads: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc b/docs/doc_examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc
new file mode 100644
index 000000000..6a20452e4
--- /dev/null
+++ b/docs/doc_examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "model2",
+ docs: [
+ {
+ text_field:
+ "The Amazon rainforest covers most of the Amazon basin in South America",
+ },
+ ],
+ inference_config: {
+ ner: {
+ tokenization: {
+ bert: {
+ truncate: "first",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cee591c1fc70d4f180c623a3a6d07755.asciidoc b/docs/doc_examples/cee591c1fc70d4f180c623a3a6d07755.asciidoc
new file mode 100644
index 000000000..0a7361e50
--- /dev/null
+++ b/docs/doc_examples/cee591c1fc70d4f180c623a3a6d07755.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getToken({
+ grant_type: "client_credentials",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc b/docs/doc_examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc
new file mode 100644
index 000000000..35fad32dd
--- /dev/null
+++ b/docs/doc_examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "routing.allocation.total_shards_per_node": 5,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cf47cd4a39cd62a3ecad919e54a67bca.asciidoc b/docs/doc_examples/cf47cd4a39cd62a3ecad919e54a67bca.asciidoc
new file mode 100644
index 000000000..455ef41c7
--- /dev/null
+++ b/docs/doc_examples/cf47cd4a39cd62a3ecad919e54a67bca.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ term: {
+ _ignored: "@timestamp",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cf5dab4334783ca9b8942eab68fb7174.asciidoc b/docs/doc_examples/cf5dab4334783ca9b8942eab68fb7174.asciidoc
new file mode 100644
index 000000000..51fa92abb
--- /dev/null
+++ b/docs/doc_examples/cf5dab4334783ca9b8942eab68fb7174.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "products",
+ size: 0,
+ query: {
+ match: {
+ name: "led tv",
+ },
+ },
+ aggs: {
+ resellers: {
+ nested: {
+ path: "resellers",
+ },
+ aggs: {
+ filter_reseller: {
+ filter: {
+ bool: {
+ filter: [
+ {
+ term: {
+ "resellers.reseller": "companyB",
+ },
+ },
+ ],
+ },
+ },
+ aggs: {
+ min_price: {
+ min: {
+ field: "resellers.price",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cf75a880c749a2f2010a8ec3f348e5c3.asciidoc b/docs/doc_examples/cf75a880c749a2f2010a8ec3f348e5c3.asciidoc
new file mode 100644
index 000000000..379cc61c9
--- /dev/null
+++ b/docs/doc_examples/cf75a880c749a2f2010a8ec3f348e5c3.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ keep_on_completion: true,
+ wait_for_completion_timeout: "2s",
+ query: '\n process where process.name == "cmd.exe"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cf8ca470156698dbf47fdc822d0a714f.asciidoc b/docs/doc_examples/cf8ca470156698dbf47fdc822d0a714f.asciidoc
new file mode 100644
index 000000000..ec92536ff
--- /dev/null
+++ b/docs/doc_examples/cf8ca470156698dbf47fdc822d0a714f.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_internal/desired_nodes/_latest",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cf9f51d719a2e90ffe36ed6fe56a4a69.asciidoc b/docs/doc_examples/cf9f51d719a2e90ffe36ed6fe56a4a69.asciidoc
new file mode 100644
index 000000000..24bc313b4
--- /dev/null
+++ b/docs/doc_examples/cf9f51d719a2e90ffe36ed6fe56a4a69.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote-replication",
+ cluster: ["manage_ccr"],
+ indices: [
+ {
+ names: ["follower-index-name"],
+ privileges: ["monitor", "read", "write", "manage_follow_index"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cfad3631be0634ee49c424f9ccec62d9.asciidoc b/docs/doc_examples/cfad3631be0634ee49c424f9ccec62d9.asciidoc
new file mode 100644
index 000000000..24848abdd
--- /dev/null
+++ b/docs/doc_examples/cfad3631be0634ee49c424f9ccec62d9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ owner: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cfd4b34f35e531a20739a3b308d57134.asciidoc b/docs/doc_examples/cfd4b34f35e531a20739a3b308d57134.asciidoc
new file mode 100644
index 000000000..b7d51f35c
--- /dev/null
+++ b/docs/doc_examples/cfd4b34f35e531a20739a3b308d57134.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_docs: 100000000,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/cffce059425d3d21e7f9571500d63524.asciidoc b/docs/doc_examples/cffce059425d3d21e7f9571500d63524.asciidoc
new file mode 100644
index 000000000..341274e75
--- /dev/null
+++ b/docs/doc_examples/cffce059425d3d21e7f9571500d63524.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.deleteRole({
+ name: "my_admin_role",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc b/docs/doc_examples/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc
new file mode 100644
index 000000000..7af2430a5
--- /dev/null
+++ b/docs/doc_examples/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "elser-v2-test",
+ processors: [
+ {
+ inference: {
+ model_id: ".elser_model_2",
+ input_output: [
+ {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ ],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d003f9110e5a474230abe11f36da9297.asciidoc b/docs/doc_examples/d003f9110e5a474230abe11f36da9297.asciidoc
new file mode 100644
index 000000000..3684f13dc
--- /dev/null
+++ b/docs/doc_examples/d003f9110e5a474230abe11f36da9297.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ description: "Hide my IP",
+ processors: [
+ {
+ redact: {
+ field: "message",
+ patterns: ["%{IP:client}"],
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ message: "55.3.244.1 GET /index.html 15824 0.043",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d01d309b0257d6fbca6d0941adeb3256.asciidoc b/docs/doc_examples/d01d309b0257d6fbca6d0941adeb3256.asciidoc
new file mode 100644
index 000000000..597ee3209
--- /dev/null
+++ b/docs/doc_examples/d01d309b0257d6fbca6d0941adeb3256.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "ct1",
+ template: {
+ settings: {
+ "index.number_of_shards": 2,
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.cluster.putComponentTemplate({
+ name: "ct2",
+ template: {
+ settings: {
+ "index.number_of_replicas": 0,
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.putIndexTemplate({
+ name: "final-template",
+ index_patterns: ["my-index-*"],
+ composed_of: ["ct1", "ct2"],
+ priority: 5,
+});
+console.log(response2);
+
+const response3 = await client.indices.simulateIndexTemplate({
+ name: "my-index-000001",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/d03139a851888db53f8b7affd85eb495.asciidoc b/docs/doc_examples/d03139a851888db53f8b7affd85eb495.asciidoc
new file mode 100644
index 000000000..78a5a38bc
--- /dev/null
+++ b/docs/doc_examples/d03139a851888db53f8b7affd85eb495.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.checkIn({
+ connector_id: "my-connector",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d0378fe5e3aad05a2fd2e6e81213374f.asciidoc b/docs/doc_examples/d0378fe5e3aad05a2fd2e6e81213374f.asciidoc
new file mode 100644
index 000000000..1b2d7df64
--- /dev/null
+++ b/docs/doc_examples/d0378fe5e3aad05a2fd2e6e81213374f.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "bulgarian_example",
+ settings: {
+ analysis: {
+ filter: {
+ bulgarian_stop: {
+ type: "stop",
+ stopwords: "_bulgarian_",
+ },
+ bulgarian_keywords: {
+ type: "keyword_marker",
+ keywords: ["пример"],
+ },
+ bulgarian_stemmer: {
+ type: "stemmer",
+ language: "bulgarian",
+ },
+ },
+ analyzer: {
+ rebuilt_bulgarian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "bulgarian_stop",
+ "bulgarian_keywords",
+ "bulgarian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d03b0e2f0f3f5ac8d53287c445007a89.asciidoc b/docs/doc_examples/d03b0e2f0f3f5ac8d53287c445007a89.asciidoc
new file mode 100644
index 000000000..fac12de59
--- /dev/null
+++ b/docs/doc_examples/d03b0e2f0f3f5ac8d53287c445007a89.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ default_field: {
+ type: "text",
+ },
+ boolean_sim_field: {
+ type: "text",
+ similarity: "boolean",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc b/docs/doc_examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc
new file mode 100644
index 000000000..23de5f5d8
--- /dev/null
+++ b/docs/doc_examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc
@@ -0,0 +1,66 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ operations: [
+ {
+ index: {
+ _index: "books",
+ },
+ },
+ {
+ name: "Revelation Space",
+ author: "Alastair Reynolds",
+ release_date: "2000-03-15",
+ page_count: 585,
+ },
+ {
+ index: {
+ _index: "books",
+ },
+ },
+ {
+ name: "1984",
+ author: "George Orwell",
+ release_date: "1985-06-01",
+ page_count: 328,
+ },
+ {
+ index: {
+ _index: "books",
+ },
+ },
+ {
+ name: "Fahrenheit 451",
+ author: "Ray Bradbury",
+ release_date: "1953-10-15",
+ page_count: 227,
+ },
+ {
+ index: {
+ _index: "books",
+ },
+ },
+ {
+ name: "Brave New World",
+ author: "Aldous Huxley",
+ release_date: "1932-06-01",
+ page_count: 268,
+ },
+ {
+ index: {
+ _index: "books",
+ },
+ },
+ {
+ name: "The Handmaids Tale",
+ author: "Margaret Atwood",
+ release_date: "1985-06-01",
+ page_count: 311,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d050c6fa7d806457a5f32d30b07e9521.asciidoc b/docs/doc_examples/d050c6fa7d806457a5f32d30b07e9521.asciidoc
new file mode 100644
index 000000000..cd4a3d736
--- /dev/null
+++ b/docs/doc_examples/d050c6fa7d806457a5f32d30b07e9521.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ dot_expander: {
+ description: "Expand 'my-object-field.my-property'",
+ field: "my-object-field.my-property",
+ },
+ },
+ {
+ set: {
+ description: "Set 'my-object-field.my-property' to 10",
+ field: "my-object-field.my-property",
+ value: 10,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d0546f047359b85a7e98207dc8de896a.asciidoc b/docs/doc_examples/d0546f047359b85a7e98207dc8de896a.asciidoc
new file mode 100644
index 000000000..3375c612b
--- /dev/null
+++ b/docs/doc_examples/d0546f047359b85a7e98207dc8de896a.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.mapping.coerce": false,
+ },
+ mappings: {
+ properties: {
+ number_one: {
+ type: "integer",
+ coerce: true,
+ },
+ number_two: {
+ type: "integer",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ number_one: "10",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ number_two: "10",
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc b/docs/doc_examples/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc
new file mode 100644
index 000000000..e865f4e45
--- /dev/null
+++ b/docs/doc_examples/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "metrics_index",
+ mappings: {
+ properties: {
+ latency_histo: {
+ type: "histogram",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ refresh: "true",
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response2);
+
+const response3 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ min_latency: {
+ min: {
+ field: "latency_histo",
+ },
+ },
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc b/docs/doc_examples/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc
new file mode 100644
index 000000000..380d5aa17
--- /dev/null
+++ b/docs/doc_examples/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc
@@ -0,0 +1,68 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:30:17-05:00",
+ message:
+ '40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:30:53-05:00",
+ message:
+ '232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:12-05:00",
+ message:
+ '26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:19-05:00",
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:22-05:00",
+ message:
+ '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:27-05:00",
+ message:
+ '252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: "2020-04-30T14:31:28-05:00",
+ message: "not a valid apache log",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d095b422d9803c02b62c01adffc85376.asciidoc b/docs/doc_examples/d095b422d9803c02b62c01adffc85376.asciidoc
new file mode 100644
index 000000000..5177e0ab0
--- /dev/null
+++ b/docs/doc_examples/d095b422d9803c02b62c01adffc85376.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.getJobs({
+ id: "sensor",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d0dee031197214b59ff9ac7540527d2c.asciidoc b/docs/doc_examples/d0dee031197214b59ff9ac7540527d2c.asciidoc
new file mode 100644
index 000000000..de8e1dc6e
--- /dev/null
+++ b/docs/doc_examples/d0dee031197214b59ff9ac7540527d2c.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movfn: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "MovingFunctions.unweightedAvg(values)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d0fad375f6e074e9067ed93d3faa07bd.asciidoc b/docs/doc_examples/d0fad375f6e074e9067ed93d3faa07bd.asciidoc
new file mode 100644
index 000000000..309e1a7ba
--- /dev/null
+++ b/docs/doc_examples/d0fad375f6e074e9067ed93d3faa07bd.asciidoc
@@ -0,0 +1,103 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (491.2350 5237.4081)",
+ city: "Amsterdam",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (490.1618 5236.9219)",
+ city: "Amsterdam",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (491.4722 5237.1667)",
+ city: "Amsterdam",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (440.5200 5122.2900)",
+ city: "Antwerp",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (233.6389 4886.1111)",
+ city: "Paris",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (232.7000 4886.0000)",
+ city: "Paris",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ query: {
+ match: {
+ name: "musée",
+ },
+ },
+ aggs: {
+ viewport: {
+ cartesian_bounds: {
+ field: "location",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/d0fde00ef381e61b8a9e99f18cb5970a.asciidoc b/docs/doc_examples/d0fde00ef381e61b8a9e99f18cb5970a.asciidoc
new file mode 100644
index 000000000..1ad80af1d
--- /dev/null
+++ b/docs/doc_examples/d0fde00ef381e61b8a9e99f18cb5970a.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ simple_query_string: {
+ query: "foo | bar + baz*",
+ flags: "OR|AND|PREFIX",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d11ea753a5d86f7e630fd69a069948b1.asciidoc b/docs/doc_examples/d11ea753a5d86f7e630fd69a069948b1.asciidoc
new file mode 100644
index 000000000..8c3fb1686
--- /dev/null
+++ b/docs/doc_examples/d11ea753a5d86f7e630fd69a069948b1.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1299b9ae1e621d2fdd0b8644c142ace.asciidoc b/docs/doc_examples/d1299b9ae1e621d2fdd0b8644c142ace.asciidoc
new file mode 100644
index 000000000..cb85bad2c
--- /dev/null
+++ b/docs/doc_examples/d1299b9ae1e621d2fdd0b8644c142ace.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "log-messages",
+ filter_path: "aggregations",
+ aggs: {
+ daily: {
+ date_histogram: {
+ field: "time",
+ fixed_interval: "1d",
+ },
+ aggs: {
+ categories: {
+ categorize_text: {
+ field: "message",
+ categorization_filters: ["\\w+\\_\\d{3}"],
+ },
+ aggs: {
+ hit: {
+ top_hits: {
+ size: 1,
+ sort: ["time"],
+ _source: "message",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d12df43ffcdcd937bae9b26fb475e239.asciidoc b/docs/doc_examples/d12df43ffcdcd937bae9b26fb475e239.asciidoc
new file mode 100644
index 000000000..bf51e32ce
--- /dev/null
+++ b/docs/doc_examples/d12df43ffcdcd937bae9b26fb475e239.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "uax_url_email",
+ text: "Email me at john.smith@global-international.com",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d133b5d82238f7d4778c341cbe0bc969.asciidoc b/docs/doc_examples/d133b5d82238f7d4778c341cbe0bc969.asciidoc
new file mode 100644
index 000000000..a42b122e1
--- /dev/null
+++ b/docs/doc_examples/d133b5d82238f7d4778c341cbe0bc969.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mtermvectors({
+ docs: [
+ {
+ _index: "my-index-000001",
+ doc: {
+ message: "test test test",
+ },
+ },
+ {
+ _index: "my-index-000001",
+ doc: {
+ message: "Another test ...",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc b/docs/doc_examples/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc
new file mode 100644
index 000000000..85d920867
--- /dev/null
+++ b/docs/doc_examples/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ "price.adjusted": {
+ type: "double",
+ script: {
+ source: "emit(doc['price'].value * params.adjustment)",
+ params: {
+ adjustment: 0.9,
+ },
+ },
+ },
+ },
+ aggs: {
+ by_date: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ avg_price: {
+ rate: {
+ field: "price.adjusted",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d14fe5838fc02224f4b5ade2626d6026.asciidoc b/docs/doc_examples/d14fe5838fc02224f4b5ade2626d6026.asciidoc
new file mode 100644
index 000000000..9eafbf38d
--- /dev/null
+++ b/docs/doc_examples/d14fe5838fc02224f4b5ade2626d6026.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.explainLifecycle({
+ index: "my-index-000001",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1b53bc9794e8609bd6f2245624bf977.asciidoc b/docs/doc_examples/d1b53bc9794e8609bd6f2245624bf977.asciidoc
new file mode 100644
index 000000000..8564b2dd5
--- /dev/null
+++ b/docs/doc_examples/d1b53bc9794e8609bd6f2245624bf977.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.estimateModelMemory({
+ analysis_config: {
+ bucket_span: "5m",
+ detectors: [
+ {
+ function: "sum",
+ field_name: "bytes",
+ by_field_name: "status",
+ partition_field_name: "app",
+ },
+ ],
+ influencers: ["source_ip", "dest_ip"],
+ },
+ overall_cardinality: {
+ status: 10,
+ app: 50,
+ },
+ max_bucket_cardinality: {
+ source_ip: 300,
+ dest_ip: 30,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1ce66957f8bd84bf01c4bfaee3ba0c3.asciidoc b/docs/doc_examples/d1ce66957f8bd84bf01c4bfaee3ba0c3.asciidoc
new file mode 100644
index 000000000..ea46327a9
--- /dev/null
+++ b/docs/doc_examples/d1ce66957f8bd84bf01c4bfaee3ba0c3.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ filter_path: "hits.events._source.@timestamp,hits.events._source.process.pid",
+ query: '\n process where process.name == "regsvr32.exe"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc b/docs/doc_examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc
new file mode 100644
index 000000000..93df61ff0
--- /dev/null
+++ b/docs/doc_examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ multi_match: {
+ query: "How is the weather in Jamaica?",
+ fields: ["title", "description"],
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ sparse_vector: {
+ field: "ml.inference.title_expanded.predicted_value",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ boost: 1,
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ sparse_vector: {
+ field: "ml.inference.description_expanded.predicted_value",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ boost: 1,
+ },
+ },
+ },
+ },
+ ],
+ window_size: 10,
+ rank_constant: 20,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1e0fee64389e7c8d4c092030626b61f.asciidoc b/docs/doc_examples/d1e0fee64389e7c8d4c092030626b61f.asciidoc
new file mode 100644
index 000000000..e19f93f40
--- /dev/null
+++ b/docs/doc_examples/d1e0fee64389e7c8d4c092030626b61f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ name: "my-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc b/docs/doc_examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc
new file mode 100644
index 000000000..8f098647f
--- /dev/null
+++ b/docs/doc_examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "connector_name-connector-api-key",
+ role_descriptors: {
+ "connector_name-connector-role": {
+ cluster: ["monitor", "manage_connector"],
+ indices: [
+ {
+ names: [
+ "index_name",
+ ".search-acl-filter-index_name",
+ ".elastic-connectors*",
+ ],
+ privileges: ["all"],
+ allow_restricted_indices: false,
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1ecce3632ae338b5e329b0e5ff3bed7.asciidoc b/docs/doc_examples/d1ecce3632ae338b5e329b0e5ff3bed7.asciidoc
new file mode 100644
index 000000000..1d5b2b25e
--- /dev/null
+++ b/docs/doc_examples/d1ecce3632ae338b5e329b0e5ff3bed7.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_join_field: {
+ type: "join",
+ relations: {
+ question: "answer",
+ },
+ eager_global_ordinals: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc b/docs/doc_examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc
new file mode 100644
index 000000000..623cf32f0
--- /dev/null
+++ b/docs/doc_examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ q: "extra:test",
+ filter_path: "hits.total",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d23452f333b77bf5b463310e2a665560.asciidoc b/docs/doc_examples/d23452f333b77bf5b463310e2a665560.asciidoc
new file mode 100644
index 000000000..711ada3a1
--- /dev/null
+++ b/docs/doc_examples/d23452f333b77bf5b463310e2a665560.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "my_director",
+ refresh: "true",
+ cluster: ["manage"],
+ indices: [
+ {
+ names: ["index1", "index2"],
+ privileges: ["manage"],
+ },
+ ],
+ run_as: ["jacknich", "rdeniro"],
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc b/docs/doc_examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc
new file mode 100644
index 000000000..9a5f60d47
--- /dev/null
+++ b/docs/doc_examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "russian_example",
+ settings: {
+ analysis: {
+ filter: {
+ russian_stop: {
+ type: "stop",
+ stopwords: "_russian_",
+ },
+ russian_keywords: {
+ type: "keyword_marker",
+ keywords: ["пример"],
+ },
+ russian_stemmer: {
+ type: "stemmer",
+ language: "russian",
+ },
+ },
+ analyzer: {
+ rebuilt_russian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "russian_stop",
+ "russian_keywords",
+ "russian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d268aec16bb1eb909b634e856175094c.asciidoc b/docs/doc_examples/d268aec16bb1eb909b634e856175094c.asciidoc
new file mode 100644
index 000000000..1e4498566
--- /dev/null
+++ b/docs/doc_examples/d268aec16bb1eb909b634e856175094c.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_stop_analyzer: {
+ type: "stop",
+ stopwords: ["the", "over"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_stop_analyzer",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc b/docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc
new file mode 100644
index 000000000..907c0a556
--- /dev/null
+++ b/docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_backup",
+ repository: {
+ type: "azure",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc b/docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc
new file mode 100644
index 000000000..fac02d172
--- /dev/null
+++ b/docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test-index",
+ query: {
+ semantic: {
+ field: "my_semantic_field",
+ },
+ },
+ highlight: {
+ fields: {
+ my_semantic_field: {
+ type: "semantic",
+ number_of_fragments: 2,
+ order: "score",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc b/docs/doc_examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc
new file mode 100644
index 000000000..8ebe00905
--- /dev/null
+++ b/docs/doc_examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc
@@ -0,0 +1,52 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ date: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ date: "2015-01-01",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ date: "2015-01-01T12:10:30Z",
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ document: {
+ date: 1420070400001,
+ },
+});
+console.log(response3);
+
+const response4 = await client.search({
+ index: "my-index-000001",
+ sort: {
+ date: "asc",
+ },
+});
+console.log(response4);
+----
diff --git a/docs/doc_examples/d2f6040c058a9555dfa62bb42d896a8f.asciidoc b/docs/doc_examples/d2f6040c058a9555dfa62bb42d896a8f.asciidoc
new file mode 100644
index 000000000..c9196570f
--- /dev/null
+++ b/docs/doc_examples/d2f6040c058a9555dfa62bb42d896a8f.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_queries1",
+ query: {
+ percolate: {
+ field: "query",
+ document: {
+ my_field: "abcd",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d2f6fb271e97fde8685d7744e6718cc7.asciidoc b/docs/doc_examples/d2f6fb271e97fde8685d7744e6718cc7.asciidoc
new file mode 100644
index 000000000..93e7ac887
--- /dev/null
+++ b/docs/doc_examples/d2f6fb271e97fde8685d7744e6718cc7.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "text_payloads",
+ id: 1,
+ document: {
+ text: "the|0 brown|3 fox|4 is|0 quick|10",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d305110a8cabfbebd1e38d85559d1023.asciidoc b/docs/doc_examples/d305110a8cabfbebd1e38d85559d1023.asciidoc
new file mode 100644
index 000000000..42e37aee7
--- /dev/null
+++ b/docs/doc_examples/d305110a8cabfbebd1e38d85559d1023.asciidoc
@@ -0,0 +1,62 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "cjk_example",
+ settings: {
+ analysis: {
+ filter: {
+ english_stop: {
+ type: "stop",
+ stopwords: [
+ "a",
+ "and",
+ "are",
+ "as",
+ "at",
+ "be",
+ "but",
+ "by",
+ "for",
+ "if",
+ "in",
+ "into",
+ "is",
+ "it",
+ "no",
+ "not",
+ "of",
+ "on",
+ "or",
+ "s",
+ "such",
+ "t",
+ "that",
+ "the",
+ "their",
+ "then",
+ "there",
+ "these",
+ "they",
+ "this",
+ "to",
+ "was",
+ "will",
+ "with",
+ "www",
+ ],
+ },
+ },
+ analyzer: {
+ rebuilt_cjk: {
+ tokenizer: "standard",
+ filter: ["cjk_width", "lowercase", "cjk_bigram", "english_stop"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3263afc69b6f969b9bbd8738cd07b97.asciidoc b/docs/doc_examples/d3263afc69b6f969b9bbd8738cd07b97.asciidoc
new file mode 100644
index 000000000..0fc058e58
--- /dev/null
+++ b/docs/doc_examples/d3263afc69b6f969b9bbd8738cd07b97.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.pauseFollow({
+ index: "follower_index",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3440ec81dde5f1a01c0206cb35e539c.asciidoc b/docs/doc_examples/d3440ec81dde5f1a01c0206cb35e539c.asciidoc
new file mode 100644
index 000000000..8a5eced01
--- /dev/null
+++ b/docs/doc_examples/d3440ec81dde5f1a01c0206cb35e539c.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ wait_for_completion: "false",
+ source: {
+ index: "test-data",
+ size: 50,
+ },
+ dest: {
+ index: "azure-openai-embeddings",
+ pipeline: "azure_openai_embeddings_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d34946f59b6f938b141a37cb0b729308.asciidoc b/docs/doc_examples/d34946f59b6f938b141a37cb0b729308.asciidoc
new file mode 100644
index 000000000..522b79829
--- /dev/null
+++ b/docs/doc_examples/d34946f59b6f938b141a37cb0b729308.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.enrich.putPolicy({
+ name: "postal_policy",
+ geo_match: {
+ indices: "postal_codes",
+ match_field: "location",
+ enrich_fields: ["location", "postal_code"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d35a4d78a8b70c9e4d636efb0a92be9d.asciidoc b/docs/doc_examples/d35a4d78a8b70c9e4d636efb0a92be9d.asciidoc
new file mode 100644
index 000000000..80591c90a
--- /dev/null
+++ b/docs/doc_examples/d35a4d78a8b70c9e4d636efb0a92be9d.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "products",
+ aggs: {
+ genres_and_products: {
+ multi_terms: {
+ terms: [
+ {
+ field: "genre",
+ },
+ {
+ field: "product",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc b/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc
new file mode 100644
index 000000000..51dea2365
--- /dev/null
+++ b/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.oidcPrepareAuthentication({
+ body: {
+ iss: "http://127.0.0.1:8080",
+ login_hint: "this_is_an_opaque_string",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d37b065a94b3ff65a2a8a204fc3b097c.asciidoc b/docs/doc_examples/d37b065a94b3ff65a2a8a204fc3b097c.asciidoc
new file mode 100644
index 000000000..4e26625de
--- /dev/null
+++ b/docs/doc_examples/d37b065a94b3ff65a2a8a204fc3b097c.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.getStatus({
+ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d37b0bda2bd24ab310e6b26708c7c6fb.asciidoc b/docs/doc_examples/d37b0bda2bd24ab310e6b26708c7c6fb.asciidoc
new file mode 100644
index 000000000..6967389d1
--- /dev/null
+++ b/docs/doc_examples/d37b0bda2bd24ab310e6b26708c7c6fb.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "price",
+ },
+ },
+ the_movavg: {
+ moving_fn: {
+ buckets_path: "the_sum",
+ window: 10,
+ script: "return values.length > 0 ? values[0] : Double.NaN",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc b/docs/doc_examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc
new file mode 100644
index 000000000..3a490c68d
--- /dev/null
+++ b/docs/doc_examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ "http.responses": {
+ type: "long",
+ script:
+ '\n String response=dissect(\'%{clientip} %{ident} %{auth} [%{@timestamp}] "%{verb} %{request} HTTP/%{httpversion}" %{response} %{size}\').extract(doc["message"].value)?.response;\n if (response != null) emit(Integer.parseInt(response));\n ',
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3d117fec34301520ccdb26332e7c98a.asciidoc b/docs/doc_examples/d3d117fec34301520ccdb26332e7c98a.asciidoc
new file mode 100644
index 000000000..96279479b
--- /dev/null
+++ b/docs/doc_examples/d3d117fec34301520ccdb26332e7c98a.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ registered_domain: {
+ field: "fqdn",
+ target_field: "url",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ fqdn: "www.example.ac.uk",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc b/docs/doc_examples/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc
new file mode 100644
index 000000000..91c379871
--- /dev/null
+++ b/docs/doc_examples/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ fields: ["content", "name.*^5"],
+ query: "this AND that OR thus",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc b/docs/doc_examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc
new file mode 100644
index 000000000..716555e1c
--- /dev/null
+++ b/docs/doc_examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "clicks_admin",
+ run_as: ["clicks_watcher_1"],
+ cluster: ["monitor"],
+ indices: [
+ {
+ names: ["events-*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["category", "@timestamp", "message"],
+ },
+ query: '{"match": {"category": "click"}}',
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d3e9e1169c3514fd46e253cd8b5ae3cb.asciidoc b/docs/doc_examples/d3e9e1169c3514fd46e253cd8b5ae3cb.asciidoc
new file mode 100644
index 000000000..7d704155a
--- /dev/null
+++ b/docs/doc_examples/d3e9e1169c3514fd46e253cd8b5ae3cb.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["my_script_filter"],
+ },
+ },
+ filter: {
+ my_script_filter: {
+ type: "predicate_token_filter",
+ script: {
+ source:
+ '\n token.type.contains("ALPHANUM")\n ',
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc b/docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc
new file mode 100644
index 000000000..ccee5c776
--- /dev/null
+++ b/docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc
@@ -0,0 +1,154 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "datastream_template",
+ index_patterns: ["datastream*"],
+ data_stream: {},
+ template: {
+ lifecycle: {
+ downsampling: [
+ {
+ after: "1m",
+ fixed_interval: "1h",
+ },
+ ],
+ },
+ settings: {
+ index: {
+ mode: "time_series",
+ },
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ kubernetes: {
+ properties: {
+ container: {
+ properties: {
+ cpu: {
+ properties: {
+ usage: {
+ properties: {
+ core: {
+ properties: {
+ ns: {
+ type: "long",
+ },
+ },
+ },
+ limit: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ nanocores: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ node: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ memory: {
+ properties: {
+ available: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ majorpagefaults: {
+ type: "long",
+ },
+ pagefaults: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ rss: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ usage: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ limit: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ node: {
+ properties: {
+ pct: {
+ type: "float",
+ },
+ },
+ },
+ },
+ },
+ workingset: {
+ properties: {
+ bytes: {
+ type: "long",
+ time_series_metric: "gauge",
+ },
+ },
+ },
+ },
+ },
+ name: {
+ type: "keyword",
+ },
+ start_time: {
+ type: "date",
+ },
+ },
+ },
+ host: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ namespace: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ node: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ pod: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4323be84152fa91abd76e966d4751dc.asciidoc b/docs/doc_examples/d4323be84152fa91abd76e966d4751dc.asciidoc
new file mode 100644
index 000000000..de913f758
--- /dev/null
+++ b/docs/doc_examples/d4323be84152fa91abd76e966d4751dc.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryApiKeys({
+ query: {
+ term: {
+ name: {
+ value: "application-key-1",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d443db2755fde3b49ca3a9d296c4a96f.asciidoc b/docs/doc_examples/d443db2755fde3b49ca3a9d296c4a96f.asciidoc
new file mode 100644
index 000000000..138641329
--- /dev/null
+++ b/docs/doc_examples/d443db2755fde3b49ca3a9d296c4a96f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "delimited_payload",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_delimited_payload: {
+ tokenizer: "whitespace",
+ filter: ["delimited_payload"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d44ecc69090c0b2bc08a6cbc2e3467c5.asciidoc b/docs/doc_examples/d44ecc69090c0b2bc08a6cbc2e3467c5.asciidoc
new file mode 100644
index 000000000..c90396ab3
--- /dev/null
+++ b/docs/doc_examples/d44ecc69090c0b2bc08a6cbc2e3467c5.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "news",
+ query: {
+ simple_query_string: {
+ query: "+elasticsearch +pozmantier",
+ },
+ },
+ _source: ["title", "source"],
+ highlight: {
+ fields: {
+ content: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d46e9739bbf25eb2f7225f58ab08b2a7.asciidoc b/docs/doc_examples/d46e9739bbf25eb2f7225f58ab08b2a7.asciidoc
new file mode 100644
index 000000000..63458b1c0
--- /dev/null
+++ b/docs/doc_examples/d46e9739bbf25eb2f7225f58ab08b2a7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlCompleteLogout({
+ realm: "saml1",
+ ids: ["_1c368075e0b3..."],
+ content: "PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d48b274a4b6098ffef0c016c6c945fb9.asciidoc b/docs/doc_examples/d48b274a4b6098ffef0c016c6c945fb9.asciidoc
new file mode 100644
index 000000000..a1e4b7603
--- /dev/null
+++ b/docs/doc_examples/d48b274a4b6098ffef0c016c6c945fb9.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getToken({
+ grant_type: "refresh_token",
+ refresh_token: "vLBPvmAB6KvwvJZr27cS",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d49318764244113ad2ac4cc0f06d77ec.asciidoc b/docs/doc_examples/d49318764244113ad2ac4cc0f06d77ec.asciidoc
new file mode 100644
index 000000000..3c6a63893
--- /dev/null
+++ b/docs/doc_examples/d49318764244113ad2ac4cc0f06d77ec.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "image-index",
+ mappings: {
+ properties: {
+ "image-vector": {
+ type: "dense_vector",
+ dims: 3,
+ similarity: "l2_norm",
+ index_options: {
+ type: "hnsw",
+ m: 32,
+ ef_construction: 100,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4a41fb74b41b41a0ee114a2311f2815.asciidoc b/docs/doc_examples/d4a41fb74b41b41a0ee114a2311f2815.asciidoc
new file mode 100644
index 000000000..beea387be
--- /dev/null
+++ b/docs/doc_examples/d4a41fb74b41b41a0ee114a2311f2815.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_age: "7d",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4b405ef0302227e050ac8f0e39068e1.asciidoc b/docs/doc_examples/d4b405ef0302227e050ac8f0e39068e1.asciidoc
new file mode 100644
index 000000000..eaa534005
--- /dev/null
+++ b/docs/doc_examples/d4b405ef0302227e050ac8f0e39068e1.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.evaluateDataFrame({
+ index: "my_analytics_dest_index",
+ evaluation: {
+ outlier_detection: {
+ actual_field: "is_outlier",
+ predicted_probability_field: "ml.outlier_score",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4b50ae96e541c0031264a10f6afccbf.asciidoc b/docs/doc_examples/d4b50ae96e541c0031264a10f6afccbf.asciidoc
new file mode 100644
index 000000000..2669eba06
--- /dev/null
+++ b/docs/doc_examples/d4b50ae96e541c0031264a10f6afccbf.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.migrateToDataStream({
+ name: "my-time-series-data",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4cdcf01014c75693b080c778071c1b5.asciidoc b/docs/doc_examples/d4cdcf01014c75693b080c778071c1b5.asciidoc
new file mode 100644
index 000000000..a7d60de27
--- /dev/null
+++ b/docs/doc_examples/d4cdcf01014c75693b080c778071c1b5.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "exams",
+ size: 0,
+ aggs: {
+ grades_stats: {
+ stats: {
+ field: "grade",
+ missing: 0,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4d450f536d747d5ef5050d2d8c66f09.asciidoc b/docs/doc_examples/d4d450f536d747d5ef5050d2d8c66f09.asciidoc
new file mode 100644
index 000000000..551748bea
--- /dev/null
+++ b/docs/doc_examples/d4d450f536d747d5ef5050d2d8c66f09.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ user: {
+ id: "kimchy",
+ },
+ "@timestamp": "2099-11-15T14:12:12",
+ message: "trying out Elasticsearch",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ user: {
+ id: "kimchi",
+ },
+ "@timestamp": "2099-11-15T14:12:13",
+ message: "My user ID is similar to kimchy!",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4ef6ac034c4d42cb75d830ec69146e6.asciidoc b/docs/doc_examples/d4ef6ac034c4d42cb75d830ec69146e6.asciidoc
new file mode 100644
index 000000000..9f176704b
--- /dev/null
+++ b/docs/doc_examples/d4ef6ac034c4d42cb75d830ec69146e6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.deleteAutoFollowPattern({
+ name: "my_auto_follow_pattern",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d4fb482a51d67a1af48e429af6019a46.asciidoc b/docs/doc_examples/d4fb482a51d67a1af48e429af6019a46.asciidoc
new file mode 100644
index 000000000..2ab3635f9
--- /dev/null
+++ b/docs/doc_examples/d4fb482a51d67a1af48e429af6019a46.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "sort.field": ["username", "date"],
+ "sort.order": ["asc", "desc"],
+ },
+ },
+ mappings: {
+ properties: {
+ username: {
+ type: "keyword",
+ doc_values: true,
+ },
+ date: {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d50b030edfe6d1128eb76aa5ba9d4e27.asciidoc b/docs/doc_examples/d50b030edfe6d1128eb76aa5ba9d4e27.asciidoc
new file mode 100644
index 000000000..4494a29ac
--- /dev/null
+++ b/docs/doc_examples/d50b030edfe6d1128eb76aa5ba9d4e27.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putTrainedModelAlias({
+ model_id: "flight-delay-prediction-1580004349800",
+ model_alias: "flight_delay_model",
+ reassign: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5132d34ae922fa8e898889b627a1405.asciidoc b/docs/doc_examples/d5132d34ae922fa8e898889b627a1405.asciidoc
new file mode 100644
index 000000000..663f0c9b5
--- /dev/null
+++ b/docs/doc_examples/d5132d34ae922fa8e898889b627a1405.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "child_example",
+ size: 0,
+ aggs: {
+ "top-tags": {
+ terms: {
+ field: "tags.keyword",
+ size: 10,
+ },
+ aggs: {
+ "to-answers": {
+ children: {
+ type: "answer",
+ },
+ aggs: {
+ "top-names": {
+ terms: {
+ field: "owner.display_name.keyword",
+ size: 10,
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc b/docs/doc_examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc
new file mode 100644
index 000000000..865d407f9
--- /dev/null
+++ b/docs/doc_examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "attachment",
+ description: "Extract attachment information",
+ processors: [
+ {
+ attachment: {
+ field: "data",
+ remove_binary: true,
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "attachment",
+ document: {
+ data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/d524db57be9f16abac5396895b9a2a59.asciidoc b/docs/doc_examples/d524db57be9f16abac5396895b9a2a59.asciidoc
new file mode 100644
index 000000000..2c534e759
--- /dev/null
+++ b/docs/doc_examples/d524db57be9f16abac5396895b9a2a59.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.resolveIndex({
+ name: "my-index-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d547d55efbf75374f6de1f224323bc73.asciidoc b/docs/doc_examples/d547d55efbf75374f6de1f224323bc73.asciidoc
new file mode 100644
index 000000000..06b300ec2
--- /dev/null
+++ b/docs/doc_examples/d547d55efbf75374f6de1f224323bc73.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "geocells",
+ mappings: {
+ properties: {
+ geocell: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.ingest.putPipeline({
+ id: "geotile2shape",
+ description: "translate rectangular z/x/y geotile to bounding box",
+ processors: [
+ {
+ geo_grid: {
+ field: "geocell",
+ tile_type: "geotile",
+ },
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.ingest.putPipeline({
+ id: "geohex2shape",
+ description: "translate H3 cell to polygon",
+ processors: [
+ {
+ geo_grid: {
+ field: "geocell",
+ tile_type: "geohex",
+ target_format: "wkt",
+ },
+ },
+ ],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/d5533f08f5cc0479f07a46c761f0786b.asciidoc b/docs/doc_examples/d5533f08f5cc0479f07a46c761f0786b.asciidoc
new file mode 100644
index 000000000..1a2273a4e
--- /dev/null
+++ b/docs/doc_examples/d5533f08f5cc0479f07a46c761f0786b.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ counter: {
+ type: "integer",
+ store: false,
+ },
+ tags: {
+ type: "keyword",
+ store: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d56a9d89282df56adbbc34b91390ac17.asciidoc b/docs/doc_examples/d56a9d89282df56adbbc34b91390ac17.asciidoc
new file mode 100644
index 000000000..e987bbba2
--- /dev/null
+++ b/docs/doc_examples/d56a9d89282df56adbbc34b91390ac17.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.getAutoFollowPattern({
+ name: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d59e9cc75814575aa5e275dbe262918c.asciidoc b/docs/doc_examples/d59e9cc75814575aa5e275dbe262918c.asciidoc
new file mode 100644
index 000000000..1e76b4c4b
--- /dev/null
+++ b/docs/doc_examples/d59e9cc75814575aa5e275dbe262918c.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ geo_grid: {
+ location: {
+ geohash: "u0",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5abaf1fd26f0abf410dd8827d077bbf.asciidoc b/docs/doc_examples/d5abaf1fd26f0abf410dd8827d077bbf.asciidoc
new file mode 100644
index 000000000..20d959497
--- /dev/null
+++ b/docs/doc_examples/d5abaf1fd26f0abf410dd8827d077bbf.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ match_all: {},
+ },
+ sort: ["my_id"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5bf9bc08f622ece98632a14a3982e27.asciidoc b/docs/doc_examples/d5bf9bc08f622ece98632a14a3982e27.asciidoc
new file mode 100644
index 000000000..a6bdb28e8
--- /dev/null
+++ b/docs/doc_examples/d5bf9bc08f622ece98632a14a3982e27.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_all: {},
+ },
+ script_fields: {
+ test1: {
+ script: "params['_source']['message']",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc b/docs/doc_examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc
new file mode 100644
index 000000000..1d3f9bd7e
--- /dev/null
+++ b/docs/doc_examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ _source: ["user.id", "_doc"],
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc b/docs/doc_examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc
new file mode 100644
index 000000000..37aa7ee9b
--- /dev/null
+++ b/docs/doc_examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ scroll: "1m",
+ sort: ["_doc"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d5ead6aacbfbedc8396f87bb34acc880.asciidoc b/docs/doc_examples/d5ead6aacbfbedc8396f87bb34acc880.asciidoc
new file mode 100644
index 000000000..631a13ebf
--- /dev/null
+++ b/docs/doc_examples/d5ead6aacbfbedc8396f87bb34acc880.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.get({
+ id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc b/docs/doc_examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc
new file mode 100644
index 000000000..8f4d19539
--- /dev/null
+++ b/docs/doc_examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.recovery({
+ v: "true",
+ h: "i,s,t,ty,st,rep,snap,f,fp,b,bp",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d64679f8a53928fe9958dbe5ee5d9d13.asciidoc b/docs/doc_examples/d64679f8a53928fe9958dbe5ee5d9d13.asciidoc
new file mode 100644
index 000000000..f00794963
--- /dev/null
+++ b/docs/doc_examples/d64679f8a53928fe9958dbe5ee5d9d13.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ parent_id: {
+ type: "answer",
+ id: "1",
+ },
+ },
+ aggs: {
+ parents: {
+ terms: {
+ field: "my_join_field#question",
+ size: 10,
+ },
+ },
+ },
+ runtime_mappings: {
+ parent: {
+ type: "long",
+ script:
+ "\n emit(Integer.parseInt(doc['my_join_field#question'].value)) \n ",
+ },
+ },
+ fields: [
+ {
+ field: "parent",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d64d509440afbed7cefd04b6898962eb.asciidoc b/docs/doc_examples/d64d509440afbed7cefd04b6898962eb.asciidoc
new file mode 100644
index 000000000..8643f368a
--- /dev/null
+++ b/docs/doc_examples/d64d509440afbed7cefd04b6898962eb.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_geoshapes",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "200km",
+ "pin.location": {
+ lat: 40,
+ lon: -70,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d66e2b4d1931bf88c72e74670156e43f.asciidoc b/docs/doc_examples/d66e2b4d1931bf88c72e74670156e43f.asciidoc
new file mode 100644
index 000000000..f3794bd47
--- /dev/null
+++ b/docs/doc_examples/d66e2b4d1931bf88c72e74670156e43f.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ track_total_hits: 100,
+ query: {
+ match: {
+ "user.id": "elkbee",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d681508a745b2bc777d47ba606d24224.asciidoc b/docs/doc_examples/d681508a745b2bc777d47ba606d24224.asciidoc
new file mode 100644
index 000000000..9a01deced
--- /dev/null
+++ b/docs/doc_examples/d681508a745b2bc777d47ba606d24224.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.fielddata({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d681b643da0d7f0a384f627b6d56111b.asciidoc b/docs/doc_examples/d681b643da0d7f0a384f627b6d56111b.asciidoc
new file mode 100644
index 000000000..12af9491f
--- /dev/null
+++ b/docs/doc_examples/d681b643da0d7f0a384f627b6d56111b.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ message: {
+ type: "wildcard",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d690a6af462c70a783625a323e11c72c.asciidoc b/docs/doc_examples/d690a6af462c70a783625a323e11c72c.asciidoc
new file mode 100644
index 000000000..b6c413d2d
--- /dev/null
+++ b/docs/doc_examples/d690a6af462c70a783625a323e11c72c.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test-index",
+ settings: {
+ number_of_shards: 1,
+ number_of_replicas: 1,
+ "index.lifecycle.name": "my_policy",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d69bd36335774c8ae1286cee21310241.asciidoc b/docs/doc_examples/d69bd36335774c8ae1286cee21310241.asciidoc
new file mode 100644
index 000000000..d74ae75be
--- /dev/null
+++ b/docs/doc_examples/d69bd36335774c8ae1286cee21310241.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote-search",
+ remote_indices: [
+ {
+ clusters: ["my_remote_cluster"],
+ names: ["target-index"],
+ privileges: ["read", "read_cross_cluster", "view_index_metadata"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d69cf7c82602431d9e339583e7dfb988.asciidoc b/docs/doc_examples/d69cf7c82602431d9e339583e7dfb988.asciidoc
new file mode 100644
index 000000000..935a516fc
--- /dev/null
+++ b/docs/doc_examples/d69cf7c82602431d9e339583e7dfb988.asciidoc
@@ -0,0 +1,48 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ std_english: {
+ type: "standard",
+ stopwords: "_english_",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_text: {
+ type: "text",
+ analyzer: "standard",
+ fields: {
+ english: {
+ type: "text",
+ analyzer: "std_english",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ field: "my_text",
+ text: "The old brown cow",
+});
+console.log(response1);
+
+const response2 = await client.indices.analyze({
+ index: "my-index-000001",
+ field: "my_text.english",
+ text: "The old brown cow",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc b/docs/doc_examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc
new file mode 100644
index 000000000..17ba11227
--- /dev/null
+++ b/docs/doc_examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.list({
+ from: 0,
+ size: 2,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc b/docs/doc_examples/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc
new file mode 100644
index 000000000..812d3b354
--- /dev/null
+++ b/docs/doc_examples/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ "price.adjusted": {
+ type: "double",
+ script:
+ "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n ",
+ },
+ },
+ aggs: {
+ max_price: {
+ max: {
+ field: "price.adjusted",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7141bd4d0db964f5cc4a872ad79dce9.asciidoc b/docs/doc_examples/d7141bd4d0db964f5cc4a872ad79dce9.asciidoc
new file mode 100644
index 000000000..e06b1bd91
--- /dev/null
+++ b/docs/doc_examples/d7141bd4d0db964f5cc4a872ad79dce9.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.features.resetFeatures();
+console.log(response);
+----
diff --git a/docs/doc_examples/d7348119df9f89a556a7b767d5298c7e.asciidoc b/docs/doc_examples/d7348119df9f89a556a7b767d5298c7e.asciidoc
new file mode 100644
index 000000000..01a333e19
--- /dev/null
+++ b/docs/doc_examples/d7348119df9f89a556a7b767d5298c7e.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "tour",
+ filter_path: "aggregations",
+ aggregations: {
+ path: {
+ terms: {
+ field: "city",
+ },
+ aggregations: {
+ museum_tour: {
+ geo_line: {
+ point: {
+ field: "location",
+ },
+ sort: {
+ field: "@timestamp",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7717318d93d0a1f3ad049f9c6604417.asciidoc b/docs/doc_examples/d7717318d93d0a1f3ad049f9c6604417.asciidoc
new file mode 100644
index 000000000..8cf16de62
--- /dev/null
+++ b/docs/doc_examples/d7717318d93d0a1f3ad049f9c6604417.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "standard",
+ max_token_length: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/d775836a0d7abecc6637aa988f204c30.asciidoc b/docs/doc_examples/d775836a0d7abecc6637aa988f204c30.asciidoc
new file mode 100644
index 000000000..5e976e1de
--- /dev/null
+++ b/docs/doc_examples/d775836a0d7abecc6637aa988f204c30.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ fullname: "John Doe",
+ text: "test test test ",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ refresh: "wait_for",
+ document: {
+ fullname: "Jane Doe",
+ text: "Another test ...",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/d7898526d239d2aea83727fb982f8f77.asciidoc b/docs/doc_examples/d7898526d239d2aea83727fb982f8f77.asciidoc
new file mode 100644
index 000000000..de62a08de
--- /dev/null
+++ b/docs/doc_examples/d7898526d239d2aea83727fb982f8f77.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.refresh();
+console.log(response);
+----
diff --git a/docs/doc_examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc b/docs/doc_examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc
new file mode 100644
index 000000000..649a0757e
--- /dev/null
+++ b/docs/doc_examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ my_field: {
+ type: "text",
+ fielddata: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7a55a7c491e97079e429483085f1d58.asciidoc b/docs/doc_examples/d7a55a7c491e97079e429483085f1d58.asciidoc
new file mode 100644
index 000000000..7eef74763
--- /dev/null
+++ b/docs/doc_examples/d7a55a7c491e97079e429483085f1d58.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "dsl-data-stream-template",
+ index_patterns: ["dsl-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ settings: {
+ "index.lifecycle.name": "pre-dsl-ilm-policy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7a5b0159ffdcdd1ab9078b38829a08b.asciidoc b/docs/doc_examples/d7a5b0159ffdcdd1ab9078b38829a08b.asciidoc
new file mode 100644
index 000000000..8bfce16e0
--- /dev/null
+++ b/docs/doc_examples/d7a5b0159ffdcdd1ab9078b38829a08b.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ term: {
+ text: "shoes",
+ },
+ },
+ },
+ },
+ {
+ standard: {
+ query: {
+ semantic: {
+ field: "semantic_field",
+ query: "shoes",
+ },
+ },
+ },
+ },
+ ],
+ rank_window_size: 50,
+ rank_constant: 20,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7ae456f119246e95f2f4c37e7544b8c.asciidoc b/docs/doc_examples/d7ae456f119246e95f2f4c37e7544b8c.asciidoc
new file mode 100644
index 000000000..afe5e6046
--- /dev/null
+++ b/docs/doc_examples/d7ae456f119246e95f2f4c37e7544b8c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.startDatafeed({
+ datafeed_id: "datafeed-low_request_rate",
+ start: "2019-04-07T18:22:16Z",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7b61bfb6adb22986a43388b823894cc.asciidoc b/docs/doc_examples/d7b61bfb6adb22986a43388b823894cc.asciidoc
new file mode 100644
index 000000000..3e0ce9910
--- /dev/null
+++ b/docs/doc_examples/d7b61bfb6adb22986a43388b823894cc.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "cohere_embeddings",
+ inference_config: {
+ service: "cohere",
+ service_settings: {
+ api_key: "",
+ model_id: "embed-english-v3.0",
+ embedding_type: "byte",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7d92816cac64b7c70d72b0000eeeeea.asciidoc b/docs/doc_examples/d7d92816cac64b7c70d72b0000eeeeea.asciidoc
new file mode 100644
index 000000000..e854a2e49
--- /dev/null
+++ b/docs/doc_examples/d7d92816cac64b7c70d72b0000eeeeea.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "test_role3",
+ indices: [
+ {
+ names: ["*"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["customer.handle"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7f42d1b906dc406be1819d17c625d5f.asciidoc b/docs/doc_examples/d7f42d1b906dc406be1819d17c625d5f.asciidoc
new file mode 100644
index 000000000..6dd63ecb0
--- /dev/null
+++ b/docs/doc_examples/d7f42d1b906dc406be1819d17c625d5f.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ t_shirts: {
+ filter: {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d7fe687201ac87b307cd06ed015dd317.asciidoc b/docs/doc_examples/d7fe687201ac87b307cd06ed015dd317.asciidoc
new file mode 100644
index 000000000..c0b8ab7d9
--- /dev/null
+++ b/docs/doc_examples/d7fe687201ac87b307cd06ed015dd317.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ user_id: {
+ type: "keyword",
+ ignore_above: 100,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d803ed00d8f45f81c33e415e1c1ecb8c.asciidoc b/docs/doc_examples/d803ed00d8f45f81c33e415e1c1ecb8c.asciidoc
new file mode 100644
index 000000000..76fcaf558
--- /dev/null
+++ b/docs/doc_examples/d803ed00d8f45f81c33e415e1c1ecb8c.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-data-stream",
+ query: {
+ range: {
+ "@timestamp": {
+ gte: "now-7d/d",
+ lte: "now/d",
+ },
+ },
+ },
+ },
+ dest: {
+ index: "new-data-stream",
+ op_type: "create",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d80ac403d8d936ca9dec185c7da13f2f.asciidoc b/docs/doc_examples/d80ac403d8d936ca9dec185c7da13f2f.asciidoc
new file mode 100644
index 000000000..efb173b6b
--- /dev/null
+++ b/docs/doc_examples/d80ac403d8d936ca9dec185c7da13f2f.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.putScript({
+ id: "my-stored-script",
+ script: {
+ lang: "painless",
+ source: "Math.log(_score * 2) + params['my_modifier']",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d8310e5606c61e7a6e64a90838b1a830.asciidoc b/docs/doc_examples/d8310e5606c61e7a6e64a90838b1a830.asciidoc
new file mode 100644
index 000000000..2ebf0acd5
--- /dev/null
+++ b/docs/doc_examples/d8310e5606c61e7a6e64a90838b1a830.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "parent_example",
+ id: 2,
+ routing: 1,
+ document: {
+ join: {
+ name: "answer",
+ parent: "1",
+ },
+ owner: {
+ location: "Norfolk, United Kingdom",
+ display_name: "Sam",
+ id: 48,
+ },
+ body: "Unfortunately you're pretty much limited to FTP...",
+ creation_date: "2009-05-04T13:45:37.030",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "parent_example",
+ id: 3,
+ routing: 1,
+ refresh: "true",
+ document: {
+ join: {
+ name: "answer",
+ parent: "1",
+ },
+ owner: {
+ location: "Norfolk, United Kingdom",
+ display_name: "Troll",
+ id: 49,
+ },
+ body: "Use Linux...",
+ creation_date: "2009-05-05T13:45:37.030",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/d8496fa0e5a394fd758617ed6a6c956f.asciidoc b/docs/doc_examples/d8496fa0e5a394fd758617ed6a6c956f.asciidoc
new file mode 100644
index 000000000..ea74db82f
--- /dev/null
+++ b/docs/doc_examples/d8496fa0e5a394fd758617ed6a6c956f.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ percolate: {
+ field: "query",
+ document: {
+ message: "The quick brown fox jumps over the lazy dog",
+ },
+ },
+ },
+ highlight: {
+ fields: {
+ message: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d84a861ce563508aeaaf30a9dd84b5cf.asciidoc b/docs/doc_examples/d84a861ce563508aeaaf30a9dd84b5cf.asciidoc
new file mode 100644
index 000000000..6deb4fde6
--- /dev/null
+++ b/docs/doc_examples/d84a861ce563508aeaaf30a9dd84b5cf.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ hot: {
+ actions: {
+ rollover: {
+ max_age: "7d",
+ max_size: "100gb",
+ min_docs: 1000,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d851282dba548251d10db5954a339307.asciidoc b/docs/doc_examples/d851282dba548251d10db5954a339307.asciidoc
new file mode 100644
index 000000000..0dcc1cb4e
--- /dev/null
+++ b/docs/doc_examples/d851282dba548251d10db5954a339307.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "twitter",
+ query: {
+ match: {
+ title: "elasticsearch",
+ },
+ },
+ search_after: [1463538857, "654323"],
+ sort: [
+ {
+ date: "asc",
+ },
+ {
+ tie_breaker_id: "asc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d870d5bd1f97fc75872a298fcddec513.asciidoc b/docs/doc_examples/d870d5bd1f97fc75872a298fcddec513.asciidoc
new file mode 100644
index 000000000..0d7463275
--- /dev/null
+++ b/docs/doc_examples/d870d5bd1f97fc75872a298fcddec513.asciidoc
@@ -0,0 +1,155 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.textStructure.findStructure({
+ text_files: [
+ {
+ name: "Leviathan Wakes",
+ author: "James S.A. Corey",
+ release_date: "2011-06-02",
+ page_count: 561,
+ },
+ {
+ name: "Hyperion",
+ author: "Dan Simmons",
+ release_date: "1989-05-26",
+ page_count: 482,
+ },
+ {
+ name: "Dune",
+ author: "Frank Herbert",
+ release_date: "1965-06-01",
+ page_count: 604,
+ },
+ {
+ name: "Dune Messiah",
+ author: "Frank Herbert",
+ release_date: "1969-10-15",
+ page_count: 331,
+ },
+ {
+ name: "Children of Dune",
+ author: "Frank Herbert",
+ release_date: "1976-04-21",
+ page_count: 408,
+ },
+ {
+ name: "God Emperor of Dune",
+ author: "Frank Herbert",
+ release_date: "1981-05-28",
+ page_count: 454,
+ },
+ {
+ name: "Consider Phlebas",
+ author: "Iain M. Banks",
+ release_date: "1987-04-23",
+ page_count: 471,
+ },
+ {
+ name: "Pandora's Star",
+ author: "Peter F. Hamilton",
+ release_date: "2004-03-02",
+ page_count: 768,
+ },
+ {
+ name: "Revelation Space",
+ author: "Alastair Reynolds",
+ release_date: "2000-03-15",
+ page_count: 585,
+ },
+ {
+ name: "A Fire Upon the Deep",
+ author: "Vernor Vinge",
+ release_date: "1992-06-01",
+ page_count: 613,
+ },
+ {
+ name: "Ender's Game",
+ author: "Orson Scott Card",
+ release_date: "1985-06-01",
+ page_count: 324,
+ },
+ {
+ name: "1984",
+ author: "George Orwell",
+ release_date: "1985-06-01",
+ page_count: 328,
+ },
+ {
+ name: "Fahrenheit 451",
+ author: "Ray Bradbury",
+ release_date: "1953-10-15",
+ page_count: 227,
+ },
+ {
+ name: "Brave New World",
+ author: "Aldous Huxley",
+ release_date: "1932-06-01",
+ page_count: 268,
+ },
+ {
+ name: "Foundation",
+ author: "Isaac Asimov",
+ release_date: "1951-06-01",
+ page_count: 224,
+ },
+ {
+ name: "The Giver",
+ author: "Lois Lowry",
+ release_date: "1993-04-26",
+ page_count: 208,
+ },
+ {
+ name: "Slaughterhouse-Five",
+ author: "Kurt Vonnegut",
+ release_date: "1969-06-01",
+ page_count: 275,
+ },
+ {
+ name: "The Hitchhiker's Guide to the Galaxy",
+ author: "Douglas Adams",
+ release_date: "1979-10-12",
+ page_count: 180,
+ },
+ {
+ name: "Snow Crash",
+ author: "Neal Stephenson",
+ release_date: "1992-06-01",
+ page_count: 470,
+ },
+ {
+ name: "Neuromancer",
+ author: "William Gibson",
+ release_date: "1984-07-01",
+ page_count: 271,
+ },
+ {
+ name: "The Handmaid's Tale",
+ author: "Margaret Atwood",
+ release_date: "1985-06-01",
+ page_count: 311,
+ },
+ {
+ name: "Starship Troopers",
+ author: "Robert A. Heinlein",
+ release_date: "1959-12-01",
+ page_count: 335,
+ },
+ {
+ name: "The Left Hand of Darkness",
+ author: "Ursula K. Le Guin",
+ release_date: "1969-06-01",
+ page_count: 304,
+ },
+ {
+ name: "The Moon is a Harsh Mistress",
+ author: "Robert A. Heinlein",
+ release_date: "1966-04-01",
+ page_count: 288,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d87175daed2327565d4325528c6d8b38.asciidoc b/docs/doc_examples/d87175daed2327565d4325528c6d8b38.asciidoc
new file mode 100644
index 000000000..60b8237df
--- /dev/null
+++ b/docs/doc_examples/d87175daed2327565d4325528c6d8b38.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 0,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d87cfcc0a297f75ffe646b2e61940d14.asciidoc b/docs/doc_examples/d87cfcc0a297f75ffe646b2e61940d14.asciidoc
new file mode 100644
index 000000000..4fe177b8f
--- /dev/null
+++ b/docs/doc_examples/d87cfcc0a297f75ffe646b2e61940d14.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "uppercase_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_uppercase: {
+ tokenizer: "whitespace",
+ filter: ["uppercase"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d880630b6f7dc634c4078293f9cd3d80.asciidoc b/docs/doc_examples/d880630b6f7dc634c4078293f9cd3d80.asciidoc
new file mode 100644
index 000000000..25e54fdb2
--- /dev/null
+++ b/docs/doc_examples/d880630b6f7dc634c4078293f9cd3d80.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ size: 2,
+ sources: [
+ {
+ date: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "1d",
+ order: "desc",
+ },
+ },
+ },
+ {
+ product: {
+ terms: {
+ field: "product",
+ order: "asc",
+ },
+ },
+ },
+ ],
+ after: {
+ date: 1494288000000,
+ product: "mad max",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d88f883ed2fb8be35cd3e72ddffcf4ef.asciidoc b/docs/doc_examples/d88f883ed2fb8be35cd3e72ddffcf4ef.asciidoc
new file mode 100644
index 000000000..2c104ebce
--- /dev/null
+++ b/docs/doc_examples/d88f883ed2fb8be35cd3e72ddffcf4ef.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "length_custom_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_length_2_to_10_char: {
+ tokenizer: "whitespace",
+ filter: ["length_2_to_10_char"],
+ },
+ },
+ filter: {
+ length_2_to_10_char: {
+ type: "length",
+ min: 2,
+ max: 10,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d89d36741d906a71eca6c144e8d83889.asciidoc b/docs/doc_examples/d89d36741d906a71eca6c144e8d83889.asciidoc
new file mode 100644
index 000000000..d45a6b65d
--- /dev/null
+++ b/docs/doc_examples/d89d36741d906a71eca6c144e8d83889.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.cancel({
+ task_id: "oTUltX4IQMOUUVeiohTt8A:12345",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d8a82511cb94f49b4fe4828fee3ba074.asciidoc b/docs/doc_examples/d8a82511cb94f49b4fe4828fee3ba074.asciidoc
new file mode 100644
index 000000000..60093c26e
--- /dev/null
+++ b/docs/doc_examples/d8a82511cb94f49b4fe4828fee3ba074.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ h: "name,node*,heap*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d8c401a5b7359ec65947b9f35ecf6927.asciidoc b/docs/doc_examples/d8c401a5b7359ec65947b9f35ecf6927.asciidoc
new file mode 100644
index 000000000..402a1ea30
--- /dev/null
+++ b/docs/doc_examples/d8c401a5b7359ec65947b9f35ecf6927.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "ngram",
+ min_gram: 3,
+ max_gram: 3,
+ token_chars: ["letter", "digit"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "2 Quick Foxes.",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc b/docs/doc_examples/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc
new file mode 100644
index 000000000..f037ca9a4
--- /dev/null
+++ b/docs/doc_examples/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "byte-image-index",
+ mappings: {
+ properties: {
+ "byte-image-vector": {
+ type: "dense_vector",
+ element_type: "byte",
+ dims: 2,
+ },
+ title: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d8fa7ca2ec8dbfa034603ea566e33f5b.asciidoc b/docs/doc_examples/d8fa7ca2ec8dbfa034603ea566e33f5b.asciidoc
new file mode 100644
index 000000000..cc29b6058
--- /dev/null
+++ b/docs/doc_examples/d8fa7ca2ec8dbfa034603ea566e33f5b.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ the_filter: {
+ filters: {
+ keyed: false,
+ filters: {
+ "t-shirt": {
+ term: {
+ type: "t-shirt",
+ },
+ },
+ hat: {
+ term: {
+ type: "hat",
+ },
+ },
+ },
+ },
+ aggs: {
+ avg_price: {
+ avg: {
+ field: "price",
+ },
+ },
+ sort_by_avg_price: {
+ bucket_sort: {
+ sort: {
+ avg_price: "asc",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc b/docs/doc_examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc
new file mode 100644
index 000000000..d6c59ff90
--- /dev/null
+++ b/docs/doc_examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "my-aliases",
+ template: {
+ aliases: {
+ "my-alias": {},
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.putIndexTemplate({
+ name: "my-index-template",
+ index_patterns: ["my-index-*"],
+ composed_of: ["my-aliases", "my-mappings", "my-settings"],
+ template: {
+ aliases: {
+ "yet-another-alias": {},
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/d94f666616dea141dcb7aaf08a35bc10.asciidoc b/docs/doc_examples/d94f666616dea141dcb7aaf08a35bc10.asciidoc
new file mode 100644
index 000000000..617d7bfe4
--- /dev/null
+++ b/docs/doc_examples/d94f666616dea141dcb7aaf08a35bc10.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "keep_types",
+ types: [""],
+ mode: "exclude",
+ },
+ ],
+ text: "1 quick fox 2 lazy dogs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d952ac7c73219d8cabc080679e035514.asciidoc b/docs/doc_examples/d952ac7c73219d8cabc080679e035514.asciidoc
new file mode 100644
index 000000000..7e7400f38
--- /dev/null
+++ b/docs/doc_examples/d952ac7c73219d8cabc080679e035514.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ knn: {
+ field: "my_embeddings.predicted_value",
+ k: 10,
+ num_candidates: 100,
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "sentence-transformers__msmarco-minilm-l-12-v3",
+ model_text: "the query string",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d979f934af0992fb8c8596beff80b638.asciidoc b/docs/doc_examples/d979f934af0992fb8c8596beff80b638.asciidoc
new file mode 100644
index 000000000..77cbe0562
--- /dev/null
+++ b/docs/doc_examples/d979f934af0992fb8c8596beff80b638.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ _source: ["obj1.*", "obj2.*"],
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d983c1ea730eeabac9e914656d7c9be2.asciidoc b/docs/doc_examples/d983c1ea730eeabac9e914656d7c9be2.asciidoc
new file mode 100644
index 000000000..dd82fb061
--- /dev/null
+++ b/docs/doc_examples/d983c1ea730eeabac9e914656d7c9be2.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "latvian_example",
+ settings: {
+ analysis: {
+ filter: {
+ latvian_stop: {
+ type: "stop",
+ stopwords: "_latvian_",
+ },
+ latvian_keywords: {
+ type: "keyword_marker",
+ keywords: ["piemērs"],
+ },
+ latvian_stemmer: {
+ type: "stemmer",
+ language: "latvian",
+ },
+ },
+ analyzer: {
+ rebuilt_latvian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "latvian_stop",
+ "latvian_keywords",
+ "latvian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc b/docs/doc_examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc
new file mode 100644
index 000000000..e8c8e1c1e
--- /dev/null
+++ b/docs/doc_examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ timestamp: {
+ type: "date",
+ },
+ temperature: {
+ type: "long",
+ },
+ voltage: {
+ type: "double",
+ },
+ node: {
+ type: "keyword",
+ },
+ voltage_corrected: {
+ type: "double",
+ on_script_error: "fail",
+ script: {
+ source:
+ "\n emit(doc['voltage'].value * params['multiplier'])\n ",
+ params: {
+ multiplier: 4,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d9a1ad1c5746b75972c74dd4d3a3d623.asciidoc b/docs/doc_examples/d9a1ad1c5746b75972c74dd4d3a3d623.asciidoc
new file mode 100644
index 000000000..a010647b8
--- /dev/null
+++ b/docs/doc_examples/d9a1ad1c5746b75972c74dd4d3a3d623.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_join_field: {
+ type: "join",
+ relations: {
+ question: ["answer", "comment"],
+ answer: "vote",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d9de409a4a197ce7cbe3714e07155d34.asciidoc b/docs/doc_examples/d9de409a4a197ce7cbe3714e07155d34.asciidoc
new file mode 100644
index 000000000..59f9b118c
--- /dev/null
+++ b/docs/doc_examples/d9de409a4a197ce7cbe3714e07155d34.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ query: {
+ match: {
+ body: "foo",
+ },
+ },
+ functions: [
+ {
+ script_score: {
+ script: {
+ source: "pure_df",
+ lang: "expert_scripts",
+ params: {
+ field: "body",
+ term: "foo",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/d9e0cba8e150681d861f5fd1545514e2.asciidoc b/docs/doc_examples/d9e0cba8e150681d861f5fd1545514e2.asciidoc
new file mode 100644
index 000000000..9c9f58277
--- /dev/null
+++ b/docs/doc_examples/d9e0cba8e150681d861f5fd1545514e2.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query:
+ "SELECT YEAR(release_date) AS year FROM library WHERE page_count > ? AND author = ? GROUP BY year HAVING COUNT(*) > ?",
+ params: [300, "Frank Herbert", 0],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc b/docs/doc_examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc
new file mode 100644
index 000000000..ed9394a53
--- /dev/null
+++ b/docs/doc_examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ match: {
+ body: "elasticsearch",
+ },
+ },
+ should: {
+ rank_feature: {
+ field: "pagerank",
+ saturation: {
+ pivot: 10,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/da18bae37cda566c0254b30c15221b01.asciidoc b/docs/doc_examples/da18bae37cda566c0254b30c15221b01.asciidoc
new file mode 100644
index 000000000..c120c31c8
--- /dev/null
+++ b/docs/doc_examples/da18bae37cda566c0254b30c15221b01.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedServiceTokens({
+ namespace: "elastic",
+ service: "fleet-server",
+ name: "token1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/da24c13eee8c9aeae9a23faf80489e31.asciidoc b/docs/doc_examples/da24c13eee8c9aeae9a23faf80489e31.asciidoc
new file mode 100644
index 000000000..a1f77cba3
--- /dev/null
+++ b/docs/doc_examples/da24c13eee8c9aeae9a23faf80489e31.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "my-index",
+});
+console.log(response);
+
+const response1 = await client.reindex({
+ source: {
+ index: "restored-my-index",
+ },
+ dest: {
+ index: "my-index",
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.deleteDataStream({
+ name: "logs-my_app-default",
+});
+console.log(response2);
+
+const response3 = await client.reindex({
+ source: {
+ index: "restored-logs-my_app-default",
+ },
+ dest: {
+ index: "logs-my_app-default",
+ op_type: "create",
+ },
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/da3f280bc65b581fb3097be768061bee.asciidoc b/docs/doc_examples/da3f280bc65b581fb3097be768061bee.asciidoc
new file mode 100644
index 000000000..8297d5687
--- /dev/null
+++ b/docs/doc_examples/da3f280bc65b581fb3097be768061bee.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlPrepareAuthentication({
+ acs: "https://kibana.org/api/security/saml/callback",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/da8db0769dff7305f178c12b1111bc99.asciidoc b/docs/doc_examples/da8db0769dff7305f178c12b1111bc99.asciidoc
new file mode 100644
index 000000000..1e6dc21fe
--- /dev/null
+++ b/docs/doc_examples/da8db0769dff7305f178c12b1111bc99.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ simple_query_string: {
+ query: "this is a test",
+ fields: ["subject^3", "message"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/da90e457e2a34fe47dd82a0a2f336095.asciidoc b/docs/doc_examples/da90e457e2a34fe47dd82a0a2f336095.asciidoc
new file mode 100644
index 000000000..908eb903c
--- /dev/null
+++ b/docs/doc_examples/da90e457e2a34fe47dd82a0a2f336095.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "networks",
+ id: 1,
+ refresh: "wait_for",
+ document: {
+ range: "10.100.0.0/16",
+ name: "production",
+ department: "OPS",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/daae2e6acebc84e537764f4ba07f2e6e.asciidoc b/docs/doc_examples/daae2e6acebc84e537764f4ba07f2e6e.asciidoc
new file mode 100644
index 000000000..4e1d675ae
--- /dev/null
+++ b/docs/doc_examples/daae2e6acebc84e537764f4ba07f2e6e.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.exclude._name": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dabb159e0b3456024889fb9754a10655.asciidoc b/docs/doc_examples/dabb159e0b3456024889fb9754a10655.asciidoc
new file mode 100644
index 000000000..1323fde55
--- /dev/null
+++ b/docs/doc_examples/dabb159e0b3456024889fb9754a10655.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example",
+ mappings: {
+ properties: {
+ geometry: {
+ type: "shape",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dabcf0bead37cae1d3e5d2813fd3ccfe.asciidoc b/docs/doc_examples/dabcf0bead37cae1d3e5d2813fd3ccfe.asciidoc
new file mode 100644
index 000000000..f96585338
--- /dev/null
+++ b/docs/doc_examples/dabcf0bead37cae1d3e5d2813fd3ccfe.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ query_string: {
+ query: 'ip_addr:"2001:db8::/48"',
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dac8ec8547bc446637fd97d9fa872f4f.asciidoc b/docs/doc_examples/dac8ec8547bc446637fd97d9fa872f4f.asciidoc
new file mode 100644
index 000000000..724f4c75b
--- /dev/null
+++ b/docs/doc_examples/dac8ec8547bc446637fd97d9fa872f4f.asciidoc
@@ -0,0 +1,82 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDataFrameAnalytics({
+ id: "flight_prices",
+ source: {
+ index: ["kibana_sample_data_flights"],
+ },
+ dest: {
+ index: "kibana_sample_flight_prices",
+ },
+ analysis: {
+ regression: {
+ dependent_variable: "AvgTicketPrice",
+ num_top_feature_importance_values: 2,
+ feature_processors: [
+ {
+ frequency_encoding: {
+ field: "DestWeather",
+ feature_name: "DestWeather_frequency",
+ frequency_map: {
+ Rain: 0.14604811155570188,
+ "Heavy Fog": 0.14604811155570188,
+ "Thunder & Lightning": 0.14604811155570188,
+ Cloudy: 0.14604811155570188,
+ "Damaging Wind": 0.14604811155570188,
+ Hail: 0.14604811155570188,
+ Sunny: 0.14604811155570188,
+ Clear: 0.14604811155570188,
+ },
+ },
+ },
+ {
+ target_mean_encoding: {
+ field: "DestWeather",
+ feature_name: "DestWeather_targetmean",
+ target_map: {
+ Rain: 626.5588814585794,
+ "Heavy Fog": 626.5588814585794,
+ "Thunder & Lightning": 626.5588814585794,
+ Hail: 626.5588814585794,
+ "Damaging Wind": 626.5588814585794,
+ Cloudy: 626.5588814585794,
+ Clear: 626.5588814585794,
+ Sunny: 626.5588814585794,
+ },
+ default_value: 624.0249512020454,
+ },
+ },
+ {
+ one_hot_encoding: {
+ field: "DestWeather",
+ hot_map: {
+ Rain: "DestWeather_Rain",
+ "Heavy Fog": "DestWeather_Heavy Fog",
+ "Thunder & Lightning": "DestWeather_Thunder & Lightning",
+ Cloudy: "DestWeather_Cloudy",
+ "Damaging Wind": "DestWeather_Damaging Wind",
+ Hail: "DestWeather_Hail",
+ Clear: "DestWeather_Clear",
+ Sunny: "DestWeather_Sunny",
+ },
+ },
+ },
+ ],
+ },
+ },
+ analyzed_fields: {
+ includes: [
+ "AvgTicketPrice",
+ "Cancelled",
+ "DestWeather",
+ "FlightDelayMin",
+ "DistanceMiles",
+ ],
+ },
+ model_memory_limit: "30mb",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dad2d4add751fde5c39475ca709cc14b.asciidoc b/docs/doc_examples/dad2d4add751fde5c39475ca709cc14b.asciidoc
new file mode 100644
index 000000000..25d579fbc
--- /dev/null
+++ b/docs/doc_examples/dad2d4add751fde5c39475ca709cc14b.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "test",
+ settings: {
+ "index.routing.allocation.include.size": "big,medium",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dadb69a225778ecd6528924c0aa029bb.asciidoc b/docs/doc_examples/dadb69a225778ecd6528924c0aa029bb.asciidoc
new file mode 100644
index 000000000..fc4d72b96
--- /dev/null
+++ b/docs/doc_examples/dadb69a225778ecd6528924c0aa029bb.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "image-index",
+ mappings: {
+ properties: {
+ "image-vector": {
+ type: "dense_vector",
+ dims: 3,
+ similarity: "l2_norm",
+ },
+ "title-vector": {
+ type: "dense_vector",
+ dims: 5,
+ similarity: "l2_norm",
+ },
+ title: {
+ type: "text",
+ },
+ "file-type": {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dae57cf7df18adb4dc64426eb159733a.asciidoc b/docs/doc_examples/dae57cf7df18adb4dc64426eb159733a.asciidoc
new file mode 100644
index 000000000..43ab168fe
--- /dev/null
+++ b/docs/doc_examples/dae57cf7df18adb4dc64426eb159733a.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ aggs: {
+ load_time_outlier: {
+ percentiles: {
+ field: "load_time",
+ percents: [95, 99, 99.9],
+ hdr: {
+ number_of_significant_value_digits: 3,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/daf5631eba5285f1b929d5d8d8dc0d50.asciidoc b/docs/doc_examples/daf5631eba5285f1b929d5d8d8dc0d50.asciidoc
new file mode 100644
index 000000000..228ba4197
--- /dev/null
+++ b/docs/doc_examples/daf5631eba5285f1b929d5d8d8dc0d50.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "my_tokenizer",
+ },
+ },
+ tokenizer: {
+ my_tokenizer: {
+ type: "uax_url_email",
+ max_token_length: 5,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.analyze({
+ index: "my-index-000001",
+ analyzer: "my_analyzer",
+ text: "john.smith@global-international.com",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/db19cc7a26ca80106d86d688f4be67a8.asciidoc b/docs/doc_examples/db19cc7a26ca80106d86d688f4be67a8.asciidoc
new file mode 100644
index 000000000..8f0e29b61
--- /dev/null
+++ b/docs/doc_examples/db19cc7a26ca80106d86d688f4be67a8.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.stopDataFrameAnalytics({
+ id: "loganalytics",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/db773f690edf659ac9b044dc854c77eb.asciidoc b/docs/doc_examples/db773f690edf659ac9b044dc854c77eb.asciidoc
new file mode 100644
index 000000000..5a4fd2320
--- /dev/null
+++ b/docs/doc_examples/db773f690edf659ac9b044dc854c77eb.asciidoc
@@ -0,0 +1,78 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ name: {
+ type: "keyword",
+ },
+ price: {
+ type: "long",
+ },
+ included: {
+ type: "boolean",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "1",
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ name: "NEMO Science Museum",
+ price: 1750,
+ included: true,
+ },
+ {
+ index: {
+ _id: "2",
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ name: "Museum Het Rembrandthuis",
+ price: 1500,
+ included: false,
+ },
+ {
+ index: {
+ _id: "3",
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Nederlands Scheepvaartmuseum",
+ price: 1650,
+ included: true,
+ },
+ {
+ index: {
+ _id: "4",
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Amsterdam Centre for Architecture",
+ price: 0,
+ included: true,
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/db8710a9793ae0817a45892d33468160.asciidoc b/docs/doc_examples/db8710a9793ae0817a45892d33468160.asciidoc
new file mode 100644
index 000000000..28e18c33d
--- /dev/null
+++ b/docs/doc_examples/db8710a9793ae0817a45892d33468160.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.diskUsage({
+ index: "my-index-000001",
+ run_expensive_tasks: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/db879dcf70abc4a9a14063a9a2d8d6f5.asciidoc b/docs/doc_examples/db879dcf70abc4a9a14063a9a2d8d6f5.asciidoc
new file mode 100644
index 000000000..2bf5d8591
--- /dev/null
+++ b/docs/doc_examples/db879dcf70abc4a9a14063a9a2d8d6f5.asciidoc
@@ -0,0 +1,93 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "museums",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "museums",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: 1,
+ },
+ },
+ {
+ location: "POINT (4.912350 52.374081)",
+ name: "NEMO Science Museum",
+ },
+ {
+ index: {
+ _id: 2,
+ },
+ },
+ {
+ location: "POINT (4.901618 52.369219)",
+ name: "Museum Het Rembrandthuis",
+ },
+ {
+ index: {
+ _id: 3,
+ },
+ },
+ {
+ location: "POINT (4.914722 52.371667)",
+ name: "Nederlands Scheepvaartmuseum",
+ },
+ {
+ index: {
+ _id: 4,
+ },
+ },
+ {
+ location: "POINT (4.405200 51.222900)",
+ name: "Letterenhuis",
+ },
+ {
+ index: {
+ _id: 5,
+ },
+ },
+ {
+ location: "POINT (2.336389 48.861111)",
+ name: "Musée du Louvre",
+ },
+ {
+ index: {
+ _id: 6,
+ },
+ },
+ {
+ location: "POINT (2.327000 48.860000)",
+ name: "Musée d'Orsay",
+ },
+ ],
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "museums",
+ size: 0,
+ aggregations: {
+ "large-grid": {
+ geohash_grid: {
+ field: "location",
+ precision: 3,
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/db9a8e3edee7c9a96ea0875fd4bbaa69.asciidoc b/docs/doc_examples/db9a8e3edee7c9a96ea0875fd4bbaa69.asciidoc
new file mode 100644
index 000000000..8f8803735
--- /dev/null
+++ b/docs/doc_examples/db9a8e3edee7c9a96ea0875fd4bbaa69.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings();
+console.log(response);
+----
diff --git a/docs/doc_examples/dbc50b8c934171e94604575a8b36f349.asciidoc b/docs/doc_examples/dbc50b8c934171e94604575a8b36f349.asciidoc
new file mode 100644
index 000000000..b69c9c9f2
--- /dev/null
+++ b/docs/doc_examples/dbc50b8c934171e94604575a8b36f349.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.forcemerge({
+ index: "my-index-000001",
+ max_num_segments: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dbcd8892dd01c43d5a60c94173574faf.asciidoc b/docs/doc_examples/dbcd8892dd01c43d5a60c94173574faf.asciidoc
new file mode 100644
index 000000000..f4c200d3c
--- /dev/null
+++ b/docs/doc_examples/dbcd8892dd01c43d5a60c94173574faf.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "range_index",
+ settings: {
+ number_of_shards: 2,
+ },
+ mappings: {
+ properties: {
+ expected_attendees: {
+ type: "integer_range",
+ },
+ time_frame: {
+ type: "date_range",
+ format: "yyyy-MM-dd||epoch_millis",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "range_index",
+ id: 1,
+ refresh: "true",
+ document: {
+ expected_attendees: {
+ gte: 10,
+ lte: 20,
+ },
+ time_frame: {
+ gte: "2019-10-28",
+ lte: "2019-11-04",
+ },
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/dbd1b930782d34d7396fdb2db1216c0d.asciidoc b/docs/doc_examples/dbd1b930782d34d7396fdb2db1216c0d.asciidoc
new file mode 100644
index 000000000..956826f86
--- /dev/null
+++ b/docs/doc_examples/dbd1b930782d34d7396fdb2db1216c0d.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ ids: {
+ values: ["1", "4", "100"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dbdd58cdeac9ef20b42ff73e4864e697.asciidoc b/docs/doc_examples/dbdd58cdeac9ef20b42ff73e4864e697.asciidoc
new file mode 100644
index 000000000..2b96106b8
--- /dev/null
+++ b/docs/doc_examples/dbdd58cdeac9ef20b42ff73e4864e697.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "_all",
+ fields: "*.id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dbf93d02ab86a09929a21232b19709cc.asciidoc b/docs/doc_examples/dbf93d02ab86a09929a21232b19709cc.asciidoc
new file mode 100644
index 000000000..b7f768ac8
--- /dev/null
+++ b/docs/doc_examples/dbf93d02ab86a09929a21232b19709cc.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.stopTrainedModelDeployment({
+ model_id: "my_model_for_search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dbf9abc37899352751dab0ede62af2fd.asciidoc b/docs/doc_examples/dbf9abc37899352751dab0ede62af2fd.asciidoc
new file mode 100644
index 000000000..9b11a1f56
--- /dev/null
+++ b/docs/doc_examples/dbf9abc37899352751dab0ede62af2fd.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateToken({
+ token:
+ "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dc33160f4087443f867080a8f5b2cfbd.asciidoc b/docs/doc_examples/dc33160f4087443f867080a8f5b2cfbd.asciidoc
new file mode 100644
index 000000000..cb0e48671
--- /dev/null
+++ b/docs/doc_examples/dc33160f4087443f867080a8f5b2cfbd.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ format: "json",
+ query:
+ "\n FROM library\n | KEEP author, name, page_count, release_date\n | SORT page_count DESC\n | LIMIT 5\n ",
+ columnar: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dc3b7603e7d688106acb804059af7834.asciidoc b/docs/doc_examples/dc3b7603e7d688106acb804059af7834.asciidoc
new file mode 100644
index 000000000..9d2cf81d9
--- /dev/null
+++ b/docs/doc_examples/dc3b7603e7d688106acb804059af7834.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ _source: false,
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dc468865da947b4a9136a5b92878d918.asciidoc b/docs/doc_examples/dc468865da947b4a9136a5b92878d918.asciidoc
new file mode 100644
index 000000000..30cdb1f6b
--- /dev/null
+++ b/docs/doc_examples/dc468865da947b4a9136a5b92878d918.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createApiKey({
+ name: "my-other-api-key",
+ metadata: {
+ application: "my-application",
+ environment: {
+ level: 2,
+ trusted: true,
+ tags: ["dev", "staging"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dc4dcfeae8a5f248639335c2c9809549.asciidoc b/docs/doc_examples/dc4dcfeae8a5f248639335c2c9809549.asciidoc
new file mode 100644
index 000000000..32844b898
--- /dev/null
+++ b/docs/doc_examples/dc4dcfeae8a5f248639335c2c9809549.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "path_hierarchy",
+ text: "/one/two/three",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dc8c94c9bef1f879282caea5c406f36e.asciidoc b/docs/doc_examples/dc8c94c9bef1f879282caea5c406f36e.asciidoc
new file mode 100644
index 000000000..dc8a7c3f0
--- /dev/null
+++ b/docs/doc_examples/dc8c94c9bef1f879282caea5c406f36e.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ filter: ["lowercase"],
+ char_filter: ["html_strip"],
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dcc02ad69da0a5aa10c4e53b34be8ec0.asciidoc b/docs/doc_examples/dcc02ad69da0a5aa10c4e53b34be8ec0.asciidoc
new file mode 100644
index 000000000..ff1616147
--- /dev/null
+++ b/docs/doc_examples/dcc02ad69da0a5aa10c4e53b34be8ec0.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ docs: [
+ {
+ _index: "my-index-000001",
+ _id: "1",
+ },
+ {
+ _index: "my-index-000001",
+ _id: "2",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc b/docs/doc_examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc
new file mode 100644
index 000000000..6e3b6b17d
--- /dev/null
+++ b/docs/doc_examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ "@timestamp": {
+ format: "strict_date_optional_time||epoch_second",
+ type: "date",
+ },
+ message: {
+ type: "wildcard",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc b/docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc
new file mode 100644
index 000000000..384d005bd
--- /dev/null
+++ b/docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ size: 10,
+ query: {
+ script_score: {
+ query: {
+ knn: {
+ query_vector: [0.04283529, 0.85670587, -0.51402352, 0],
+ field: "my_int4_vector",
+ num_candidates: 20,
+ },
+ },
+ script: {
+ source: "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)",
+ params: {
+ queryVector: [0.04283529, 0.85670587, -0.51402352, 0],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dcfa7f479a33f459a2d222a92e651451.asciidoc b/docs/doc_examples/dcfa7f479a33f459a2d222a92e651451.asciidoc
new file mode 100644
index 000000000..1287912d5
--- /dev/null
+++ b/docs/doc_examples/dcfa7f479a33f459a2d222a92e651451.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "my_admin_role",
+ description:
+ "Grants full access to all management features within the cluster.",
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index1", "index2"],
+ privileges: ["all"],
+ field_security: {
+ grant: ["title", "body"],
+ },
+ query: '{"match": {"title": "foo"}}',
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["admin", "read"],
+ resources: ["*"],
+ },
+ ],
+ run_as: ["other_user"],
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dd0b196a099e1cca08c5ce4dd74e935a.asciidoc b/docs/doc_examples/dd0b196a099e1cca08c5ce4dd74e935a.asciidoc
new file mode 100644
index 000000000..45ed76e36
--- /dev/null
+++ b/docs/doc_examples/dd0b196a099e1cca08c5ce4dd74e935a.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "cluster_health_watch",
+ trigger: {
+ schedule: {
+ interval: "10s",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dd1a25d821d0c8deaeaa9c8083152a54.asciidoc b/docs/doc_examples/dd1a25d821d0c8deaeaa9c8083152a54.asciidoc
new file mode 100644
index 000000000..4114ec4f6
--- /dev/null
+++ b/docs/doc_examples/dd1a25d821d0c8deaeaa9c8083152a54.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.processorGrok({
+ s: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dd3b263e9fa4226e59bedfc957d399d2.asciidoc b/docs/doc_examples/dd3b263e9fa4226e59bedfc957d399d2.asciidoc
new file mode 100644
index 000000000..9b43b5804
--- /dev/null
+++ b/docs/doc_examples/dd3b263e9fa4226e59bedfc957d399d2.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query: "SELECT * FROM library WHERE release_date < '2000-01-01'",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dd3ee00ab2af607b32532180d60a41d4.asciidoc b/docs/doc_examples/dd3ee00ab2af607b32532180d60a41d4.asciidoc
new file mode 100644
index 000000000..ad777029c
--- /dev/null
+++ b/docs/doc_examples/dd3ee00ab2af607b32532180d60a41d4.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "standard",
+ filter: ["lowercase", "my_snow"],
+ },
+ },
+ filter: {
+ my_snow: {
+ type: "snowball",
+ language: "English",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dd4f051ab62f0507e3b6e3d6f333e85f.asciidoc b/docs/doc_examples/dd4f051ab62f0507e3b6e3d6f333e85f.asciidoc
new file mode 100644
index 000000000..0ff322366
--- /dev/null
+++ b/docs/doc_examples/dd4f051ab62f0507e3b6e3d6f333e85f.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getComponentTemplate();
+console.log(response);
+----
diff --git a/docs/doc_examples/dd71b0c9f9197684ff29c61062c55660.asciidoc b/docs/doc_examples/dd71b0c9f9197684ff29c61062c55660.asciidoc
new file mode 100644
index 000000000..ff630da8a
--- /dev/null
+++ b/docs/doc_examples/dd71b0c9f9197684ff29c61062c55660.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getSettings();
+console.log(response);
+----
diff --git a/docs/doc_examples/dd7814258121d3c2e576a7f00469d7e3.asciidoc b/docs/doc_examples/dd7814258121d3c2e576a7f00469d7e3.asciidoc
new file mode 100644
index 000000000..da4ac42b8
--- /dev/null
+++ b/docs/doc_examples/dd7814258121d3c2e576a7f00469d7e3.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "mistral_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "mistral_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dd792bb53703a57f9207e36d16e26255.asciidoc b/docs/doc_examples/dd792bb53703a57f9207e36d16e26255.asciidoc
new file mode 100644
index 000000000..9623daabc
--- /dev/null
+++ b/docs/doc_examples/dd792bb53703a57f9207e36d16e26255.asciidoc
@@ -0,0 +1,67 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-index-000001",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516729294000,
+ temperature: 200,
+ voltage: 5.2,
+ node: "a",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516642894000,
+ temperature: 201,
+ voltage: 5.8,
+ node: "b",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516556494000,
+ temperature: 202,
+ voltage: 5.1,
+ node: "a",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516470094000,
+ temperature: 198,
+ voltage: 5.6,
+ node: "b",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516383694000,
+ temperature: 200,
+ voltage: 4.2,
+ node: "c",
+ },
+ {
+ index: {},
+ },
+ {
+ timestamp: 1516297294000,
+ temperature: 202,
+ voltage: 4,
+ node: "c",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dda949d20d07a9edbe64cefc623df945.asciidoc b/docs/doc_examples/dda949d20d07a9edbe64cefc623df945.asciidoc
new file mode 100644
index 000000000..695caaf60
--- /dev/null
+++ b/docs/doc_examples/dda949d20d07a9edbe64cefc623df945.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my_test_scores",
+ properties: {
+ total_score: {
+ type: "long",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc b/docs/doc_examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc
new file mode 100644
index 000000000..bd9c35360
--- /dev/null
+++ b/docs/doc_examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.inference({
+ task_type: "my-inference-endpoint",
+ inference_id: "_update",
+ service_settings: {
+ api_key: "",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ddcfa47381d47078dbec651e31b69949.asciidoc b/docs/doc_examples/ddcfa47381d47078dbec651e31b69949.asciidoc
new file mode 100644
index 000000000..984c274da
--- /dev/null
+++ b/docs/doc_examples/ddcfa47381d47078dbec651e31b69949.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n library where process.name == "regsvr32.exe" and dll.name == "scrobj.dll"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc b/docs/doc_examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc
new file mode 100644
index 000000000..e8049b2cb
--- /dev/null
+++ b/docs/doc_examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ query: "FROM mv | EVAL b + 2, a + b | LIMIT 4",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dde283eab92608e7bfbfa09c6482a12e.asciidoc b/docs/doc_examples/dde283eab92608e7bfbfa09c6482a12e.asciidoc
new file mode 100644
index 000000000..eb773d5b0
--- /dev/null
+++ b/docs/doc_examples/dde283eab92608e7bfbfa09c6482a12e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ realm_name: "native1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ddf375e4b6175d830fa4097ea0b41536.asciidoc b/docs/doc_examples/ddf375e4b6175d830fa4097ea0b41536.asciidoc
new file mode 100644
index 000000000..0209a5c00
--- /dev/null
+++ b/docs/doc_examples/ddf375e4b6175d830fa4097ea0b41536.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "DELETE",
+ path: "/_internal/desired_nodes",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ddf56782ecc7eaeb3115e150c4830013.asciidoc b/docs/doc_examples/ddf56782ecc7eaeb3115e150c4830013.asciidoc
new file mode 100644
index 000000000..261dbdf37
--- /dev/null
+++ b/docs/doc_examples/ddf56782ecc7eaeb3115e150c4830013.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ slice: {
+ id: 0,
+ max: 2,
+ },
+ script: {
+ source: "ctx._source['extra'] = 'test'",
+ },
+});
+console.log(response);
+
+const response1 = await client.updateByQuery({
+ index: "my-index-000001",
+ slice: {
+ id: 1,
+ max: 2,
+ },
+ script: {
+ source: "ctx._source['extra'] = 'test'",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/de139866a220124360e5e27d1a736ea4.asciidoc b/docs/doc_examples/de139866a220124360e5e27d1a736ea4.asciidoc
new file mode 100644
index 000000000..1318fe886
--- /dev/null
+++ b/docs/doc_examples/de139866a220124360e5e27d1a736ea4.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ term: {
+ product: "chocolate",
+ },
+ },
+ sort: [
+ {
+ "offer.price": {
+ mode: "avg",
+ order: "asc",
+ nested: {
+ path: "offer",
+ filter: {
+ term: {
+ "offer.color": "blue",
+ },
+ },
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/de2f59887737de3a27716177b60393a2.asciidoc b/docs/doc_examples/de2f59887737de3a27716177b60393a2.asciidoc
new file mode 100644
index 000000000..e93b1c272
--- /dev/null
+++ b/docs/doc_examples/de2f59887737de3a27716177b60393a2.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "analyze_sample",
+ field: "obj1.field1",
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/de876505acc75d371d1f6f484c449197.asciidoc b/docs/doc_examples/de876505acc75d371d1f6f484c449197.asciidoc
new file mode 100644
index 000000000..373b13fdb
--- /dev/null
+++ b/docs/doc_examples/de876505acc75d371d1f6f484c449197.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ settings: {
+ "index.write.wait_for_active_shards": "2",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/de90249caeac6f1601a7e7e9f98f1bec.asciidoc b/docs/doc_examples/de90249caeac6f1601a7e7e9f98f1bec.asciidoc
new file mode 100644
index 000000000..6cb361f3e
--- /dev/null
+++ b/docs/doc_examples/de90249caeac6f1601a7e7e9f98f1bec.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryApiKeys({
+ with_limited_by: "true",
+ query: {
+ ids: {
+ values: ["VuaCfGcBCdbkQm-e5aOx"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dea22bb4997e368950f0fc80f2a5f304.asciidoc b/docs/doc_examples/dea22bb4997e368950f0fc80f2a5f304.asciidoc
new file mode 100644
index 000000000..789ac12d6
--- /dev/null
+++ b/docs/doc_examples/dea22bb4997e368950f0fc80f2a5f304.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "my-index-000001",
+ fields: "employee-id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc b/docs/doc_examples/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc
new file mode 100644
index 000000000..3ae915d08
--- /dev/null
+++ b/docs/doc_examples/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "place",
+ id: 1,
+ document: {
+ suggest: {
+ input: ["timmy's", "starbucks", "dunkin donuts"],
+ contexts: {
+ place_type: ["cafe", "food"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dead0682932ea6ec33c1197017bcb209.asciidoc b/docs/doc_examples/dead0682932ea6ec33c1197017bcb209.asciidoc
new file mode 100644
index 000000000..0cfd8d93c
--- /dev/null
+++ b/docs/doc_examples/dead0682932ea6ec33c1197017bcb209.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: "dr5r9ydj2y73",
+ bottom_right: "drj7teegpus6",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dec2af498a7e5892e8fcd09ae779c8f0.asciidoc b/docs/doc_examples/dec2af498a7e5892e8fcd09ae779c8f0.asciidoc
new file mode 100644
index 000000000..e5d6dd96c
--- /dev/null
+++ b/docs/doc_examples/dec2af498a7e5892e8fcd09ae779c8f0.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "ip_addresses",
+ size: 0,
+ aggs: {
+ ip_ranges: {
+ ip_range: {
+ field: "ip",
+ ranges: [
+ {
+ mask: "10.0.0.0/25",
+ },
+ {
+ mask: "10.0.0.127/25",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dee3023098d9e63aa9e113beea5686da.asciidoc b/docs/doc_examples/dee3023098d9e63aa9e113beea5686da.asciidoc
new file mode 100644
index 000000000..cf5b294bf
--- /dev/null
+++ b/docs/doc_examples/dee3023098d9e63aa9e113beea5686da.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["index1"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "knn": {\n "field": "{{knn_field}}",\n "query_vector": {{#toJson}}query_vector{{/toJson}},\n "k": "{{k}}",\n "num_candidates": {{num_candidates}}\n },\n "fields": {{#toJson}}fields{{/toJson}}\n }\n ',
+ params: {
+ knn_field: "image-vector",
+ query_vector: [],
+ k: 10,
+ num_candidates: 100,
+ fields: ["title", "file-type"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc b/docs/doc_examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc
new file mode 100644
index 000000000..3d7b78f05
--- /dev/null
+++ b/docs/doc_examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ h: "heap.max",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df0d27d3abd286b75aef7ddcf0e6c66c.asciidoc b/docs/doc_examples/df0d27d3abd286b75aef7ddcf0e6c66c.asciidoc
new file mode 100644
index 000000000..fcf3cf69f
--- /dev/null
+++ b/docs/doc_examples/df0d27d3abd286b75aef7ddcf0e6c66c.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ analysis: {
+ analyzer: {
+ my_synonyms: {
+ tokenizer: "whitespace",
+ filter: ["synonym"],
+ },
+ },
+ filter: {
+ synonym: {
+ type: "synonym_graph",
+ synonyms_path: "analysis/synonym.txt",
+ updateable: true,
+ },
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ analyzer: "standard",
+ search_analyzer: "my_synonyms",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df103a3df9b353357e72f9180ef421a1.asciidoc b/docs/doc_examples/df103a3df9b353357e72f9180ef421a1.asciidoc
new file mode 100644
index 000000000..af7aa30b7
--- /dev/null
+++ b/docs/doc_examples/df103a3df9b353357e72f9180ef421a1.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ rare_terms: {
+ field: "genre",
+ include: "swi*",
+ exclude: "electro*",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df1336e768fb6fc1826a5afa30a57285.asciidoc b/docs/doc_examples/df1336e768fb6fc1826a5afa30a57285.asciidoc
new file mode 100644
index 000000000..7d322eefb
--- /dev/null
+++ b/docs/doc_examples/df1336e768fb6fc1826a5afa30a57285.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-data-stream",
+ document: {
+ "@timestamp": "2099-03-08T11:06:07.000Z",
+ user: {
+ id: "8a4f500d",
+ },
+ message: "Login successful",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc b/docs/doc_examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc
new file mode 100644
index 000000000..0c820eea2
--- /dev/null
+++ b/docs/doc_examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc
@@ -0,0 +1,83 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ properties: {
+ comments: {
+ type: "nested",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index",
+ id: 1,
+ refresh: "true",
+ document: {
+ comments: [
+ {
+ author: "kimchy",
+ },
+ ],
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index",
+ id: 2,
+ refresh: "true",
+ document: {
+ comments: [
+ {
+ author: "kimchy",
+ },
+ {
+ author: "nik9000",
+ },
+ ],
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my-index",
+ id: 3,
+ refresh: "true",
+ document: {
+ comments: [
+ {
+ author: "nik9000",
+ },
+ ],
+ },
+});
+console.log(response3);
+
+const response4 = await client.search({
+ index: "my-index",
+ query: {
+ nested: {
+ path: "comments",
+ query: {
+ bool: {
+ must_not: [
+ {
+ term: {
+ "comments.author": "nik9000",
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response4);
+----
diff --git a/docs/doc_examples/df7dbac966b67404b8bfa9cdda5ef480.asciidoc b/docs/doc_examples/df7dbac966b67404b8bfa9cdda5ef480.asciidoc
new file mode 100644
index 000000000..d6506f70e
--- /dev/null
+++ b/docs/doc_examples/df7dbac966b67404b8bfa9cdda5ef480.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.ackWatch({
+ watch_id: "my_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df7ed126d8c92ddd3655c59ce4f305c9.asciidoc b/docs/doc_examples/df7ed126d8c92ddd3655c59ce4f305c9.asciidoc
new file mode 100644
index 000000000..924b9da1c
--- /dev/null
+++ b/docs/doc_examples/df7ed126d8c92ddd3655c59ce4f305c9.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.threadPool({
+ thread_pool_patterns: "generic",
+ v: "true",
+ h: "id,name,active,rejected,completed",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/df82a9cb21a7557f3ddba2509f76f608.asciidoc b/docs/doc_examples/df82a9cb21a7557f3ddba2509f76f608.asciidoc
new file mode 100644
index 000000000..de3179aa1
--- /dev/null
+++ b/docs/doc_examples/df82a9cb21a7557f3ddba2509f76f608.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["fingerprint"],
+ text: "zebra jumps over resting resting dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dfa16b7300d225e013f23625f44c087b.asciidoc b/docs/doc_examples/dfa16b7300d225e013f23625f44c087b.asciidoc
new file mode 100644
index 000000000..90ef0a673
--- /dev/null
+++ b/docs/doc_examples/dfa16b7300d225e013f23625f44c087b.asciidoc
@@ -0,0 +1,65 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ settings: {
+ number_of_shards: 1,
+ similarity: {
+ scripted_tfidf: {
+ type: "scripted",
+ script: {
+ source:
+ "double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ field: {
+ type: "text",
+ similarity: "scripted_tfidf",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "index",
+ id: 1,
+ document: {
+ field: "foo bar foo",
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "index",
+ id: 2,
+ document: {
+ field: "bar baz",
+ },
+});
+console.log(response2);
+
+const response3 = await client.indices.refresh({
+ index: "index",
+});
+console.log(response3);
+
+const response4 = await client.search({
+ index: "index",
+ explain: "true",
+ query: {
+ query_string: {
+ query: "foo^1.7",
+ default_field: "field",
+ },
+ },
+});
+console.log(response4);
+----
diff --git a/docs/doc_examples/dfa75000edf4b960ed9002595a051871.asciidoc b/docs/doc_examples/dfa75000edf4b960ed9002595a051871.asciidoc
new file mode 100644
index 000000000..8e62c4d26
--- /dev/null
+++ b/docs/doc_examples/dfa75000edf4b960ed9002595a051871.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.stop();
+console.log(response);
+----
diff --git a/docs/doc_examples/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc b/docs/doc_examples/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc
new file mode 100644
index 000000000..04facbcb5
--- /dev/null
+++ b/docs/doc_examples/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: ".watcher-history*",
+ sort: [
+ {
+ "result.execution_time": "desc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dfb641d2d3155669ad6fb5a424dabf4f.asciidoc b/docs/doc_examples/dfb641d2d3155669ad6fb5a424dabf4f.asciidoc
new file mode 100644
index 000000000..aca2d7530
--- /dev/null
+++ b/docs/doc_examples/dfb641d2d3155669ad6fb5a424dabf4f.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.getStatus();
+console.log(response);
+----
diff --git a/docs/doc_examples/dfbf53781adc6640493d49931a352167.asciidoc b/docs/doc_examples/dfbf53781adc6640493d49931a352167.asciidoc
new file mode 100644
index 000000000..94e9cf226
--- /dev/null
+++ b/docs/doc_examples/dfbf53781adc6640493d49931a352167.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ enabled: false,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "session_1",
+ document: {
+ user_id: "kimchy",
+ session_data: {
+ arbitrary_object: {
+ some_array: [
+ "foo",
+ "bar",
+ {
+ baz: 2,
+ },
+ ],
+ },
+ },
+ last_updated: "2015-12-06T18:20:22",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "session_1",
+});
+console.log(response2);
+
+const response3 = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response3);
+----
diff --git a/docs/doc_examples/dfcc83efefaddccfe5dce0695c2266ef.asciidoc b/docs/doc_examples/dfcc83efefaddccfe5dce0695c2266ef.asciidoc
new file mode 100644
index 000000000..1486e6f12
--- /dev/null
+++ b/docs/doc_examples/dfcc83efefaddccfe5dce0695c2266ef.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ obj1: {
+ type: "nested",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dfcdcd3ea6753dcc391a4a52cf640527.asciidoc b/docs/doc_examples/dfcdcd3ea6753dcc391a4a52cf640527.asciidoc
new file mode 100644
index 000000000..fd702383f
--- /dev/null
+++ b/docs/doc_examples/dfcdcd3ea6753dcc391a4a52cf640527.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "PUT",
+ path: "/_internal/desired_nodes/Ywkh3INLQcuPT49f6kcppA/101",
+ body: {
+ nodes: [
+ {
+ settings: {
+ "node.name": "instance-000187",
+ "node.external_id": "instance-000187",
+ "node.roles": ["data_hot", "master"],
+ "node.attr.data": "hot",
+ "node.attr.logical_availability_zone": "zone-0",
+ },
+ processors_range: {
+ min: 8,
+ max: 10,
+ },
+ memory: "58gb",
+ storage: "2tb",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc b/docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc
new file mode 100644
index 000000000..c46ec2537
--- /dev/null
+++ b/docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.updateTrainedModelDeployment({
+ model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
+ adaptive_allocations: {
+ enabled: true,
+ min_number_of_allocations: 3,
+ max_number_of_allocations: 10,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dfdf82b8d99436582f150117695190b3.asciidoc b/docs/doc_examples/dfdf82b8d99436582f150117695190b3.asciidoc
new file mode 100644
index 000000000..8d4d07d06
--- /dev/null
+++ b/docs/doc_examples/dfdf82b8d99436582f150117695190b3.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "child_example",
+ id: 1,
+ document: {
+ join: {
+ name: "question",
+ },
+ body: "I have Windows 2003 server and i bought a new Windows 2008 server...",
+ title:
+ "Whats the best way to file transfer my site from server to a newer one?",
+ tags: ["windows-server-2003", "windows-server-2008", "file-transfer"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dff61a76d5ef9ca8cbe59a416269a84b.asciidoc b/docs/doc_examples/dff61a76d5ef9ca8cbe59a416269a84b.asciidoc
new file mode 100644
index 000000000..f3a92dcab
--- /dev/null
+++ b/docs/doc_examples/dff61a76d5ef9ca8cbe59a416269a84b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.deletePipeline({
+ id: "my-pipeline-id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/dffbbdc4025e5777c647d8818847b960.asciidoc b/docs/doc_examples/dffbbdc4025e5777c647d8818847b960.asciidoc
new file mode 100644
index 000000000..d6249f4cf
--- /dev/null
+++ b/docs/doc_examples/dffbbdc4025e5777c647d8818847b960.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getApiKey({
+ id: "VuaCfGcBCdbkQm-e5aOx",
+ owner: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc b/docs/doc_examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc
new file mode 100644
index 000000000..153d1a4ff
--- /dev/null
+++ b/docs/doc_examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.postCalendarEvents({
+ calendar_id: "dst-germany",
+ events: [
+ {
+ description: "Fall 2024",
+ start_time: 1729994400000,
+ end_time: 1730167200000,
+ skip_result: false,
+ skip_model_update: false,
+ force_time_shift: -3600,
+ },
+ {
+ description: "Spring 2025",
+ start_time: 1743296400000,
+ end_time: 1743469200000,
+ skip_result: false,
+ skip_model_update: false,
+ force_time_shift: 3600,
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e04267ffc50d916800b919c6cdc9622a.asciidoc b/docs/doc_examples/e04267ffc50d916800b919c6cdc9622a.asciidoc
new file mode 100644
index 000000000..5893b52d1
--- /dev/null
+++ b/docs/doc_examples/e04267ffc50d916800b919c6cdc9622a.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.mapping.ignore_above": 256,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e0734215054e1ff5df712ce3a826cdba.asciidoc b/docs/doc_examples/e0734215054e1ff5df712ce3a826cdba.asciidoc
new file mode 100644
index 000000000..926699d94
--- /dev/null
+++ b/docs/doc_examples/e0734215054e1ff5df712ce3a826cdba.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "my-index",
+});
+console.log(response);
+
+const response1 = await client.indices.deleteDataStream({
+ name: "logs-my_app-default",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/e08fb1435dc659c24badf25b676efb68.asciidoc b/docs/doc_examples/e08fb1435dc659c24badf25b676efb68.asciidoc
new file mode 100644
index 000000000..0a05a4f32
--- /dev/null
+++ b/docs/doc_examples/e08fb1435dc659c24badf25b676efb68.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ body_text: {
+ type: "text",
+ index_prefixes: {},
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e095fc96504efecc588f97673912e3d3.asciidoc b/docs/doc_examples/e095fc96504efecc588f97673912e3d3.asciidoc
new file mode 100644
index 000000000..a4c8438a0
--- /dev/null
+++ b/docs/doc_examples/e095fc96504efecc588f97673912e3d3.asciidoc
@@ -0,0 +1,54 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putJob({
+ job_id: "test-job1",
+ pretty: "true",
+ analysis_config: {
+ bucket_span: "15m",
+ detectors: [
+ {
+ detector_description: "Sum of bytes",
+ function: "sum",
+ field_name: "bytes",
+ },
+ ],
+ },
+ data_description: {
+ time_field: "timestamp",
+ time_format: "epoch_ms",
+ },
+ analysis_limits: {
+ model_memory_limit: "11MB",
+ },
+ model_plot_config: {
+ enabled: true,
+ annotations_enabled: true,
+ },
+ results_index_name: "test-job1",
+ datafeed_config: {
+ indices: ["kibana_sample_data_logs"],
+ query: {
+ bool: {
+ must: [
+ {
+ match_all: {},
+ },
+ ],
+ },
+ },
+ runtime_mappings: {
+ hour_of_day: {
+ type: "long",
+ script: {
+ source: "emit(doc['timestamp'].value.getHour());",
+ },
+ },
+ },
+ datafeed_id: "datafeed-test-job1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e09d30195108bd6a1f6857394a6123ea.asciidoc b/docs/doc_examples/e09d30195108bd6a1f6857394a6123ea.asciidoc
new file mode 100644
index 000000000..b6d3ff1e0
--- /dev/null
+++ b/docs/doc_examples/e09d30195108bd6a1f6857394a6123ea.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["reverse"],
+ text: "quick fox jumps",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e09ee13ce253c7892dd5ef076fbfbba5.asciidoc b/docs/doc_examples/e09ee13ce253c7892dd5ef076fbfbba5.asciidoc
new file mode 100644
index 000000000..69b1d067e
--- /dev/null
+++ b/docs/doc_examples/e09ee13ce253c7892dd5ef076fbfbba5.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_analyzer: {
+ tokenizer: "standard",
+ filter: ["keyword_repeat", "stemmer", "remove_duplicates"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc b/docs/doc_examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc
new file mode 100644
index 000000000..fa26514b1
--- /dev/null
+++ b/docs/doc_examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ slice: {
+ id: 0,
+ max: 2,
+ },
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+
+const response1 = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ slice: {
+ id: 1,
+ max: 2,
+ },
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/e0b2f56c34e33ff52f8f9658be2f7ca1.asciidoc b/docs/doc_examples/e0b2f56c34e33ff52f8f9658be2f7ca1.asciidoc
new file mode 100644
index 000000000..cc38f9896
--- /dev/null
+++ b/docs/doc_examples/e0b2f56c34e33ff52f8f9658be2f7ca1.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.stats({
+ index: "index1,index2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e0bbfb368eae307e9508ab8d6e9cf23c.asciidoc b/docs/doc_examples/e0bbfb368eae307e9508ab8d6e9cf23c.asciidoc
new file mode 100644
index 000000000..552adb14c
--- /dev/null
+++ b/docs/doc_examples/e0bbfb368eae307e9508ab8d6e9cf23c.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.fielddata({
+ v: "true",
+ fields: "body",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e0d4a800de2d8f4062e69433586c38db.asciidoc b/docs/doc_examples/e0d4a800de2d8f4062e69433586c38db.asciidoc
new file mode 100644
index 000000000..ea1945982
--- /dev/null
+++ b/docs/doc_examples/e0d4a800de2d8f4062e69433586c38db.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.samlCompleteLogout({
+ realm: "saml1",
+ ids: ["_1c368075e0b3..."],
+ query_string:
+ "SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e0fcef99656799de6b88117d56f131e2.asciidoc b/docs/doc_examples/e0fcef99656799de6b88117d56f131e2.asciidoc
new file mode 100644
index 000000000..03c15eafc
--- /dev/null
+++ b/docs/doc_examples/e0fcef99656799de6b88117d56f131e2.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.explain({
+ index: "my-index-000001",
+ id: 0,
+ query: {
+ match: {
+ message: "elasticsearch",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1220f2c28db6ef0233e26e6bd3866fa.asciidoc b/docs/doc_examples/e1220f2c28db6ef0233e26e6bd3866fa.asciidoc
new file mode 100644
index 000000000..6f338681d
--- /dev/null
+++ b/docs/doc_examples/e1220f2c28db6ef0233e26e6bd3866fa.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ top_tags: {
+ terms: {
+ field: "type",
+ size: 3,
+ },
+ aggs: {
+ top_sales_hits: {
+ top_hits: {
+ sort: [
+ {
+ date: {
+ order: "desc",
+ },
+ },
+ ],
+ _source: {
+ includes: ["date", "price"],
+ },
+ size: 1,
+ },
+ },
+ "having.top_salary": {
+ bucket_selector: {
+ buckets_path: {
+ tp: "top_sales_hits[_source.price]",
+ },
+ script: "params.tp < 180",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e12f2d2ddca387630e7855a6db952da2.asciidoc b/docs/doc_examples/e12f2d2ddca387630e7855a6db952da2.asciidoc
new file mode 100644
index 000000000..5672d4c40
--- /dev/null
+++ b/docs/doc_examples/e12f2d2ddca387630e7855a6db952da2.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ runtime_mappings: {
+ "price.euros": {
+ type: "double",
+ script: {
+ source:
+ "\n emit(doc['price'].value * params.conversion_rate)\n ",
+ params: {
+ conversion_rate: 0.835526591,
+ },
+ },
+ },
+ },
+ aggs: {
+ price_ranges: {
+ range: {
+ field: "price.euros",
+ ranges: [
+ {
+ to: 100,
+ },
+ {
+ from: 100,
+ to: 200,
+ },
+ {
+ from: 200,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1337c6b76defd5a46d05220f9d9c9fc.asciidoc b/docs/doc_examples/e1337c6b76defd5a46d05220f9d9c9fc.asciidoc
new file mode 100644
index 000000000..44211f46b
--- /dev/null
+++ b/docs/doc_examples/e1337c6b76defd5a46d05220f9d9c9fc.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.getToken({
+ grant_type: "password",
+ username: "test_admin",
+ password: "x-pack-test-password",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e14a5a5a1c880031486bfff43031fa3a.asciidoc b/docs/doc_examples/e14a5a5a1c880031486bfff43031fa3a.asciidoc
new file mode 100644
index 000000000..627606897
--- /dev/null
+++ b/docs/doc_examples/e14a5a5a1c880031486bfff43031fa3a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "breaker",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e16a353e619b935c5c70769b1b9fa100.asciidoc b/docs/doc_examples/e16a353e619b935c5c70769b1b9fa100.asciidoc
new file mode 100644
index 000000000..2e4b4802e
--- /dev/null
+++ b/docs/doc_examples/e16a353e619b935c5c70769b1b9fa100.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ aggs: {
+ my_buckets: {
+ composite: {
+ sources: [
+ {
+ tile: {
+ geotile_grid: {
+ field: "location",
+ precision: 8,
+ },
+ },
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1874cc7cd22b6860ca8b11bde3c70c1.asciidoc b/docs/doc_examples/e1874cc7cd22b6860ca8b11bde3c70c1.asciidoc
new file mode 100644
index 000000000..ae53bc087
--- /dev/null
+++ b/docs/doc_examples/e1874cc7cd22b6860ca8b11bde3c70c1.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index2",
+ query: {
+ query_string: {
+ query: "running with scissors",
+ fields: ["comment", "comment.english"],
+ },
+ },
+ highlight: {
+ order: "score",
+ fields: {
+ comment: {
+ type: "fvh",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e194e9cbe3eb2305f4f7cdda0cf529bd.asciidoc b/docs/doc_examples/e194e9cbe3eb2305f4f7cdda0cf529bd.asciidoc
new file mode 100644
index 000000000..75b53db1d
--- /dev/null
+++ b/docs/doc_examples/e194e9cbe3eb2305f4f7cdda0cf529bd.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ typed_keys: "true",
+ suggest: {
+ text: "some test mssage",
+ "my-first-suggester": {
+ term: {
+ field: "message",
+ },
+ },
+ "my-second-suggester": {
+ phrase: {
+ field: "message",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e19f5e3724d9f3f36a817b9a811ca42e.asciidoc b/docs/doc_examples/e19f5e3724d9f3f36a817b9a811ca42e.asciidoc
new file mode 100644
index 000000000..26bc23dc8
--- /dev/null
+++ b/docs/doc_examples/e19f5e3724d9f3f36a817b9a811ca42e.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ my_date_histo: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "day",
+ },
+ aggs: {
+ the_sum: {
+ sum: {
+ field: "lemmings",
+ },
+ },
+ the_deriv: {
+ derivative: {
+ buckets_path: "the_sum",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1c08f5774e81da31cd75aa1bdc2c548.asciidoc b/docs/doc_examples/e1c08f5774e81da31cd75aa1bdc2c548.asciidoc
new file mode 100644
index 000000000..75701ade6
--- /dev/null
+++ b/docs/doc_examples/e1c08f5774e81da31cd75aa1bdc2c548.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ bool: {
+ should: [
+ {
+ percolate: {
+ field: "query",
+ document: {
+ message: "bonsai tree",
+ },
+ name: "query1",
+ },
+ },
+ {
+ percolate: {
+ field: "query",
+ document: {
+ message: "tulip flower",
+ },
+ name: "query2",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc b/docs/doc_examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc
new file mode 100644
index 000000000..2d21ab128
--- /dev/null
+++ b/docs/doc_examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1f20ee96ce80edcc35b647cef731e15.asciidoc b/docs/doc_examples/e1f20ee96ce80edcc35b647cef731e15.asciidoc
new file mode 100644
index 000000000..89f63d5b9
--- /dev/null
+++ b/docs/doc_examples/e1f20ee96ce80edcc35b647cef731e15.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "user_lookup",
+ document: {
+ email: "mardy.brown@asciidocsmith.com",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e1f6ea7c0937cf7e6ea7e8209e52e8bb.asciidoc b/docs/doc_examples/e1f6ea7c0937cf7e6ea7e8209e52e8bb.asciidoc
new file mode 100644
index 000000000..29722ee03
--- /dev/null
+++ b/docs/doc_examples/e1f6ea7c0937cf7e6ea7e8209e52e8bb.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "events",
+ size: 10,
+ sort: [
+ {
+ timestamp: "desc",
+ },
+ ],
+ track_total_hits: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e20037f66bf54bcac7d10f536f031f34.asciidoc b/docs/doc_examples/e20037f66bf54bcac7d10f536f031f34.asciidoc
new file mode 100644
index 000000000..3b4f9251b
--- /dev/null
+++ b/docs/doc_examples/e20037f66bf54bcac7d10f536f031f34.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ "index.blocks.read_only_allow_delete": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc b/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc
new file mode 100644
index 000000000..26c4b9b0a
--- /dev/null
+++ b/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_query_rules/my-ruleset/_test",
+ body: {
+ match_criteria: {
+ query_string: "puggles",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e26c96978096ccc592849cca9db67ffc.asciidoc b/docs/doc_examples/e26c96978096ccc592849cca9db67ffc.asciidoc
new file mode 100644
index 000000000..f01887bd3
--- /dev/null
+++ b/docs/doc_examples/e26c96978096ccc592849cca9db67ffc.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ "index.requests.cache.enable": true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc b/docs/doc_examples/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc
new file mode 100644
index 000000000..ab6b687b0
--- /dev/null
+++ b/docs/doc_examples/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc
@@ -0,0 +1,90 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "sample_data",
+ mappings: {
+ properties: {
+ client_ip: {
+ type: "ip",
+ },
+ message: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "sample_data",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T12:15:03.360Z",
+ client_ip: "172.21.2.162",
+ message: "Connected to 10.1.0.3",
+ event_duration: 3450233,
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T12:27:28.948Z",
+ client_ip: "172.21.2.113",
+ message: "Connected to 10.1.0.2",
+ event_duration: 2764889,
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T13:33:34.937Z",
+ client_ip: "172.21.0.5",
+ message: "Disconnected",
+ event_duration: 1232382,
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T13:51:54.732Z",
+ client_ip: "172.21.3.15",
+ message: "Connection error",
+ event_duration: 725448,
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T13:52:55.015Z",
+ client_ip: "172.21.3.15",
+ message: "Connection error",
+ event_duration: 8268153,
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T13:53:55.832Z",
+ client_ip: "172.21.3.15",
+ message: "Connection error",
+ event_duration: 5033755,
+ },
+ {
+ index: {},
+ },
+ {
+ "@timestamp": "2023-10-23T13:55:01.543Z",
+ client_ip: "172.21.3.15",
+ message: "Connected to 10.1.0.1",
+ event_duration: 1756467,
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc b/docs/doc_examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc
new file mode 100644
index 000000000..c5ce59e19
--- /dev/null
+++ b/docs/doc_examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "Will Smith",
+ type: "best_fields",
+ fields: ["first_name", "last_name"],
+ operator: "and",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e273060a675c959fd5f3cde27c8aff07.asciidoc b/docs/doc_examples/e273060a675c959fd5f3cde27c8aff07.asciidoc
new file mode 100644
index 000000000..fb7327c66
--- /dev/null
+++ b/docs/doc_examples/e273060a675c959fd5f3cde27c8aff07.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "index",
+ mappings: {
+ properties: {
+ foo: {
+ type: "integer",
+ index: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2750d69bcb6d4c7e16e704cd0fb3530.asciidoc b/docs/doc_examples/e2750d69bcb6d4c7e16e704cd0fb3530.asciidoc
new file mode 100644
index 000000000..22ace2fd1
--- /dev/null
+++ b/docs/doc_examples/e2750d69bcb6d4c7e16e704cd0fb3530.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ mappings: {
+ properties: {
+ pagerank: {
+ type: "rank_feature",
+ },
+ url_length: {
+ type: "rank_feature",
+ positive_score_impact: false,
+ },
+ topics: {
+ type: "rank_features",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2883c88b5ceca9fce1e70e716d80025.asciidoc b/docs/doc_examples/e2883c88b5ceca9fce1e70e716d80025.asciidoc
new file mode 100644
index 000000000..d08785c3f
--- /dev/null
+++ b/docs/doc_examples/e2883c88b5ceca9fce1e70e716d80025.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_version: {
+ type: "version",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc b/docs/doc_examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc
new file mode 100644
index 000000000..7ed084f76
--- /dev/null
+++ b/docs/doc_examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ intervals: {
+ my_text: {
+ match: {
+ query: "salty",
+ filter: {
+ contained_by: {
+ match: {
+ query: "hot porridge",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2a753029b450942a3228e3003a55a7d.asciidoc b/docs/doc_examples/e2a753029b450942a3228e3003a55a7d.asciidoc
new file mode 100644
index 000000000..e8feda761
--- /dev/null
+++ b/docs/doc_examples/e2a753029b450942a3228e3003a55a7d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putDataLifecycle({
+ name: "my-weather-sensor-data-stream",
+ downsampling: [
+ {
+ after: "1d",
+ fixed_interval: "10m",
+ },
+ {
+ after: "7d",
+ fixed_interval: "1d",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2a7d127b82ddebb690a959dcd0cbc09.asciidoc b/docs/doc_examples/e2a7d127b82ddebb690a959dcd0cbc09.asciidoc
new file mode 100644
index 000000000..498327da9
--- /dev/null
+++ b/docs/doc_examples/e2a7d127b82ddebb690a959dcd0cbc09.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "elision_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ whitespace_elision: {
+ tokenizer: "whitespace",
+ filter: ["elision"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc b/docs/doc_examples/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc
new file mode 100644
index 000000000..fb0c3c9ac
--- /dev/null
+++ b/docs/doc_examples/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ range: {
+ "user.effective.date": {
+ gte: "{{date.min}}",
+ lte: "{{date.max}}",
+ format:
+ "{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}",
+ },
+ },
+ },
+ },
+ params: {
+ date: {
+ min: "2098",
+ max: "06/05/2099",
+ formats: ["dd/MM/yyyy", "yyyy"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc b/docs/doc_examples/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc
new file mode 100644
index 000000000..4f8760f0e
--- /dev/null
+++ b/docs/doc_examples/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.synonyms.getSynonymsSets();
+console.log(response);
+----
diff --git a/docs/doc_examples/e2d8cf24a12053eb09fec7087cdab43a.asciidoc b/docs/doc_examples/e2d8cf24a12053eb09fec7087cdab43a.asciidoc
new file mode 100644
index 000000000..3da189a80
--- /dev/null
+++ b/docs/doc_examples/e2d8cf24a12053eb09fec7087cdab43a.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ percent_of_total_sales: {
+ normalize: {
+ buckets_path: "sales",
+ method: "percent_of_sum",
+ format: "00.00%",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e2ec9e867f7141b304b53ebc59098f2a.asciidoc b/docs/doc_examples/e2ec9e867f7141b304b53ebc59098f2a.asciidoc
new file mode 100644
index 000000000..12f8bfcc0
--- /dev/null
+++ b/docs/doc_examples/e2ec9e867f7141b304b53ebc59098f2a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.updateApiKey({
+ id: "VuaCfGcBCdbkQm-e5aOx",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc b/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc
new file mode 100644
index 000000000..5a02c157a
--- /dev/null
+++ b/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.oidcPrepareAuthentication({
+ body: {
+ realm: "oidc1",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc b/docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc
new file mode 100644
index 000000000..28a832c3a
--- /dev/null
+++ b/docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "ip_location",
+ description: "Add ip geolocation info",
+ processors: [
+ {
+ ip_location: {
+ field: "ip",
+ target_field: "geo",
+ database_file: "GeoLite2-Country.mmdb",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "ip_location",
+ document: {
+ ip: "89.160.20.128",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/e30ea6e3823a139d7693d8cce1920a06.asciidoc b/docs/doc_examples/e30ea6e3823a139d7693d8cce1920a06.asciidoc
new file mode 100644
index 000000000..28c54a237
--- /dev/null
+++ b/docs/doc_examples/e30ea6e3823a139d7693d8cce1920a06.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ multi_match: {
+ query: "this is a test",
+ fields: ["subject^3", "message"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e316271f668c9889bf548311fb421f1e.asciidoc b/docs/doc_examples/e316271f668c9889bf548311fb421f1e.asciidoc
new file mode 100644
index 000000000..331097c1f
--- /dev/null
+++ b/docs/doc_examples/e316271f668c9889bf548311fb421f1e.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ ip_addresses: {
+ terms: {
+ field: "destination_ip",
+ missing: "0.0.0.0",
+ value_type: "ip",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e317a8380dfbc76c4e7f23d0997b3518.asciidoc b/docs/doc_examples/e317a8380dfbc76c4e7f23d0997b3518.asciidoc
new file mode 100644
index 000000000..13b20ac31
--- /dev/null
+++ b/docs/doc_examples/e317a8380dfbc76c4e7f23d0997b3518.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "action.destructive_requires_name": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e324ea1547635180c31c1adf77870ba2.asciidoc b/docs/doc_examples/e324ea1547635180c31c1adf77870ba2.asciidoc
new file mode 100644
index 000000000..6db19aaad
--- /dev/null
+++ b/docs/doc_examples/e324ea1547635180c31c1adf77870ba2.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "destination_template",
+ template: {
+ settings: {
+ index: {
+ number_of_replicas: 2,
+ number_of_shards: 2,
+ mode: "time_series",
+ routing_path: ["metricset"],
+ },
+ },
+ mappings: {
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ metricset: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ k8s: {
+ properties: {
+ tx: {
+ type: "long",
+ },
+ rx: {
+ type: "long",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e35abc9403e4aef7d538ab29ccc363b3.asciidoc b/docs/doc_examples/e35abc9403e4aef7d538ab29ccc363b3.asciidoc
new file mode 100644
index 000000000..812f46fca
--- /dev/null
+++ b/docs/doc_examples/e35abc9403e4aef7d538ab29ccc363b3.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_internal/prevalidate_node_removal",
+ querystring: {
+ names: "node1,node2",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e3678142aec988e2ff0ae5d934dc39e9.asciidoc b/docs/doc_examples/e3678142aec988e2ff0ae5d934dc39e9.asciidoc
new file mode 100644
index 000000000..ccdf39576
--- /dev/null
+++ b/docs/doc_examples/e3678142aec988e2ff0ae5d934dc39e9.asciidoc
@@ -0,0 +1,102 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_point",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Geopoint as an object using GeoJSON format",
+ location: {
+ type: "Point",
+ coordinates: [-71.34, 41.12],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ text: "Geopoint as a WKT POINT primitive",
+ location: "POINT (-71.34 41.12)",
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "my-index-000001",
+ id: 3,
+ document: {
+ text: "Geopoint as an object with 'lat' and 'lon' keys",
+ location: {
+ lat: 41.12,
+ lon: -71.34,
+ },
+ },
+});
+console.log(response3);
+
+const response4 = await client.index({
+ index: "my-index-000001",
+ id: 4,
+ document: {
+ text: "Geopoint as an array",
+ location: [-71.34, 41.12],
+ },
+});
+console.log(response4);
+
+const response5 = await client.index({
+ index: "my-index-000001",
+ id: 5,
+ document: {
+ text: "Geopoint as a string",
+ location: "41.12,-71.34",
+ },
+});
+console.log(response5);
+
+const response6 = await client.index({
+ index: "my-index-000001",
+ id: 6,
+ document: {
+ text: "Geopoint as a geohash",
+ location: "drm3btev3e86",
+ },
+});
+console.log(response6);
+
+const response7 = await client.search({
+ index: "my-index-000001",
+ query: {
+ geo_bounding_box: {
+ location: {
+ top_left: {
+ lat: 42,
+ lon: -72,
+ },
+ bottom_right: {
+ lat: 40,
+ lon: -74,
+ },
+ },
+ },
+ },
+});
+console.log(response7);
+----
diff --git a/docs/doc_examples/e3a6462ca79c101314da0680c97678cd.asciidoc b/docs/doc_examples/e3a6462ca79c101314da0680c97678cd.asciidoc
new file mode 100644
index 000000000..5634f8005
--- /dev/null
+++ b/docs/doc_examples/e3a6462ca79c101314da0680c97678cd.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_all: {},
+ },
+ script_fields: {
+ test1: {
+ script: {
+ lang: "painless",
+ source: "doc['price'].value * 2",
+ },
+ },
+ test2: {
+ script: {
+ lang: "painless",
+ source: "doc['price'].value * params.factor",
+ params: {
+ factor: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc b/docs/doc_examples/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc
new file mode 100644
index 000000000..4e8f1c68e
--- /dev/null
+++ b/docs/doc_examples/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.store.preload": ["nvd", "dvd"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e3f2f6ee3e312b8a90634827ae954d70.asciidoc b/docs/doc_examples/e3f2f6ee3e312b8a90634827ae954d70.asciidoc
new file mode 100644
index 000000000..955bb8caf
--- /dev/null
+++ b/docs/doc_examples/e3f2f6ee3e312b8a90634827ae954d70.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "GeometryCollection",
+ geometries: [
+ {
+ type: "Point",
+ coordinates: [100, 0],
+ },
+ {
+ type: "LineString",
+ coordinates: [
+ [101, 0],
+ [102, 1],
+ ],
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e3fe842951dc873d7d00c8f6a010c53f.asciidoc b/docs/doc_examples/e3fe842951dc873d7d00c8f6a010c53f.asciidoc
new file mode 100644
index 000000000..33c2f68ce
--- /dev/null
+++ b/docs/doc_examples/e3fe842951dc873d7d00c8f6a010c53f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ human: "true",
+ detailed: "true",
+ actions: "indices:data/write/search",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4193867485595c9c92f909a052d2a90.asciidoc b/docs/doc_examples/e4193867485595c9c92f909a052d2a90.asciidoc
new file mode 100644
index 000000000..ab10339a7
--- /dev/null
+++ b/docs/doc_examples/e4193867485595c9c92f909a052d2a90.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ "my-join-field": {
+ type: "join",
+ relations: {
+ parent: "child",
+ },
+ },
+ tag: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e41a9bac42d0c1cb103674ae9039b7af.asciidoc b/docs/doc_examples/e41a9bac42d0c1cb103674ae9039b7af.asciidoc
new file mode 100644
index 000000000..533bee458
--- /dev/null
+++ b/docs/doc_examples/e41a9bac42d0c1cb103674ae9039b7af.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ numeric_detection: true,
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ my_float: "1.0",
+ my_integer: "1",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/e441cb3be3c2f007621ee1f8c9a2e0ef.asciidoc b/docs/doc_examples/e441cb3be3c2f007621ee1f8c9a2e0ef.asciidoc
new file mode 100644
index 000000000..d8168a881
--- /dev/null
+++ b/docs/doc_examples/e441cb3be3c2f007621ee1f8c9a2e0ef.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ statistics: {
+ matrix_stats: {
+ fields: ["poverty", "income"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e451900efbd8be50c2b8347a83816aa6.asciidoc b/docs/doc_examples/e451900efbd8be50c2b8347a83816aa6.asciidoc
new file mode 100644
index 000000000..d4aa9c554
--- /dev/null
+++ b/docs/doc_examples/e451900efbd8be50c2b8347a83816aa6.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ stats_monthly_sales: {
+ extended_stats_bucket: {
+ buckets_path: "sales_per_month>sales",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e46c83db1580e14be844079cd008f518.asciidoc b/docs/doc_examples/e46c83db1580e14be844079cd008f518.asciidoc
new file mode 100644
index 000000000..9e529c789
--- /dev/null
+++ b/docs/doc_examples/e46c83db1580e14be844079cd008f518.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ "routing.allocation.enable": "all",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e47a71a2e314dbbee5db8142a23957ce.asciidoc b/docs/doc_examples/e47a71a2e314dbbee5db8142a23957ce.asciidoc
new file mode 100644
index 000000000..a75f8d567
--- /dev/null
+++ b/docs/doc_examples/e47a71a2e314dbbee5db8142a23957ce.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ description: "Index the ingest timestamp as 'event.ingested'",
+ field: "event.ingested",
+ value: "{{{_ingest.timestamp}}}",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e48e7da65c2b32d724fd7e3bfa175c6f.asciidoc b/docs/doc_examples/e48e7da65c2b32d724fd7e3bfa175c6f.asciidoc
new file mode 100644
index 000000000..41a817618
--- /dev/null
+++ b/docs/doc_examples/e48e7da65c2b32d724fd7e3bfa175c6f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getOverallBuckets({
+ job_id: "job-*",
+ overall_score: 80,
+ start: 1403532000000,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e494162e83ce041c56b2e2bc29d33474.asciidoc b/docs/doc_examples/e494162e83ce041c56b2e2bc29d33474.asciidoc
new file mode 100644
index 000000000..c6ab0c547
--- /dev/null
+++ b/docs/doc_examples/e494162e83ce041c56b2e2bc29d33474.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n sequence by process.pid with maxspan=1h\n [ process where process.name == "regsvr32.exe" ]\n [ file where stringContains(file.name, "scrobj.dll") ]\n until [ process where event.type == "termination" ]\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4b2b5e0aaedf3cbbcde3d61eb1f13fc.asciidoc b/docs/doc_examples/e4b2b5e0aaedf3cbbcde3d61eb1f13fc.asciidoc
new file mode 100644
index 000000000..7b6bdf9f7
--- /dev/null
+++ b/docs/doc_examples/e4b2b5e0aaedf3cbbcde3d61eb1f13fc.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "test",
+ id: 4,
+ refresh: "wait_for",
+ document: {
+ test: "test",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc b/docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc
new file mode 100644
index 000000000..92b9b7363
--- /dev/null
+++ b/docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.simulate.ingest({
+ body: {
+ docs: [
+ {
+ _index: "my-index",
+ _id: "123",
+ _source: {
+ foo: "foo",
+ },
+ },
+ {
+ _index: "my-index",
+ _id: "456",
+ _source: {
+ bar: "rab",
+ },
+ },
+ ],
+ component_template_substitutions: {
+ "my-mappings_template": {
+ template: {
+ mappings: {
+ dynamic: "strict",
+ properties: {
+ foo: {
+ type: "keyword",
+ },
+ bar: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc b/docs/doc_examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc
new file mode 100644
index 000000000..75685cab4
--- /dev/null
+++ b/docs/doc_examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc
@@ -0,0 +1,51 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.putTransform({
+ transform_id: "data_log",
+ source: {
+ index: "kibana_sample_data_logs",
+ },
+ dest: {
+ index: "data-logs-by-client",
+ },
+ pivot: {
+ group_by: {
+ "machine.os": {
+ terms: {
+ field: "machine.os.keyword",
+ },
+ },
+ "machine.ip": {
+ terms: {
+ field: "clientip",
+ },
+ },
+ },
+ aggregations: {
+ "time_frame.lte": {
+ max: {
+ field: "timestamp",
+ },
+ },
+ "time_frame.gte": {
+ min: {
+ field: "timestamp",
+ },
+ },
+ time_length: {
+ bucket_script: {
+ buckets_path: {
+ min: "time_frame.gte.value",
+ max: "time_frame.lte.value",
+ },
+ script: "params.max - params.min",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc b/docs/doc_examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc
new file mode 100644
index 000000000..bdbb31513
--- /dev/null
+++ b/docs/doc_examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.promoteDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc b/docs/doc_examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc
new file mode 100644
index 000000000..3fdbb2aa8
--- /dev/null
+++ b/docs/doc_examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "publications",
+ properties: {
+ title: {
+ type: "text",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc b/docs/doc_examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc
new file mode 100644
index 000000000..246793183
--- /dev/null
+++ b/docs/doc_examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.tasks.list({
+ human: "true",
+ detailed: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4de6035653e8202c43631f02d244661.asciidoc b/docs/doc_examples/e4de6035653e8202c43631f02d244661.asciidoc
new file mode 100644
index 000000000..23f0dd981
--- /dev/null
+++ b/docs/doc_examples/e4de6035653e8202c43631f02d244661.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "cluster_one:my-index-000001",
+ size: 1,
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ _source: ["user.id", "message", "http.response.status_code"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc b/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc
new file mode 100644
index 000000000..7207d8204
--- /dev/null
+++ b/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.queryUser({
+ query: {
+ prefix: {
+ roles: "other",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e51a86b666f447cda5f634547a8e1a4a.asciidoc b/docs/doc_examples/e51a86b666f447cda5f634547a8e1a4a.asciidoc
new file mode 100644
index 000000000..d09d2747f
--- /dev/null
+++ b/docs/doc_examples/e51a86b666f447cda5f634547a8e1a4a.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.createDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e551ea38a2d8f8deac110b33304200cc.asciidoc b/docs/doc_examples/e551ea38a2d8f8deac110b33304200cc.asciidoc
new file mode 100644
index 000000000..362c609dc
--- /dev/null
+++ b/docs/doc_examples/e551ea38a2d8f8deac110b33304200cc.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ multi_match: {
+ fields: ["title", "content"],
+ query: "the quick brown fox",
+ },
+ },
+ rescore: {
+ learning_to_rank: {
+ model_id: "ltr-model",
+ params: {
+ query_text: "the quick brown fox",
+ },
+ },
+ window_size: 100,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e586d1d2a997133e039fd352a42a72b3.asciidoc b/docs/doc_examples/e586d1d2a997133e039fd352a42a72b3.asciidoc
new file mode 100644
index 000000000..9f0f29ea4
--- /dev/null
+++ b/docs/doc_examples/e586d1d2a997133e039fd352a42a72b3.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "job-candidates",
+ query: {
+ terms_set: {
+ programming_languages: {
+ terms: ["c++", "java", "php"],
+ minimum_should_match_field: "required_matches",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e58833449d01379df20ad06dc28144d8.asciidoc b/docs/doc_examples/e58833449d01379df20ad06dc28144d8.asciidoc
new file mode 100644
index 000000000..93af1e480
--- /dev/null
+++ b/docs/doc_examples/e58833449d01379df20ad06dc28144d8.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.updateByQuery({
+ index: "my-index-000001",
+ conflicts: "proceed",
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e58b7965c3a314c34bc444c6db3b1b79.asciidoc b/docs/doc_examples/e58b7965c3a314c34bc444c6db3b1b79.asciidoc
new file mode 100644
index 000000000..ded25932b
--- /dev/null
+++ b/docs/doc_examples/e58b7965c3a314c34bc444c6db3b1b79.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ name: "index.routing.allocation.enable",
+ flat_settings: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e5901f48eb8a419b878fc2cb815d8691.asciidoc b/docs/doc_examples/e5901f48eb8a419b878fc2cb815d8691.asciidoc
new file mode 100644
index 000000000..15f694447
--- /dev/null
+++ b/docs/doc_examples/e5901f48eb8a419b878fc2cb815d8691.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "indices.recovery.max_bytes_per_sec": "50mb",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e5c710b08a545522d50b4ce35503bc46.asciidoc b/docs/doc_examples/e5c710b08a545522d50b4ce35503bc46.asciidoc
new file mode 100644
index 000000000..fa2981ef5
--- /dev/null
+++ b/docs/doc_examples/e5c710b08a545522d50b4ce35503bc46.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-data-stream",
+ pipeline: "my-pipeline",
+ document: {
+ "@timestamp": "2099-03-07T11:04:05.000Z",
+ "my-keyword-field": "foo",
+ },
+});
+console.log(response);
+
+const response1 = await client.bulk({
+ index: "my-data-stream",
+ pipeline: "my-pipeline",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-03-07T11:04:06.000Z",
+ "my-keyword-field": "foo",
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-03-07T11:04:07.000Z",
+ "my-keyword-field": "bar",
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/e5f50b31f165462d883ecbff45f74985.asciidoc b/docs/doc_examples/e5f50b31f165462d883ecbff45f74985.asciidoc
new file mode 100644
index 000000000..cf38e87ae
--- /dev/null
+++ b/docs/doc_examples/e5f50b31f165462d883ecbff45f74985.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putTemplate({
+ name: "template_1",
+ index_patterns: ["te*", "bar*"],
+ settings: {
+ number_of_shards: 1,
+ },
+ mappings: {
+ _source: {
+ enabled: false,
+ },
+ properties: {
+ host_name: {
+ type: "keyword",
+ },
+ created_at: {
+ type: "date",
+ format: "EEE MMM dd HH:mm:ss Z yyyy",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc b/docs/doc_examples/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc
new file mode 100644
index 000000000..74dcb596e
--- /dev/null
+++ b/docs/doc_examples/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-index-000001",
+ id: 0,
+ _source_includes: "*.id",
+ _source_excludes: "entities",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc b/docs/doc_examples/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc
new file mode 100644
index 000000000..48076f9c2
--- /dev/null
+++ b/docs/doc_examples/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.enable": "all",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e608cd0c034f6c245ea87f425e09ce2f.asciidoc b/docs/doc_examples/e608cd0c034f6c245ea87f425e09ce2f.asciidoc
new file mode 100644
index 000000000..08f05042e
--- /dev/null
+++ b/docs/doc_examples/e608cd0c034f6c245ea87f425e09ce2f.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e60b7f75ca806f2c74927c3d9409a986.asciidoc b/docs/doc_examples/e60b7f75ca806f2c74927c3d9409a986.asciidoc
new file mode 100644
index 000000000..e6c658b67
--- /dev/null
+++ b/docs/doc_examples/e60b7f75ca806f2c74927c3d9409a986.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "mapping3",
+ roles: ["ldap-user"],
+ enabled: true,
+ rules: {
+ field: {
+ "realm.name": "ldap1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e60c2bf89fdf38187709d04dd1c55330.asciidoc b/docs/doc_examples/e60c2bf89fdf38187709d04dd1c55330.asciidoc
new file mode 100644
index 000000000..2ff61b02f
--- /dev/null
+++ b/docs/doc_examples/e60c2bf89fdf38187709d04dd1c55330.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ more_like_this: {
+ fields: ["title", "description"],
+ like: "Once upon a time",
+ min_term_freq: 1,
+ max_query_terms: 12,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc b/docs/doc_examples/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc
new file mode 100644
index 000000000..eb8c44fbb
--- /dev/null
+++ b/docs/doc_examples/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ products: {
+ terms: {
+ field: "product",
+ size: 5,
+ show_term_doc_count_error: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e61b5abe85000cc954a42e2cd74f3a26.asciidoc b/docs/doc_examples/e61b5abe85000cc954a42e2cd74f3a26.asciidoc
new file mode 100644
index 000000000..272176613
--- /dev/null
+++ b/docs/doc_examples/e61b5abe85000cc954a42e2cd74f3a26.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putCalendar({
+ calendar_id: "planned-outages",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e6369e7cef82d881af593d5526bf79bd.asciidoc b/docs/doc_examples/e6369e7cef82d881af593d5526bf79bd.asciidoc
new file mode 100644
index 000000000..38d057377
--- /dev/null
+++ b/docs/doc_examples/e6369e7cef82d881af593d5526bf79bd.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_term: {
+ "user.id": {
+ value: "kimchy",
+ boost: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc b/docs/doc_examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc
new file mode 100644
index 000000000..27156eddb
--- /dev/null
+++ b/docs/doc_examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.health({
+ index: "my-index-000001",
+ level: "shards",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e63cf08350e9381f519c2835843be7cd.asciidoc b/docs/doc_examples/e63cf08350e9381f519c2835843be7cd.asciidoc
new file mode 100644
index 000000000..492ee50b1
--- /dev/null
+++ b/docs/doc_examples/e63cf08350e9381f519c2835843be7cd.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_date_formats: ["yyyy/MM||MM/dd/yyyy"],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ create_date: "09/25/2015",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/e642be44a62a89cf4afb2db28220c9a9.asciidoc b/docs/doc_examples/e642be44a62a89cf4afb2db28220c9a9.asciidoc
new file mode 100644
index 000000000..3bdd9984b
--- /dev/null
+++ b/docs/doc_examples/e642be44a62a89cf4afb2db28220c9a9.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "ingest.geoip.downloader.enabled": true,
+ "indices.lifecycle.history_index_enabled": true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e650d73c57ab313e686fec01e3b0c90f.asciidoc b/docs/doc_examples/e650d73c57ab313e686fec01e3b0c90f.asciidoc
new file mode 100644
index 000000000..33c7ef397
--- /dev/null
+++ b/docs/doc_examples/e650d73c57ab313e686fec01e3b0c90f.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my-index-000001",
+ },
+ dest: {
+ index: "my-new-index-000001",
+ version_type: "external",
+ },
+ script: {
+ source:
+ "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}",
+ lang: "painless",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e697ef947f3fb7835f7fadb9125b1043.asciidoc b/docs/doc_examples/e697ef947f3fb7835f7fadb9125b1043.asciidoc
new file mode 100644
index 000000000..aee888618
--- /dev/null
+++ b/docs/doc_examples/e697ef947f3fb7835f7fadb9125b1043.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ filter: {
+ range: {
+ page_count: {
+ gte: 100,
+ lte: 200,
+ },
+ },
+ },
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e6b972611c0ec8ab4c240f33f323d85b.asciidoc b/docs/doc_examples/e6b972611c0ec8ab4c240f33f323d85b.asciidoc
new file mode 100644
index 000000000..0e09b23e2
--- /dev/null
+++ b/docs/doc_examples/e6b972611c0ec8ab4c240f33f323d85b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ by_day: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "day",
+ time_zone: "-01:00",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc b/docs/doc_examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc
new file mode 100644
index 000000000..0a8f5ebdc
--- /dev/null
+++ b/docs/doc_examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getAlias();
+console.log(response);
+----
diff --git a/docs/doc_examples/e6dcc2911d2416a65eaec9846b956e15.asciidoc b/docs/doc_examples/e6dcc2911d2416a65eaec9846b956e15.asciidoc
new file mode 100644
index 000000000..673ac434a
--- /dev/null
+++ b/docs/doc_examples/e6dcc2911d2416a65eaec9846b956e15.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.refresh({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e6e47da87079a8b67f767a2a01878cf2.asciidoc b/docs/doc_examples/e6e47da87079a8b67f767a2a01878cf2.asciidoc
new file mode 100644
index 000000000..4868fe215
--- /dev/null
+++ b/docs/doc_examples/e6e47da87079a8b67f767a2a01878cf2.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ set: {
+ description: "Use geo_point dynamic template for address field",
+ field: "_dynamic_templates",
+ value: {
+ address: "geo_point",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc b/docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc
new file mode 100644
index 000000000..a0bffb528
--- /dev/null
+++ b/docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "retrievers_example",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ query_string: {
+ query: "(information retrieval) OR (artificial intelligence)",
+ default_field: "text",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [0.23, 0.67, 0.89],
+ k: 3,
+ num_candidates: 5,
+ },
+ },
+ ],
+ rank_window_size: 10,
+ rank_constant: 1,
+ },
+ },
+ collapse: {
+ field: "year",
+ inner_hits: {
+ name: "topic related documents",
+ _source: ["year"],
+ },
+ },
+ _source: false,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc b/docs/doc_examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc
new file mode 100644
index 000000000..5099b0b3e
--- /dev/null
+++ b/docs/doc_examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ highlight: {
+ fields: [
+ {
+ title: {},
+ },
+ {
+ text: {},
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e71d300cd87f09a9527cf45395dd7eb1.asciidoc b/docs/doc_examples/e71d300cd87f09a9527cf45395dd7eb1.asciidoc
new file mode 100644
index 000000000..3dd4b3ef8
--- /dev/null
+++ b/docs/doc_examples/e71d300cd87f09a9527cf45395dd7eb1.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.executeRetention();
+console.log(response);
+----
diff --git a/docs/doc_examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc b/docs/doc_examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc
new file mode 100644
index 000000000..76351698d
--- /dev/null
+++ b/docs/doc_examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "attachment",
+ description: "Extract attachment information",
+ processors: [
+ {
+ attachment: {
+ field: "data",
+ properties: ["content", "title"],
+ remove_binary: true,
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e784fc00894635470adfd78a0c46b427.asciidoc b/docs/doc_examples/e784fc00894635470adfd78a0c46b427.asciidoc
new file mode 100644
index 000000000..6572b4a1f
--- /dev/null
+++ b/docs/doc_examples/e784fc00894635470adfd78a0c46b427.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putComponentTemplate({
+ name: "template_1",
+ template: {
+ settings: {
+ number_of_shards: 1,
+ },
+ mappings: {
+ _source: {
+ enabled: false,
+ },
+ properties: {
+ host_name: {
+ type: "keyword",
+ },
+ created_at: {
+ type: "date",
+ format: "EEE MMM dd HH:mm:ss Z yyyy",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e7cfe670b4177d1011076f845ec2916c.asciidoc b/docs/doc_examples/e7cfe670b4177d1011076f845ec2916c.asciidoc
new file mode 100644
index 000000000..760160b38
--- /dev/null
+++ b/docs/doc_examples/e7cfe670b4177d1011076f845ec2916c.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "data_streams.lifecycle.retention.default": "7d",
+ "data_streams.lifecycle.retention.max": "90d",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e7d819634d765cde269e2669e2dc677f.asciidoc b/docs/doc_examples/e7d819634d765cde269e2669e2dc677f.asciidoc
new file mode 100644
index 000000000..8dbb9e88a
--- /dev/null
+++ b/docs/doc_examples/e7d819634d765cde269e2669e2dc677f.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ username: "myuser",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e7e95022867c72a6563137f066dd2973.asciidoc b/docs/doc_examples/e7e95022867c72a6563137f066dd2973.asciidoc
new file mode 100644
index 000000000..3ff6b6cac
--- /dev/null
+++ b/docs/doc_examples/e7e95022867c72a6563137f066dd2973.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ hotspots: {
+ geohash_grid: {
+ field: "location",
+ precision: 5,
+ },
+ aggs: {
+ significant_crime_types: {
+ significant_terms: {
+ field: "crime_type",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc b/docs/doc_examples/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc
new file mode 100644
index 000000000..9ce8d6c4b
--- /dev/null
+++ b/docs/doc_examples/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ types_count: {
+ value_count: {
+ field: "type",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8211247c280a3fbbbdd32850b743b7b.asciidoc b/docs/doc_examples/e8211247c280a3fbbbdd32850b743b7b.asciidoc
new file mode 100644
index 000000000..eb43ead35
--- /dev/null
+++ b/docs/doc_examples/e8211247c280a3fbbbdd32850b743b7b.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.putDataFrameAnalytics({
+ id: "house_price_regression_analysis",
+ source: {
+ index: "houses_sold_last_10_yrs",
+ },
+ dest: {
+ index: "house_price_predictions",
+ },
+ analysis: {
+ regression: {
+ dependent_variable: "price",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e821d27a8b810821707ba860e31f8b78.asciidoc b/docs/doc_examples/e821d27a8b810821707ba860e31f8b78.asciidoc
new file mode 100644
index 000000000..941d4af41
--- /dev/null
+++ b/docs/doc_examples/e821d27a8b810821707ba860e31f8b78.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ properties: {
+ city: {
+ type: "text",
+ fields: {
+ raw: {
+ type: "keyword",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e827a9040e137410d62d10bb3b3cbb71.asciidoc b/docs/doc_examples/e827a9040e137410d62d10bb3b3cbb71.asciidoc
new file mode 100644
index 000000000..b4e52ceb7
--- /dev/null
+++ b/docs/doc_examples/e827a9040e137410d62d10bb3b3cbb71.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.getWatch({
+ id: "my_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e82c33def91faddcfeed7b02cd258605.asciidoc b/docs/doc_examples/e82c33def91faddcfeed7b02cd258605.asciidoc
new file mode 100644
index 000000000..610783b30
--- /dev/null
+++ b/docs/doc_examples/e82c33def91faddcfeed7b02cd258605.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "products",
+ aggs: {
+ genres_and_products: {
+ multi_terms: {
+ terms: [
+ {
+ field: "genre",
+ },
+ {
+ field: "product",
+ missing: "Product Z",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e84e23232c7ecc8d6377ec2c16a60269.asciidoc b/docs/doc_examples/e84e23232c7ecc8d6377ec2c16a60269.asciidoc
new file mode 100644
index 000000000..219d478d6
--- /dev/null
+++ b/docs/doc_examples/e84e23232c7ecc8d6377ec2c16a60269.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ aliases: {
+ alias_1: {},
+ alias_2: {
+ filter: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ routing: "shard-1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc b/docs/doc_examples/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc
new file mode 100644
index 000000000..b5fa22aa5
--- /dev/null
+++ b/docs/doc_examples/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings({
+ filter_path: "**.xpack.profiling.templates.enabled",
+ include_defaults: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e891e1d4805172da45a81f62b6b44aca.asciidoc b/docs/doc_examples/e891e1d4805172da45a81f62b6b44aca.asciidoc
new file mode 100644
index 000000000..d35dec2fa
--- /dev/null
+++ b/docs/doc_examples/e891e1d4805172da45a81f62b6b44aca.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ size: 0,
+ runtime_mappings: {
+ normalized_genre: {
+ type: "keyword",
+ script:
+ "\n String genre = doc['genre'].value;\n if (doc['product'].value.startsWith('Anthology')) {\n emit(genre + ' anthology');\n } else {\n emit(genre);\n }\n ",
+ },
+ },
+ aggs: {
+ genres: {
+ terms: {
+ field: "normalized_genre",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e89bf0d893b7bf43c2d9b44db6cfe21b.asciidoc b/docs/doc_examples/e89bf0d893b7bf43c2d9b44db6cfe21b.asciidoc
new file mode 100644
index 000000000..fac95eaa4
--- /dev/null
+++ b/docs/doc_examples/e89bf0d893b7bf43c2d9b44db6cfe21b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ query: {
+ rank_feature: {
+ field: "pagerank",
+ log: {
+ scaling_factor: 4,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8a2726eea5545355d1d0835d4599f55.asciidoc b/docs/doc_examples/e8a2726eea5545355d1d0835d4599f55.asciidoc
new file mode 100644
index 000000000..19dd77247
--- /dev/null
+++ b/docs/doc_examples/e8a2726eea5545355d1d0835d4599f55.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ term: {
+ ip_addr: "2001:db8::/48",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8bb5c57bdeff22be8e5f39a99dfe70e.asciidoc b/docs/doc_examples/e8bb5c57bdeff22be8e5f39a99dfe70e.asciidoc
new file mode 100644
index 000000000..0cebca89a
--- /dev/null
+++ b/docs/doc_examples/e8bb5c57bdeff22be8e5f39a99dfe70e.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "stackoverflow",
+ size: 0,
+ query: {
+ query_string: {
+ query: "tags:kibana OR tags:javascript",
+ },
+ },
+ aggs: {
+ sample: {
+ sampler: {
+ shard_size: 200,
+ },
+ aggs: {
+ keywords: {
+ significant_terms: {
+ field: "tags",
+ exclude: ["kibana", "javascript"],
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8c348cabe15dfe58ab4c3cc13a963fe.asciidoc b/docs/doc_examples/e8c348cabe15dfe58ab4c3cc13a963fe.asciidoc
new file mode 100644
index 000000000..50aa4b1e8
--- /dev/null
+++ b/docs/doc_examples/e8c348cabe15dfe58ab4c3cc13a963fe.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchShards({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8cbe2269f3dff6b231e73119e81511d.asciidoc b/docs/doc_examples/e8cbe2269f3dff6b231e73119e81511d.asciidoc
new file mode 100644
index 000000000..9bb62d070
--- /dev/null
+++ b/docs/doc_examples/e8cbe2269f3dff6b231e73119e81511d.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ exists: {
+ field: "user",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8ea65153d7775f25b08dfdfe6954498.asciidoc b/docs/doc_examples/e8ea65153d7775f25b08dfdfe6954498.asciidoc
new file mode 100644
index 000000000..271527227
--- /dev/null
+++ b/docs/doc_examples/e8ea65153d7775f25b08dfdfe6954498.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ simple_query_string: {
+ query: "Will Smith",
+ fields: ["title", "*_name"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e8f1c9ee003d115ec8f55e57990df6e4.asciidoc b/docs/doc_examples/e8f1c9ee003d115ec8f55e57990df6e4.asciidoc
new file mode 100644
index 000000000..0ec3637d4
--- /dev/null
+++ b/docs/doc_examples/e8f1c9ee003d115ec8f55e57990df6e4.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getCategories({
+ job_id: "esxi_log",
+ page: {
+ size: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e905543b281e9c41395304da76ed2ea3.asciidoc b/docs/doc_examples/e905543b281e9c41395304da76ed2ea3.asciidoc
new file mode 100644
index 000000000..188e1d435
--- /dev/null
+++ b/docs/doc_examples/e905543b281e9c41395304da76ed2ea3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: ".watches",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e930a572e8ddfdecc13498c04007b9e3.asciidoc b/docs/doc_examples/e930a572e8ddfdecc13498c04007b9e3.asciidoc
new file mode 100644
index 000000000..6b81643ec
--- /dev/null
+++ b/docs/doc_examples/e930a572e8ddfdecc13498c04007b9e3.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "openai-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1536,
+ element_type: "float",
+ similarity: "dot_product",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc b/docs/doc_examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc
new file mode 100644
index 000000000..0e82192f7
--- /dev/null
+++ b/docs/doc_examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ "user.id": "kimchy",
+ },
+ },
+ highlight: {
+ pre_tags: [""],
+ post_tags: [" "],
+ fields: {
+ body: {},
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e95ba581b298cd7bb598374afbfed315.asciidoc b/docs/doc_examples/e95ba581b298cd7bb598374afbfed315.asciidoc
new file mode 100644
index 000000000..99b9c40c9
--- /dev/null
+++ b/docs/doc_examples/e95ba581b298cd7bb598374afbfed315.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.asyncSearch.get({
+ id: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e95e61988dc3073a007f7b7445dd233b.asciidoc b/docs/doc_examples/e95e61988dc3073a007f7b7445dd233b.asciidoc
new file mode 100644
index 000000000..c9aaddee0
--- /dev/null
+++ b/docs/doc_examples/e95e61988dc3073a007f7b7445dd233b.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "dsl-data-stream-template",
+ index_patterns: ["dsl-data-stream*"],
+ data_stream: {},
+ priority: 500,
+ template: {
+ settings: {
+ "index.lifecycle.name": "pre-dsl-ilm-policy",
+ "index.lifecycle.prefer_ilm": false,
+ },
+ lifecycle: {
+ data_retention: "7d",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e9625da419bff6470ffd9927c59ca159.asciidoc b/docs/doc_examples/e9625da419bff6470ffd9927c59ca159.asciidoc
new file mode 100644
index 000000000..d3ff499f4
--- /dev/null
+++ b/docs/doc_examples/e9625da419bff6470ffd9927c59ca159.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.threadPool({
+ v: "true",
+ h: "id,name,queue,active,rejected,completed",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e9738fe09a99080506a07945795e8eda.asciidoc b/docs/doc_examples/e9738fe09a99080506a07945795e8eda.asciidoc
new file mode 100644
index 000000000..9b7a8182a
--- /dev/null
+++ b/docs/doc_examples/e9738fe09a99080506a07945795e8eda.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["stop"],
+ text: "a quick fox jumps over the lazy dog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e99c45a47dc0ba7440aea8a9a99c84fa.asciidoc b/docs/doc_examples/e99c45a47dc0ba7440aea8a9a99c84fa.asciidoc
new file mode 100644
index 000000000..1f5b22c33
--- /dev/null
+++ b/docs/doc_examples/e99c45a47dc0ba7440aea8a9a99c84fa.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "news",
+ query: {
+ match: {
+ content: "Bird flu",
+ },
+ },
+ aggregations: {
+ my_sample: {
+ sampler: {
+ shard_size: 100,
+ },
+ aggregations: {
+ keywords: {
+ significant_text: {
+ field: "content",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e9a0b450af6219772631703d602c7092.asciidoc b/docs/doc_examples/e9a0b450af6219772631703d602c7092.asciidoc
new file mode 100644
index 000000000..4073cd41b
--- /dev/null
+++ b/docs/doc_examples/e9a0b450af6219772631703d602c7092.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ text_expansion: {
+ "ml.tokens": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: false,
+ },
+ },
+ },
+ },
+ rescore: {
+ window_size: 100,
+ query: {
+ rescore_query: {
+ text_expansion: {
+ "ml.tokens": {
+ model_id: ".elser_model_2",
+ model_text: "How is the weather in Jamaica?",
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: true,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e9f9e184499a793828233e536fac0487.asciidoc b/docs/doc_examples/e9f9e184499a793828233e536fac0487.asciidoc
new file mode 100644
index 000000000..a8dbb9fcf
--- /dev/null
+++ b/docs/doc_examples/e9f9e184499a793828233e536fac0487.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteByQuery({
+ index: "my-index-000001",
+ scroll_size: 5000,
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc b/docs/doc_examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc
new file mode 100644
index 000000000..7ec14029d
--- /dev/null
+++ b/docs/doc_examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "google_ai_studio_completion",
+ inference_config: {
+ service: "googleaistudio",
+ service_settings: {
+ api_key: "",
+ model_id: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc b/docs/doc_examples/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc
new file mode 100644
index 000000000..62c0a1363
--- /dev/null
+++ b/docs/doc_examples/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc
@@ -0,0 +1,46 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "child_example",
+ id: 2,
+ routing: 1,
+ document: {
+ join: {
+ name: "answer",
+ parent: "1",
+ },
+ owner: {
+ location: "Norfolk, United Kingdom",
+ display_name: "Sam",
+ id: 48,
+ },
+ body: "Unfortunately you're pretty much limited to FTP...",
+ creation_date: "2009-05-04T13:45:37.030",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "child_example",
+ id: 3,
+ routing: 1,
+ refresh: "true",
+ document: {
+ join: {
+ name: "answer",
+ parent: "1",
+ },
+ owner: {
+ location: "Norfolk, United Kingdom",
+ display_name: "Troll",
+ id: 49,
+ },
+ body: "Use Linux...",
+ creation_date: "2009-05-05T13:45:37.030",
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/ea020ea32d5cd35e577c61a120f92451.asciidoc b/docs/doc_examples/ea020ea32d5cd35e577c61a120f92451.asciidoc
new file mode 100644
index 000000000..bfd1e2c92
--- /dev/null
+++ b/docs/doc_examples/ea020ea32d5cd35e577c61a120f92451.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-data-stream",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-05-06T16:21:15.000Z",
+ message:
+ '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736',
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-05-06T16:25:42.000Z",
+ message:
+ '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638',
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-data-stream",
+ document: {
+ "@timestamp": "2099-05-06T16:21:15.000Z",
+ message:
+ '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736',
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/ea29029884a5fd9a8d8830d25884bf07.asciidoc b/docs/doc_examples/ea29029884a5fd9a8d8830d25884bf07.asciidoc
new file mode 100644
index 000000000..b00988659
--- /dev/null
+++ b/docs/doc_examples/ea29029884a5fd9a8d8830d25884bf07.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ parent_id: {
+ type: "my-child",
+ id: "1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea313059c18d6edbd28c3f743a5e7c1c.asciidoc b/docs/doc_examples/ea313059c18d6edbd28c3f743a5e7c1c.asciidoc
new file mode 100644
index 000000000..d7a847278
--- /dev/null
+++ b/docs/doc_examples/ea313059c18d6edbd28c3f743a5e7c1c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ city: "madrid",
+ },
+ },
+ aggs: {
+ tags: {
+ significant_terms: {
+ field: "tag",
+ background_filter: {
+ term: {
+ text: "spain",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea5391267ced860c00214c096e08c8d4.asciidoc b/docs/doc_examples/ea5391267ced860c00214c096e08c8d4.asciidoc
new file mode 100644
index 000000000..fda39b10d
--- /dev/null
+++ b/docs/doc_examples/ea5391267ced860c00214c096e08c8d4.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ number_of_replicas: 2,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea5b4d2d87fd4e040afad18903c44869.asciidoc b/docs/doc_examples/ea5b4d2d87fd4e040afad18903c44869.asciidoc
new file mode 100644
index 000000000..e7e8a4292
--- /dev/null
+++ b/docs/doc_examples/ea5b4d2d87fd4e040afad18903c44869.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: {
+ lat: 40.73,
+ lon: -74.1,
+ },
+ bottom_right: {
+ lat: 40.01,
+ lon: -71.12,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea61aa2531ea73ccc0acd2d41f0518eb.asciidoc b/docs/doc_examples/ea61aa2531ea73ccc0acd2d41f0518eb.asciidoc
new file mode 100644
index 000000000..83955e4ec
--- /dev/null
+++ b/docs/doc_examples/ea61aa2531ea73ccc0acd2d41f0518eb.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ pagerank: {
+ type: "rank_feature",
+ },
+ url_length: {
+ type: "rank_feature",
+ positive_score_impact: false,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ pagerank: 8,
+ url_length: 22,
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ rank_feature: {
+ field: "pagerank",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ea66a620c23337545e409c120c4ed5d9.asciidoc b/docs/doc_examples/ea66a620c23337545e409c120c4ed5d9.asciidoc
new file mode 100644
index 000000000..115c615f8
--- /dev/null
+++ b/docs/doc_examples/ea66a620c23337545e409c120c4ed5d9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.explainLifecycle({
+ index: ".ds-timeseries-*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea68e3428cc2ca3455bf312d09451489.asciidoc b/docs/doc_examples/ea68e3428cc2ca3455bf312d09451489.asciidoc
new file mode 100644
index 000000000..aa41e2ba4
--- /dev/null
+++ b/docs/doc_examples/ea68e3428cc2ca3455bf312d09451489.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "product-index",
+ mappings: {
+ properties: {
+ "product-vector": {
+ type: "dense_vector",
+ dims: 5,
+ index: false,
+ },
+ price: {
+ type: "long",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea690283f301c6ce957efad93d7d5c5d.asciidoc b/docs/doc_examples/ea690283f301c6ce957efad93d7d5c5d.asciidoc
new file mode 100644
index 000000000..115a9adf0
--- /dev/null
+++ b/docs/doc_examples/ea690283f301c6ce957efad93d7d5c5d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "length_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_length: {
+ tokenizer: "standard",
+ filter: ["length"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ea8c4229afa6dd4f1321355542be9912.asciidoc b/docs/doc_examples/ea8c4229afa6dd4f1321355542be9912.asciidoc
new file mode 100644
index 000000000..c4744fb4e
--- /dev/null
+++ b/docs/doc_examples/ea8c4229afa6dd4f1321355542be9912.asciidoc
@@ -0,0 +1,37 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "attachment",
+ description: "Extract attachment information",
+ processors: [
+ {
+ attachment: {
+ field: "data",
+ indexed_chars: 11,
+ indexed_chars_field: "max_size",
+ remove_binary: true,
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "attachment",
+ document: {
+ data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ea92390651e8ecad0c890658985343c5.asciidoc b/docs/doc_examples/ea92390651e8ecad0c890658985343c5.asciidoc
new file mode 100644
index 000000000..e71ac87a0
--- /dev/null
+++ b/docs/doc_examples/ea92390651e8ecad0c890658985343c5.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "hourly-snapshots",
+ name: "",
+ schedule: "0 0 * * * ?",
+ repository: "my_repository",
+ config: {
+ indices: "*",
+ include_global_state: true,
+ },
+ retention: {
+ expire_after: "1d",
+ min_count: 1,
+ max_count: 24,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eab3cad0257c539c5efd2689aa52f242.asciidoc b/docs/doc_examples/eab3cad0257c539c5efd2689aa52f242.asciidoc
new file mode 100644
index 000000000..32089e3ef
--- /dev/null
+++ b/docs/doc_examples/eab3cad0257c539c5efd2689aa52f242.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.dataStreamsStats({
+ name: "my-data-stream",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc b/docs/doc_examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc
new file mode 100644
index 000000000..f5decb0b8
--- /dev/null
+++ b/docs/doc_examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc
@@ -0,0 +1,61 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match: {
+ comment: {
+ query: "foo bar",
+ },
+ },
+ },
+ rescore: {
+ window_size: 50,
+ query: {
+ rescore_query: {
+ match_phrase: {
+ comment: {
+ query: "foo bar",
+ slop: 1,
+ },
+ },
+ },
+ rescore_query_weight: 10,
+ },
+ },
+ _source: false,
+ highlight: {
+ order: "score",
+ fields: {
+ comment: {
+ fragment_size: 150,
+ number_of_fragments: 3,
+ highlight_query: {
+ bool: {
+ must: {
+ match: {
+ comment: {
+ query: "foo bar",
+ },
+ },
+ },
+ should: {
+ match_phrase: {
+ comment: {
+ query: "foo bar",
+ slop: 1,
+ boost: 10,
+ },
+ },
+ },
+ minimum_should_match: 0,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ead4d875877d618594d0cdbdd9b7998b.asciidoc b/docs/doc_examples/ead4d875877d618594d0cdbdd9b7998b.asciidoc
new file mode 100644
index 000000000..2a73cee7d
--- /dev/null
+++ b/docs/doc_examples/ead4d875877d618594d0cdbdd9b7998b.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.deleteVotingConfigExclusions();
+console.log(response);
+
+const response1 = await client.cluster.deleteVotingConfigExclusions({
+ wait_for_removal: "false",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc b/docs/doc_examples/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc
new file mode 100644
index 000000000..bc3b41783
--- /dev/null
+++ b/docs/doc_examples/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "metrics_index",
+ id: 1,
+ document: {
+ "network.name": "net-1",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [3, 7, 23, 12, 6],
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "metrics_index",
+ id: 2,
+ document: {
+ "network.name": "net-2",
+ latency_histo: {
+ values: [0.1, 0.2, 0.3, 0.4, 0.5],
+ counts: [8, 17, 8, 7, 6],
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "metrics_index",
+ size: 0,
+ aggs: {
+ total_requests: {
+ value_count: {
+ field: "latency_histo",
+ },
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/eae8931d01b3b878dd0c45214121e662.asciidoc b/docs/doc_examples/eae8931d01b3b878dd0c45214121e662.asciidoc
new file mode 100644
index 000000000..f36471ccb
--- /dev/null
+++ b/docs/doc_examples/eae8931d01b3b878dd0c45214121e662.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ geo_bounding_box: {
+ "pin.location": {
+ top_left: "dr",
+ bottom_right: "dr",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eaf53b05959cc6b7fb09579baf34de68.asciidoc b/docs/doc_examples/eaf53b05959cc6b7fb09579baf34de68.asciidoc
new file mode 100644
index 000000000..400427410
--- /dev/null
+++ b/docs/doc_examples/eaf53b05959cc6b7fb09579baf34de68.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sale_type: {
+ terms: {
+ field: "type",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+ },
+ hat_vs_bag_ratio: {
+ bucket_script: {
+ buckets_path: {
+ hats: "sale_type['hat']>sales",
+ bags: "sale_type['bag']>sales",
+ },
+ script: "params.hats / params.bags",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eaf6a846ded090fd6ac48269ad2b328b.asciidoc b/docs/doc_examples/eaf6a846ded090fd6ac48269ad2b328b.asciidoc
new file mode 100644
index 000000000..8f88b4f8d
--- /dev/null
+++ b/docs/doc_examples/eaf6a846ded090fd6ac48269ad2b328b.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ "index.lifecycle.name": "my_policy",
+ "index.lifecycle.rollover_alias": "my_data",
+ },
+ aliases: {
+ my_data: {
+ is_write_index: true,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eafdabe80b21b90495555fa6d9089412.asciidoc b/docs/doc_examples/eafdabe80b21b90495555fa6d9089412.asciidoc
new file mode 100644
index 000000000..fd4633709
--- /dev/null
+++ b/docs/doc_examples/eafdabe80b21b90495555fa6d9089412.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedServiceTokens({
+ namespace: "elastic",
+ service: "fleet-server",
+ name: "token1,token2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb09235533a1c65a0627ba05f7d4ad4d.asciidoc b/docs/doc_examples/eb09235533a1c65a0627ba05f7d4ad4d.asciidoc
new file mode 100644
index 000000000..56ae5af9d
--- /dev/null
+++ b/docs/doc_examples/eb09235533a1c65a0627ba05f7d4ad4d.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "place",
+ id: 1,
+ document: {
+ suggest: {
+ input: "timmy's",
+ contexts: {
+ location: [
+ {
+ lat: 43.6624803,
+ lon: -79.3863353,
+ },
+ {
+ lat: 43.6624718,
+ lon: -79.3873227,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc b/docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc
new file mode 100644
index 000000000..55f84f169
--- /dev/null
+++ b/docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "good_example_index",
+ mappings: {
+ properties: {
+ field_1: {
+ type: "text",
+ copy_to: ["field_2", "field_3"],
+ },
+ field_2: {
+ type: "text",
+ },
+ field_3: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc b/docs/doc_examples/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc
new file mode 100644
index 000000000..fea94f9a6
--- /dev/null
+++ b/docs/doc_examples/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "test",
+ id: 1,
+ script: "ctx._source.new_field = 'value_of_new_field'",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb33a7e5a0fe83fdaa0f79354f659428.asciidoc b/docs/doc_examples/eb33a7e5a0fe83fdaa0f79354f659428.asciidoc
new file mode 100644
index 000000000..954f2ae31
--- /dev/null
+++ b/docs/doc_examples/eb33a7e5a0fe83fdaa0f79354f659428.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index-000001",
+ runtime: {
+ client_ip: {
+ type: "ip",
+ script: {
+ source:
+ 'String m = doc["message"].value; int end = m.indexOf(" "); emit(m.substring(0, end));',
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb4e43b47867b54214a8630172dd0e21.asciidoc b/docs/doc_examples/eb4e43b47867b54214a8630172dd0e21.asciidoc
new file mode 100644
index 000000000..3caf88096
--- /dev/null
+++ b/docs/doc_examples/eb4e43b47867b54214a8630172dd0e21.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteForecast({
+ job_id: "total-requests",
+ forecast_id: "_all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb54506fbc71a7d250e86b22d0600114.asciidoc b/docs/doc_examples/eb54506fbc71a7d250e86b22d0600114.asciidoc
new file mode 100644
index 000000000..027c4ff88
--- /dev/null
+++ b/docs/doc_examples/eb54506fbc71a7d250e86b22d0600114.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.list({
+ service_type: "sharepoint_online,google_drive",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb5486d2fe4283475bf9e0e09280be16.asciidoc b/docs/doc_examples/eb5486d2fe4283475bf9e0e09280be16.asciidoc
new file mode 100644
index 000000000..adf2ca795
--- /dev/null
+++ b/docs/doc_examples/eb5486d2fe4283475bf9e0e09280be16.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ forcemerge: {
+ max_num_segments: 1,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb5987b58dae90c3a8a1609410be0570.asciidoc b/docs/doc_examples/eb5987b58dae90c3a8a1609410be0570.asciidoc
new file mode 100644
index 000000000..3d37bbfbb
--- /dev/null
+++ b/docs/doc_examples/eb5987b58dae90c3a8a1609410be0570.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "indonesian_example",
+ settings: {
+ analysis: {
+ filter: {
+ indonesian_stop: {
+ type: "stop",
+ stopwords: "_indonesian_",
+ },
+ indonesian_keywords: {
+ type: "keyword_marker",
+ keywords: ["contoh"],
+ },
+ indonesian_stemmer: {
+ type: "stemmer",
+ language: "indonesian",
+ },
+ },
+ analyzer: {
+ rebuilt_indonesian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "indonesian_stop",
+ "indonesian_keywords",
+ "indonesian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb6d62f1d855a8e8fe9eab2656d47504.asciidoc b/docs/doc_examples/eb6d62f1d855a8e8fe9eab2656d47504.asciidoc
new file mode 100644
index 000000000..45a7c10da
--- /dev/null
+++ b/docs/doc_examples/eb6d62f1d855a8e8fe9eab2656d47504.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ suggest: {
+ text: "obel prize",
+ simple_phrase: {
+ phrase: {
+ field: "title.trigram",
+ size: 1,
+ direct_generator: [
+ {
+ field: "title.trigram",
+ suggest_mode: "always",
+ },
+ {
+ field: "title.reverse",
+ suggest_mode: "always",
+ pre_filter: "reverse",
+ post_filter: "reverse",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb964d8d7f27c057a4542448ba5b74e4.asciidoc b/docs/doc_examples/eb964d8d7f27c057a4542448ba5b74e4.asciidoc
new file mode 100644
index 000000000..7a8337ffa
--- /dev/null
+++ b/docs/doc_examples/eb964d8d7f27c057a4542448ba5b74e4.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.get({
+ repository: "my_repository",
+ snapshot: "snapshot*",
+ size: 2,
+ sort: "name",
+ after: "c25hcHNob3RfMixteV9yZXBvc2l0b3J5LHNuYXBzaG90XzI=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc b/docs/doc_examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc
new file mode 100644
index 000000000..9f2187174
--- /dev/null
+++ b/docs/doc_examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateScheduling({
+ connector_id: "my-connector",
+ scheduling: {
+ full: {
+ enabled: true,
+ interval: "0 10 0 * * ?",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc b/docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc
new file mode 100644
index 000000000..a9cdeb962
--- /dev/null
+++ b/docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.bulkPutRole({
+ roles: {
+ my_admin_role: {
+ cluster: ["bad_cluster_privilege"],
+ indices: [
+ {
+ names: ["index1", "index2"],
+ privileges: ["all"],
+ field_security: {
+ grant: ["title", "body"],
+ },
+ query: '{"match": {"title": "foo"}}',
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["admin", "read"],
+ resources: ["*"],
+ },
+ ],
+ run_as: ["other_user"],
+ metadata: {
+ version: 1,
+ },
+ },
+ my_user_role: {
+ cluster: ["all"],
+ indices: [
+ {
+ names: ["index1"],
+ privileges: ["read"],
+ field_security: {
+ grant: ["title", "body"],
+ },
+ query: '{"match": {"title": "foo"}}',
+ },
+ ],
+ applications: [
+ {
+ application: "myapp",
+ privileges: ["admin", "read"],
+ resources: ["*"],
+ },
+ ],
+ run_as: ["other_user"],
+ metadata: {
+ version: 1,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ebb1c7554e91adb4552599f3e5de1865.asciidoc b/docs/doc_examples/ebb1c7554e91adb4552599f3e5de1865.asciidoc
new file mode 100644
index 000000000..9c53844b2
--- /dev/null
+++ b/docs/doc_examples/ebb1c7554e91adb4552599f3e5de1865.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ number_of_routing_shards: 30,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ebd76a45e153c4656c5871e23b7b5508.asciidoc b/docs/doc_examples/ebd76a45e153c4656c5871e23b7b5508.asciidoc
new file mode 100644
index 000000000..71d69b8bd
--- /dev/null
+++ b/docs/doc_examples/ebd76a45e153c4656c5871e23b7b5508.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.deletePrivileges({
+ application: "myapp",
+ name: "read",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ebef3dc8ed1766d433a5cffc40fde7ae.asciidoc b/docs/doc_examples/ebef3dc8ed1766d433a5cffc40fde7ae.asciidoc
new file mode 100644
index 000000000..5a6237882
--- /dev/null
+++ b/docs/doc_examples/ebef3dc8ed1766d433a5cffc40fde7ae.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.removePolicy({
+ index: "logs-my_app-default",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec0e50f78390b8622cef4e0b0cd45967.asciidoc b/docs/doc_examples/ec0e50f78390b8622cef4e0b0cd45967.asciidoc
new file mode 100644
index 000000000..39544c478
--- /dev/null
+++ b/docs/doc_examples/ec0e50f78390b8622cef4e0b0cd45967.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ query:
+ '\n process where (process.name == "cmd.exe" and process.pid != 2013)\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec195297eb804cba1cb19c9926773059.asciidoc b/docs/doc_examples/ec195297eb804cba1cb19c9926773059.asciidoc
new file mode 100644
index 000000000..4fcadbc73
--- /dev/null
+++ b/docs/doc_examples/ec195297eb804cba1cb19c9926773059.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "mylogs-pre-ilm*",
+ settings: {
+ index: {
+ lifecycle: {
+ name: "mylogs_policy_existing",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec420b28e327f332c9e99d6040c4eb3f.asciidoc b/docs/doc_examples/ec420b28e327f332c9e99d6040c4eb3f.asciidoc
new file mode 100644
index 000000000..80f12e99a
--- /dev/null
+++ b/docs/doc_examples/ec420b28e327f332c9e99d6040c4eb3f.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "users",
+ id: 0,
+ pipeline: "postal_lookup",
+ document: {
+ first_name: "Mardy",
+ last_name: "Brown",
+ geo_location: "POINT (13.5 52.5)",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec44999b6618ac6bbacb23eb08c0fa88.asciidoc b/docs/doc_examples/ec44999b6618ac6bbacb23eb08c0fa88.asciidoc
new file mode 100644
index 000000000..b4eb794c2
--- /dev/null
+++ b/docs/doc_examples/ec44999b6618ac6bbacb23eb08c0fa88.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ runtime_mappings: {
+ gc_size: {
+ type: "keyword",
+ script:
+ "\n Map gc=dissect('[%{@timestamp}][%{code}][%{desc}] %{ident} used %{usize}, capacity %{csize}, committed %{comsize}, reserved %{rsize}').extract(doc[\"gc.keyword\"].value);\n if (gc != null) emit(\"used\" + ' ' + gc.usize + ', ' + \"capacity\" + ' ' + gc.csize + ', ' + \"committed\" + ' ' + gc.comsize);\n ",
+ },
+ },
+ size: 1,
+ aggs: {
+ sizes: {
+ terms: {
+ field: "gc_size",
+ size: 10,
+ },
+ },
+ },
+ fields: ["gc_size"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec5a2ce156c36aaa267fa31dd9367307.asciidoc b/docs/doc_examples/ec5a2ce156c36aaa267fa31dd9367307.asciidoc
new file mode 100644
index 000000000..311487347
--- /dev/null
+++ b/docs/doc_examples/ec5a2ce156c36aaa267fa31dd9367307.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "set_ingest_time",
+ description: "Set ingest timestamp.",
+ processors: [
+ {
+ set: {
+ field: "event.ingested",
+ value: "{{{_ingest.timestamp}}}",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec69543e39c1f6afb5aff6fb9adc400d.asciidoc b/docs/doc_examples/ec69543e39c1f6afb5aff6fb9adc400d.asciidoc
new file mode 100644
index 000000000..8a6eb97c8
--- /dev/null
+++ b/docs/doc_examples/ec69543e39c1f6afb5aff6fb9adc400d.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "index1",
+ refresh: "true",
+ operations: [
+ {
+ index: {
+ _id: "doc1",
+ },
+ },
+ {
+ comment: "run with scissors",
+ },
+ {
+ index: {
+ _id: "doc2",
+ },
+ },
+ {
+ comment: "running with scissors",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ec736c31f49c54e5424efa2e53b22906.asciidoc b/docs/doc_examples/ec736c31f49c54e5424efa2e53b22906.asciidoc
new file mode 100644
index 000000000..9dd498c1a
--- /dev/null
+++ b/docs/doc_examples/ec736c31f49c54e5424efa2e53b22906.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "user_agent",
+ description: "Add user agent information",
+ processors: [
+ {
+ user_agent: {
+ field: "agent",
+ },
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: "my_id",
+ pipeline: "user_agent",
+ document: {
+ agent:
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ },
+});
+console.log(response1);
+
+const response2 = await client.get({
+ index: "my-index-000001",
+ id: "my_id",
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc b/docs/doc_examples/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc
new file mode 100644
index 000000000..454c2c49c
--- /dev/null
+++ b/docs/doc_examples/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "products",
+ runtime_mappings: {
+ "genre.length": {
+ type: "long",
+ script: "emit(doc['genre'].value.length())",
+ },
+ },
+ aggs: {
+ genres_and_products: {
+ multi_terms: {
+ terms: [
+ {
+ field: "genre.length",
+ },
+ {
+ field: "product",
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc b/docs/doc_examples/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc
new file mode 100644
index 000000000..57ec2e036
--- /dev/null
+++ b/docs/doc_examples/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "1M",
+ format: "yyyy-MM-dd",
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ece01f9382e450f669c0e0925e5b30e5.asciidoc b/docs/doc_examples/ece01f9382e450f669c0e0925e5b30e5.asciidoc
new file mode 100644
index 000000000..d33db1d05
--- /dev/null
+++ b/docs/doc_examples/ece01f9382e450f669c0e0925e5b30e5.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ range: {
+ date_range: {
+ field: "date",
+ format: "MM-yyy",
+ ranges: [
+ {
+ to: "now-10M/M",
+ },
+ {
+ from: "now-10M/M",
+ },
+ ],
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc b/docs/doc_examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc
new file mode 100644
index 000000000..3622004ac
--- /dev/null
+++ b/docs/doc_examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateError({
+ connector_id: "my-connector",
+ error: "Houston, we have a problem!",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed01b542bb56b1521ea8d5a3c67aa891.asciidoc b/docs/doc_examples/ed01b542bb56b1521ea8d5a3c67aa891.asciidoc
new file mode 100644
index 000000000..4fccf4f6e
--- /dev/null
+++ b/docs/doc_examples/ed01b542bb56b1521ea8d5a3c67aa891.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_gcs_repository",
+ repository: {
+ type: "gcs",
+ settings: {
+ bucket: "my_bucket",
+ client: "my_alternate_client",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed01d27b8f80bb4ea54bf4e32b8d6258.asciidoc b/docs/doc_examples/ed01d27b8f80bb4ea54bf4e32b8d6258.asciidoc
new file mode 100644
index 000000000..a5283d696
--- /dev/null
+++ b/docs/doc_examples/ed01d27b8f80bb4ea54bf4e32b8d6258.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ rings_around_amsterdam: {
+ geo_distance: {
+ field: "location",
+ origin: "POINT (4.894 52.3760)",
+ ranges: [
+ {
+ to: 100000,
+ key: "first_ring",
+ },
+ {
+ from: 100000,
+ to: 300000,
+ key: "second_ring",
+ },
+ {
+ from: 300000,
+ key: "third_ring",
+ },
+ ],
+ keyed: true,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed09432c6069e41409f0a5e0d1d3842a.asciidoc b/docs/doc_examples/ed09432c6069e41409f0a5e0d1d3842a.asciidoc
new file mode 100644
index 000000000..6e565f33e
--- /dev/null
+++ b/docs/doc_examples/ed09432c6069e41409f0a5e0d1d3842a.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.reloadSearchAnalyzers({
+ index: "my-index-000001",
+});
+console.log(response);
+
+const response1 = await client.indices.clearCache({
+ index: "my-index-000001",
+ request: "true",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/ed12eeadb4e530b53c4975dadaa06054.asciidoc b/docs/doc_examples/ed12eeadb4e530b53c4975dadaa06054.asciidoc
new file mode 100644
index 000000000..2fe91ad53
--- /dev/null
+++ b/docs/doc_examples/ed12eeadb4e530b53c4975dadaa06054.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.processorGrok({
+ ecs_compatibility: "v1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed250b74bc77c15bb794f55a12d762c3.asciidoc b/docs/doc_examples/ed250b74bc77c15bb794f55a12d762c3.asciidoc
new file mode 100644
index 000000000..18ac24524
--- /dev/null
+++ b/docs/doc_examples/ed250b74bc77c15bb794f55a12d762c3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.info({
+ filter_path: "**.mlockall",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed27843eff311f3011b679e97e6fda50.asciidoc b/docs/doc_examples/ed27843eff311f3011b679e97e6fda50.asciidoc
new file mode 100644
index 000000000..c6ecce6fa
--- /dev/null
+++ b/docs/doc_examples/ed27843eff311f3011b679e97e6fda50.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "my_snapshot_2099.05.06",
+ indices: "my-index,logs-my_app-default",
+ index_settings: {
+ "index.number_of_replicas": 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed3bdf4d6799b43526851e92b6a60c55.asciidoc b/docs/doc_examples/ed3bdf4d6799b43526851e92b6a60c55.asciidoc
new file mode 100644
index 000000000..ed11c2ffd
--- /dev/null
+++ b/docs/doc_examples/ed3bdf4d6799b43526851e92b6a60c55.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getFieldMapping({
+ index: "publications",
+ fields: "author.id,abstract,name",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed5bfa68d01e079aac94de78dc5caddf.asciidoc b/docs/doc_examples/ed5bfa68d01e079aac94de78dc5caddf.asciidoc
new file mode 100644
index 000000000..dfa1e1323
--- /dev/null
+++ b/docs/doc_examples/ed5bfa68d01e079aac94de78dc5caddf.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.master({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed5c3b45e8de912faba44507d827eb93.asciidoc b/docs/doc_examples/ed5c3b45e8de912faba44507d827eb93.asciidoc
new file mode 100644
index 000000000..0ce9c3072
--- /dev/null
+++ b/docs/doc_examples/ed5c3b45e8de912faba44507d827eb93.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ _geo_distance: {
+ "pin.location": "POINT (-70 40)",
+ order: "asc",
+ unit: "km",
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed60daeaec351fc8b3f39a3dfad6fc4e.asciidoc b/docs/doc_examples/ed60daeaec351fc8b3f39a3dfad6fc4e.asciidoc
new file mode 100644
index 000000000..724c1f0c0
--- /dev/null
+++ b/docs/doc_examples/ed60daeaec351fc8b3f39a3dfad6fc4e.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "amazon-bedrock-embeddings",
+ mappings: {
+ properties: {
+ content_embedding: {
+ type: "dense_vector",
+ dims: 1024,
+ element_type: "float",
+ similarity: "dot_product",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed688d86eeaa4d7969acb0f574eb917f.asciidoc b/docs/doc_examples/ed688d86eeaa4d7969acb0f574eb917f.asciidoc
new file mode 100644
index 000000000..1dce69225
--- /dev/null
+++ b/docs/doc_examples/ed688d86eeaa4d7969acb0f574eb917f.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my_queries1",
+ id: 1,
+ refresh: "true",
+ document: {
+ query: {
+ term: {
+ "my_field.prefix": "abc",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed6b996ea389e0955a01c2e67f4c8339.asciidoc b/docs/doc_examples/ed6b996ea389e0955a01c2e67f4c8339.asciidoc
new file mode 100644
index 000000000..5e627dec3
--- /dev/null
+++ b/docs/doc_examples/ed6b996ea389e0955a01c2e67f4c8339.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.fieldCaps({
+ index: "my-index-000001",
+ fields: "my-field",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed7fa1971ac322aeccd6391ab32d0490.asciidoc b/docs/doc_examples/ed7fa1971ac322aeccd6391ab32d0490.asciidoc
new file mode 100644
index 000000000..da6e6d943
--- /dev/null
+++ b/docs/doc_examples/ed7fa1971ac322aeccd6391ab32d0490.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.nodes({
+ v: "true",
+ h: "name,master,node.role,disk.used_percent,disk.used,disk.avail,disk.total",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ed85ed833bec7286a0dfbe64077c5715.asciidoc b/docs/doc_examples/ed85ed833bec7286a0dfbe64077c5715.asciidoc
new file mode 100644
index 000000000..08ac02a73
--- /dev/null
+++ b/docs/doc_examples/ed85ed833bec7286a0dfbe64077c5715.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "danish_example",
+ settings: {
+ analysis: {
+ filter: {
+ danish_stop: {
+ type: "stop",
+ stopwords: "_danish_",
+ },
+ danish_keywords: {
+ type: "keyword_marker",
+ keywords: ["eksempel"],
+ },
+ danish_stemmer: {
+ type: "stemmer",
+ language: "danish",
+ },
+ },
+ analyzer: {
+ rebuilt_danish: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "danish_stop",
+ "danish_keywords",
+ "danish_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/edae616e1244babf6032aecc6aaaf836.asciidoc b/docs/doc_examples/edae616e1244babf6032aecc6aaaf836.asciidoc
new file mode 100644
index 000000000..72c6aa669
--- /dev/null
+++ b/docs/doc_examples/edae616e1244babf6032aecc6aaaf836.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ _geo_distance: {
+ "pin.location": {
+ lat: 40,
+ lon: -70,
+ },
+ order: "asc",
+ unit: "km",
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/edb25dc0162b039d477cb06aed2d6275.asciidoc b/docs/doc_examples/edb25dc0162b039d477cb06aed2d6275.asciidoc
new file mode 100644
index 000000000..31c711aa2
--- /dev/null
+++ b/docs/doc_examples/edb25dc0162b039d477cb06aed2d6275.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ bool: {
+ should: [
+ {
+ sparse_vector: {
+ field: "ml.inference.title_expanded.predicted_value",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ boost: 1,
+ },
+ },
+ {
+ sparse_vector: {
+ field: "ml.inference.description_expanded.predicted_value",
+ inference_id: "my-elser-model",
+ query: "How is the weather in Jamaica?",
+ boost: 1,
+ },
+ },
+ {
+ multi_match: {
+ query: "How is the weather in Jamaica?",
+ fields: ["title", "description"],
+ boost: 4,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/edb5cad890208014ecd91f3f739ce193.asciidoc b/docs/doc_examples/edb5cad890208014ecd91f3f739ce193.asciidoc
new file mode 100644
index 000000000..2bb41773d
--- /dev/null
+++ b/docs/doc_examples/edb5cad890208014ecd91f3f739ce193.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "metrics-weather_sensors-dev",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc b/docs/doc_examples/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc
new file mode 100644
index 000000000..f3065ff0d
--- /dev/null
+++ b/docs/doc_examples/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ query: {
+ match_all: {},
+ },
+ boost: "5",
+ functions: [
+ {
+ filter: {
+ match: {
+ test: "bar",
+ },
+ },
+ random_score: {},
+ weight: 23,
+ },
+ {
+ filter: {
+ match: {
+ test: "cat",
+ },
+ },
+ weight: 42,
+ },
+ ],
+ max_boost: 42,
+ score_mode: "max",
+ boost_mode: "multiply",
+ min_score: 42,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc b/docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc
new file mode 100644
index 000000000..abb8e0b60
--- /dev/null
+++ b/docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc
@@ -0,0 +1,94 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "retrievers_example",
+ mappings: {
+ properties: {
+ vector: {
+ type: "dense_vector",
+ dims: 3,
+ similarity: "l2_norm",
+ index: true,
+ },
+ text: {
+ type: "text",
+ },
+ year: {
+ type: "integer",
+ },
+ topic: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "retrievers_example",
+ id: 1,
+ document: {
+ vector: [0.23, 0.67, 0.89],
+ text: "Large language models are revolutionizing information retrieval by boosting search precision, deepening contextual understanding, and reshaping user experiences in data-rich environments.",
+ year: 2024,
+ topic: ["llm", "ai", "information_retrieval"],
+ },
+});
+console.log(response1);
+
+const response2 = await client.index({
+ index: "retrievers_example",
+ id: 2,
+ document: {
+ vector: [0.12, 0.56, 0.78],
+ text: "Artificial intelligence is transforming medicine, from advancing diagnostics and tailoring treatment plans to empowering predictive patient care for improved health outcomes.",
+ year: 2023,
+ topic: ["ai", "medicine"],
+ },
+});
+console.log(response2);
+
+const response3 = await client.index({
+ index: "retrievers_example",
+ id: 3,
+ document: {
+ vector: [0.45, 0.32, 0.91],
+ text: "AI is redefining security by enabling advanced threat detection, proactive risk analysis, and dynamic defenses against increasingly sophisticated cyber threats.",
+ year: 2024,
+ topic: ["ai", "security"],
+ },
+});
+console.log(response3);
+
+const response4 = await client.index({
+ index: "retrievers_example",
+ id: 4,
+ document: {
+ vector: [0.34, 0.21, 0.98],
+ text: "Elastic introduces Elastic AI Assistant, the open, generative AI sidekick powered by ESRE to democratize cybersecurity and enable users of every skill level.",
+ year: 2023,
+ topic: ["ai", "elastic", "assistant"],
+ },
+});
+console.log(response4);
+
+const response5 = await client.index({
+ index: "retrievers_example",
+ id: 5,
+ document: {
+ vector: [0.11, 0.65, 0.47],
+ text: "Learn how to spin up a deployment of our hosted Elasticsearch Service and use Elastic Observability to gain deeper insight into the behavior of your applications and systems.",
+ year: 2024,
+ topic: ["documentation", "observability", "elastic"],
+ },
+});
+console.log(response5);
+
+const response6 = await client.indices.refresh({
+ index: "retrievers_example",
+});
+console.log(response6);
+----
diff --git a/docs/doc_examples/ee08328cd157d547de19b4abe867b23e.asciidoc b/docs/doc_examples/ee08328cd157d547de19b4abe867b23e.asciidoc
new file mode 100644
index 000000000..a2bbbd116
--- /dev/null
+++ b/docs/doc_examples/ee08328cd157d547de19b4abe867b23e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getAlias({
+ name: "logs",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc b/docs/doc_examples/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc
new file mode 100644
index 000000000..9e94a56b4
--- /dev/null
+++ b/docs/doc_examples/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc
@@ -0,0 +1,95 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ query: {
+ weighted_tokens: {
+ query_expansion_field: {
+ tokens: {
+ "2161": 0.4679,
+ "2621": 0.307,
+ "2782": 0.1299,
+ "2851": 0.1056,
+ "3088": 0.3041,
+ "3376": 0.1038,
+ "3467": 0.4873,
+ "3684": 0.8958,
+ "4380": 0.334,
+ "4542": 0.4636,
+ "4633": 2.2805,
+ "4785": 1.2628,
+ "4860": 1.0655,
+ "5133": 1.0709,
+ "7139": 1.0016,
+ "7224": 0.2486,
+ "7387": 0.0985,
+ "7394": 0.0542,
+ "8915": 0.369,
+ "9156": 2.8947,
+ "10505": 0.2771,
+ "11464": 0.3996,
+ "13525": 0.0088,
+ "14178": 0.8161,
+ "16893": 0.1376,
+ "17851": 1.5348,
+ "19939": 0.6012,
+ },
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: false,
+ },
+ },
+ },
+ },
+ rescore: {
+ window_size: 100,
+ query: {
+ rescore_query: {
+ weighted_tokens: {
+ query_expansion_field: {
+ tokens: {
+ "2161": 0.4679,
+ "2621": 0.307,
+ "2782": 0.1299,
+ "2851": 0.1056,
+ "3088": 0.3041,
+ "3376": 0.1038,
+ "3467": 0.4873,
+ "3684": 0.8958,
+ "4380": 0.334,
+ "4542": 0.4636,
+ "4633": 2.2805,
+ "4785": 1.2628,
+ "4860": 1.0655,
+ "5133": 1.0709,
+ "7139": 1.0016,
+ "7224": 0.2486,
+ "7387": 0.0985,
+ "7394": 0.0542,
+ "8915": 0.369,
+ "9156": 2.8947,
+ "10505": 0.2771,
+ "11464": 0.3996,
+ "13525": 0.0088,
+ "14178": 0.8161,
+ "16893": 0.1376,
+ "17851": 1.5348,
+ "19939": 0.6012,
+ },
+ pruning_config: {
+ tokens_freq_ratio_threshold: 5,
+ tokens_weight_threshold: 0.4,
+ only_score_pruned_tokens: true,
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee223e604bb695cad2517d28ae63ac34.asciidoc b/docs/doc_examples/ee223e604bb695cad2517d28ae63ac34.asciidoc
new file mode 100644
index 000000000..907093605
--- /dev/null
+++ b/docs/doc_examples/ee223e604bb695cad2517d28ae63ac34.asciidoc
@@ -0,0 +1,35 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "example-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ term: {
+ text: "shoes",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "vector",
+ query_vector: [1.25, 2, 3.5],
+ k: 50,
+ num_candidates: 100,
+ },
+ },
+ ],
+ rank_window_size: 50,
+ rank_constant: 20,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee2d97090d617ed8aa2a87ea33556dd7.asciidoc b/docs/doc_examples/ee2d97090d617ed8aa2a87ea33556dd7.asciidoc
new file mode 100644
index 000000000..6b15589c5
--- /dev/null
+++ b/docs/doc_examples/ee2d97090d617ed8aa2a87ea33556dd7.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "whitespace",
+ filter: ["truncate"],
+ text: "the quinquennial extravaganza carried on",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee577c4c7cc723e99569ea2d1137adba.asciidoc b/docs/doc_examples/ee577c4c7cc723e99569ea2d1137adba.asciidoc
new file mode 100644
index 000000000..f643646c4
--- /dev/null
+++ b/docs/doc_examples/ee577c4c7cc723e99569ea2d1137adba.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedRoles({
+ name: "my_admin_role",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee634d59def6302134d24fa90e18b609.asciidoc b/docs/doc_examples/ee634d59def6302134d24fa90e18b609.asciidoc
new file mode 100644
index 000000000..7c7070cf7
--- /dev/null
+++ b/docs/doc_examples/ee634d59def6302134d24fa90e18b609.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.putAutoscalingPolicy({
+ name: "my_autoscaling_policy",
+ policy: {
+ roles: ["ml"],
+ deciders: {
+ ml: {
+ num_anomaly_jobs_in_queue: 5,
+ num_analytics_jobs_in_queue: 3,
+ down_scale_delay: "30m",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ee90d1fb22b59d30da339d825303b912.asciidoc b/docs/doc_examples/ee90d1fb22b59d30da339d825303b912.asciidoc
new file mode 100644
index 000000000..40f37b043
--- /dev/null
+++ b/docs/doc_examples/ee90d1fb22b59d30da339d825303b912.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putPrivileges({
+ privileges: {
+ app01: {
+ read: {
+ actions: ["action:login", "data:read/*"],
+ },
+ write: {
+ actions: ["action:login", "data:write/*"],
+ },
+ },
+ app02: {
+ all: {
+ actions: ["*"],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eeb35b759bd239bb773c8ebd5fe63d05.asciidoc b/docs/doc_examples/eeb35b759bd239bb773c8ebd5fe63d05.asciidoc
new file mode 100644
index 000000000..429756a85
--- /dev/null
+++ b/docs/doc_examples/eeb35b759bd239bb773c8ebd5fe63d05.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "museums",
+ size: 0,
+ aggs: {
+ cities: {
+ terms: {
+ field: "city.keyword",
+ },
+ aggs: {
+ centroid: {
+ geo_centroid: {
+ field: "location",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eec051555c8050d017d3fe38ea59e3a0.asciidoc b/docs/doc_examples/eec051555c8050d017d3fe38ea59e3a0.asciidoc
new file mode 100644
index 000000000..e6563395a
--- /dev/null
+++ b/docs/doc_examples/eec051555c8050d017d3fe38ea59e3a0.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ from: 40,
+ size: 20,
+ query: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eed37703cfe8fec093ed5a42210a6ffd.asciidoc b/docs/doc_examples/eed37703cfe8fec093ed5a42210a6ffd.asciidoc
new file mode 100644
index 000000000..4ca308a64
--- /dev/null
+++ b/docs/doc_examples/eed37703cfe8fec093ed5a42210a6ffd.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.putJob({
+ id: "sensor",
+ index_pattern: "sensor-*",
+ rollup_index: "sensor_rollup",
+ cron: "*/30 * * * * ?",
+ page_size: 1000,
+ groups: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "60m",
+ },
+ terms: {
+ fields: ["node"],
+ },
+ },
+ metrics: [
+ {
+ field: "temperature",
+ metrics: ["min", "max", "sum"],
+ },
+ {
+ field: "voltage",
+ metrics: ["avg"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc b/docs/doc_examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc
new file mode 100644
index 000000000..d414b928c
--- /dev/null
+++ b/docs/doc_examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "text_embedding",
+ inference_id: "hugging-face-embeddings",
+ inference_config: {
+ service: "hugging_face",
+ service_settings: {
+ api_key: "",
+ url: "",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eef9deff7f9799d1f7657bb7e2afb7f1.asciidoc b/docs/doc_examples/eef9deff7f9799d1f7657bb7e2afb7f1.asciidoc
new file mode 100644
index 000000000..535a66e39
--- /dev/null
+++ b/docs/doc_examples/eef9deff7f9799d1f7657bb7e2afb7f1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "*",
+ expand_wildcards: "all",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef10e8d07d9fae945e035d5dee1e9754.asciidoc b/docs/doc_examples/ef10e8d07d9fae945e035d5dee1e9754.asciidoc
new file mode 100644
index 000000000..ebdd4ee45
--- /dev/null
+++ b/docs/doc_examples/ef10e8d07d9fae945e035d5dee1e9754.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "synonym_graph",
+ synonyms: ["dns, domain name system"],
+ },
+ "flatten_graph",
+ ],
+ text: "domain name system is fragile",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc b/docs/doc_examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc
new file mode 100644
index 000000000..5e496f0cf
--- /dev/null
+++ b/docs/doc_examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ max_docs: 1,
+ source: {
+ index: "my-index-000001",
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef33b3b373f7040b874146599db5d557.asciidoc b/docs/doc_examples/ef33b3b373f7040b874146599db5d557.asciidoc
new file mode 100644
index 000000000..cce76bc0b
--- /dev/null
+++ b/docs/doc_examples/ef33b3b373f7040b874146599db5d557.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ filter: ["lowercase"],
+ text: "this is a test",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef3666b5d288faefbcbc4a25e8f506da.asciidoc b/docs/doc_examples/ef3666b5d288faefbcbc4a25e8f506da.asciidoc
new file mode 100644
index 000000000..39568eb32
--- /dev/null
+++ b/docs/doc_examples/ef3666b5d288faefbcbc4a25e8f506da.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.count({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef46c42d473b2acc151a6a41272e0f14.asciidoc b/docs/doc_examples/ef46c42d473b2acc151a6a41272e0f14.asciidoc
new file mode 100644
index 000000000..5fbb3c8b7
--- /dev/null
+++ b/docs/doc_examples/ef46c42d473b2acc151a6a41272e0f14.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic: "runtime",
+ runtime: {
+ day_of_week: {
+ type: "keyword",
+ script: {
+ source:
+ "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
+ },
+ },
+ },
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef643bab44e7de6ddddde23a2eece5c7.asciidoc b/docs/doc_examples/ef643bab44e7de6ddddde23a2eece5c7.asciidoc
new file mode 100644
index 000000000..3f692157d
--- /dev/null
+++ b/docs/doc_examples/ef643bab44e7de6ddddde23a2eece5c7.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "books",
+ document: {
+ name: "The Great Gatsby",
+ author: "F. Scott Fitzgerald",
+ release_date: "1925-04-10",
+ page_count: 180,
+ language: "EN",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc b/docs/doc_examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc
new file mode 100644
index 000000000..7578ffc46
--- /dev/null
+++ b/docs/doc_examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ runtime_mappings: {
+ "date.promoted_is_tomorrow": {
+ type: "date",
+ script:
+ "\n long date = doc['date'].value.toInstant().toEpochMilli();\n if (doc['promoted'].value) {\n date += 86400;\n }\n emit(date);\n ",
+ },
+ },
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date.promoted_is_tomorrow",
+ calendar_interval: "1M",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef867e563cbffe7866769a096b5d7a92.asciidoc b/docs/doc_examples/ef867e563cbffe7866769a096b5d7a92.asciidoc
new file mode 100644
index 000000000..5f0cb29b7
--- /dev/null
+++ b/docs/doc_examples/ef867e563cbffe7866769a096b5d7a92.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_per_month: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "month",
+ },
+ aggs: {
+ sales: {
+ sum: {
+ field: "price",
+ },
+ },
+ cumulative_sales: {
+ cumulative_sum: {
+ buckets_path: "sales",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef8f30e85e12e9a5a8817d28977598e4.asciidoc b/docs/doc_examples/ef8f30e85e12e9a5a8817d28977598e4.asciidoc
new file mode 100644
index 000000000..5971b624b
--- /dev/null
+++ b/docs/doc_examples/ef8f30e85e12e9a5a8817d28977598e4.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ aggs: {
+ price_ranges: {
+ range: {
+ field: "price",
+ ranges: [
+ {
+ to: 100,
+ },
+ {
+ from: 100,
+ to: 200,
+ },
+ {
+ from: 200,
+ },
+ ],
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ef9c29759459904fef162acd223462c4.asciidoc b/docs/doc_examples/ef9c29759459904fef162acd223462c4.asciidoc
new file mode 100644
index 000000000..674ca8a30
--- /dev/null
+++ b/docs/doc_examples/ef9c29759459904fef162acd223462c4.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "ingest",
+ filter_path: "nodes.*.ingest",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/efa146bf81a9351ba42b92a6decbcfee.asciidoc b/docs/doc_examples/efa146bf81a9351ba42b92a6decbcfee.asciidoc
new file mode 100644
index 000000000..78f36d9c1
--- /dev/null
+++ b/docs/doc_examples/efa146bf81a9351ba42b92a6decbcfee.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-index",
+ runtime: {
+ "http.response": {
+ type: "long",
+ script:
+ '\n String response=dissect(\'%{clientip} %{ident} %{auth} [%{@timestamp}] "%{verb} %{request} HTTP/%{httpversion}" %{response} %{size}\').extract(doc["message"].value)?.response;\n if (response != null) emit(Integer.parseInt(response));\n ',
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/efa924638043f3a6b23ccb824d757eba.asciidoc b/docs/doc_examples/efa924638043f3a6b23ccb824d757eba.asciidoc
new file mode 100644
index 000000000..70c4d55ae
--- /dev/null
+++ b/docs/doc_examples/efa924638043f3a6b23ccb824d757eba.asciidoc
@@ -0,0 +1,32 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "mv",
+ refresh: "true",
+ operations: [
+ {
+ index: {},
+ },
+ {
+ a: 1,
+ b: [2, 1],
+ },
+ {
+ index: {},
+ },
+ {
+ a: 2,
+ b: 3,
+ },
+ ],
+});
+console.log(response);
+
+const response1 = await client.esql.query({
+ query: "FROM mv | LIMIT 2",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/efbd4936cca1a752493d8fa2ba6ad1a3.asciidoc b/docs/doc_examples/efbd4936cca1a752493d8fa2ba6ad1a3.asciidoc
new file mode 100644
index 000000000..0dca28ff5
--- /dev/null
+++ b/docs/doc_examples/efbd4936cca1a752493d8fa2ba6ad1a3.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ runtime: {
+ day_of_week: {
+ type: "keyword",
+ script: {
+ source:
+ "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
+ },
+ },
+ },
+ properties: {
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc b/docs/doc_examples/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc
new file mode 100644
index 000000000..8ea87e2e1
--- /dev/null
+++ b/docs/doc_examples/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ query: {
+ match_all: {},
+ },
+ boost: "5",
+ random_score: {},
+ boost_mode: "multiply",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/eff8ecaed1ed084909c64450fc363a20.asciidoc b/docs/doc_examples/eff8ecaed1ed084909c64450fc363a20.asciidoc
new file mode 100644
index 000000000..e612615ea
--- /dev/null
+++ b/docs/doc_examples/eff8ecaed1ed084909c64450fc363a20.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ transient: {
+ "indices.recovery.max_bytes_per_sec": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f03352bb1129938a89f97e4b650038dd.asciidoc b/docs/doc_examples/f03352bb1129938a89f97e4b650038dd.asciidoc
new file mode 100644
index 000000000..f39a62d6f
--- /dev/null
+++ b/docs/doc_examples/f03352bb1129938a89f97e4b650038dd.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "amazon_bedrock_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "amazon_bedrock_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f04e1284d09ceb4443d67b2ef9c7f476.asciidoc b/docs/doc_examples/f04e1284d09ceb4443d67b2ef9c7f476.asciidoc
new file mode 100644
index 000000000..983f0e8c1
--- /dev/null
+++ b/docs/doc_examples/f04e1284d09ceb4443d67b2ef9c7f476.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.delete({
+ repository: "my_repository",
+ snapshot: "my_snapshot",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f0816beb8ac21cb0940858b72f6b1946.asciidoc b/docs/doc_examples/f0816beb8ac21cb0940858b72f6b1946.asciidoc
new file mode 100644
index 000000000..1ae0987ba
--- /dev/null
+++ b/docs/doc_examples/f0816beb8ac21cb0940858b72f6b1946.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.fielddata({
+ fields: "body,soul",
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc b/docs/doc_examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc
new file mode 100644
index 000000000..af615dc9b
--- /dev/null
+++ b/docs/doc_examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "swedish_example",
+ settings: {
+ analysis: {
+ filter: {
+ swedish_stop: {
+ type: "stop",
+ stopwords: "_swedish_",
+ },
+ swedish_keywords: {
+ type: "keyword_marker",
+ keywords: ["exempel"],
+ },
+ swedish_stemmer: {
+ type: "stemmer",
+ language: "swedish",
+ },
+ },
+ analyzer: {
+ rebuilt_swedish: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "swedish_stop",
+ "swedish_keywords",
+ "swedish_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f09817fd13ff3dce52eb79d0722409c3.asciidoc b/docs/doc_examples/f09817fd13ff3dce52eb79d0722409c3.asciidoc
new file mode 100644
index 000000000..d844fc1ee
--- /dev/null
+++ b/docs/doc_examples/f09817fd13ff3dce52eb79d0722409c3.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "new_index",
+ mappings: {
+ properties: {
+ query: {
+ type: "percolator",
+ },
+ body: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.reindex({
+ refresh: "true",
+ source: {
+ index: "index",
+ },
+ dest: {
+ index: "new_index",
+ },
+});
+console.log(response1);
+
+const response2 = await client.indices.updateAliases({
+ actions: [
+ {
+ remove: {
+ index: "index",
+ alias: "queries",
+ },
+ },
+ {
+ add: {
+ index: "new_index",
+ alias: "queries",
+ },
+ },
+ ],
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc b/docs/doc_examples/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc
new file mode 100644
index 000000000..14f0cc66e
--- /dev/null
+++ b/docs/doc_examples/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "latency",
+ size: 0,
+ runtime_mappings: {
+ "load_time.seconds": {
+ type: "long",
+ script: {
+ source: "emit(doc['load_time'].value / params.timeUnit)",
+ params: {
+ timeUnit: 1000,
+ },
+ },
+ },
+ },
+ aggs: {
+ load_time_boxplot: {
+ boxplot: {
+ field: "load_time.seconds",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f0c3235d8fce641d6ff8ce90ab7b7b8b.asciidoc b/docs/doc_examples/f0c3235d8fce641d6ff8ce90ab7b7b8b.asciidoc
new file mode 100644
index 000000000..abc598b1e
--- /dev/null
+++ b/docs/doc_examples/f0c3235d8fce641d6ff8ce90ab7b7b8b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mtermvectors({
+ index: "my-index-000001",
+ ids: ["1", "2"],
+ parameters: {
+ fields: ["message"],
+ term_statistics: true,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f10ab582387b2c157917a60205c993f7.asciidoc b/docs/doc_examples/f10ab582387b2c157917a60205c993f7.asciidoc
new file mode 100644
index 000000000..26a38e4e8
--- /dev/null
+++ b/docs/doc_examples/f10ab582387b2c157917a60205c993f7.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ latency: {
+ type: "long",
+ meta: {
+ unit: "ms",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f128a9dff5051b47efe2c53c4454a68f.asciidoc b/docs/doc_examples/f128a9dff5051b47efe2c53c4454a68f.asciidoc
new file mode 100644
index 000000000..c0c85c658
--- /dev/null
+++ b/docs/doc_examples/f128a9dff5051b47efe2c53c4454a68f.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.rollover({
+ alias: "my-data-stream",
+ conditions: {
+ max_age: "7d",
+ max_docs: 1000,
+ max_primary_shard_size: "50gb",
+ max_primary_shard_docs: "2000",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f14d0e4a280fee540e8e5f0fc4d0e9f1.asciidoc b/docs/doc_examples/f14d0e4a280fee540e8e5f0fc4d0e9f1.asciidoc
new file mode 100644
index 000000000..71dd1a095
--- /dev/null
+++ b/docs/doc_examples/f14d0e4a280fee540e8e5f0fc4d0e9f1.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ size: 0,
+ aggs: {
+ grouped: {
+ geotile_grid: {
+ field: "location",
+ precision: 6,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1508a2221152842894819e762e63491.asciidoc b/docs/doc_examples/f1508a2221152842894819e762e63491.asciidoc
new file mode 100644
index 000000000..61e99fb3d
--- /dev/null
+++ b/docs/doc_examples/f1508a2221152842894819e762e63491.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ keep_on_completion: true,
+ wait_for_completion_timeout: "2s",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f160561efab38e40c2feebf5a2542ab5.asciidoc b/docs/doc_examples/f160561efab38e40c2feebf5a2542ab5.asciidoc
new file mode 100644
index 000000000..313a79df9
--- /dev/null
+++ b/docs/doc_examples/f160561efab38e40c2feebf5a2542ab5.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.nodes.stats({
+ metric: "ingest",
+ filter_path: "nodes.*.ingest.pipelines",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f18248c181690b81d090275b072f0070.asciidoc b/docs/doc_examples/f18248c181690b81d090275b072f0070.asciidoc
new file mode 100644
index 000000000..7753354ba
--- /dev/null
+++ b/docs/doc_examples/f18248c181690b81d090275b072f0070.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ keep_alive: "2d",
+ wait_for_completion_timeout: "2s",
+ query: '\n process where process.name == "cmd.exe"\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f187ac2dc35425cb0ef48f328cc7e435.asciidoc b/docs/doc_examples/f187ac2dc35425cb0ef48f328cc7e435.asciidoc
new file mode 100644
index 000000000..0498b4759
--- /dev/null
+++ b/docs/doc_examples/f187ac2dc35425cb0ef48f328cc7e435.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putUser({
+ username: "cross-search-user",
+ password: "l0ng-r4nd0m-p@ssw0rd",
+ roles: ["remote-search"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc b/docs/doc_examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc
new file mode 100644
index 000000000..023d009ab
--- /dev/null
+++ b/docs/doc_examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.inference({
+ task_type: "rerank",
+ inference_id: "cohere_rerank",
+ input: ["luke", "like", "leia", "chewy", "r2d2", "star", "wars"],
+ query: "star wars main character",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc b/docs/doc_examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc
new file mode 100644
index 000000000..78223bc2b
--- /dev/null
+++ b/docs/doc_examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-byte-quantized-index",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 64,
+ index: true,
+ index_options: {
+ type: "bbq_hnsw",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1bf3edbd9e6c7e01b00c74c99a58b61.asciidoc b/docs/doc_examples/f1bf3edbd9e6c7e01b00c74c99a58b61.asciidoc
new file mode 100644
index 000000000..9a4eac016
--- /dev/null
+++ b/docs/doc_examples/f1bf3edbd9e6c7e01b00c74c99a58b61.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ cluster_one: {
+ seeds: ["127.0.0.1:9300"],
+ },
+ cluster_two: {
+ seeds: ["127.0.0.1:9301"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1d2b8169160adfd27f32988113f0f9f.asciidoc b/docs/doc_examples/f1d2b8169160adfd27f32988113f0f9f.asciidoc
new file mode 100644
index 000000000..c51090492
--- /dev/null
+++ b/docs/doc_examples/f1d2b8169160adfd27f32988113f0f9f.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_analyzer: {
+ tokenizer: "keyword",
+ filter: ["word_delimiter"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1dc6f69453867ffafe86e998dd464d9.asciidoc b/docs/doc_examples/f1dc6f69453867ffafe86e998dd464d9.asciidoc
new file mode 100644
index 000000000..5ce51ecf1
--- /dev/null
+++ b/docs/doc_examples/f1dc6f69453867ffafe86e998dd464d9.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "file-path-test",
+ query: {
+ term: {
+ "file_path.tree_reversed": {
+ value: "my_photo1.jpg",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f1e2af6dbb30fc5335e7d0b5507a2a93.asciidoc b/docs/doc_examples/f1e2af6dbb30fc5335e7d0b5507a2a93.asciidoc
new file mode 100644
index 000000000..ebf51b9ca
--- /dev/null
+++ b/docs/doc_examples/f1e2af6dbb30fc5335e7d0b5507a2a93.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.resetJob({
+ job_id: "total-requests",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2175feadc2abe545899889e6d4ffcad.asciidoc b/docs/doc_examples/f2175feadc2abe545899889e6d4ffcad.asciidoc
new file mode 100644
index 000000000..c8e0b3205
--- /dev/null
+++ b/docs/doc_examples/f2175feadc2abe545899889e6d4ffcad.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.getLifecycle({
+ policy_id: "daily-snapshots",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f235544a883fd04bed2dc369b0c450f3.asciidoc b/docs/doc_examples/f235544a883fd04bed2dc369b0c450f3.asciidoc
new file mode 100644
index 000000000..11b7ad26f
--- /dev/null
+++ b/docs/doc_examples/f235544a883fd04bed2dc369b0c450f3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "txt",
+ query: "SELECT * FROM library",
+ filter: {
+ terms: {
+ _routing: ["abc"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2359acfb6eaa919125463cc1d3a7cd1.asciidoc b/docs/doc_examples/f2359acfb6eaa919125463cc1d3a7cd1.asciidoc
new file mode 100644
index 000000000..48dedaf2a
--- /dev/null
+++ b/docs/doc_examples/f2359acfb6eaa919125463cc1d3a7cd1.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "admins",
+ roles: ["monitoring", "user"],
+ rules: {
+ field: {
+ groups: "cn=admins,dc=example,dc=com",
+ },
+ },
+ enabled: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f268416813befd13c604642c6fe6eda9.asciidoc b/docs/doc_examples/f268416813befd13c604642c6fe6eda9.asciidoc
new file mode 100644
index 000000000..45015b079
--- /dev/null
+++ b/docs/doc_examples/f268416813befd13c604642c6fe6eda9.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "custom_lowercase_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ greek_lowercase_example: {
+ type: "custom",
+ tokenizer: "standard",
+ filter: ["greek_lowercase"],
+ },
+ },
+ filter: {
+ greek_lowercase: {
+ type: "lowercase",
+ language: "greek",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f27c28ddbf4c266b5f42d14da837b8de.asciidoc b/docs/doc_examples/f27c28ddbf4c266b5f42d14da837b8de.asciidoc
new file mode 100644
index 000000000..fc520e33d
--- /dev/null
+++ b/docs/doc_examples/f27c28ddbf4c266b5f42d14da837b8de.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.flush();
+console.log(response);
+----
diff --git a/docs/doc_examples/f281ff50b2cdb67ac0ece93f1594fa95.asciidoc b/docs/doc_examples/f281ff50b2cdb67ac0ece93f1594fa95.asciidoc
new file mode 100644
index 000000000..d280260a8
--- /dev/null
+++ b/docs/doc_examples/f281ff50b2cdb67ac0ece93f1594fa95.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "example_points",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_shape: {
+ location: {
+ shape: {
+ type: "envelope",
+ coordinates: [
+ [13, 53],
+ [14, 52],
+ ],
+ },
+ relation: "intersects",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc b/docs/doc_examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc
new file mode 100644
index 000000000..4f46cf2e9
--- /dev/null
+++ b/docs/doc_examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.pendingTasks({
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc b/docs/doc_examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc
new file mode 100644
index 000000000..29b095fb2
--- /dev/null
+++ b/docs/doc_examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ title: "Search",
+ },
+ },
+ {
+ match: {
+ content: "Elasticsearch",
+ },
+ },
+ ],
+ filter: [
+ {
+ term: {
+ status: "published",
+ },
+ },
+ {
+ range: {
+ publish_date: {
+ gte: "2015-01-01",
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f29b2674299ddf51a25ed87619025ede.asciidoc b/docs/doc_examples/f29b2674299ddf51a25ed87619025ede.asciidoc
new file mode 100644
index 000000000..3400481d1
--- /dev/null
+++ b/docs/doc_examples/f29b2674299ddf51a25ed87619025ede.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.rollupSearch({
+ index: "sensor_rollup",
+ size: 0,
+ aggregations: {
+ max_temperature: {
+ max: {
+ field: "temperature",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc b/docs/doc_examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc
new file mode 100644
index 000000000..ab808a3c4
--- /dev/null
+++ b/docs/doc_examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.get({
+ connector_id: "my-connector",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2b2d62bc0a44940ad14fca57d6d008a.asciidoc b/docs/doc_examples/f2b2d62bc0a44940ad14fca57d6d008a.asciidoc
new file mode 100644
index 000000000..b318357eb
--- /dev/null
+++ b/docs/doc_examples/f2b2d62bc0a44940ad14fca57d6d008a.asciidoc
@@ -0,0 +1,106 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transform.putTransform({
+ transform_id: "suspicious_client_ips",
+ source: {
+ index: "kibana_sample_data_logs",
+ },
+ dest: {
+ index: "sample_weblogs_by_clientip",
+ },
+ sync: {
+ time: {
+ field: "timestamp",
+ delay: "60s",
+ },
+ },
+ pivot: {
+ group_by: {
+ clientip: {
+ terms: {
+ field: "clientip",
+ },
+ },
+ },
+ aggregations: {
+ url_dc: {
+ cardinality: {
+ field: "url.keyword",
+ },
+ },
+ bytes_sum: {
+ sum: {
+ field: "bytes",
+ },
+ },
+ "geo.src_dc": {
+ cardinality: {
+ field: "geo.src",
+ },
+ },
+ agent_dc: {
+ cardinality: {
+ field: "agent.keyword",
+ },
+ },
+ "geo.dest_dc": {
+ cardinality: {
+ field: "geo.dest",
+ },
+ },
+ "responses.total": {
+ value_count: {
+ field: "timestamp",
+ },
+ },
+ success: {
+ filter: {
+ term: {
+ response: "200",
+ },
+ },
+ },
+ error404: {
+ filter: {
+ term: {
+ response: "404",
+ },
+ },
+ },
+ error5xx: {
+ filter: {
+ range: {
+ response: {
+ gte: 500,
+ lt: 600,
+ },
+ },
+ },
+ },
+ "timestamp.min": {
+ min: {
+ field: "timestamp",
+ },
+ },
+ "timestamp.max": {
+ max: {
+ field: "timestamp",
+ },
+ },
+ "timestamp.duration_ms": {
+ bucket_script: {
+ buckets_path: {
+ min_time: "timestamp.min.value",
+ max_time: "timestamp.max.value",
+ },
+ script: "(params.max_time - params.min_time)",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2c9afd052878b2ec00908739b0d0f74.asciidoc b/docs/doc_examples/f2c9afd052878b2ec00908739b0d0f74.asciidoc
new file mode 100644
index 000000000..1aa9b2a81
--- /dev/null
+++ b/docs/doc_examples/f2c9afd052878b2ec00908739b0d0f74.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ rename: {
+ description: "Rename 'provider' to 'cloud.provider'",
+ field: "provider",
+ target_field: "cloud.provider",
+ on_failure: [
+ {
+ set: {
+ description: "Set 'error.message'",
+ field: "error.message",
+ value:
+ "Field 'provider' does not exist. Cannot rename to 'cloud.provider'",
+ override: false,
+ on_failure: [
+ {
+ set: {
+ description: "Set 'error.message.multi'",
+ field: "error.message.multi",
+ value: "Document encountered multiple ingest errors",
+ override: true,
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2e854b6c99659ccc1824e86c096e433.asciidoc b/docs/doc_examples/f2e854b6c99659ccc1824e86c096e433.asciidoc
new file mode 100644
index 000000000..b5bc56dfb
--- /dev/null
+++ b/docs/doc_examples/f2e854b6c99659ccc1824e86c096e433.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.resumeAutoFollowPattern({
+ name: "my_auto_follow_pattern",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2ec53c0ef5025de8890d0ff8ec287a0.asciidoc b/docs/doc_examples/f2ec53c0ef5025de8890d0ff8ec287a0.asciidoc
new file mode 100644
index 000000000..3571da97b
--- /dev/null
+++ b/docs/doc_examples/f2ec53c0ef5025de8890d0ff8ec287a0.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rankEval({
+ index: "my-index-000001",
+ requests: [
+ {
+ id: "JFK query",
+ request: {
+ query: {
+ match_all: {},
+ },
+ },
+ ratings: [],
+ },
+ ],
+ metric: {
+ mean_reciprocal_rank: {
+ k: 20,
+ relevant_rating_threshold: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f2f1cae094855a45fd8f73478bec8e70.asciidoc b/docs/doc_examples/f2f1cae094855a45fd8f73478bec8e70.asciidoc
new file mode 100644
index 000000000..838a4da46
--- /dev/null
+++ b/docs/doc_examples/f2f1cae094855a45fd8f73478bec8e70.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.split({
+ index: "my_source_index",
+ target: "my_target_index",
+ settings: {
+ "index.number_of_shards": 5,
+ },
+ aliases: {
+ my_search_indices: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc b/docs/doc_examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc
new file mode 100644
index 000000000..8e0dd2359
--- /dev/null
+++ b/docs/doc_examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "POST",
+ path: "/_connector/_sync_job",
+ body: {
+ id: "my-connector-id",
+ job_type: "full",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f329242d7c8406297eff9bf609870c37.asciidoc b/docs/doc_examples/f329242d7c8406297eff9bf609870c37.asciidoc
new file mode 100644
index 000000000..875cd32a3
--- /dev/null
+++ b/docs/doc_examples/f329242d7c8406297eff9bf609870c37.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "music",
+ pretty: "true",
+ suggest: {
+ "song-suggest": {
+ prefix: "nor",
+ completion: {
+ field: "suggest",
+ fuzzy: {
+ fuzziness: 2,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc b/docs/doc_examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc
new file mode 100644
index 000000000..bffd0b207
--- /dev/null
+++ b/docs/doc_examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ query_string: {
+ default_field: "title",
+ query: "ny city",
+ auto_generate_synonyms_phrase_query: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f342465c65ba76383dedbb334b57b616.asciidoc b/docs/doc_examples/f342465c65ba76383dedbb334b57b616.asciidoc
new file mode 100644
index 000000000..4a8ae5885
--- /dev/null
+++ b/docs/doc_examples/f342465c65ba76383dedbb334b57b616.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ index_options: "offsets",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ text: "Quick brown fox",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ text: "brown fox",
+ },
+ },
+ highlight: {
+ fields: {
+ text: {},
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/f34c02351662481dd61a5c2a3e206c60.asciidoc b/docs/doc_examples/f34c02351662481dd61a5c2a3e206c60.asciidoc
new file mode 100644
index 000000000..ace60f481
--- /dev/null
+++ b/docs/doc_examples/f34c02351662481dd61a5c2a3e206c60.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: [
+ {
+ type: "hyphenation_decompounder",
+ hyphenation_patterns_path: "analysis/hyphenation_patterns.xml",
+ word_list: ["Kaffee", "zucker", "tasse"],
+ },
+ ],
+ text: "Kaffeetasse",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc b/docs/doc_examples/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc
new file mode 100644
index 000000000..f78c80064
--- /dev/null
+++ b/docs/doc_examples/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.shrink({
+ index: "my_source_index",
+ target: "my_target_index",
+ settings: {
+ "index.routing.allocation.require._name": null,
+ "index.blocks.write": null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3697682a886ab129530f3e5c1b30632.asciidoc b/docs/doc_examples/f3697682a886ab129530f3e5c1b30632.asciidoc
new file mode 100644
index 000000000..dfdaa28a7
--- /dev/null
+++ b/docs/doc_examples/f3697682a886ab129530f3e5c1b30632.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termvectors({
+ index: "my-index-000001",
+ id: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc b/docs/doc_examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc
new file mode 100644
index 000000000..d63f990e3
--- /dev/null
+++ b/docs/doc_examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.get({
+ index: "my-new-index-000001",
+ id: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f388e571224dd6850f8c9f9f08fca3da.asciidoc b/docs/doc_examples/f388e571224dd6850f8c9f9f08fca3da.asciidoc
new file mode 100644
index 000000000..ce1095fd2
--- /dev/null
+++ b/docs/doc_examples/f388e571224dd6850f8c9f9f08fca3da.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.invalidateApiKey({
+ name: "my-api-key",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3942d9b34138dfca79dff707af270b7.asciidoc b/docs/doc_examples/f3942d9b34138dfca79dff707af270b7.asciidoc
new file mode 100644
index 000000000..02d7258d2
--- /dev/null
+++ b/docs/doc_examples/f3942d9b34138dfca79dff707af270b7.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-data-stream",
+ timestamp_field: "file.accessed",
+ event_category_field: "file.type",
+ query: '\n file where (file.size > 1 and file.type == "file")\n ',
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc b/docs/doc_examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc
new file mode 100644
index 000000000..ee8421977
--- /dev/null
+++ b/docs/doc_examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.rollupSearch({
+ index: "sensor_rollup",
+ size: 0,
+ aggregations: {
+ timeline: {
+ date_histogram: {
+ field: "timestamp",
+ fixed_interval: "7d",
+ },
+ aggs: {
+ nodes: {
+ terms: {
+ field: "node",
+ },
+ aggs: {
+ max_temperature: {
+ max: {
+ field: "temperature",
+ },
+ },
+ avg_voltage: {
+ avg: {
+ field: "voltage",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3ab820e1f2f54ea718017aeae865742.asciidoc b/docs/doc_examples/f3ab820e1f2f54ea718017aeae865742.asciidoc
new file mode 100644
index 000000000..4e1adad3d
--- /dev/null
+++ b/docs/doc_examples/f3ab820e1f2f54ea718017aeae865742.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "oidc-finance",
+ roles: ["finance_data"],
+ enabled: true,
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "oidc1",
+ },
+ },
+ {
+ field: {
+ groups: "finance-team",
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3b185131f40687c25d2f85e1231d8bd.asciidoc b/docs/doc_examples/f3b185131f40687c25d2f85e1231d8bd.asciidoc
new file mode 100644
index 000000000..8db77c5b0
--- /dev/null
+++ b/docs/doc_examples/f3b185131f40687c25d2f85e1231d8bd.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.validateQuery({
+ index: "my-index-000001",
+ q: "user.id:kimchy",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3b4ddce8ff21fc1a76a7c0d9c36650e.asciidoc b/docs/doc_examples/f3b4ddce8ff21fc1a76a7c0d9c36650e.asciidoc
new file mode 100644
index 000000000..5a7ab8f36
--- /dev/null
+++ b/docs/doc_examples/f3b4ddce8ff21fc1a76a7c0d9c36650e.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ shrink: {
+ number_of_shards: 1,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3c696cd63a3f042e62cbb94b75c2427.asciidoc b/docs/doc_examples/f3c696cd63a3f042e62cbb94b75c2427.asciidoc
new file mode 100644
index 000000000..a6e06c5e2
--- /dev/null
+++ b/docs/doc_examples/f3c696cd63a3f042e62cbb94b75c2427.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.getSettings({
+ flat_settings: "true",
+ filter_path: "persistent.archived*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3e1dfe1c440e3590be26f265e19425d.asciidoc b/docs/doc_examples/f3e1dfe1c440e3590be26f265e19425d.asciidoc
new file mode 100644
index 000000000..e9b09015b
--- /dev/null
+++ b/docs/doc_examples/f3e1dfe1c440e3590be26f265e19425d.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "published",
+ },
+ },
+ },
+ },
+ script: {
+ source: "1 / (1 + l2norm(params.queryVector, 'my_dense_vector'))",
+ params: {
+ queryVector: [4, 3.4, -0.2],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3fb3cba44988b6e9fee93316138b2cf.asciidoc b/docs/doc_examples/f3fb3cba44988b6e9fee93316138b2cf.asciidoc
new file mode 100644
index 000000000..5369161be
--- /dev/null
+++ b/docs/doc_examples/f3fb3cba44988b6e9fee93316138b2cf.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedPrivileges({
+ application: "myapp,my-other-app",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3fb52680482925c202c2e2f8af6f044.asciidoc b/docs/doc_examples/f3fb52680482925c202c2e2f8af6f044.asciidoc
new file mode 100644
index 000000000..814d8e865
--- /dev/null
+++ b/docs/doc_examples/f3fb52680482925c202c2e2f8af6f044.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.count({
+ index: "my-index-000001",
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f3fe2012557ebbce1ebad4fc997c092d.asciidoc b/docs/doc_examples/f3fe2012557ebbce1ebad4fc997c092d.asciidoc
new file mode 100644
index 000000000..4a3c06e4e
--- /dev/null
+++ b/docs/doc_examples/f3fe2012557ebbce1ebad4fc997c092d.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.createRepository({
+ name: "my_fs_backup",
+ repository: {
+ type: "fs",
+ settings: {
+ location: "my_fs_backup_location",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f43d551aaaad73d979adf1b86533e6a3.asciidoc b/docs/doc_examples/f43d551aaaad73d979adf1b86533e6a3.asciidoc
new file mode 100644
index 000000000..b1a46928e
--- /dev/null
+++ b/docs/doc_examples/f43d551aaaad73d979adf1b86533e6a3.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date",
+ fixed_interval: "2w",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f43ec4041e3b72bbde063452990bfc4b.asciidoc b/docs/doc_examples/f43ec4041e3b72bbde063452990bfc4b.asciidoc
new file mode 100644
index 000000000..5d7b46190
--- /dev/null
+++ b/docs/doc_examples/f43ec4041e3b72bbde063452990bfc4b.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.clearCache({
+ index: "my-index-000001,my-index-000002",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f44d287c6937785eb09b91353c1deb1e.asciidoc b/docs/doc_examples/f44d287c6937785eb09b91353c1deb1e.asciidoc
new file mode 100644
index 000000000..8e6ddc8cb
--- /dev/null
+++ b/docs/doc_examples/f44d287c6937785eb09b91353c1deb1e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getDatafeedStats({
+ datafeed_id: "datafeed-high_sum_total_sales",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f453e14bcf30853e57618bf12f83e148.asciidoc b/docs/doc_examples/f453e14bcf30853e57618bf12f83e148.asciidoc
new file mode 100644
index 000000000..afa69bc17
--- /dev/null
+++ b/docs/doc_examples/f453e14bcf30853e57618bf12f83e148.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "pattern_example",
+ settings: {
+ analysis: {
+ tokenizer: {
+ split_on_non_word: {
+ type: "pattern",
+ pattern: "\\W+",
+ },
+ },
+ analyzer: {
+ rebuilt_pattern: {
+ tokenizer: "split_on_non_word",
+ filter: ["lowercase"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc b/docs/doc_examples/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc
new file mode 100644
index 000000000..5c0f37868
--- /dev/null
+++ b/docs/doc_examples/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc
@@ -0,0 +1,49 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ message: "some arrays in this document...",
+ tags: ["elasticsearch", "wow"],
+ lists: [
+ {
+ name: "prog_list",
+ description: "programming list",
+ },
+ {
+ name: "cool_list",
+ description: "cool stuff list",
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 2,
+ document: {
+ message: "no arrays in this document...",
+ tags: "elasticsearch",
+ lists: {
+ name: "prog_list",
+ description: "programming list",
+ },
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "my-index-000001",
+ query: {
+ match: {
+ tags: "elasticsearch",
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/f45990264f8755b96b11c69c12c90ff4.asciidoc b/docs/doc_examples/f45990264f8755b96b11c69c12c90ff4.asciidoc
new file mode 100644
index 000000000..0852c2e70
--- /dev/null
+++ b/docs/doc_examples/f45990264f8755b96b11c69c12c90ff4.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.exists({
+ index: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f495f9c99916a05e3b28166d31955fad.asciidoc b/docs/doc_examples/f495f9c99916a05e3b28166d31955fad.asciidoc
new file mode 100644
index 000000000..5522bffda
--- /dev/null
+++ b/docs/doc_examples/f495f9c99916a05e3b28166d31955fad.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ terms: {
+ field: "genre",
+ order: {
+ "playback_stats.max": "desc",
+ },
+ },
+ aggs: {
+ playback_stats: {
+ stats: {
+ field: "play_count",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc b/docs/doc_examples/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc
new file mode 100644
index 000000000..e40f14b9d
--- /dev/null
+++ b/docs/doc_examples/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-image-index",
+ mappings: {
+ properties: {
+ "image-vector": {
+ type: "dense_vector",
+ dims: 3,
+ index: true,
+ similarity: "l2_norm",
+ },
+ "file-type": {
+ type: "keyword",
+ },
+ title: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc b/docs/doc_examples/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc
new file mode 100644
index 000000000..15cfea68e
--- /dev/null
+++ b/docs/doc_examples/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "quantized-image-index",
+ mappings: {
+ properties: {
+ "image-vector": {
+ type: "dense_vector",
+ element_type: "float",
+ dims: 2,
+ index: true,
+ index_options: {
+ type: "int8_hnsw",
+ },
+ },
+ title: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f4b9baed3c6a82be3672cbc8999c2368.asciidoc b/docs/doc_examples/f4b9baed3c6a82be3672cbc8999c2368.asciidoc
new file mode 100644
index 000000000..1c73cea43
--- /dev/null
+++ b/docs/doc_examples/f4b9baed3c6a82be3672cbc8999c2368.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.termsEnum({
+ index: "stackoverflow",
+ field: "tags",
+ string: "kiba",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f4c194628761a4cf2a01453a96bbcc3c.asciidoc b/docs/doc_examples/f4c194628761a4cf2a01453a96bbcc3c.asciidoc
new file mode 100644
index 000000000..06a8284a3
--- /dev/null
+++ b/docs/doc_examples/f4c194628761a4cf2a01453a96bbcc3c.asciidoc
@@ -0,0 +1,42 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "multipolygon",
+ coordinates: [
+ [
+ [
+ [1002, 200],
+ [1003, 200],
+ [1003, 300],
+ [1002, 300],
+ [1002, 200],
+ ],
+ ],
+ [
+ [
+ [1000, 200],
+ [1001, 100],
+ [1001, 100],
+ [1000, 100],
+ [1000, 100],
+ ],
+ [
+ [1000.2, 200.2],
+ [1000.8, 100.2],
+ [1000.8, 100.8],
+ [1000.2, 100.8],
+ [1000.2, 100.2],
+ ],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc b/docs/doc_examples/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc
new file mode 100644
index 000000000..e41ea896e
--- /dev/null
+++ b/docs/doc_examples/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ "cluster.routing.allocation.disk.watermark.low": null,
+ "cluster.routing.allocation.disk.watermark.low.max_headroom": null,
+ "cluster.routing.allocation.disk.watermark.high": null,
+ "cluster.routing.allocation.disk.watermark.high.max_headroom": null,
+ "cluster.routing.allocation.disk.watermark.flood_stage": null,
+ "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": null,
+ "cluster.routing.allocation.disk.watermark.flood_stage.frozen": null,
+ "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom":
+ null,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f4f557716049b23f8840d58d71e748f0.asciidoc b/docs/doc_examples/f4f557716049b23f8840d58d71e748f0.asciidoc
new file mode 100644
index 000000000..a7503c9a3
--- /dev/null
+++ b/docs/doc_examples/f4f557716049b23f8840d58d71e748f0.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putSettings({
+ index: "my-index-000001",
+ settings: {
+ index: {
+ refresh_interval: "-1",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f4fdfe52ecba65eec6beb30d8deb8bbf.asciidoc b/docs/doc_examples/f4fdfe52ecba65eec6beb30d8deb8bbf.asciidoc
new file mode 100644
index 000000000..cd19c6359
--- /dev/null
+++ b/docs/doc_examples/f4fdfe52ecba65eec6beb30d8deb8bbf.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.forgetFollower({
+ index: "",
+ follower_cluster: "",
+ follower_index: "",
+ follower_index_uuid: "",
+ leader_remote_cluster: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5013174f77868da4dc40cdd745d4ea4.asciidoc b/docs/doc_examples/f5013174f77868da4dc40cdd745d4ea4.asciidoc
new file mode 100644
index 000000000..f8876e0f8
--- /dev/null
+++ b/docs/doc_examples/f5013174f77868da4dc40cdd745d4ea4.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ aggs: {
+ genres: {
+ rare_terms: {
+ field: "genre",
+ max_doc_count: 2,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5140f08f56c64b5789357539f8b9ba8.asciidoc b/docs/doc_examples/f5140f08f56c64b5789357539f8b9ba8.asciidoc
new file mode 100644
index 000000000..b6609f84d
--- /dev/null
+++ b/docs/doc_examples/f5140f08f56c64b5789357539f8b9ba8.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteAlias({
+ index: "my-data-stream",
+ name: "my-alias",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f545bb95214769aca993c1632a71ad2c.asciidoc b/docs/doc_examples/f545bb95214769aca993c1632a71ad2c.asciidoc
new file mode 100644
index 000000000..a54c8c9de
--- /dev/null
+++ b/docs/doc_examples/f545bb95214769aca993c1632a71ad2c.asciidoc
@@ -0,0 +1,59 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "french_example",
+ settings: {
+ analysis: {
+ filter: {
+ french_elision: {
+ type: "elision",
+ articles_case: true,
+ articles: [
+ "l",
+ "m",
+ "t",
+ "qu",
+ "n",
+ "s",
+ "j",
+ "d",
+ "c",
+ "jusqu",
+ "quoiqu",
+ "lorsqu",
+ "puisqu",
+ ],
+ },
+ french_stop: {
+ type: "stop",
+ stopwords: "_french_",
+ },
+ french_keywords: {
+ type: "keyword_marker",
+ keywords: ["Example"],
+ },
+ french_stemmer: {
+ type: "stemmer",
+ language: "light_french",
+ },
+ },
+ analyzer: {
+ rebuilt_french: {
+ tokenizer: "standard",
+ filter: [
+ "french_elision",
+ "lowercase",
+ "french_stop",
+ "french_keywords",
+ "french_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f54f6d06163221f2c7aff6e8db942be3.asciidoc b/docs/doc_examples/f54f6d06163221f2c7aff6e8db942be3.asciidoc
new file mode 100644
index 000000000..97adcb0dc
--- /dev/null
+++ b/docs/doc_examples/f54f6d06163221f2c7aff6e8db942be3.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.slm.putLifecycle({
+ policy_id: "daily-snapshots",
+ name: "",
+ schedule: "0 45 23 * * ?",
+ repository: "my_repository",
+ config: {
+ indices: "*",
+ include_global_state: true,
+ },
+ retention: {
+ expire_after: "30d",
+ min_count: 1,
+ max_count: 31,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc b/docs/doc_examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc
new file mode 100644
index 000000000..1b2520793
--- /dev/null
+++ b/docs/doc_examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.inference.put({
+ task_type: "completion",
+ inference_id: "azure_openai_completion",
+ inference_config: {
+ service: "azureopenai",
+ service_settings: {
+ api_key: "",
+ resource_name: "",
+ deployment_id: "",
+ api_version: "2024-02-01",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5815d573cee0447910c9668003887b8.asciidoc b/docs/doc_examples/f5815d573cee0447910c9668003887b8.asciidoc
new file mode 100644
index 000000000..82e48529d
--- /dev/null
+++ b/docs/doc_examples/f5815d573cee0447910c9668003887b8.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ aggs: {
+ sales_over_time: {
+ date_histogram: {
+ field: "date",
+ calendar_interval: "2d",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f58969ac405db85f439c5940d014964b.asciidoc b/docs/doc_examples/f58969ac405db85f439c5940d014964b.asciidoc
new file mode 100644
index 000000000..3406c8013
--- /dev/null
+++ b/docs/doc_examples/f58969ac405db85f439c5940d014964b.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_bounding_box: {
+ "pin.location": {
+ wkt: "BBOX (-74.1, -71.12, 40.73, 40.01)",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f58fd031597e2c3df78bf0efd07206e3.asciidoc b/docs/doc_examples/f58fd031597e2c3df78bf0efd07206e3.asciidoc
new file mode 100644
index 000000000..eb4cc2eaf
--- /dev/null
+++ b/docs/doc_examples/f58fd031597e2c3df78bf0efd07206e3.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.postStartBasic({
+ acknowledge: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5bf2526af19d964f8c4c59d4795cffc.asciidoc b/docs/doc_examples/f5bf2526af19d964f8c4c59d4795cffc.asciidoc
new file mode 100644
index 000000000..46fe5e0e8
--- /dev/null
+++ b/docs/doc_examples/f5bf2526af19d964f8c4c59d4795cffc.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "imdb",
+ mappings: {
+ properties: {
+ title: {
+ type: "text",
+ term_vector: "yes",
+ },
+ description: {
+ type: "text",
+ },
+ tags: {
+ type: "text",
+ fields: {
+ raw: {
+ type: "text",
+ analyzer: "keyword",
+ term_vector: "yes",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc b/docs/doc_examples/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc
new file mode 100644
index 000000000..b9617e400
--- /dev/null
+++ b/docs/doc_examples/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "ecommerce-customers",
+ mappings: {
+ properties: {
+ "total_quantity.sum": {
+ type: "double",
+ },
+ total_quantity: {
+ type: "object",
+ },
+ taxless_total_price: {
+ type: "object",
+ },
+ "taxless_total_price.sum": {
+ type: "double",
+ },
+ "order_id.cardinality": {
+ type: "long",
+ },
+ customer_id: {
+ type: "keyword",
+ },
+ "total_quantity.max": {
+ type: "integer",
+ },
+ order_id: {
+ type: "object",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5e50fe8a60467adb2c5ee9e0f2d88da.asciidoc b/docs/doc_examples/f5e50fe8a60467adb2c5ee9e0f2d88da.asciidoc
new file mode 100644
index 000000000..115cd3757
--- /dev/null
+++ b/docs/doc_examples/f5e50fe8a60467adb2c5ee9e0f2d88da.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.clearCursor({
+ cursor:
+ "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5e6378cc41ddf5326fe4084396c59b2.asciidoc b/docs/doc_examples/f5e6378cc41ddf5326fe4084396c59b2.asciidoc
new file mode 100644
index 000000000..bc7cd7b1a
--- /dev/null
+++ b/docs/doc_examples/f5e6378cc41ddf5326fe4084396c59b2.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ default: {
+ type: "simple",
+ },
+ default_search: {
+ type: "whitespace",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5eed3f2e3558a238487bc85305b7a71.asciidoc b/docs/doc_examples/f5eed3f2e3558a238487bc85305b7a71.asciidoc
new file mode 100644
index 000000000..1f5c5accb
--- /dev/null
+++ b/docs/doc_examples/f5eed3f2e3558a238487bc85305b7a71.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f5ef80dd92c67059ca353a833e6b7b5e.asciidoc b/docs/doc_examples/f5ef80dd92c67059ca353a833e6b7b5e.asciidoc
new file mode 100644
index 000000000..b36c0c85e
--- /dev/null
+++ b/docs/doc_examples/f5ef80dd92c67059ca353a833e6b7b5e.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ query: {
+ constant_score: {
+ filter: {
+ match: {
+ type: "hat",
+ },
+ },
+ },
+ },
+ aggs: {
+ hat_prices: {
+ sum: {
+ field: "price",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc b/docs/doc_examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc
new file mode 100644
index 000000000..c506a9e44
--- /dev/null
+++ b/docs/doc_examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: ".elastic-connectors",
+ id: "connector-id",
+ doc: {
+ custom_scheduling: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f63f6343e74bd5c844854272e746de14.asciidoc b/docs/doc_examples/f63f6343e74bd5c844854272e746de14.asciidoc
new file mode 100644
index 000000000..a1a92a95d
--- /dev/null
+++ b/docs/doc_examples/f63f6343e74bd5c844854272e746de14.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.deactivateWatch({
+ watch_id: "my_watch",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f642b64e592131f37209a5100fe161cc.asciidoc b/docs/doc_examples/f642b64e592131f37209a5100fe161cc.asciidoc
new file mode 100644
index 000000000..df08d6beb
--- /dev/null
+++ b/docs/doc_examples/f642b64e592131f37209a5100fe161cc.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ dynamic_templates: [
+ {
+ named_analyzers: {
+ match_mapping_type: "string",
+ match: "*",
+ mapping: {
+ type: "text",
+ analyzer: "{name}",
+ },
+ },
+ },
+ {
+ no_doc_values: {
+ match_mapping_type: "*",
+ mapping: {
+ type: "{dynamic_type}",
+ doc_values: false,
+ },
+ },
+ },
+ ],
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ english: "Some English text",
+ count: 5,
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/f6566395f85d3afe917228643d7318d6.asciidoc b/docs/doc_examples/f6566395f85d3afe917228643d7318d6.asciidoc
new file mode 100644
index 000000000..d4a98b60b
--- /dev/null
+++ b/docs/doc_examples/f6566395f85d3afe917228643d7318d6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.delete({
+ index: "my-index-000001",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f656c1e64268293ecc8ebd8065628faa.asciidoc b/docs/doc_examples/f656c1e64268293ecc8ebd8065628faa.asciidoc
new file mode 100644
index 000000000..0c9f9c376
--- /dev/null
+++ b/docs/doc_examples/f656c1e64268293ecc8ebd8065628faa.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedServiceTokens({
+ namespace: "elastic",
+ service: "fleet-server",
+ name: "*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f65abb38dd0cfedeb06e0cef206fbdab.asciidoc b/docs/doc_examples/f65abb38dd0cfedeb06e0cef206fbdab.asciidoc
new file mode 100644
index 000000000..724fcf566
--- /dev/null
+++ b/docs/doc_examples/f65abb38dd0cfedeb06e0cef206fbdab.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["ngram"],
+ text: "Quick fox",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f66643c54999426c5afa6d5a87435d4e.asciidoc b/docs/doc_examples/f66643c54999426c5afa6d5a87435d4e.asciidoc
new file mode 100644
index 000000000..982d55165
--- /dev/null
+++ b/docs/doc_examples/f66643c54999426c5afa6d5a87435d4e.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearApiKeyCache({
+ ids: "yVGMr3QByxdh1MSaicYx",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f679e414de48b8fe25e458844be05618.asciidoc b/docs/doc_examples/f679e414de48b8fe25e458844be05618.asciidoc
new file mode 100644
index 000000000..1c0fa96c5
--- /dev/null
+++ b/docs/doc_examples/f679e414de48b8fe25e458844be05618.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.put({
+ connector_id: "my-connector-id",
+ name: "Music catalog",
+ index_name: "music",
+ service_type: "postgresql",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f67d8aab9106ad24b1d2c771d3840ed1.asciidoc b/docs/doc_examples/f67d8aab9106ad24b1d2c771d3840ed1.asciidoc
new file mode 100644
index 000000000..4cf7e3016
--- /dev/null
+++ b/docs/doc_examples/f67d8aab9106ad24b1d2c771d3840ed1.asciidoc
@@ -0,0 +1,70 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "log_event_watch",
+ trigger: {
+ schedule: {
+ interval: "5m",
+ },
+ },
+ input: {
+ search: {
+ request: {
+ indices: "log-events",
+ body: {
+ size: 0,
+ query: {
+ match: {
+ status: "error",
+ },
+ },
+ },
+ },
+ },
+ },
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 0,
+ },
+ },
+ },
+ actions: {
+ email_administrator: {
+ email: {
+ to: "sys.admino@host.domain",
+ subject: "Encountered {{ctx.payload.hits.total}} errors",
+ body: "Too many error in the system, see attached data",
+ attachments: {
+ attached_data: {
+ data: {
+ format: "json",
+ },
+ },
+ },
+ priority: "high",
+ },
+ },
+ notify_pager: {
+ condition: {
+ compare: {
+ "ctx.payload.hits.total": {
+ gt: 5,
+ },
+ },
+ },
+ webhook: {
+ method: "POST",
+ host: "pager.service.domain",
+ port: 1234,
+ path: "/{{watch_id}}",
+ body: "Encountered {{ctx.payload.hits.total}} errors",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6911b0f2f56523ccbd8027f276981b3.asciidoc b/docs/doc_examples/f6911b0f2f56523ccbd8027f276981b3.asciidoc
new file mode 100644
index 000000000..95355dc17
--- /dev/null
+++ b/docs/doc_examples/f6911b0f2f56523ccbd8027f276981b3.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ combined_fields: {
+ query: "database systems",
+ fields: ["title", "abstract", "body"],
+ operator: "and",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6982ff80b9a64cd5fcac5b20908c906.asciidoc b/docs/doc_examples/f6982ff80b9a64cd5fcac5b20908c906.asciidoc
new file mode 100644
index 000000000..33a796a1f
--- /dev/null
+++ b/docs/doc_examples/f6982ff80b9a64cd5fcac5b20908c906.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.deleteCalendarEvent({
+ calendar_id: "planned-outages",
+ event_id: "LS8LJGEBMTCMA-qz49st",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6c9d72fa26cbedd0c3f9fa64a88c38a.asciidoc b/docs/doc_examples/f6c9d72fa26cbedd0c3f9fa64a88c38a.asciidoc
new file mode 100644
index 000000000..2b2e4c2b3
--- /dev/null
+++ b/docs/doc_examples/f6c9d72fa26cbedd0c3f9fa64a88c38a.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ match_all: {},
+ },
+ _source: "route_length_miles",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6d493650b4344f17297b568016fb445.asciidoc b/docs/doc_examples/f6d493650b4344f17297b568016fb445.asciidoc
new file mode 100644
index 000000000..2ca1d4a9c
--- /dev/null
+++ b/docs/doc_examples/f6d493650b4344f17297b568016fb445.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ccr.unfollow({
+ index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6de702c3d097af0b0bd391c4f947233.asciidoc b/docs/doc_examples/f6de702c3d097af0b0bd391c4f947233.asciidoc
new file mode 100644
index 000000000..f7a8647ae
--- /dev/null
+++ b/docs/doc_examples/f6de702c3d097af0b0bd391c4f947233.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.indices({
+ v: "true",
+ s: "rep:desc,pri.store.size:desc",
+ h: "health,index,pri,rep,store.size,pri.store.size",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6df4acf3c7a4f85706ff314b21ebcb2.asciidoc b/docs/doc_examples/f6df4acf3c7a4f85706ff314b21ebcb2.asciidoc
new file mode 100644
index 000000000..5cbc31432
--- /dev/null
+++ b/docs/doc_examples/f6df4acf3c7a4f85706ff314b21ebcb2.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.clearCachedPrivileges({
+ application: "myapp",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6ead39c5505045543b9225deca7367d.asciidoc b/docs/doc_examples/f6ead39c5505045543b9225deca7367d.asciidoc
new file mode 100644
index 000000000..9e329ed3e
--- /dev/null
+++ b/docs/doc_examples/f6ead39c5505045543b9225deca7367d.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.postVotingConfigExclusions({
+ node_names: "nodeName1,nodeName2",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6edbed2b5b2709bbc13866a4780e27a.asciidoc b/docs/doc_examples/f6edbed2b5b2709bbc13866a4780e27a.asciidoc
new file mode 100644
index 000000000..34e9a18d1
--- /dev/null
+++ b/docs/doc_examples/f6edbed2b5b2709bbc13866a4780e27a.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ document: {
+ username: "johnsmith",
+ name: {
+ first: "John",
+ last: "Smith",
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.indices.getMapping({
+ index: "my-index-000001",
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/f6eff830fb0fad200ebfb1e3e46f6f0e.asciidoc b/docs/doc_examples/f6eff830fb0fad200ebfb1e3e46f6f0e.asciidoc
new file mode 100644
index 000000000..6d21aa440
--- /dev/null
+++ b/docs/doc_examples/f6eff830fb0fad200ebfb1e3e46f6f0e.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.executeWatch({
+ id: "my_watch",
+ trigger_data: {
+ triggered_time: "now",
+ scheduled_time: "now",
+ },
+ alternative_input: {
+ foo: "bar",
+ },
+ ignore_condition: true,
+ action_modes: {
+ "my-action": "force_simulate",
+ },
+ record_execution: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f6f647eb644a2d236637ff05f833cb73.asciidoc b/docs/doc_examples/f6f647eb644a2d236637ff05f833cb73.asciidoc
new file mode 100644
index 000000000..81783cf66
--- /dev/null
+++ b/docs/doc_examples/f6f647eb644a2d236637ff05f833cb73.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.secretPost({
+ body: {
+ value: "encoded_api_key",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc b/docs/doc_examples/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc
new file mode 100644
index 000000000..df0215037
--- /dev/null
+++ b/docs/doc_examples/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "active",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f70ff57c80cdbce3f1e7c63ee307c92d.asciidoc b/docs/doc_examples/f70ff57c80cdbce3f1e7c63ee307c92d.asciidoc
new file mode 100644
index 000000000..4506b25ca
--- /dev/null
+++ b/docs/doc_examples/f70ff57c80cdbce3f1e7c63ee307c92d.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "my_test_scores",
+ },
+ dest: {
+ index: "my_test_scores_2",
+ pipeline: "my_test_scores_pipeline",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f7139b3c0e066be832b9100ae17157cc.asciidoc b/docs/doc_examples/f7139b3c0e066be832b9100ae17157cc.asciidoc
new file mode 100644
index 000000000..8635b5ce1
--- /dev/null
+++ b/docs/doc_examples/f7139b3c0e066be832b9100ae17157cc.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.esql.query({
+ format: "txt",
+ query:
+ "\n FROM library\n | KEEP author, name, page_count, release_date\n | SORT page_count DESC\n | LIMIT 5\n ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f733b25cd4c448b226bb76862974eef2.asciidoc b/docs/doc_examples/f733b25cd4c448b226bb76862974eef2.asciidoc
new file mode 100644
index 000000000..390ed34ff
--- /dev/null
+++ b/docs/doc_examples/f733b25cd4c448b226bb76862974eef2.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ settings: {
+ analysis: {
+ filter: {
+ code: {
+ type: "pattern_capture",
+ preserve_original: true,
+ patterns: ["(\\p{Ll}+|\\p{Lu}\\p{Ll}+|\\p{Lu}+)", "(\\d+)"],
+ },
+ },
+ analyzer: {
+ code: {
+ tokenizer: "pattern",
+ filter: ["code", "lowercase"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f749efe8f11ebd43ef83db91922c736e.asciidoc b/docs/doc_examples/f749efe8f11ebd43ef83db91922c736e.asciidoc
new file mode 100644
index 000000000..630fed95c
--- /dev/null
+++ b/docs/doc_examples/f749efe8f11ebd43ef83db91922c736e.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cluster.putSettings({
+ persistent: {
+ cluster: {
+ remote: {
+ clusterB: {
+ mode: "proxy",
+ skip_unavailable: "true",
+ server_name: "clusterb.es.region-b.gcp.elastic-cloud.com",
+ proxy_socket_connections: "18",
+ proxy_address: "clusterb.es.region-b.gcp.elastic-cloud.com:9400",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f7726cc2c60dea26b88bf0df99fb0813.asciidoc b/docs/doc_examples/f7726cc2c60dea26b88bf0df99fb0813.asciidoc
new file mode 100644
index 000000000..355dc8d8a
--- /dev/null
+++ b/docs/doc_examples/f7726cc2c60dea26b88bf0df99fb0813.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ runtime: {
+ day_of_week: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc b/docs/doc_examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc
new file mode 100644
index 000000000..b6d0265a7
--- /dev/null
+++ b/docs/doc_examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.transport.request({
+ method: "GET",
+ path: "/_connector/_sync_job/my-connector-sync-job",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc b/docs/doc_examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc
new file mode 100644
index 000000000..a673f8da2
--- /dev/null
+++ b/docs/doc_examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "sales",
+ size: 0,
+ query: {
+ constant_score: {
+ filter: {
+ range: {
+ price: {
+ lte: "500",
+ },
+ },
+ },
+ },
+ },
+ aggs: {
+ prices: {
+ histogram: {
+ field: "price",
+ interval: 50,
+ hard_bounds: {
+ min: 100,
+ max: 200,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc b/docs/doc_examples/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc
new file mode 100644
index 000000000..1a905fa5f
--- /dev/null
+++ b/docs/doc_examples/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ index: "k8s",
+ },
+ dest: {
+ index: "k9s",
+ op_type: "create",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f7dc2fed08e57abda2c3e8a14f8eb098.asciidoc b/docs/doc_examples/f7dc2fed08e57abda2c3e8a14f8eb098.asciidoc
new file mode 100644
index 000000000..2e19d6a11
--- /dev/null
+++ b/docs/doc_examples/f7dc2fed08e57abda2c3e8a14f8eb098.asciidoc
@@ -0,0 +1,39 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "armenian_example",
+ settings: {
+ analysis: {
+ filter: {
+ armenian_stop: {
+ type: "stop",
+ stopwords: "_armenian_",
+ },
+ armenian_keywords: {
+ type: "keyword_marker",
+ keywords: ["օրինակ"],
+ },
+ armenian_stemmer: {
+ type: "stemmer",
+ language: "armenian",
+ },
+ },
+ analyzer: {
+ rebuilt_armenian: {
+ tokenizer: "standard",
+ filter: [
+ "lowercase",
+ "armenian_stop",
+ "armenian_keywords",
+ "armenian_stemmer",
+ ],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f7ec9062b3a7578fed55f119d7c22b74.asciidoc b/docs/doc_examples/f7ec9062b3a7578fed55f119d7c22b74.asciidoc
new file mode 100644
index 000000000..e942d1c0c
--- /dev/null
+++ b/docs/doc_examples/f7ec9062b3a7578fed55f119d7c22b74.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "standard",
+ filter: ["lowercase", "asciifolding"],
+ text: "Is this déja vu?",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f823e4b87ed181b27f73ebc51351f0ee.asciidoc b/docs/doc_examples/f823e4b87ed181b27f73ebc51351f0ee.asciidoc
new file mode 100644
index 000000000..e5501b1a8
--- /dev/null
+++ b/docs/doc_examples/f823e4b87ed181b27f73ebc51351f0ee.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.deleteDataStream({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f83eb6605c7c56e297a494b318400ef0.asciidoc b/docs/doc_examples/f83eb6605c7c56e297a494b318400ef0.asciidoc
new file mode 100644
index 000000000..4f336dd82
--- /dev/null
+++ b/docs/doc_examples/f83eb6605c7c56e297a494b318400ef0.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "shirts",
+ query: {
+ bool: {
+ filter: [
+ {
+ term: {
+ color: "red",
+ },
+ },
+ {
+ term: {
+ brand: "gucci",
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f86337e13526c968848cfe29a52d658f.asciidoc b/docs/doc_examples/f86337e13526c968848cfe29a52d658f.asciidoc
new file mode 100644
index 000000000..d244f1a1e
--- /dev/null
+++ b/docs/doc_examples/f86337e13526c968848cfe29a52d658f.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "elser_embeddings_pipeline",
+ processors: [
+ {
+ inference: {
+ model_id: "elser_embeddings",
+ input_output: {
+ input_field: "content",
+ output_field: "content_embedding",
+ },
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f8651356ce2e7e93fa306c30f57ed588.asciidoc b/docs/doc_examples/f8651356ce2e7e93fa306c30f57ed588.asciidoc
new file mode 100644
index 000000000..60451049e
--- /dev/null
+++ b/docs/doc_examples/f8651356ce2e7e93fa306c30f57ed588.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "custom_truncate_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ standard_truncate: {
+ tokenizer: "standard",
+ filter: ["truncate"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f8833488041f3d318435b60917fa877c.asciidoc b/docs/doc_examples/f8833488041f3d318435b60917fa877c.asciidoc
new file mode 100644
index 000000000..2c6c95db2
--- /dev/null
+++ b/docs/doc_examples/f8833488041f3d318435b60917fa877c.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["my_search_index1", "my_search_index2"],
+ template: {
+ script: {
+ source: {
+ query: {
+ query_string: {
+ query: "{{query_string}}",
+ default_field: "{{default_field}}",
+ },
+ },
+ },
+ params: {
+ query_string: "*",
+ default_field: "*",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f8a0010753b1ff563dc42d703902d2fa.asciidoc b/docs/doc_examples/f8a0010753b1ff563dc42d703902d2fa.asciidoc
new file mode 100644
index 000000000..156c3a585
--- /dev/null
+++ b/docs/doc_examples/f8a0010753b1ff563dc42d703902d2fa.asciidoc
@@ -0,0 +1,45 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ term: {
+ "user.id": "kimchy",
+ },
+ },
+ filter: {
+ term: {
+ tags: "production",
+ },
+ },
+ must_not: {
+ range: {
+ age: {
+ gte: 10,
+ lte: 20,
+ },
+ },
+ },
+ should: [
+ {
+ term: {
+ tags: "env1",
+ },
+ },
+ {
+ term: {
+ tags: "deployed",
+ },
+ },
+ ],
+ minimum_should_match: 1,
+ boost: 1,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f8cafb1a08bc9b2dd5239f99d4e93f4c.asciidoc b/docs/doc_examples/f8cafb1a08bc9b2dd5239f99d4e93f4c.asciidoc
new file mode 100644
index 000000000..85f1392c5
--- /dev/null
+++ b/docs/doc_examples/f8cafb1a08bc9b2dd5239f99d4e93f4c.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: {
+ type: "char_group",
+ tokenize_on_chars: ["whitespace", "-", "\n"],
+ },
+ text: "The QUICK brown-fox",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc b/docs/doc_examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc
new file mode 100644
index 000000000..c02fd9b75
--- /dev/null
+++ b/docs/doc_examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rollup.getRollupCaps({
+ id: "sensor-1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f8f960550104c33e00dc78bc8723ccef.asciidoc b/docs/doc_examples/f8f960550104c33e00dc78bc8723ccef.asciidoc
new file mode 100644
index 000000000..8d3d91597
--- /dev/null
+++ b/docs/doc_examples/f8f960550104c33e00dc78bc8723ccef.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "cooking_blog",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f92d2f5018a8843ffbb56ade15f84406.asciidoc b/docs/doc_examples/f92d2f5018a8843ffbb56ade15f84406.asciidoc
new file mode 100644
index 000000000..f74bd1fbc
--- /dev/null
+++ b/docs/doc_examples/f92d2f5018a8843ffbb56ade15f84406.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.license.getBasicStatus();
+console.log(response);
+----
diff --git a/docs/doc_examples/f95a4d7ab02bf400246c8822f0245f02.asciidoc b/docs/doc_examples/f95a4d7ab02bf400246c8822f0245f02.asciidoc
new file mode 100644
index 000000000..90668404a
--- /dev/null
+++ b/docs/doc_examples/f95a4d7ab02bf400246c8822f0245f02.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.mlTrainedModels({
+ h: "c,o,l,ct,v",
+ v: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f96d4614f2fc294339fef325b794355f.asciidoc b/docs/doc_examples/f96d4614f2fc294339fef325b794355f.asciidoc
new file mode 100644
index 000000000..7e97b2c84
--- /dev/null
+++ b/docs/doc_examples/f96d4614f2fc294339fef325b794355f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getBuckets({
+ job_id: "low_request_rate",
+ anomaly_score: 80,
+ start: 1454530200001,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f96d8131e8a592fbf6dfd686173940a9.asciidoc b/docs/doc_examples/f96d8131e8a592fbf6dfd686173940a9.asciidoc
new file mode 100644
index 000000000..5dfedbed7
--- /dev/null
+++ b/docs/doc_examples/f96d8131e8a592fbf6dfd686173940a9.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.watcher.putWatch({
+ id: "test_watch",
+ trigger: {
+ schedule: {
+ hourly: {
+ minute: [0, 5],
+ },
+ },
+ },
+ input: {
+ simple: {
+ payload: {
+ send: "yes",
+ },
+ },
+ },
+ condition: {
+ always: {},
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f9732ce07960134ea7156e118c2da8a6.asciidoc b/docs/doc_examples/f9732ce07960134ea7156e118c2da8a6.asciidoc
new file mode 100644
index 000000000..f7a5e21cc
--- /dev/null
+++ b/docs/doc_examples/f9732ce07960134ea7156e118c2da8a6.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ settings: {
+ analysis: {
+ analyzer: {
+ my_custom_simple_analyzer: {
+ tokenizer: "lowercase",
+ filter: [],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f978088f5117d4addd55c11ee3777312.asciidoc b/docs/doc_examples/f978088f5117d4addd55c11ee3777312.asciidoc
new file mode 100644
index 000000000..43ef49020
--- /dev/null
+++ b/docs/doc_examples/f978088f5117d4addd55c11ee3777312.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.createServiceToken({
+ namespace: "elastic",
+ service: "fleet-server",
+ name: "token1",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f97aa2efabbf11a534073041eb2658c9.asciidoc b/docs/doc_examples/f97aa2efabbf11a534073041eb2658c9.asciidoc
new file mode 100644
index 000000000..a46773eb2
--- /dev/null
+++ b/docs/doc_examples/f97aa2efabbf11a534073041eb2658c9.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.deleteScript({
+ id: "my-stored-script",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f98687271e1bec031cc34d05d8f4b60b.asciidoc b/docs/doc_examples/f98687271e1bec031cc34d05d8f4b60b.asciidoc
new file mode 100644
index 000000000..50dcca406
--- /dev/null
+++ b/docs/doc_examples/f98687271e1bec031cc34d05d8f4b60b.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ span_multi: {
+ match: {
+ prefix: {
+ "user.id": {
+ value: "ki",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc b/docs/doc_examples/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc
new file mode 100644
index 000000000..4ffc48a55
--- /dev/null
+++ b/docs/doc_examples/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location:
+ "MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f9bad6fd369764185e1cb09b89ee39cc.asciidoc b/docs/doc_examples/f9bad6fd369764185e1cb09b89ee39cc.asciidoc
new file mode 100644
index 000000000..2045d9c7d
--- /dev/null
+++ b/docs/doc_examples/f9bad6fd369764185e1cb09b89ee39cc.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ text: {
+ type: "text",
+ store: true,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ text: [
+ "the quick brown fox",
+ "the quick brown fox",
+ "jumped over the lazy dog",
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/f9c8245cc13770dff052b6759a749efa.asciidoc b/docs/doc_examples/f9c8245cc13770dff052b6759a749efa.asciidoc
new file mode 100644
index 000000000..717368649
--- /dev/null
+++ b/docs/doc_examples/f9c8245cc13770dff052b6759a749efa.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.getSource({
+ index: "my-index-000001",
+ id: 1,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc b/docs/doc_examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc
new file mode 100644
index 000000000..0c7b48ea7
--- /dev/null
+++ b/docs/doc_examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ multi_match: {
+ query: "brown f",
+ type: "bool_prefix",
+ fields: ["my_field", "my_field._2gram", "my_field._3gram"],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/f9f541ae23a184301913f07e62d1afd3.asciidoc b/docs/doc_examples/f9f541ae23a184301913f07e62d1afd3.asciidoc
new file mode 100644
index 000000000..78b1ad12c
--- /dev/null
+++ b/docs/doc_examples/f9f541ae23a184301913f07e62d1afd3.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.sql.query({
+ format: "json",
+ keep_alive: "2d",
+ wait_for_completion_timeout: "2s",
+ query: "SELECT * FROM library ORDER BY page_count DESC",
+ fetch_size: 5,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa42ae3bf6a300420cd0f77ba006458a.asciidoc b/docs/doc_examples/fa42ae3bf6a300420cd0f77ba006458a.asciidoc
new file mode 100644
index 000000000..73cdcbcd1
--- /dev/null
+++ b/docs/doc_examples/fa42ae3bf6a300420cd0f77ba006458a.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "standard",
+ text: "Quick Brown Foxes!",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa5dcd1c7fadc473a791daf0d7ceec36.asciidoc b/docs/doc_examples/fa5dcd1c7fadc473a791daf0d7ceec36.asciidoc
new file mode 100644
index 000000000..ada16f058
--- /dev/null
+++ b/docs/doc_examples/fa5dcd1c7fadc473a791daf0d7ceec36.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "tour",
+ filter_path: "aggregations",
+ aggregations: {
+ path: {
+ time_series: {},
+ aggregations: {
+ museum_tour: {
+ geo_line: {
+ point: {
+ field: "location",
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa61e3481b1f889b3bd4253866bb1c6b.asciidoc b/docs/doc_examples/fa61e3481b1f889b3bd4253866bb1c6b.asciidoc
new file mode 100644
index 000000000..77efc1c63
--- /dev/null
+++ b/docs/doc_examples/fa61e3481b1f889b3bd4253866bb1c6b.asciidoc
@@ -0,0 +1,86 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "correlate_latency",
+ size: 0,
+ filter_path: "aggregations",
+ aggs: {
+ buckets: {
+ terms: {
+ field: "version",
+ size: 2,
+ },
+ aggs: {
+ latency_ranges: {
+ range: {
+ field: "latency",
+ ranges: [
+ {
+ to: 0,
+ },
+ {
+ from: 0,
+ to: 105,
+ },
+ {
+ from: 105,
+ to: 225,
+ },
+ {
+ from: 225,
+ to: 445,
+ },
+ {
+ from: 445,
+ to: 665,
+ },
+ {
+ from: 665,
+ to: 885,
+ },
+ {
+ from: 885,
+ to: 1115,
+ },
+ {
+ from: 1115,
+ to: 1335,
+ },
+ {
+ from: 1335,
+ to: 1555,
+ },
+ {
+ from: 1555,
+ to: 1775,
+ },
+ {
+ from: 1775,
+ },
+ ],
+ },
+ },
+ bucket_correlation: {
+ bucket_correlation: {
+ buckets_path: "latency_ranges>_count",
+ function: {
+ count_correlation: {
+ indicator: {
+ expectations: [
+ 0, 52.5, 165, 335, 555, 775, 1000, 1225, 1445, 1665, 1775,
+ ],
+ doc_count: 200,
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa82d86a046d67366cfe9ce65535e433.asciidoc b/docs/doc_examples/fa82d86a046d67366cfe9ce65535e433.asciidoc
new file mode 100644
index 000000000..0120aa38c
--- /dev/null
+++ b/docs/doc_examples/fa82d86a046d67366cfe9ce65535e433.asciidoc
@@ -0,0 +1,24 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.graph.explore({
+ index: "clicklogs",
+ vertices: [
+ {
+ field: "product",
+ include: ["1854873"],
+ },
+ ],
+ connections: {
+ vertices: [
+ {
+ field: "query.raw",
+ exclude: ["midi keyboard", "midi", "synth"],
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc b/docs/doc_examples/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc
new file mode 100644
index 000000000..b7e200d3f
--- /dev/null
+++ b/docs/doc_examples/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ term: {
+ status: "active",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa946228e946da256d40264c8b070a1a.asciidoc b/docs/doc_examples/fa946228e946da256d40264c8b070a1a.asciidoc
new file mode 100644
index 000000000..0cce8f2e4
--- /dev/null
+++ b/docs/doc_examples/fa946228e946da256d40264c8b070a1a.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ aggs: {
+ "my-agg-name": {
+ terms: {
+ field: "my-field",
+ },
+ meta: {
+ "my-metadata-field": "foo",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fa9a3ef94470f3d9bd6500b65bf993d1.asciidoc b/docs/doc_examples/fa9a3ef94470f3d9bd6500b65bf993d1.asciidoc
new file mode 100644
index 000000000..7dc54746d
--- /dev/null
+++ b/docs/doc_examples/fa9a3ef94470f3d9bd6500b65bf993d1.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ index: "multiplexer_example",
+ analyzer: "my_analyzer",
+ text: "Going HOME",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fab4b811ba968aa4df92fb1ac059ea31.asciidoc b/docs/doc_examples/fab4b811ba968aa4df92fb1ac059ea31.asciidoc
new file mode 100644
index 000000000..a84fa74d6
--- /dev/null
+++ b/docs/doc_examples/fab4b811ba968aa4df92fb1ac059ea31.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "example",
+ mappings: {
+ properties: {
+ location: {
+ type: "geo_shape",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fab702851e90e945c1b62dec0bb6a205.asciidoc b/docs/doc_examples/fab702851e90e945c1b62dec0bb6a205.asciidoc
new file mode 100644
index 000000000..cf74a61dd
--- /dev/null
+++ b/docs/doc_examples/fab702851e90e945c1b62dec0bb6a205.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.deleteBehavioralAnalytics({
+ name: "my_analytics_collection",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fabe14480624a99e8ee42c7338672058.asciidoc b/docs/doc_examples/fabe14480624a99e8ee42c7338672058.asciidoc
new file mode 100644
index 000000000..36202bf45
--- /dev/null
+++ b/docs/doc_examples/fabe14480624a99e8ee42c7338672058.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "test",
+ wait_for_active_shards: 2,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fad26f4fb5a1bc9c38db33394e877d94.asciidoc b/docs/doc_examples/fad26f4fb5a1bc9c38db33394e877d94.asciidoc
new file mode 100644
index 000000000..b6fb34952
--- /dev/null
+++ b/docs/doc_examples/fad26f4fb5a1bc9c38db33394e877d94.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.getDataFrameAnalyticsStats({
+ id: "weblog-outliers",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fad524db23eb5718ff310956e590b00d.asciidoc b/docs/doc_examples/fad524db23eb5718ff310956e590b00d.asciidoc
new file mode 100644
index 000000000..73022d70d
--- /dev/null
+++ b/docs/doc_examples/fad524db23eb5718ff310956e590b00d.asciidoc
@@ -0,0 +1,17 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ function_score: {
+ random_score: {
+ seed: 10,
+ field: "_seq_no",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/faf7d8b9827cf5c0db5c177f01dc31c4.asciidoc b/docs/doc_examples/faf7d8b9827cf5c0db5c177f01dc31c4.asciidoc
new file mode 100644
index 000000000..c6e1be29f
--- /dev/null
+++ b/docs/doc_examples/faf7d8b9827cf5c0db5c177f01dc31c4.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.rankEval({
+ index: "my-index-000001",
+ requests: [
+ {
+ id: "JFK query",
+ request: {
+ query: {
+ match_all: {},
+ },
+ },
+ ratings: [],
+ },
+ ],
+ metric: {
+ precision: {
+ k: 20,
+ relevant_rating_threshold: 1,
+ ignore_unlabeled: false,
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb0152f6c70f647a8b6709969113486d.asciidoc b/docs/doc_examples/fb0152f6c70f647a8b6709969113486d.asciidoc
new file mode 100644
index 000000000..cd8a962e0
--- /dev/null
+++ b/docs/doc_examples/fb0152f6c70f647a8b6709969113486d.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ kwd: {
+ type: "keyword",
+ store: true,
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ kwd: ["foo", "foo", "bar", "baz"],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/fb1180992b2087dfb36576b44c4261e4.asciidoc b/docs/doc_examples/fb1180992b2087dfb36576b44c4261e4.asciidoc
new file mode 100644
index 000000000..edb1ad6c8
--- /dev/null
+++ b/docs/doc_examples/fb1180992b2087dfb36576b44c4261e4.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putMapping({
+ index: "my-data-stream",
+ write_index_only: "true",
+ properties: {
+ host: {
+ properties: {
+ ip: {
+ type: "ip",
+ ignore_malformed: true,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb1263cfdcbb6a89b20b57004d7e0dfc.asciidoc b/docs/doc_examples/fb1263cfdcbb6a89b20b57004d7e0dfc.asciidoc
new file mode 100644
index 000000000..db4b69406
--- /dev/null
+++ b/docs/doc_examples/fb1263cfdcbb6a89b20b57004d7e0dfc.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ set: {
+ field: "my_field",
+ value: "{{{input_field.1}}}",
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _index: "index",
+ _id: "id",
+ _source: {
+ input_field: ["Ubuntu", "Windows", "Ventura"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb2b91206cfa8b86b4c7117ac1b5193b.asciidoc b/docs/doc_examples/fb2b91206cfa8b86b4c7117ac1b5193b.asciidoc
new file mode 100644
index 000000000..e3465e741
--- /dev/null
+++ b/docs/doc_examples/fb2b91206cfa8b86b4c7117ac1b5193b.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "user_hits",
+ size: 0,
+ aggs: {
+ users_per_day: {
+ date_histogram: {
+ field: "timestamp",
+ calendar_interval: "day",
+ },
+ aggs: {
+ distinct_users: {
+ cardinality: {
+ field: "user_id",
+ },
+ },
+ total_new_users: {
+ cumulative_cardinality: {
+ buckets_path: "distinct_users",
+ },
+ },
+ incremental_new_users: {
+ derivative: {
+ buckets_path: "total_new_users",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb3505d976283fb7c7b9705a761e0dc2.asciidoc b/docs/doc_examples/fb3505d976283fb7c7b9705a761e0dc2.asciidoc
new file mode 100644
index 000000000..5841a4fe8
--- /dev/null
+++ b/docs/doc_examples/fb3505d976283fb7c7b9705a761e0dc2.asciidoc
@@ -0,0 +1,25 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "polygon",
+ orientation: "clockwise",
+ coordinates: [
+ [
+ [1000, 1000],
+ [1000, 1001],
+ [1001, 1001],
+ [1001, 1000],
+ [1000, 1000],
+ ],
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb4799d2fe4011bf6084f89d97d9a4a5.asciidoc b/docs/doc_examples/fb4799d2fe4011bf6084f89d97d9a4a5.asciidoc
new file mode 100644
index 000000000..f659ab628
--- /dev/null
+++ b/docs/doc_examples/fb4799d2fe4011bf6084f89d97d9a4a5.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.autoscaling.getAutoscalingPolicy({
+ name: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc b/docs/doc_examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc
new file mode 100644
index 000000000..1405a070d
--- /dev/null
+++ b/docs/doc_examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateApiKeyId({
+ connector_id: "my_connector_id>",
+ api_key_id: "API key_id",
+ api_key_secret_id: "secret_id",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fb955375a202f66133af009c04cb77ad.asciidoc b/docs/doc_examples/fb955375a202f66133af009c04cb77ad.asciidoc
new file mode 100644
index 000000000..5e3b5b376
--- /dev/null
+++ b/docs/doc_examples/fb955375a202f66133af009c04cb77ad.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "networks",
+ mappings: {
+ properties: {
+ range: {
+ type: "ip_range",
+ },
+ name: {
+ type: "keyword",
+ },
+ department: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fbb38243221c8fb311660616e3add9ce.asciidoc b/docs/doc_examples/fbb38243221c8fb311660616e3add9ce.asciidoc
new file mode 100644
index 000000000..543a8d989
--- /dev/null
+++ b/docs/doc_examples/fbb38243221c8fb311660616e3add9ce.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ sort: [
+ {
+ _geo_distance: {
+ "pin.location": [-70, 40],
+ order: "asc",
+ unit: "km",
+ mode: "min",
+ distance_type: "arc",
+ ignore_unmapped: true,
+ },
+ },
+ ],
+ query: {
+ term: {
+ user: "kimchy",
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fbc5ab85b908480bf944b55da0a43488.asciidoc b/docs/doc_examples/fbc5ab85b908480bf944b55da0a43488.asciidoc
new file mode 100644
index 000000000..2f9356831
--- /dev/null
+++ b/docs/doc_examples/fbc5ab85b908480bf944b55da0a43488.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ query: {
+ prefix: {
+ "user.id": {
+ value: "ki",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fbdad6620eb645f5f1f02e3673604d01.asciidoc b/docs/doc_examples/fbdad6620eb645f5f1f02e3673604d01.asciidoc
new file mode 100644
index 000000000..62822d80b
--- /dev/null
+++ b/docs/doc_examples/fbdad6620eb645f5f1f02e3673604d01.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my_locations",
+ query: {
+ bool: {
+ must: {
+ match_all: {},
+ },
+ filter: {
+ geo_distance: {
+ distance: "12km",
+ "pin.location": "drm3btev3e86",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc1907515f6a913884a9f86451e90ee8.asciidoc b/docs/doc_examples/fc1907515f6a913884a9f86451e90ee8.asciidoc
new file mode 100644
index 000000000..cd09758c7
--- /dev/null
+++ b/docs/doc_examples/fc1907515f6a913884a9f86451e90ee8.asciidoc
@@ -0,0 +1,23 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index",
+ mappings: {
+ _source: {
+ excludes: ["content_embedding"],
+ },
+ properties: {
+ content_embedding: {
+ type: "sparse_vector",
+ },
+ content: {
+ type: "text",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc190fbbf71949331266dcb3f46a1198.asciidoc b/docs/doc_examples/fc190fbbf71949331266dcb3f46a1198.asciidoc
new file mode 100644
index 000000000..679b55598
--- /dev/null
+++ b/docs/doc_examples/fc190fbbf71949331266dcb3f46a1198.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.dataStreamsStats({
+ name: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc26f51bb22c0b5270a66b4722f18aa7.asciidoc b/docs/doc_examples/fc26f51bb22c0b5270a66b4722f18aa7.asciidoc
new file mode 100644
index 000000000..990b731c8
--- /dev/null
+++ b/docs/doc_examples/fc26f51bb22c0b5270a66b4722f18aa7.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ allocate: {
+ number_of_replicas: 2,
+ total_shards_per_node: 200,
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc3f5f40fa283559ca615cd0eb0a1755.asciidoc b/docs/doc_examples/fc3f5f40fa283559ca615cd0eb0a1755.asciidoc
new file mode 100644
index 000000000..eede615f7
--- /dev/null
+++ b/docs/doc_examples/fc3f5f40fa283559ca615cd0eb0a1755.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my_index",
+ mappings: {
+ properties: {
+ my_histogram: {
+ type: "histogram",
+ },
+ my_text: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc49437ce2e7916facf58128308c2aa3.asciidoc b/docs/doc_examples/fc49437ce2e7916facf58128308c2aa3.asciidoc
new file mode 100644
index 000000000..fed89c0fb
--- /dev/null
+++ b/docs/doc_examples/fc49437ce2e7916facf58128308c2aa3.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchableSnapshots.mount({
+ repository: "my_repository",
+ snapshot: "my_snapshot",
+ wait_for_completion: "true",
+ index: "my_docs",
+ renamed_index: "docs",
+ index_settings: {
+ "index.number_of_replicas": 0,
+ },
+ ignore_index_settings: ["index.refresh_interval"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc51fbc60b0e20aac83300a43ad90252.asciidoc b/docs/doc_examples/fc51fbc60b0e20aac83300a43ad90252.asciidoc
new file mode 100644
index 000000000..d6db2d338
--- /dev/null
+++ b/docs/doc_examples/fc51fbc60b0e20aac83300a43ad90252.asciidoc
@@ -0,0 +1,28 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "example",
+ document: {
+ location: {
+ type: "geometrycollection",
+ geometries: [
+ {
+ type: "point",
+ coordinates: [1000, 100],
+ },
+ {
+ type: "linestring",
+ coordinates: [
+ [1001, 100],
+ [1002, 100],
+ ],
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc5a81f34d416e4b45ca8a859dd3b8f1.asciidoc b/docs/doc_examples/fc5a81f34d416e4b45ca8a859dd3b8f1.asciidoc
new file mode 100644
index 000000000..1498d7d30
--- /dev/null
+++ b/docs/doc_examples/fc5a81f34d416e4b45ca8a859dd3b8f1.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ size: 0,
+ aggs: {
+ by_day: {
+ auto_date_histogram: {
+ field: "date",
+ buckets: 3,
+ time_zone: "-01:00",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc75ea748e5f49b8ab292e453ab641a6.asciidoc b/docs/doc_examples/fc75ea748e5f49b8ab292e453ab641a6.asciidoc
new file mode 100644
index 000000000..76340b434
--- /dev/null
+++ b/docs/doc_examples/fc75ea748e5f49b8ab292e453ab641a6.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "products",
+ size: 0,
+ query: {
+ match: {
+ name: "led tv",
+ },
+ },
+ aggs: {
+ resellers: {
+ nested: {
+ path: "resellers",
+ },
+ aggs: {
+ min_price: {
+ min: {
+ field: "resellers.price",
+ },
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc8a426f8a5112e61e2acb913982a8d9.asciidoc b/docs/doc_examples/fc8a426f8a5112e61e2acb913982a8d9.asciidoc
new file mode 100644
index 000000000..0342ca2e6
--- /dev/null
+++ b/docs/doc_examples/fc8a426f8a5112e61e2acb913982a8d9.asciidoc
@@ -0,0 +1,16 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "events",
+ size: 10,
+ sort: [
+ {
+ timestamp: "desc",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fc9a1b1173690a911725cff3912e9755.asciidoc b/docs/doc_examples/fc9a1b1173690a911725cff3912e9755.asciidoc
new file mode 100644
index 000000000..e97eff174
--- /dev/null
+++ b/docs/doc_examples/fc9a1b1173690a911725cff3912e9755.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ilm.putLifecycle({
+ name: "my_policy",
+ policy: {
+ phases: {
+ warm: {
+ actions: {
+ readonly: {},
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fccbddfba9f975de7e321732874dfb78.asciidoc b/docs/doc_examples/fccbddfba9f975de7e321732874dfb78.asciidoc
new file mode 100644
index 000000000..48de444fe
--- /dev/null
+++ b/docs/doc_examples/fccbddfba9f975de7e321732874dfb78.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.dataStreamsStats({
+ name: "my-data-stream*",
+ human: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fce5c03a388c893cb11a6696e068543f.asciidoc b/docs/doc_examples/fce5c03a388c893cb11a6696e068543f.asciidoc
new file mode 100644
index 000000000..eede0ecb8
--- /dev/null
+++ b/docs/doc_examples/fce5c03a388c893cb11a6696e068543f.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.hasPrivilegesUserProfile({
+ uids: [
+ "u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0",
+ "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1",
+ "u_does-not-exist_0",
+ ],
+ privileges: {
+ cluster: ["monitor", "create_snapshot", "manage_ml"],
+ index: [
+ {
+ names: ["suppliers", "products"],
+ privileges: ["create_doc"],
+ },
+ {
+ names: ["inventory"],
+ privileges: ["read", "write"],
+ },
+ ],
+ application: [
+ {
+ application: "inventory_manager",
+ privileges: ["read", "data:write/inventory"],
+ resources: ["product/1852563"],
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fce7a35a737fc9e54ac1225e310dd561.asciidoc b/docs/doc_examples/fce7a35a737fc9e54ac1225e310dd561.asciidoc
new file mode 100644
index 000000000..0a773ef35
--- /dev/null
+++ b/docs/doc_examples/fce7a35a737fc9e54ac1225e310dd561.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "published",
+ },
+ },
+ },
+ },
+ script: {
+ source:
+ "\n double value = dotProduct(params.query_vector, 'my_dense_vector');\n return sigmoid(1, Math.E, -value); \n ",
+ params: {
+ query_vector: [4, 3.4, -0.2],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd04289c54493e19c1d3ac70d0b489c4.asciidoc b/docs/doc_examples/fd04289c54493e19c1d3ac70d0b489c4.asciidoc
new file mode 100644
index 000000000..7805fd227
--- /dev/null
+++ b/docs/doc_examples/fd04289c54493e19c1d3ac70d0b489c4.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "my-pipeline",
+ processors: [
+ {
+ drop: {
+ description: "Drop documents that don't contain 'prod' tag",
+ if: "\n Collection tags = ctx.tags;\n if(tags != null){\n for (String tag : tags) {\n if (tag.toLowerCase().contains('prod')) {\n return false;\n }\n }\n }\n return true;\n ",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd0cd8ecd03468726b59a605eea06d75.asciidoc b/docs/doc_examples/fd0cd8ecd03468726b59a605eea06d75.asciidoc
new file mode 100644
index 000000000..2c97c321d
--- /dev/null
+++ b/docs/doc_examples/fd0cd8ecd03468726b59a605eea06d75.asciidoc
@@ -0,0 +1,40 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "test",
+ query: {
+ bool: {
+ must: [
+ {
+ match: {
+ content: "2016",
+ },
+ },
+ ],
+ should: [
+ {
+ rank_feature: {
+ field: "pagerank",
+ },
+ },
+ {
+ rank_feature: {
+ field: "url_length",
+ boost: 0.1,
+ },
+ },
+ {
+ rank_feature: {
+ field: "topics.sports",
+ boost: 0.4,
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd26bfdbe95b2d2db374385d12849f77.asciidoc b/docs/doc_examples/fd26bfdbe95b2d2db374385d12849f77.asciidoc
new file mode 100644
index 000000000..7209a78f7
--- /dev/null
+++ b/docs/doc_examples/fd26bfdbe95b2d2db374385d12849f77.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "trim_example",
+ settings: {
+ analysis: {
+ analyzer: {
+ keyword_trim: {
+ tokenizer: "keyword",
+ filter: ["trim"],
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd2d289e6b725fcc3cbe8fe7ffe02ea0.asciidoc b/docs/doc_examples/fd2d289e6b725fcc3cbe8fe7ffe02ea0.asciidoc
new file mode 100644
index 000000000..ec8571bec
--- /dev/null
+++ b/docs/doc_examples/fd2d289e6b725fcc3cbe8fe7ffe02ea0.asciidoc
@@ -0,0 +1,8 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getTemplate();
+console.log(response);
+----
diff --git a/docs/doc_examples/fd352b472d44d197022a46fce90b6ecb.asciidoc b/docs/doc_examples/fd352b472d44d197022a46fce90b6ecb.asciidoc
new file mode 100644
index 000000000..fcd562fa2
--- /dev/null
+++ b/docs/doc_examples/fd352b472d44d197022a46fce90b6ecb.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.mget({
+ docs: [
+ {
+ _index: "test",
+ _id: "1",
+ _source: false,
+ },
+ {
+ _index: "test",
+ _id: "2",
+ _source: ["field3", "field4"],
+ },
+ {
+ _index: "test",
+ _id: "3",
+ _source: {
+ include: ["user"],
+ exclude: ["user.location"],
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd60b4092c6552164862cec287359676.asciidoc b/docs/doc_examples/fd60b4092c6552164862cec287359676.asciidoc
new file mode 100644
index 000000000..3418d2f7b
--- /dev/null
+++ b/docs/doc_examples/fd60b4092c6552164862cec287359676.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.stopDatafeed({
+ datafeed_id: "datafeed-low_request_rate",
+ timeout: "30s",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd620f09dbce62c6f0f603a366623607.asciidoc b/docs/doc_examples/fd620f09dbce62c6f0f603a366623607.asciidoc
new file mode 100644
index 000000000..5fe2c6fd7
--- /dev/null
+++ b/docs/doc_examples/fd620f09dbce62c6f0f603a366623607.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.connector.updateFiltering({
+ connector_id: "my-sql-connector",
+ advanced_snippet: {
+ value: [
+ {
+ tables: ["users", "orders"],
+ query:
+ "SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd6fdc8fa994dd02cf1177077325304f.asciidoc b/docs/doc_examples/fd6fdc8fa994dd02cf1177077325304f.asciidoc
new file mode 100644
index 000000000..13c5bfeb8
--- /dev/null
+++ b/docs/doc_examples/fd6fdc8fa994dd02cf1177077325304f.asciidoc
@@ -0,0 +1,14 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.restore({
+ repository: "my_repository",
+ snapshot: "snapshot-20200617",
+ feature_states: ["geoip"],
+ indices: "kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001",
+ include_aliases: true,
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd738a9af7b5d21da31a7722f03aade8.asciidoc b/docs/doc_examples/fd738a9af7b5d21da31a7722f03aade8.asciidoc
new file mode 100644
index 000000000..c7bd58f9e
--- /dev/null
+++ b/docs/doc_examples/fd738a9af7b5d21da31a7722f03aade8.asciidoc
@@ -0,0 +1,13 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.cat.shards({
+ v: "true",
+ h: "index,prirep,shard,store",
+ s: "prirep,store",
+ bytes: "gb",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc b/docs/doc_examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc
new file mode 100644
index 000000000..b5b6b35b5
--- /dev/null
+++ b/docs/doc_examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc
@@ -0,0 +1,18 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRole({
+ name: "remote-replication",
+ cluster: ["manage_ccr"],
+ remote_indices: [
+ {
+ clusters: ["my_remote_cluster"],
+ names: ["leader-index"],
+ privileges: ["cross_cluster_replication"],
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fd9b668eeb1f117950bd4991c7c03fb1.asciidoc b/docs/doc_examples/fd9b668eeb1f117950bd4991c7c03fb1.asciidoc
new file mode 100644
index 000000000..202324d8c
--- /dev/null
+++ b/docs/doc_examples/fd9b668eeb1f117950bd4991c7c03fb1.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ analyzer: "standard",
+ text: ["this is a test", "the second text"],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fdada036a875d7995d5d7aba9c06361e.asciidoc b/docs/doc_examples/fdada036a875d7995d5d7aba9c06361e.asciidoc
new file mode 100644
index 000000000..245c36566
--- /dev/null
+++ b/docs/doc_examples/fdada036a875d7995d5d7aba9c06361e.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-2",
+ mappings: {
+ properties: {
+ my_vector: {
+ type: "dense_vector",
+ dims: 3,
+ index: false,
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fdc8e090293e78e9a6b283650b682517.asciidoc b/docs/doc_examples/fdc8e090293e78e9a6b283650b682517.asciidoc
new file mode 100644
index 000000000..8fd30d6cf
--- /dev/null
+++ b/docs/doc_examples/fdc8e090293e78e9a6b283650b682517.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.open({
+ index: "my-data-stream",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fde3463ddf136fdfff1306a60986515e.asciidoc b/docs/doc_examples/fde3463ddf136fdfff1306a60986515e.asciidoc
new file mode 100644
index 000000000..1296b55b0
--- /dev/null
+++ b/docs/doc_examples/fde3463ddf136fdfff1306a60986515e.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "*",
+ flat_settings: "true",
+ filter_path: "**.settings.archived*",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fdf7cfdf1c92d21ee710675596eac6fd.asciidoc b/docs/doc_examples/fdf7cfdf1c92d21ee710675596eac6fd.asciidoc
new file mode 100644
index 000000000..869b00ef4
--- /dev/null
+++ b/docs/doc_examples/fdf7cfdf1c92d21ee710675596eac6fd.asciidoc
@@ -0,0 +1,38 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index",
+ retriever: {
+ rrf: {
+ retrievers: [
+ {
+ standard: {
+ query: {
+ match: {
+ my_text_field: "the query string",
+ },
+ },
+ },
+ },
+ {
+ knn: {
+ field: "text_embedding.predicted_value",
+ k: 10,
+ num_candidates: 100,
+ query_vector_builder: {
+ text_embedding: {
+ model_id: "sentence-transformers__msmarco-minilm-l-12-v3",
+ model_text: "the query string",
+ },
+ },
+ },
+ },
+ ],
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc b/docs/doc_examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc
new file mode 100644
index 000000000..256eb6384
--- /dev/null
+++ b/docs/doc_examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc
@@ -0,0 +1,44 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.putIndexTemplate({
+ name: "sensor-template",
+ index_patterns: ["sensor-*"],
+ data_stream: {},
+ template: {
+ lifecycle: {
+ downsampling: [
+ {
+ after: "1d",
+ fixed_interval: "1h",
+ },
+ ],
+ },
+ settings: {
+ "index.mode": "time_series",
+ },
+ mappings: {
+ properties: {
+ node: {
+ type: "keyword",
+ time_series_dimension: true,
+ },
+ temperature: {
+ type: "half_float",
+ time_series_metric: "gauge",
+ },
+ voltage: {
+ type: "half_float",
+ time_series_metric: "gauge",
+ },
+ "@timestamp": {
+ type: "date",
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe3a927d868cbc530e08e05964d5174a.asciidoc b/docs/doc_examples/fe3a927d868cbc530e08e05964d5174a.asciidoc
new file mode 100644
index 000000000..8988080e4
--- /dev/null
+++ b/docs/doc_examples/fe3a927d868cbc530e08e05964d5174a.asciidoc
@@ -0,0 +1,33 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "my-index-000001",
+ id: 1,
+ refresh: "true",
+ document: {
+ product: "chocolate",
+ price: [20, 4],
+ },
+});
+console.log(response);
+
+const response1 = await client.search({
+ query: {
+ term: {
+ product: "chocolate",
+ },
+ },
+ sort: [
+ {
+ price: {
+ order: "asc",
+ mode: "avg",
+ },
+ },
+ ],
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/fe54f3e53dbe7dee40ec3108a461d19a.asciidoc b/docs/doc_examples/fe54f3e53dbe7dee40ec3108a461d19a.asciidoc
new file mode 100644
index 000000000..c879695f1
--- /dev/null
+++ b/docs/doc_examples/fe54f3e53dbe7dee40ec3108a461d19a.asciidoc
@@ -0,0 +1,30 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.putRoleMapping({
+ name: "jwt_user1",
+ refresh: "true",
+ roles: ["jwt_role1"],
+ rules: {
+ all: [
+ {
+ field: {
+ "realm.name": "jwt2",
+ },
+ },
+ {
+ field: {
+ username: "user2",
+ },
+ },
+ ],
+ },
+ enabled: true,
+ metadata: {
+ version: 1,
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe6429d0d82174aa5acf95e96e237380.asciidoc b/docs/doc_examples/fe6429d0d82174aa5acf95e96e237380.asciidoc
new file mode 100644
index 000000000..0e51c7393
--- /dev/null
+++ b/docs/doc_examples/fe6429d0d82174aa5acf95e96e237380.asciidoc
@@ -0,0 +1,41 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "idx",
+ settings: {
+ index: {
+ mapping: {
+ source: {
+ mode: "synthetic",
+ },
+ },
+ },
+ },
+ mappings: {
+ properties: {
+ my_range: {
+ type: "ip_range",
+ },
+ },
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "idx",
+ id: 1,
+ document: {
+ my_range: [
+ "10.0.0.0/24",
+ {
+ gte: "10.0.0.0",
+ lte: "10.0.0.255",
+ },
+ ],
+ },
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc b/docs/doc_examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc
new file mode 100644
index 000000000..cd8c15f98
--- /dev/null
+++ b/docs/doc_examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc
@@ -0,0 +1,22 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "index",
+ query: {
+ script_score: {
+ query: {
+ match: {
+ body: "elasticsearch",
+ },
+ },
+ script: {
+ source: "_score * saturation(doc['pagerank'].value, 10)",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe7169bab8e626f582c9ea87585d0f35.asciidoc b/docs/doc_examples/fe7169bab8e626f582c9ea87585d0f35.asciidoc
new file mode 100644
index 000000000..4a08144cf
--- /dev/null
+++ b/docs/doc_examples/fe7169bab8e626f582c9ea87585d0f35.asciidoc
@@ -0,0 +1,20 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ my_histogram: {
+ type: "histogram",
+ },
+ my_text: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe806011466e7cdc1590da186297edb6.asciidoc b/docs/doc_examples/fe806011466e7cdc1590da186297edb6.asciidoc
new file mode 100644
index 000000000..d7d6148cc
--- /dev/null
+++ b/docs/doc_examples/fe806011466e7cdc1590da186297edb6.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe825c05e13e8163073166572c7ac97d.asciidoc b/docs/doc_examples/fe825c05e13e8163073166572c7ac97d.asciidoc
new file mode 100644
index 000000000..47072cba1
--- /dev/null
+++ b/docs/doc_examples/fe825c05e13e8163073166572c7ac97d.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "geocells",
+ id: 1,
+ pipeline: "geohex2shape",
+ document: {
+ geocell: "811fbffffffffff",
+ },
+});
+console.log(response);
+
+const response1 = await client.get({
+ index: "geocells",
+ id: 1,
+});
+console.log(response1);
+----
diff --git a/docs/doc_examples/fe8c3e2632f5057bfbd1898a8fe4d0d2.asciidoc b/docs/doc_examples/fe8c3e2632f5057bfbd1898a8fe4d0d2.asciidoc
new file mode 100644
index 000000000..9c1b8804e
--- /dev/null
+++ b/docs/doc_examples/fe8c3e2632f5057bfbd1898a8fe4d0d2.asciidoc
@@ -0,0 +1,36 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.searchApplication.put({
+ name: "my_search_application",
+ search_application: {
+ indices: ["index1", "index2"],
+ template: {
+ script: {
+ lang: "mustache",
+ source:
+ '\n {\n "query": {\n "multi_match": {\n "query": "{{query_string}}",\n "fields": [{{#text_fields}}"{{name}}^{{boost}}",{{/text_fields}}]\n }\n },\n "explain": "{{explain}}",\n "from": "{{from}}",\n "size": "{{size}}"\n }\n ',
+ params: {
+ query_string: "*",
+ text_fields: [
+ {
+ name: "title",
+ boost: 10,
+ },
+ {
+ name: "description",
+ boost: 5,
+ },
+ ],
+ explain: false,
+ from: 0,
+ size: 10,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fe96ca3b2a559d8411aca7ed5f3854bd.asciidoc b/docs/doc_examples/fe96ca3b2a559d8411aca7ed5f3854bd.asciidoc
new file mode 100644
index 000000000..a8701212d
--- /dev/null
+++ b/docs/doc_examples/fe96ca3b2a559d8411aca7ed5f3854bd.asciidoc
@@ -0,0 +1,11 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.getSettings({
+ index: "my-index-000001",
+ flat_settings: "true",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/febb71d774e0a1fc67454213d7448c53.asciidoc b/docs/doc_examples/febb71d774e0a1fc67454213d7448c53.asciidoc
new file mode 100644
index 000000000..791a84783
--- /dev/null
+++ b/docs/doc_examples/febb71d774e0a1fc67454213d7448c53.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.update({
+ index: "my-index-000001",
+ id: 1,
+ script: "ctx._source.remove('new_field')",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fece7c0fe1f7d113aa05ff5346a18aff.asciidoc b/docs/doc_examples/fece7c0fe1f7d113aa05ff5346a18aff.asciidoc
new file mode 100644
index 000000000..a820ab4eb
--- /dev/null
+++ b/docs/doc_examples/fece7c0fe1f7d113aa05ff5346a18aff.asciidoc
@@ -0,0 +1,43 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.bulk({
+ index: "my-data-stream",
+ refresh: "true",
+ operations: [
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-03-08T11:04:05.000Z",
+ user: {
+ id: "vlb44hny",
+ },
+ message: "Login attempt failed",
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-03-08T11:06:07.000Z",
+ user: {
+ id: "8a4f500d",
+ },
+ message: "Login successful",
+ },
+ {
+ create: {},
+ },
+ {
+ "@timestamp": "2099-03-09T11:07:08.000Z",
+ user: {
+ id: "l7gk7f82",
+ },
+ message: "Logout successful",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/feda4b996ea7004f8b2c5f5007fb717b.asciidoc b/docs/doc_examples/feda4b996ea7004f8b2c5f5007fb717b.asciidoc
new file mode 100644
index 000000000..550ae710f
--- /dev/null
+++ b/docs/doc_examples/feda4b996ea7004f8b2c5f5007fb717b.asciidoc
@@ -0,0 +1,21 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.putPipeline({
+ id: "networks_lookup",
+ processors: [
+ {
+ enrich: {
+ description: "Add 'network' data based on 'ip'",
+ policy_name: "networks-policy",
+ field: "ip",
+ target_field: "network",
+ max_matches: "10",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/fef520cbc9b0656e6aac7b3dd3da9984.asciidoc b/docs/doc_examples/fef520cbc9b0656e6aac7b3dd3da9984.asciidoc
new file mode 100644
index 000000000..39457fccc
--- /dev/null
+++ b/docs/doc_examples/fef520cbc9b0656e6aac7b3dd3da9984.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.eql.search({
+ index: "my-index*",
+ query:
+ "\n sample by host\n [any where uptime > 0] by os\n [any where port > 100] by op_sys\n [any where bool == true] by os\n ",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff05842419968a2141bde0371ac2f6f4.asciidoc b/docs/doc_examples/ff05842419968a2141bde0371ac2f6f4.asciidoc
new file mode 100644
index 000000000..f64626281
--- /dev/null
+++ b/docs/doc_examples/ff05842419968a2141bde0371ac2f6f4.asciidoc
@@ -0,0 +1,19 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.renderSearchTemplate({
+ source: {
+ query: {
+ match: {
+ "user.group.emails": "{{#join}}emails{{/join}}",
+ },
+ },
+ },
+ params: {
+ emails: ["user1@example.com", "user_one@example.com"],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc b/docs/doc_examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc
new file mode 100644
index 000000000..c0b5cd35e
--- /dev/null
+++ b/docs/doc_examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-new-index-000001",
+ size: 0,
+ filter_path: "hits.total",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc b/docs/doc_examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc
new file mode 100644
index 000000000..1357bcc36
--- /dev/null
+++ b/docs/doc_examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.create({
+ index: "my-index-000001",
+ mappings: {
+ properties: {
+ timestamp: {
+ type: "date",
+ },
+ temperature: {
+ type: "long",
+ },
+ voltage: {
+ type: "double",
+ },
+ node: {
+ type: "keyword",
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc b/docs/doc_examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc
new file mode 100644
index 000000000..08c23aa74
--- /dev/null
+++ b/docs/doc_examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc
@@ -0,0 +1,29 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ingest.simulate({
+ pipeline: {
+ processors: [
+ {
+ redact: {
+ field: "message",
+ patterns: ["%{GITHUB_NAME:GITHUB_NAME}"],
+ pattern_definitions: {
+ GITHUB_NAME: "@%{USERNAME}",
+ },
+ },
+ },
+ ],
+ },
+ docs: [
+ {
+ _source: {
+ message: "@elastic-data-management the PR is ready for review",
+ },
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff56ded50c65998c70f3c5691ddc6f86.asciidoc b/docs/doc_examples/ff56ded50c65998c70f3c5691ddc6f86.asciidoc
new file mode 100644
index 000000000..0db142db9
--- /dev/null
+++ b/docs/doc_examples/ff56ded50c65998c70f3c5691ddc6f86.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.snapshot.deleteRepository({
+ name: "my_repository",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff63ae39c34925dbfa54282ec9989124.asciidoc b/docs/doc_examples/ff63ae39c34925dbfa54282ec9989124.asciidoc
new file mode 100644
index 000000000..6eec21a63
--- /dev/null
+++ b/docs/doc_examples/ff63ae39c34925dbfa54282ec9989124.asciidoc
@@ -0,0 +1,26 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.reindex({
+ source: {
+ remote: {
+ host: "http://otherhost:9200",
+ headers: {
+ Authorization: "ApiKey API_KEY_VALUE",
+ },
+ },
+ index: "my-index-000001",
+ query: {
+ match: {
+ test: "data",
+ },
+ },
+ },
+ dest: {
+ index: "my-new-index-000001",
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc b/docs/doc_examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc
new file mode 100644
index 000000000..89bd3a53c
--- /dev/null
+++ b/docs/doc_examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc
@@ -0,0 +1,15 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.ml.inferTrainedModel({
+ model_id: "model2",
+ docs: [
+ {
+ text_field: "Hi my name is Josh and I live in Berlin",
+ },
+ ],
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff7b81fa96c3b994efa3dee230512291.asciidoc b/docs/doc_examples/ff7b81fa96c3b994efa3dee230512291.asciidoc
new file mode 100644
index 000000000..0fdc9278b
--- /dev/null
+++ b/docs/doc_examples/ff7b81fa96c3b994efa3dee230512291.asciidoc
@@ -0,0 +1,27 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.graph.explore({
+ index: "clicklogs",
+ query: {
+ match: {
+ "query.raw": "midi",
+ },
+ },
+ vertices: [
+ {
+ field: "product",
+ },
+ ],
+ connections: {
+ vertices: [
+ {
+ field: "query.raw",
+ },
+ ],
+ },
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc b/docs/doc_examples/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc
new file mode 100644
index 000000000..e8bf6e810
--- /dev/null
+++ b/docs/doc_examples/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc
@@ -0,0 +1,34 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.index({
+ index: "index_1",
+ id: 1,
+ document: {
+ text: "Document in index 1",
+ },
+});
+console.log(response);
+
+const response1 = await client.index({
+ index: "index_2",
+ id: 2,
+ refresh: "true",
+ document: {
+ text: "Document in index 2",
+ },
+});
+console.log(response1);
+
+const response2 = await client.search({
+ index: "index_1,index_2",
+ query: {
+ terms: {
+ _tier: ["data_hot", "data_warm"],
+ },
+ },
+});
+console.log(response2);
+----
diff --git a/docs/doc_examples/ffcf80e1094aa2d774f56f6b0bc54827.asciidoc b/docs/doc_examples/ffcf80e1094aa2d774f56f6b0bc54827.asciidoc
new file mode 100644
index 000000000..785b77d90
--- /dev/null
+++ b/docs/doc_examples/ffcf80e1094aa2d774f56f6b0bc54827.asciidoc
@@ -0,0 +1,12 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.indices.analyze({
+ tokenizer: "keyword",
+ filter: ["word_delimiter_graph"],
+ text: "Neil's-Super-Duper-XL500--42+AutoCoder",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ffd63dd186ab81b893faec3b3358fa09.asciidoc b/docs/doc_examples/ffd63dd186ab81b893faec3b3358fa09.asciidoc
new file mode 100644
index 000000000..79abaeb97
--- /dev/null
+++ b/docs/doc_examples/ffd63dd186ab81b893faec3b3358fa09.asciidoc
@@ -0,0 +1,10 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.security.deleteUser({
+ username: "jacknich",
+});
+console.log(response);
+----
diff --git a/docs/doc_examples/ffe45a7c70071730c2078cabb8cbdf95.asciidoc b/docs/doc_examples/ffe45a7c70071730c2078cabb8cbdf95.asciidoc
new file mode 100644
index 000000000..876bb701d
--- /dev/null
+++ b/docs/doc_examples/ffe45a7c70071730c2078cabb8cbdf95.asciidoc
@@ -0,0 +1,31 @@
+// This file is autogenerated, DO NOT EDIT
+// Use `node scripts/generate-docs-examples.js` to generate the docs examples
+
+[source, js]
+----
+const response = await client.search({
+ index: "my-index-000001",
+ query: {
+ script_score: {
+ query: {
+ bool: {
+ filter: {
+ term: {
+ status: "published",
+ },
+ },
+ },
+ },
+ script: {
+ source:
+ "\n float[] v = doc['my_dense_vector'].vectorValue;\n float vm = doc['my_dense_vector'].magnitude;\n float dotProduct = 0;\n for (int i = 0; i < v.length; i++) {\n dotProduct += v[i] * params.queryVector[i];\n }\n return dotProduct / (vm * (float) params.queryVectorMag);\n ",
+ params: {
+ queryVector: [4, 3.4, -0.2],
+ queryVectorMag: 5.25357,
+ },
+ },
+ },
+ },
+});
+console.log(response);
+----
diff --git a/docs/examples/asStream.asciidoc b/docs/examples/asStream.asciidoc
index 00929bab0..e27c0a1b1 100644
--- a/docs/examples/asStream.asciidoc
+++ b/docs/examples/asStream.asciidoc
@@ -1,18 +1,23 @@
-== asStream
+[[as_stream_examples]]
+=== asStream
-Instead of getting the parsed body back, you will get the raw Node.js stream of data.
+Instead of getting the parsed body back, you will get the raw Node.js stream of
+data.
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
- await client.bulk({
+ const bulkResponse = await client.bulk({
refresh: true,
- body: [
+ operations: [
// operation to perform
{ index: { _index: 'game-of-thrones' } },
// the document to index
@@ -35,57 +40,55 @@ async function run () {
]
})
+ if (bulkResponse.errors) {
+ console.log(bulkResponse)
+ process.exit(1)
+ }
+
// Let's search!
- const { body } = await client.search({
+ const result = await client.search({
index: 'game-of-thrones',
- body: {
- query: {
- match: {
- quote: 'winter'
- }
+ query: {
+ match: {
+ quote: 'winter'
}
}
}, {
asStream: true
})
- // stream async iteration, available in Node.js ≥ 10
- var payload = ''
- body.setEncoding('utf8')
- for await (const chunk of body) {
+ let payload = ''
+ result.setEncoding('utf8')
+ for await (const chunk of result) {
payload += chunk
}
console.log(JSON.parse(payload))
-
- // classic stream callback style
- var payload = ''
- body.setEncoding('utf8')
- body.on('data', chunk => { payload += chunk })
- body.on('error', console.log)
- body.on('end', () => {
- console.log(JSON.parse(payload))
- })
}
run().catch(console.log)
----
-TIP: This can be useful if you need to pipe the Elasticsearch's response to a proxy, or send it directly to another source.
+TIP: This can be useful if you need to pipe the {es}'s response to a proxy, or
+send it directly to another source.
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
const fastify = require('fastify')()
fastify.post('/search/:index', async (req, reply) => {
const { body, statusCode, headers } = await client.search({
index: req.params.index,
- body: req.body
+ ...req.body
}, {
- asStream: true
+ asStream: true,
+ meta: true
})
reply.code(statusCode).headers(headers)
@@ -93,4 +96,4 @@ fastify.post('/search/:index', async (req, reply) => {
})
fastify.listen(3000)
-----
\ No newline at end of file
+----
diff --git a/docs/examples/bulk.asciidoc b/docs/examples/bulk.asciidoc
index 93c5397c1..74725c9e9 100644
--- a/docs/examples/bulk.asciidoc
+++ b/docs/examples/bulk.asciidoc
@@ -1,58 +1,93 @@
-= Bulk
+[[bulk_examples]]
+=== Bulk
-The `bulk` API makes it possible to perform many index/delete operations in a single API call. +
-This can greatly increase the indexing speed.
+With the {jsclient}/api-reference.html#_bulk[`bulk` API], you can perform multiple index/delete operations in a
+single API call. The `bulk` API significantly increases indexing speed.
+
+NOTE: You can also use the {jsclient}/client-helpers.html[bulk helper].
[source,js]
----
'use strict'
+require('array.prototype.flatmap').shim()
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
- await client.bulk({
- // here we are forcing an index refresh,
- // otherwise we will not get any result
- // in the consequent search
- refresh: true,
- body: [
- // operation to perform
- { index: { _index: 'game-of-thrones' } },
- // the document to index
- {
- character: 'Ned Stark',
- quote: 'Winter is coming.'
- },
-
- { index: { _index: 'game-of-thrones' } },
- {
- character: 'Daenerys Targaryen',
- quote: 'I am the blood of the dragon.'
- },
-
- { index: { _index: 'game-of-thrones' } },
- {
- character: 'Tyrion Lannister',
- quote: 'A mind needs books like a sword needs a whetstone.'
- }
- ]
- })
-
- // Let's search!
- const { body } = await client.search({
- index: 'game-of-thrones',
- body: {
- query: {
- match: {
- quote: 'winter'
+ await client.indices.create({
+ index: 'tweets',
+ operations: {
+ mappings: {
+ properties: {
+ id: { type: 'integer' },
+ text: { type: 'text' },
+ user: { type: 'keyword' },
+ time: { type: 'date' }
}
}
}
- })
+ }, { ignore: [400] })
+
+ const dataset = [{
+ id: 1,
+ text: 'If I fall, don\'t bring me back.',
+ user: 'jon',
+ time: new Date()
+ }, {
+ id: 2,
+ text: 'Winter is coming',
+ user: 'ned',
+ time: new Date()
+ }, {
+ id: 3,
+ text: 'A Lannister always pays his debts.',
+ user: 'tyrion',
+ time: new Date()
+ }, {
+ id: 4,
+ text: 'I am the blood of the dragon.',
+ user: 'daenerys',
+ time: new Date()
+ }, {
+ id: 5, // change this value to a string to see the bulk response with errors
+ text: 'A girl is Arya Stark of Winterfell. And I\'m going home.',
+ user: 'arya',
+ time: new Date()
+ }]
+
+ const operations = dataset.flatMap(doc => [{ index: { _index: 'tweets' } }, doc])
- console.log(body.hits.hits)
+ const bulkResponse = await client.bulk({ refresh: true, operations })
+
+ if (bulkResponse.errors) {
+ const erroredDocuments = []
+ // The items array has the same order of the dataset we just indexed.
+ // The presence of the `error` key indicates that the operation
+ // that we did for the document has failed.
+ bulkResponse.items.forEach((action, i) => {
+ const operation = Object.keys(action)[0]
+ if (action[operation].error) {
+ erroredDocuments.push({
+ // If the status is 429 it means that you can retry the document,
+ // otherwise it's very likely a mapping error, and you should
+ // fix the document before to try it again.
+ status: action[operation].status,
+ error: action[operation].error,
+ operation: operations[i * 2],
+ document: operations[i * 2 + 1]
+ })
+ }
+ })
+ console.log(erroredDocuments)
+ }
+
+ const count = await client.count({ index: 'tweets' })
+ console.log(count)
}
run().catch(console.log)
-----
\ No newline at end of file
+----
diff --git a/docs/examples/exists.asciidoc b/docs/examples/exists.asciidoc
index 4c64287a3..29a39a196 100644
--- a/docs/examples/exists.asciidoc
+++ b/docs/examples/exists.asciidoc
@@ -1,4 +1,5 @@
-= Exists
+[[exists_examples]]
+=== Exists
Check that the document `/game-of-thrones/1` exists.
@@ -9,24 +10,27 @@ NOTE: Since this API uses the `HEAD` method, the body value will be boolean.
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
await client.index({
index: 'game-of-thrones',
id: '1',
- body: {
+ document: {
character: 'Ned Stark',
quote: 'Winter is coming.'
}
})
- const { body } = await client.exists({
+ const exists = await client.exists({
index: 'game-of-thrones',
id: 1
})
- console.log(body) // true
+ console.log(exists) // true
}
run().catch(console.log)
diff --git a/docs/examples/get.asciidoc b/docs/examples/get.asciidoc
index b978bc8ce..f6dd94ddf 100644
--- a/docs/examples/get.asciidoc
+++ b/docs/examples/get.asciidoc
@@ -1,31 +1,36 @@
-= Get
+[[get_examples]]
+=== Get
-The get API allows to get a typed JSON document from the index based on its id. +
-The following example gets a JSON document from an index called `game-of-thrones`, under a type called `_doc`, with id valued `'1'`.
+The get API allows to get a typed JSON document from the index based on its id.
+The following example gets a JSON document from an index called
+`game-of-thrones`, under a type called `_doc`, with id valued `'1'`.
[source,js]
---------
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
await client.index({
index: 'game-of-thrones',
id: '1',
- body: {
+ document: {
character: 'Ned Stark',
quote: 'Winter is coming.'
}
})
- const { body } = await client.get({
+ const document = await client.get({
index: 'game-of-thrones',
id: '1'
})
- console.log(body)
+ console.log(document)
}
run().catch(console.log)
diff --git a/docs/examples/ignore.asciidoc b/docs/examples/ignore.asciidoc
index d4b5a9af1..de5577dcd 100644
--- a/docs/examples/ignore.asciidoc
+++ b/docs/examples/ignore.asciidoc
@@ -1,4 +1,6 @@
-== Ignore
+[[ignore_examples]]
+=== Ignore
+
HTTP status codes which should not be considered errors for this request.
[source,js]
@@ -6,12 +8,15 @@ HTTP status codes which should not be considered errors for this request.
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
- await client.bulk({
+ const bulkResponse = await client.bulk({
refresh: true,
- body: [
+ operations: [
// operation to perform
{ index: { _index: 'game-of-thrones' } },
// the document to index
@@ -34,8 +39,13 @@ async function run () {
]
})
+ if (bulkResponse.errors) {
+ console.log(bulkResponse)
+ process.exit(1)
+ }
+
// Let's search!
- const { body } = await client.search({
+ const result = await client.search({
index: 'game-of-thrones',
body: {
query: {
@@ -48,7 +58,7 @@ async function run () {
ignore: [404]
})
- console.log(body) // ResponseError
+ console.log(result) // ResponseError
}
run().catch(console.log)
diff --git a/docs/examples/index.asciidoc b/docs/examples/index.asciidoc
new file mode 100644
index 000000000..e786675ec
--- /dev/null
+++ b/docs/examples/index.asciidoc
@@ -0,0 +1,34 @@
+[[examples]]
+== Examples
+
+Following you can find some examples on how to use the client.
+
+* Use of the <> parameter;
+* Executing a <> request;
+* Executing a <> request;
+* Executing a <> request;
+* Executing a <> request;
+* Executing a <> request;
+* Executing a <> request;
+* Executing a <> request;
+* Use of the <> parameter;
+* Executing a <> request;
+* How do I <>?
+* Executing a <> request;
+* I need <>;
+* How to use the <> method;
+
+include::asStream.asciidoc[]
+include::bulk.asciidoc[]
+include::exists.asciidoc[]
+include::get.asciidoc[]
+include::ignore.asciidoc[]
+include::msearch.asciidoc[]
+include::scroll.asciidoc[]
+include::search.asciidoc[]
+include::suggest.asciidoc[]
+include::transport.request.asciidoc[]
+include::sql.query.asciidoc[]
+include::update.asciidoc[]
+include::update_by_query.asciidoc[]
+include::reindex.asciidoc[]
diff --git a/docs/examples/msearch.asciidoc b/docs/examples/msearch.asciidoc
index 5915dc77d..66222a34e 100644
--- a/docs/examples/msearch.asciidoc
+++ b/docs/examples/msearch.asciidoc
@@ -1,18 +1,23 @@
-= MSearch
+[[msearch_examples]]
+=== MSearch
-The multi search API allows to execute several search requests within the same API.
+The multi search API allows to execute several search requests within the same
+API.
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
- await client.bulk({
+ const bulkResponse = await client.bulk({
refresh: true,
- body: [
+ operations: [
{ index: { _index: 'game-of-thrones' } },
{
character: 'Ned Stark',
@@ -33,8 +38,13 @@ async function run () {
]
})
- const { body } = await client.msearch({
- body: [
+ if (bulkResponse.errors) {
+ console.log(bulkResponse)
+ process.exit(1)
+ }
+
+ const result = await client.msearch({
+ searches: [
{ index: 'game-of-thrones' },
{ query: { match: { character: 'Daenerys' } } },
@@ -43,7 +53,7 @@ async function run () {
]
})
- console.log(body.responses)
+ console.log(result.responses)
}
run().catch(console.log)
diff --git a/docs/examples/proxy/.gitignore b/docs/examples/proxy/.gitignore
new file mode 100644
index 000000000..12536433a
--- /dev/null
+++ b/docs/examples/proxy/.gitignore
@@ -0,0 +1,51 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# coverage output
+coverage.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules
+jspm_packages
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
+
+# mac files
+.DS_Store
+
+# vim swap files
+*.swp
+
+#Jetbrains editor folder
+.idea
+
+.vercel
\ No newline at end of file
diff --git a/docs/examples/proxy/README.md b/docs/examples/proxy/README.md
new file mode 100644
index 000000000..23e835aae
--- /dev/null
+++ b/docs/examples/proxy/README.md
@@ -0,0 +1,65 @@
+# Elasticsearch proxy example
+
+This folder contains an example of how to build a lightweight proxy
+between your frontend code and Elasticsearch if you don't
+have a more sophisticated backend in place yet.
+
+> **IMPORTANT:** This is not a production ready code and it is only for demonstration purposes,
+> we make no guarantees on it's security and stability.
+
+This project is designed to be deployed on [Vercel](https://vercel.com/), a cloud platform
+for static sites and Serverless Functions. You can use other functions providers,
+such as [Google Cloud functions](https://cloud.google.com/functions).
+
+## Project structure
+
+The project comes with four endpoints:
+
+- `/api/search`: runs a search, requires `'read'` permission
+- `/api/autocomplete`: runs an autocomplete suggestion, requires `'read'` permission
+- `/api/index`: indexes or updates a document, requires `'write'` permission
+- `/api/delete`: deletes a document, requires `'write'` permission
+
+Inside `utils/authorize.js` you can find the authorization logic for the endpoints.
+In each endpoint you should configure the `INDEX` variable.
+
+## How to use
+
+Create an account on Vercel, then create a deployment on Elastic Cloud. If you
+don't have an account on Elastic Cloud, you can create one with a free 14-day trial
+of the [Elasticsearch Service](https://www.elastic.co/elasticsearch/service).
+
+### Configure Elasticsearch
+
+Once you have created a deployment on Elastic Cloud copy the generated Cloud Id and the credentials.
+Then open `utils/prepare-elasticsearch.js` and fill your credentials. The script generates
+an [Api Key](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html)
+that you can use for authenticating your request. Based on the configuration of the Api Key, you will be able
+to perform different operation on the specified indices or index pattern.
+
+### Configure Vercel
+
+Install the [Vercel CLI](https://vercel.com/docs/cli) to bootstrap the project,
+or read the [quickstart](https://vercel.com/docs) documentation.
+
+If you are using the CLI, bootstrap the project by running `vercel`. Test the project locally
+with `vercel dev`, and deploy it with `vercel deploy`.
+Configure the `ELASTIC_CLOUD_ID` [environment varible](https://vercel.com/docs/environment-variables) as well.
+The Api Key is passed from the frontend app via a `Authorization` header as `Bearer` token and is
+used to authorize the API calls to the endpoints as well.
+Additional configuration, such as CORS, can be added to [`vercel.json`](https://vercel.com/docs/configuration).
+
+## Authentication
+
+If you are using Elasticsearch only for search purposes, such as a search box, you can create
+an Api Key with `read` permissions and store it in your frontend app. Then you can send it
+via `Authorization` header to the proxy and run your searches.
+
+If you need to ingest data as well, it's more secure to have a strong authentication in your application.
+For such cases, use an external authentication service, such as [Auth0](https://auth0.com/)
+or [Magic Link](https://magic.link/). Then create a different Api Key with `read` and `write`
+permissions for authenticated users, that will not be stored in the frontend app.
+
+## License
+
+This software is licensed under the [Apache 2 license](../../LICENSE).
diff --git a/docs/examples/proxy/api/autocomplete.js b/docs/examples/proxy/api/autocomplete.js
new file mode 100644
index 000000000..fb18298cf
--- /dev/null
+++ b/docs/examples/proxy/api/autocomplete.js
@@ -0,0 +1,103 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// IMPORTANT: this is not a production ready code & purely for demonstration purposes,
+// we make no guarantees on it's security and stability
+
+// NOTE: to make this endpoint work, you should create an ApiKey with 'read' permissions
+
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const authorize = require('../utils/authorize')
+
+const INDEX = ''
+const client = new Client({
+ cloud: {
+ id: process.env.ELASTIC_CLOUD_ID
+ }
+})
+
+module.exports = async (req, res) => {
+ const [err, token] = authorize(req)
+ if (err) {
+ res.status(401)
+ res.json(err)
+ return
+ }
+
+ if (typeof req.query.q !== 'string') {
+ res.status(400)
+ res.json({
+ error: 'Bad Request',
+ message: 'Missing parameter "query.q"',
+ statusCode: 400
+ })
+ return
+ }
+
+ if (req.query.q.length < 3) {
+ res.status(400)
+ res.json({
+ error: 'Bad Request',
+ message: 'The length of "query.q" should be at least 3',
+ statusCode: 400
+ })
+ return
+ }
+
+ try {
+ const response = await client.search({
+ index: INDEX,
+ // You could directly send from the browser
+ // the Elasticsearch's query DSL, but it will
+ // expose you to the risk that a malicious user
+ // could overload your cluster by crafting
+ // expensive queries.
+ _source: ['id', 'url', 'name'], // the fields you want to show in the autocompletion
+ size: 0,
+ // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html
+ suggest: {
+ suggestions: {
+ prefix: req.query.q,
+ completion: {
+ field: 'suggest',
+ size: 5
+ }
+ }
+ }
+ }, {
+ headers: {
+ Authorization: `ApiKey ${token}`
+ }
+ })
+
+ // It might be useful to configure http control caching headers
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
+ // res.setHeader('stale-while-revalidate', '30')
+ res.json(response)
+ } catch (err) {
+ res.status(err.statusCode || 500)
+ res.json({
+ error: err.name,
+ message: err.message,
+ statusCode: err.statusCode || 500
+ })
+ }
+}
diff --git a/docs/examples/proxy/api/delete.js b/docs/examples/proxy/api/delete.js
new file mode 100644
index 000000000..b76108428
--- /dev/null
+++ b/docs/examples/proxy/api/delete.js
@@ -0,0 +1,74 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// IMPORTANT: this is not a production ready code & purely for demonstration purposes,
+// we make no guarantees on it's security and stability
+
+// NOTE: to make this endpoint work, you should create an ApiKey with 'write' permissions
+
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const authorize = require('../utils/authorize')
+
+const INDEX = ''
+const client = new Client({
+ cloud: {
+ id: process.env.ELASTIC_CLOUD_ID
+ }
+})
+
+module.exports = async (req, res) => {
+ const [err, token] = authorize(req)
+ if (err) {
+ res.status(401)
+ res.json(err)
+ return
+ }
+
+ if (typeof req.query.id !== 'string' && req.query.id.length === 0) {
+ res.status(400)
+ res.json({
+ error: 'Bad Request',
+ message: 'Missing document id',
+ statusCode: 400
+ })
+ return
+ }
+
+ try {
+ const response = await client.delete({
+ index: INDEX,
+ id: req.query.id
+ }, {
+ headers: {
+ Authorization: `ApiKey ${token}`
+ }
+ })
+
+ res.json(response)
+ } catch (err) {
+ res.status(err.statusCode || 500)
+ res.json({
+ error: err.name,
+ message: err.message,
+ statusCode: err.statusCode || 500
+ })
+ }
+}
diff --git a/docs/examples/proxy/api/index.js b/docs/examples/proxy/api/index.js
new file mode 100644
index 000000000..901139713
--- /dev/null
+++ b/docs/examples/proxy/api/index.js
@@ -0,0 +1,77 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// IMPORTANT: this is not a production ready code & purely for demonstration purposes,
+// we make no guarantees on it's security and stability
+
+// NOTE: to make this endpoint work, you should create an ApiKey with 'write' permissions
+
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const authorize = require('../utils/authorize')
+
+const INDEX = ''
+const client = new Client({
+ cloud: {
+ id: process.env.ELASTIC_CLOUD_ID
+ }
+})
+
+module.exports = async (req, res) => {
+ const [err, token] = authorize(req)
+ if (err) {
+ res.status(401)
+ res.json(err)
+ return
+ }
+
+ if (typeof req.body !== 'object') {
+ res.status(400)
+ res.json({
+ error: 'Bad Request',
+ message: 'The document should be an object',
+ statusCode: 400
+ })
+ return
+ }
+
+ try {
+ const response = await client.index({
+ index: INDEX,
+ id: req.query.id,
+ document: req.body
+ }, {
+ headers: {
+ Authorization: `ApiKey ${token}`
+ },
+ meta: true
+ })
+
+ res.status(response.statusCode)
+ res.json(response.body)
+ } catch (err) {
+ res.status(err.statusCode || 500)
+ res.json({
+ error: err.name,
+ message: err.message,
+ statusCode: err.statusCode || 500
+ })
+ }
+}
diff --git a/docs/examples/proxy/api/search.js b/docs/examples/proxy/api/search.js
new file mode 100644
index 000000000..8659e08f4
--- /dev/null
+++ b/docs/examples/proxy/api/search.js
@@ -0,0 +1,84 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// IMPORTANT: this is not a production ready code & purely for demonstration purposes,
+// we make no guarantees on it's security and stability
+
+// NOTE: to make this endpoint work, you should create an ApiKey with 'read' permissions
+
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const authorize = require('../utils/authorize')
+
+const INDEX = ''
+const client = new Client({
+ cloud: {
+ id: process.env.ELASTIC_CLOUD_ID
+ }
+})
+
+module.exports = async (req, res) => {
+ const [err, token] = authorize(req)
+ if (err) {
+ res.status(401)
+ res.json(err)
+ return
+ }
+
+ if (typeof req.body.text !== 'string') {
+ res.status(400)
+ res.json({
+ error: 'Bad Request',
+ message: 'Missing parameter "body.text"',
+ statusCode: 400
+ })
+ return
+ }
+
+ try {
+ const response = await client.search({
+ index: INDEX,
+ // You could directly send from the browser
+ // the Elasticsearch's query DSL, but it will
+ // expose you to the risk that a malicious user
+ // could overload your cluster by crafting
+ // expensive queries.
+ query: {
+ match: { field: req.body.text }
+ }
+ }, {
+ headers: {
+ Authorization: `ApiKey ${token}`
+ }
+ })
+
+ // It might be useful to configure http control caching headers
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
+ // res.setHeader('stale-while-revalidate', '30')
+ res.json(response)
+ } catch (err) {
+ res.status(err.statusCode || 500)
+ res.json({
+ error: err.name,
+ message: err.message,
+ statusCode: err.statusCode || 500
+ })
+ }
+}
diff --git a/docs/examples/proxy/package.json b/docs/examples/proxy/package.json
new file mode 100644
index 000000000..cdbeea15e
--- /dev/null
+++ b/docs/examples/proxy/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "proxy-example",
+ "version": "1.0.0",
+ "private": true,
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "test": "standard"
+ },
+ "keywords": [],
+ "author": "Elastic Client Library Maintainers",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@elastic/elasticsearch": "^8.0.0"
+ },
+ "devDependencies": {
+ "standard": "^16.0.3"
+ }
+}
diff --git a/docs/examples/proxy/utils/authorize.js b/docs/examples/proxy/utils/authorize.js
new file mode 100644
index 000000000..97bb9c4b5
--- /dev/null
+++ b/docs/examples/proxy/utils/authorize.js
@@ -0,0 +1,54 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// IMPORTANT: this is not a production ready code & purely for demonstration purposes,
+// we make no guarantees on it's security and stability
+
+'use strict'
+
+module.exports = (req) => {
+ const auth = req.headers.authorization
+ if (typeof auth !== 'string') {
+ return [{
+ error: 'Unauthorized',
+ message: 'Missing authorization header',
+ statusCode: 401
+ }, null]
+ }
+
+ const [type, token] = req.headers.authorization.split(' ')
+
+ if (type !== 'Bearer') {
+ return [{
+ error: 'Unauthorized',
+ message: 'Bad authorization type',
+ statusCode: 401
+ }, null]
+ }
+
+ if (token.length === 0) {
+ return [{
+ error: 'Unauthorized',
+ message: 'Bad authorization token',
+ statusCode: 401
+ }, null]
+ }
+
+ return [null, token]
+}
diff --git a/docs/examples/proxy/utils/prepare-elasticsearch.js b/docs/examples/proxy/utils/prepare-elasticsearch.js
new file mode 100644
index 000000000..bf833f0c2
--- /dev/null
+++ b/docs/examples/proxy/utils/prepare-elasticsearch.js
@@ -0,0 +1,66 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+
+// Your Cloud Id
+const cloudId = ''
+// Your admin username
+const username = ''
+// Your admin password
+const password = ''
+// The indices or index patterns you will need to access
+const indexNames = ['my-index-name-or-pattern']
+// see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html#privileges-list-indices
+const privileges = ['read']
+
+async function generateApiKeys (opts) {
+ const client = new Client({
+ cloud: {
+ id: cloudId
+ },
+ auth: {
+ username,
+ password
+ }
+ })
+
+ const result = await client.security.createApiKey({
+ name: 'elasticsearch-proxy',
+ role_descriptors: {
+ 'elasticsearch-proxy-users': {
+ index: [{
+ names: indexNames,
+ privileges
+ }]
+ }
+ }
+ })
+
+ return Buffer.from(`${result.id}:${result.api_key}`).toString('base64')
+}
+
+generateApiKeys()
+ .then(console.log)
+ .catch(err => {
+ console.error(err)
+ process.exit(1)
+ })
diff --git a/docs/examples/proxy/vercel.json b/docs/examples/proxy/vercel.json
new file mode 100644
index 000000000..d1615c120
--- /dev/null
+++ b/docs/examples/proxy/vercel.json
@@ -0,0 +1,13 @@
+{
+ "headers": [
+ {
+ "source": "/api/(.*)",
+ "headers": [
+ { "key": "Access-Control-Allow-Credentials", "value": "true" },
+ { "key": "Access-Control-Allow-Origin", "value": "*" },
+ { "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS,PATCH,DELETE,POST,PUT" },
+ { "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
+ ]
+ }
+ ]
+}
diff --git a/docs/examples/reindex.asciidoc b/docs/examples/reindex.asciidoc
new file mode 100644
index 000000000..a9014036a
--- /dev/null
+++ b/docs/examples/reindex.asciidoc
@@ -0,0 +1,79 @@
+[[reindex_examples]]
+=== Reindex
+
+The `reindex` API extracts the document source from the source index and indexes
+the documents into the destination index. You can copy all documents to the
+destination index, reindex a subset of the documents or update the source before
+to reindex it.
+
+In the following example we have a `game-of-thrones` index which contains
+different quotes of various characters, we want to create a new index only for
+the house Stark and remove the `house` field from the document source.
+
+[source,js]
+----
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+async function run () {
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Ned Stark',
+ quote: 'Winter is coming.',
+ house: 'stark'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Arya Stark',
+ quote: 'A girl is Arya Stark of Winterfell. And I\'m going home.',
+ house: 'stark'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ refresh: true,
+ document: {
+ character: 'Tyrion Lannister',
+ quote: 'A Lannister always pays his debts.',
+ house: 'lannister'
+ }
+ })
+
+ await client.reindex({
+ wait_for_completion: true,
+ refresh: true,
+ source: {
+ index: 'game-of-thrones',
+ query: {
+ match: { house: 'stark' }
+ }
+ },
+ dest: {
+ index: 'stark-index'
+ },
+ script: {
+ lang: 'painless',
+ source: 'ctx._source.remove("house")'
+ }
+ })
+
+ const result = await client.search({
+ index: 'stark-index',
+ query: { match_all: {} }
+ })
+
+ console.log(result.hits.hits)
+}
+
+run().catch(console.log)
+----
diff --git a/docs/examples/scroll.asciidoc b/docs/examples/scroll.asciidoc
index 90ade2fb6..0f23a1bc1 100644
--- a/docs/examples/scroll.asciidoc
+++ b/docs/examples/scroll.asciidoc
@@ -1,31 +1,47 @@
-= Scroll
+[[scroll_examples]]
+=== Scroll
-While a search request returns a single “page” of results, the scroll API can be used to retrieve large numbers of results (or even all results) from a single search request, in much the same way as you would use a cursor on a traditional database.
+While a search request returns a single “page” of results, the scroll API can be
+used to retrieve large numbers of results (or even all results) from a single
+search request, in much the same way as you would use a cursor on a traditional
+database.
-Scrolling is not intended for real time user requests, but rather for processing large amounts of data, e.g. in order to reindex the contents of one index into a new index with a different configuration.
+Scrolling is not intended for real time user requests, but rather for processing
+large amounts of data, for example in order to reindex the contents of one index
+into a new index with a different configuration.
-NOTE: The results that are returned from a scroll request reflect the state of the index at the time that the initial search request was made, like a snapshot in time. Subsequent changes to documents (index, update or delete) will only affect later search requests.
+NOTE: The results that are returned from a scroll request reflect the state of
+the index at the time that the initial search request was made, like a snapshot
+in time. Subsequent changes to documents (index, update or delete) will only
+affect later search requests.
-In order to use scrolling, the initial search request should specify the scroll parameter in the query string, which tells Elasticsearch how long it should keep the “search context” alive.
+In order to use scrolling, the initial search request should specify the scroll
+parameter in the query string, which tells {es} how long it should keep the
+“search context” alive.
+
+NOTE: Did you know that we provide an helper for sending scroll requests? You can find it {jsclient}/client-helpers.html[here].
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
const allQuotes = []
const responseQueue = []
// Let's index some data!
- await client.bulk({
+ const bulkResponse = await client.bulk({
// here we are forcing an index refresh,
// otherwise we will not get any result
// in the consequent search
refresh: true,
- body: [
+ operations: [
// operation to perform
{ index: { _index: 'game-of-thrones' } },
// the document to index
@@ -48,6 +64,11 @@ async function run () {
]
})
+ if (bulkResponse.errors) {
+ console.log(bulkResponse)
+ process.exit(1)
+ }
+
// start things off by searching, setting a scroll timeout, and pushing
// our first response into the queue to be processed
const response = await client.search({
@@ -58,17 +79,15 @@ async function run () {
size: 1,
// filter the source to only include the quote field
_source: ['quote'],
- body: {
- query: {
- match_all: {}
- }
+ query: {
+ match_all: {}
}
})
responseQueue.push(response)
while (responseQueue.length) {
- const { body } = responseQueue.shift()
+ const body = responseQueue.shift()
// collect the titles from this response
body.hits.hits.forEach(function (hit) {
@@ -84,7 +103,7 @@ async function run () {
// get the next response if there are more quotes to fetch
responseQueue.push(
await client.scroll({
- scrollId: body._scroll_id,
+ scroll_id: body._scroll_id,
scroll: '30s'
})
)
@@ -94,21 +113,25 @@ async function run () {
run().catch(console.log)
----
-Another cool usage of the `scroll` API can be done with Node.js ≥ 10, by using async iteration!
+Another cool usage of the `scroll` API can be done with Node.js ≥ 10, by using
+async iteration!
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
// Scroll utility
async function * scrollSearch (params) {
- var response = await client.search(params)
+ let response = await client.search(params)
while (true) {
- const sourceHits = response.body.hits.hits
+ const sourceHits = response.hits.hits
if (sourceHits.length === 0) {
break
@@ -118,12 +141,12 @@ async function * scrollSearch (params) {
yield hit
}
- if (!response.body._scroll_id) {
+ if (!response._scroll_id) {
break
}
response = await client.scroll({
- scrollId: response.body._scroll_id,
+ scroll_id: response._scroll_id,
scroll: params.scroll
})
}
@@ -132,7 +155,7 @@ async function * scrollSearch (params) {
async function run () {
await client.bulk({
refresh: true,
- body: [
+ operations: [
{ index: { _index: 'game-of-thrones' } },
{
character: 'Ned Stark',
@@ -158,10 +181,8 @@ async function run () {
scroll: '30s',
size: 1,
_source: ['quote'],
- body: {
- query: {
- match_all: {}
- }
+ query: {
+ match_all: {}
}
}
@@ -171,4 +192,4 @@ async function run () {
}
run().catch(console.log)
-----
\ No newline at end of file
+----
diff --git a/docs/examples/search.asciidoc b/docs/examples/search.asciidoc
index 794efc1e5..229d1b09b 100644
--- a/docs/examples/search.asciidoc
+++ b/docs/examples/search.asciidoc
@@ -1,20 +1,27 @@
-= Search
+[[search_examples]]
+=== Search
-The `search` API allows you to execute a search query and get back search hits that match the query. +
-The query can either be provided using a simple https://www.elastic.co/guide/en/elasticsearch/reference/6.6/search-uri-request.html[query string as a parameter], or using a https://www.elastic.co/guide/en/elasticsearch/reference/6.6/search-request-body.html[request body].
+The `search` API allows you to execute a search query and get back search hits
+that match the query. The query can either be provided using a simple
+https://www.elastic.co/guide/en/elasticsearch/reference/6.6/search-uri-request.html[query string as a parameter],
+or using a
+https://www.elastic.co/guide/en/elasticsearch/reference/6.6/search-request-body.html[request body].
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
// Let's start by indexing some data
await client.index({
index: 'game-of-thrones',
- body: {
+ document: {
character: 'Ned Stark',
quote: 'Winter is coming.'
}
@@ -22,7 +29,7 @@ async function run () {
await client.index({
index: 'game-of-thrones',
- body: {
+ document: {
character: 'Daenerys Targaryen',
quote: 'I am the blood of the dragon.'
}
@@ -34,25 +41,23 @@ async function run () {
// otherwise we will not get any result
// in the consequent search
refresh: true,
- body: {
+ document: {
character: 'Tyrion Lannister',
quote: 'A mind needs books like a sword needs a whetstone.'
}
})
// Let's search!
- const { body } = await client.search({
+ const result = await client.search({
index: 'game-of-thrones',
- body: {
- query: {
- match: {
- quote: 'winter'
- }
+ query: {
+ match: {
+ quote: 'winter'
}
}
})
- console.log(body.hits.hits)
+ console.log(result.hits.hits)
}
run().catch(console.log)
diff --git a/docs/examples/sql.query.asciidoc b/docs/examples/sql.query.asciidoc
new file mode 100644
index 000000000..cdf61147c
--- /dev/null
+++ b/docs/examples/sql.query.asciidoc
@@ -0,0 +1,72 @@
+[[sql_query_examples]]
+=== SQL
+
+{es} SQL is an X-Pack component that allows SQL-like queries to be executed in
+real-time against {es}. Whether using the REST interface, command-line or JDBC,
+any client can use SQL to search and aggregate data natively inside {es}. One
+can think of {es} SQL as a translator, one that understands both SQL and {es}
+and makes it easy to read and process data in real-time, at scale by leveraging
+{es} capabilities.
+
+In the following example we will search all the documents that has the field
+`house` equals to `stark`, log the result with the tabular view and then
+manipulate the result to obtain an object easy to navigate.
+
+[source,js]
+----
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+async function run () {
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Ned Stark',
+ quote: 'Winter is coming.',
+ house: 'stark'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Arya Stark',
+ quote: 'A girl is Arya Stark of Winterfell. And I\'m going home.',
+ house: 'stark'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ refresh: true,
+ document: {
+ character: 'Tyrion Lannister',
+ quote: 'A Lannister always pays his debts.',
+ house: 'lannister'
+ }
+ })
+
+ const result = await client.sql.query({
+ query: "SELECT * FROM \"game-of-thrones\" WHERE house='stark'"
+ })
+
+ console.log(result)
+
+ const data = result.rows.map(row => {
+ const obj = {}
+ for (let i = 0; i < row.length; i++) {
+ obj[result.columns[i].name] = row[i]
+ }
+ return obj
+ })
+
+ console.log(data)
+}
+
+run().catch(console.log)
+----
diff --git a/docs/examples/suggest.asciidoc b/docs/examples/suggest.asciidoc
index d691d8344..6096bc753 100644
--- a/docs/examples/suggest.asciidoc
+++ b/docs/examples/suggest.asciidoc
@@ -1,21 +1,26 @@
-= Suggest
+[[suggest_examples]]
+=== Suggest
-The suggest feature suggests similar looking terms based on a provided text by using a suggester. _Parts of the suggest feature are still under development._
+The suggest feature suggests similar looking terms based on a provided text by
+using a suggester. _Parts of the suggest feature are still under development._
-The suggest request part is defined alongside the query part in a `search` request. +
-If the query part is left out, only suggestions are returned.
+The suggest request part is defined alongside the query part in a `search`
+request. If the query part is left out, only suggestions are returned.
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
- await client.bulk({
+ const bulkResponse = await client.bulk({
refresh: true,
- body: [
+ operations: [
{ index: { _index: 'game-of-thrones' } },
{
character: 'Ned Stark',
@@ -36,22 +41,25 @@ async function run () {
]
})
- const { body } = await client.search({
+ if (bulkResponse.errors) {
+ console.log(bulkResponse)
+ process.exit(1)
+ }
+
+ const result = await client.search({
index: 'game-of-thrones',
- body: {
- query: {
- match: { quote: 'witner' }
- },
- suggest: {
- gotsuggest: {
- text: 'witner',
- term: { field: 'quote' }
- }
+ query: {
+ match: { quote: 'winter' }
+ },
+ suggest: {
+ gotsuggest: {
+ text: 'winter',
+ term: { field: 'quote' }
}
}
})
- console.log(body)
+ console.log(result)
}
run().catch(console.log)
diff --git a/docs/examples/transport.request.asciidoc b/docs/examples/transport.request.asciidoc
index f89514b50..7c325e07e 100644
--- a/docs/examples/transport.request.asciidoc
+++ b/docs/examples/transport.request.asciidoc
@@ -1,23 +1,34 @@
-= transport.request
+[[transport_request_examples]]
+=== transport.request
-It can happen that you need to communicate with Elasticsearch by using an API that is not supported by the client, to mitigate this issue you can directly call `client.transport.request`, which is the internal utility that the client uses to communicate with Elasticsearch when you use an API method.
+It can happen that you need to communicate with {es} by using an API that is not
+supported by the client, to mitigate this issue you can directly call
+`client.transport.request`, which is the internal utility that the client uses
+to communicate with {es} when you use an API method.
-NOTE: When using the `transport.request` method you must provide all the parameters needed to perform an HTTP call, such as `method`, `path`, `querystring`, and `body`.
+NOTE: When using the `transport.request` method you must provide all the
+parameters needed to perform an HTTP call, such as `method`, `path`,
+`querystring`, and `body`.
-TIP: If you find yourself use this method too often, take in consideration the use of `client.extend`, which will make your code look cleaner and easier to maintain.
+TIP: If you find yourself use this method too often, take in consideration the
+use of `client.extend`, which will make your code look cleaner and easier to
+maintain.
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
async function run () {
- await client.bulk({
+ const bulkResponse = await client.bulk({
refresh: true,
- body: [
+ operations: [
{ index: { _index: 'game-of-thrones' } },
{
character: 'Ned Stark',
@@ -38,7 +49,12 @@ async function run () {
]
})
- const { body } = await client.transport.request({
+ if (bulkResponse.errors) {
+ console.log(bulkResponse)
+ process.exit(1)
+ }
+
+ const response = await client.transport.request({
method: 'POST',
path: '/game-of-thrones/_search',
body: {
@@ -51,7 +67,7 @@ async function run () {
querystring: {}
})
- console.log(body)
+ console.log(response)
}
run().catch(console.log)
diff --git a/docs/examples/typescript.asciidoc b/docs/examples/typescript.asciidoc
deleted file mode 100644
index b3df28b74..000000000
--- a/docs/examples/typescript.asciidoc
+++ /dev/null
@@ -1,69 +0,0 @@
-= Typescript
-
-The client offers a first-class support for TypeScript, since it ships the type definitions for every exposed API.
-
-NOTE: If you are using TypeScript you will be required to use _snake_case_ style to define the API parameters instead of _camelCase_.
-
-[source,ts]
-----
-'use strict'
-
-import { Client, ApiResponse, RequestParams } from '@elastic/elasticsearch'
-const client = new Client({ node: 'http://localhost:9200' })
-
-async function run (): void {
- // Let's start by indexing some data
- const doc1: RequestParams.Index = {
- index: 'game-of-thrones',
- body: {
- character: 'Ned Stark',
- quote: 'Winter is coming.'
- }
- }
- await client.index(doc1)
-
- const doc2: RequestParams.Index = {
- index: 'game-of-thrones',
- body: {
- character: 'Daenerys Targaryen',
- quote: 'I am the blood of the dragon.'
- }
- }
- await client.index(doc2)
-
- const doc3: RequestParams.Index = {
- index: 'game-of-thrones',
- // here we are forcing an index refresh,
- // otherwise we will not get any result
- // in the consequent search
- refresh: true,
- body: {
- character: 'Tyrion Lannister',
- quote: 'A mind needs books like a sword needs a whetstone.'
- }
- }
- await client.index(doc3)
-
- // Let's search!
- const params: RequestParams.Search = {
- index: 'game-of-thrones',
- body: {
- query: {
- match: {
- quote: 'winter'
- }
- }
- }
- }
- client
- .search(params)
- .then((result: ApiResponse) => {
- console.og(result.body.hits.hits)
- })
- .catch((err: Error) => {
- console.log(err)
- })
-}
-
-run()
-----
\ No newline at end of file
diff --git a/docs/examples/update.asciidoc b/docs/examples/update.asciidoc
new file mode 100644
index 000000000..3c83acd25
--- /dev/null
+++ b/docs/examples/update.asciidoc
@@ -0,0 +1,95 @@
+[[update_examples]]
+=== Update
+
+The update API allows updates of a specific document using the given script. In
+the following example, we will index a document that also tracks how many times
+a character has said the given quote, and then we will update the `times` field.
+
+[source,js]
+---------
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+async function run () {
+ await client.index({
+ index: 'game-of-thrones',
+ id: '1',
+ document: {
+ character: 'Ned Stark',
+ quote: 'Winter is coming.',
+ times: 0
+ }
+ })
+
+ await client.update({
+ index: 'game-of-thrones',
+ id: '1',
+ script: {
+ lang: 'painless',
+ source: 'ctx._source.times++'
+ // you can also use parameters
+ // source: 'ctx._source.times += params.count',
+ // params: { count: 1 }
+ }
+ })
+
+ const document = await client.get({
+ index: 'game-of-thrones',
+ id: '1'
+ })
+
+ console.log(document)
+}
+
+run().catch(console.log)
+
+---------
+
+With the update API, you can also run a partial update of a document.
+
+[source,js]
+---------
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+async function run () {
+ await client.index({
+ index: 'game-of-thrones',
+ id: '1',
+ document: {
+ character: 'Ned Stark',
+ quote: 'Winter is coming.',
+ isAlive: true
+ }
+ })
+
+ await client.update({
+ index: 'game-of-thrones',
+ id: '1',
+ doc: {
+ isAlive: false
+ }
+ })
+
+ const document = await client.get({
+ index: 'game-of-thrones',
+ id: '1'
+ })
+
+ console.log(document)
+}
+
+run().catch(console.log)
+
+
+---------
\ No newline at end of file
diff --git a/docs/examples/update_by_query.asciidoc b/docs/examples/update_by_query.asciidoc
new file mode 100644
index 000000000..d17b5c455
--- /dev/null
+++ b/docs/examples/update_by_query.asciidoc
@@ -0,0 +1,60 @@
+[[update_by_query_examples]]
+=== Update By Query
+
+The simplest usage of _update_by_query just performs an update on every document
+in the index without changing the source. This is useful to pick up a new
+property or some other online mapping change.
+
+[source,js]
+---------
+'use strict'
+
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+async function run () {
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Ned Stark',
+ quote: 'Winter is coming.'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ refresh: true,
+ document: {
+ character: 'Arya Stark',
+ quote: 'A girl is Arya Stark of Winterfell. And I\'m going home.'
+ }
+ })
+
+ await client.updateByQuery({
+ index: 'game-of-thrones',
+ refresh: true,
+ script: {
+ lang: 'painless',
+ source: 'ctx._source["house"] = "stark"'
+ },
+ query: {
+ match: {
+ character: 'stark'
+ }
+ }
+ })
+
+ const result = await client.search({
+ index: 'game-of-thrones',
+ query: { match_all: {} }
+ })
+
+ console.log(result.hits.hits)
+}
+
+run().catch(console.log)
+
+---------
diff --git a/docs/extend.asciidoc b/docs/extend.asciidoc
deleted file mode 100644
index c80c8bd3f..000000000
--- a/docs/extend.asciidoc
+++ /dev/null
@@ -1,69 +0,0 @@
-= Extend the client
-
-Sometimes you need to reuse the same logic, or you want to build a custom API to allow you simplify your code. +
-The easiest way to achieve that is by extending the client.
-
-NOTE: If you want to override existing methods, you should specify the `{ force: true }` option.
-
-[source,js]
-----
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
-
-client.extend('supersearch', ({ makeRequest, ConfigurationError }) => {
- return function supersearch (params, options) {
- const {
- body,
- index,
- method,
- ...querystring
- } = params
-
- // params validation
- if (body == null) {
- throw new ConfigurationError('Missing required parameter: body')
- }
-
- // build request object
- const request = {
- method: method || 'POST',
- path: `/${encodeURIComponent(index)}/_search_`,
- body,
- querystring
- }
-
- // build request options object
- const requestOptions = {
- ignore: options.ignore || null,
- requestTimeout: options.requestTimeout || null,
- maxRetries: options.maxRetries || null,
- asStream: options.asStream || false,
- headers: options.headers || null
- }
-
- return makeRequest(request, requestOptions)
- }
-})
-
-client.extend('utility.index', ({ makeRequest }) => {
- return function _index (params, options) {
- // your code
- }
-})
-
-client.extend('utility.delete', ({ makeRequest }) => {
- return function _delete (params, options) {
- // your code
- }
-})
-
-client.extend('indices.delete', { force: true }, ({ makeRequest }) => {
- return function _delete (params, options) {
- // your code
- }
-})
-
-client.supersearch(...)
-client.utility.index(...)
-client.utility.delete(...)
-----
\ No newline at end of file
diff --git a/docs/getting-started.asciidoc b/docs/getting-started.asciidoc
new file mode 100644
index 000000000..d272d1302
--- /dev/null
+++ b/docs/getting-started.asciidoc
@@ -0,0 +1,170 @@
+[[getting-started-js]]
+== Getting started
+
+This page guides you through the installation process of the Node.js client,
+shows you how to instantiate the client, and how to perform basic Elasticsearch
+operations with it.
+
+[discrete]
+=== Requirements
+
+* https://nodejs.org/[Node.js] version 14.x or newer
+* https://docs.npmjs.com/downloading-and-installing-node-js-and-npm[`npm`], usually bundled with Node.js
+
+[discrete]
+=== Installation
+
+To install the latest version of the client, run the following command:
+
+[source,shell]
+--------------------------
+npm install @elastic/elasticsearch
+--------------------------
+
+Refer to the <> page to learn more.
+
+
+[discrete]
+=== Connecting
+
+You can connect to the Elastic Cloud using an API key and the Elasticsearch
+endpoint.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ node: 'https://...', // Elasticsearch endpoint
+ auth: {
+ apiKey: { // API key ID and secret
+ id: 'foo',
+ api_key: 'bar',
+ }
+ }
+})
+----
+
+Your Elasticsearch endpoint can be found on the **My deployment** page of your
+deployment:
+
+image::images/es-endpoint.jpg[alt="Finding Elasticsearch endpoint",align="center"]
+
+You can generate an API key on the **Management** page under Security.
+
+image::images/create-api-key.png[alt="Create API key",align="center"]
+
+For other connection options, refer to the <> section.
+
+
+[discrete]
+=== Operations
+
+Time to use Elasticsearch! This section walks you through the basic, and most
+important, operations of Elasticsearch.
+
+
+[discrete]
+==== Creating an index
+
+This is how you create the `my_index` index:
+
+[source,js]
+----
+await client.indices.create({ index: 'my_index' })
+----
+
+
+[discrete]
+==== Indexing documents
+
+This is a simple way of indexing a document:
+
+[source,js]
+----
+await client.index({
+ index: 'my_index',
+ id: 'my_document_id',
+ document: {
+ foo: 'foo',
+ bar: 'bar',
+ },
+})
+----
+
+
+[discrete]
+==== Getting documents
+
+You can get documents by using the following code:
+
+[source,js]
+----
+await client.get({
+ index: 'my_index',
+ id: 'my_document_id',
+})
+----
+
+
+[discrete]
+==== Searching documents
+
+This is how you can create a single match query with the client:
+
+[source,js]
+----
+await client.search({
+ query: {
+ match: {
+ foo: 'foo'
+ }
+ }
+})
+----
+
+
+[discrete]
+==== Updating documents
+
+This is how you can update a document, for example to add a new field:
+
+[source,js]
+----
+await client.update({
+ index: 'my_index',
+ id: 'my_document_id',
+ doc: {
+ foo: 'bar',
+ new_field: 'new value'
+ }
+})
+----
+
+
+[discrete]
+==== Deleting documents
+
+[source,js]
+----
+await client.delete({
+ index: 'my_index',
+ id: 'my_document_id',
+})
+----
+
+
+[discrete]
+==== Deleting an index
+
+[source,js]
+----
+await client.indices.delete({ index: 'my_index' })
+----
+
+
+[discrete]
+== Further reading
+
+* Use <> for a more comfortable experience with the APIs.
+* For an elaborate example of how to ingest data into Elastic Cloud,
+refer to {cloud}/ec-getting-started-node-js.html[this page].
diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc
new file mode 100644
index 000000000..cb60dbc51
--- /dev/null
+++ b/docs/helpers.asciidoc
@@ -0,0 +1,748 @@
+[[client-helpers]]
+== Client helpers
+
+The client comes with an handy collection of helpers to give you a more
+comfortable experience with some APIs.
+
+CAUTION: The client helpers are experimental, and the API may change in the next
+minor releases. The helpers will not work in any Node.js version lower than 10.
+
+
+[discrete]
+[[bulk-helper]]
+=== Bulk helper
+
+~Added~ ~in~ ~`v7.7.0`~
+
+Running bulk requests can be complex due to the shape of the API, this helper
+aims to provide a nicer developer experience around the Bulk API.
+
+
+[discrete]
+==== Usage
+
+[source,js]
+----
+const { createReadStream } = require('fs')
+const split = require('split2')
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const result = await client.helpers.bulk({
+ datasource: createReadStream('./dataset.ndjson').pipe(split()),
+ onDocument (doc) {
+ return {
+ index: { _index: 'my-index' }
+ }
+ }
+})
+
+console.log(result)
+// {
+// total: number,
+// failed: number,
+// retry: number,
+// successful: number,
+// time: number,
+// bytes: number,
+// aborted: boolean
+// }
+----
+
+To create a new instance of the Bulk helper, access it as shown in the example
+above, the configuration options are:
+[cols=2*]
+|===
+|`datasource`
+a|An array, async generator or a readable stream with the data you need to index/create/update/delete.
+It can be an array of strings or objects, but also a stream of json strings or JavaScript objects. +
+If it is a stream, we recommend to use the https://www.npmjs.com/package/split2[`split2`] package, that splits the stream on new lines delimiters. +
+This parameter is mandatory.
+[source,js]
+----
+const { createReadStream } = require('fs')
+const split = require('split2')
+const b = client.helpers.bulk({
+ // if you just use split(), the data will be used as array of strings
+ datasource: createReadStream('./dataset.ndjson').pipe(split())
+ // if you need to manipulate the data, you can pass JSON.parse to split
+ datasource: createReadStream('./dataset.ndjson').pipe(split(JSON.parse))
+})
+----
+
+|`onDocument`
+a|A function that is called for each document of the datasource. Inside this function you can manipulate the document and you must return the operation you want to execute with the document. Look at the link:{ref}/docs-bulk.html[Bulk API documentation] to see the supported operations. +
+This parameter is mandatory.
+[source,js]
+----
+const b = client.helpers.bulk({
+ onDocument (doc) {
+ return {
+ index: { _index: 'my-index' }
+ }
+ }
+})
+----
+
+|`onDrop`
+a|A function that is called for everytime a document can't be indexed and it has reached the maximum amount of retries.
+[source,js]
+----
+const b = client.helpers.bulk({
+ onDrop (doc) {
+ console.log(doc)
+ }
+})
+----
+
+|`onSuccess`
+a|A function that is called for each successful operation in the bulk request, which includes the result from Elasticsearch along with the original document that was sent, or `null` for delete operations.
+[source,js]
+----
+const b = client.helpers.bulk({
+ onSuccess ({ result, document }) {
+ console.log(`SUCCESS: Document ${result.index._id} indexed to ${result.index._index}`)
+ }
+})
+----
+
+|`flushBytes`
+a|The size of the bulk body in bytes to reach before to send it. Default of 5MB. +
+_Default:_ `5000000`
+[source,js]
+----
+const b = client.helpers.bulk({
+ flushBytes: 1000000
+})
+----
+
+|`flushInterval`
+a|How much time (in milliseconds) the helper waits before flushing the body from the last document read. +
+_Default:_ `30000`
+[source,js]
+----
+const b = client.helpers.bulk({
+ flushInterval: 30000
+})
+----
+
+|`concurrency`
+a|How many request is executed at the same time. +
+_Default:_ `5`
+[source,js]
+----
+const b = client.helpers.bulk({
+ concurrency: 10
+})
+----
+
+|`retries`
+a|How many times a document is retried before to call the `onDrop` callback. +
+_Default:_ Client max retries.
+[source,js]
+----
+const b = client.helpers.bulk({
+ retries: 3
+})
+----
+
+|`wait`
+a|How much time to wait before retries in milliseconds. +
+_Default:_ 5000.
+[source,js]
+----
+const b = client.helpers.bulk({
+ wait: 3000
+})
+----
+
+|`refreshOnCompletion`
+a|If `true`, at the end of the bulk operation it runs a refresh on all indices or on the specified indices. +
+_Default:_ false.
+[source,js]
+----
+const b = client.helpers.bulk({
+ refreshOnCompletion: true
+ // or
+ refreshOnCompletion: 'index-name'
+})
+----
+
+|===
+
+
+[discrete]
+==== Supported operations
+
+
+[discrete]
+===== Index
+
+[source,js]
+----
+client.helpers.bulk({
+ datasource: myDatasource,
+ onDocument (doc) {
+ return {
+ index: { _index: 'my-index' }
+ }
+ }
+})
+----
+
+
+[discrete]
+===== Create
+
+[source,js]
+----
+client.helpers.bulk({
+ datasource: myDatasource,
+ onDocument (doc) {
+ return {
+ create: { _index: 'my-index', _id: doc.id }
+ }
+ }
+})
+----
+
+
+[discrete]
+===== Update
+
+[source,js]
+----
+client.helpers.bulk({
+ datasource: myDatasource,
+ onDocument (doc) {
+ // Note that the update operation requires you to return
+ // an array, where the first element is the action, while
+ // the second are the document option
+ return [
+ { update: { _index: 'my-index', _id: doc.id } },
+ { doc_as_upsert: true }
+ ]
+ }
+})
+----
+
+
+[discrete]
+===== Delete
+
+[source,js]
+----
+client.helpers.bulk({
+ datasource: myDatasource,
+ onDocument (doc) {
+ return {
+ delete: { _index: 'my-index', _id: doc.id }
+ }
+ }
+})
+----
+
+
+[discrete]
+==== Abort a bulk operation
+
+If needed, you can abort a bulk operation at any time. The bulk helper returns a
+https://promisesaplus.com/[thenable], which has an `abort` method.
+
+NOTE: The abort method stops the execution of the bulk operation, but if you
+are using a concurrency higher than one, the operations that are already running
+will not be stopped.
+
+[source,js]
+----
+const { createReadStream } = require('fs')
+const split = require('split2')
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const b = client.helpers.bulk({
+ datasource: createReadStream('./dataset.ndjson').pipe(split()),
+ onDocument (doc) {
+ return {
+ index: { _index: 'my-index' }
+ }
+ },
+ onDrop (doc) {
+ b.abort()
+ }
+})
+
+console.log(await b)
+----
+
+
+[discrete]
+==== Passing custom options to the Bulk API
+
+You can pass any option supported by the link:
+{ref}/docs-bulk.html#docs-bulk-api-query-params[Bulk API] to the helper, and the
+helper uses those options in conjunction with the Bulk API call.
+
+[source,js]
+----
+const result = await client.helpers.bulk({
+ datasource: [...],
+ onDocument (doc) {
+ return {
+ index: { _index: 'my-index' }
+ }
+ },
+ pipeline: 'my-pipeline'
+})
+----
+
+
+[discrete]
+==== Usage with an async generator
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+async function * generator () {
+ const dataset = [
+ { user: 'jon', age: 23 },
+ { user: 'arya', age: 18 },
+ { user: 'tyrion', age: 39 }
+ ]
+ for (const doc of dataset) {
+ yield doc
+ }
+}
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const result = await client.helpers.bulk({
+ datasource: generator(),
+ onDocument (doc) {
+ return {
+ index: { _index: 'my-index' }
+ }
+ }
+})
+
+console.log(result)
+----
+
+[discrete]
+==== Modifying a document before operation
+
+~Added~ ~in~ ~`v8.8.2`~
+
+If you need to modify documents in your datasource before it is sent to Elasticsearch, you can return an array in the `onDocument` function rather than an operation object. The first item in the array must be the operation object, and the second item must be the document or partial document object as you'd like it to be sent to Elasticsearch.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const result = await client.helpers.bulk({
+ datasource: [...],
+ onDocument (doc) {
+ return [
+ { index: { _index: 'my-index' } },
+ { ...doc, favorite_color: 'mauve' },
+ ]
+ }
+})
+
+console.log(result)
+----
+
+[discrete]
+[[multi-search-helper]]
+=== Multi search helper
+
+~Added~ ~in~ ~`v7.8.0`~
+
+If you send search request at a high rate, this helper might be useful
+for you. It uses the multi search API under the hood to batch the requests
+and improve the overall performances of your application. The `result` exposes a
+`documents` property as well, which allows you to access directly the hits
+sources.
+
+
+[discrete]
+==== Usage
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const m = client.helpers.msearch()
+
+m.search(
+ { index: 'stackoverflow' },
+ { query: { match: { title: 'javascript' } } }
+ )
+ .then(result => console.log(result.body)) // or result.documents
+ .catch(err => console.error(err))
+----
+
+To create a new instance of the multi search (msearch) helper, you should access
+it as shown in the example above, the configuration options are:
+[cols=2*]
+|===
+|`operations`
+a|How many search operations should be sent in a single msearch request. +
+_Default:_ `5`
+[source,js]
+----
+const m = client.helpers.msearch({
+ operations: 10
+})
+----
+
+|`flushInterval`
+a|How much time (in milliseconds) the helper waits before flushing the operations from the last operation read. +
+_Default:_ `500`
+[source,js]
+----
+const m = client.helpers.msearch({
+ flushInterval: 500
+})
+----
+
+|`concurrency`
+a|How many request is executed at the same time. +
+_Default:_ `5`
+[source,js]
+----
+const m = client.helpers.msearch({
+ concurrency: 10
+})
+----
+
+|`retries`
+a|How many times an operation is retried before to resolve the request. An operation is retried only in case of a 429 error. +
+_Default:_ Client max retries.
+[source,js]
+----
+const m = client.helpers.msearch({
+ retries: 3
+})
+----
+
+|`wait`
+a|How much time to wait before retries in milliseconds. +
+_Default:_ 5000.
+[source,js]
+----
+const m = client.helpers.msearch({
+ wait: 3000
+})
+----
+
+|===
+
+
+[discrete]
+==== Stopping the msearch helper
+
+If needed, you can stop an msearch processor at any time. The msearch helper
+returns a https://promisesaplus.com/[thenable], which has an `stop` method.
+
+If you are creating multiple msearch helpers instances and using them for a
+limitied period of time, remember to always use the `stop` method once you have
+finished using them, otherwise your application will start leaking memory.
+
+The `stop` method accepts an optional error, that will be dispatched every
+subsequent search request.
+
+NOTE: The stop method stops the execution of the msearch processor, but if
+you are using a concurrency higher than one, the operations that are already
+running will not be stopped.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const m = client.helpers.msearch()
+
+m.search(
+ { index: 'stackoverflow' },
+ { query: { match: { title: 'javascript' } } }
+ )
+ .then(result => console.log(result.body))
+ .catch(err => console.error(err))
+
+m.search(
+ { index: 'stackoverflow' },
+ { query: { match: { title: 'ruby' } } }
+ )
+ .then(result => console.log(result.body))
+ .catch(err => console.error(err))
+
+setImmediate(() => m.stop())
+----
+
+
+[discrete]
+[[search-helper]]
+=== Search helper
+
+~Added~ ~in~ ~`v7.7.0`~
+
+A simple wrapper around the search API. Instead of returning the entire `result`
+object it returns only the search documents source. For improving the
+performances, this helper automatically adds `filter_path=hits.hits._source` to
+the query string.
+
+[source,js]
+----
+const documents = await client.helpers.search({
+ index: 'stackoverflow',
+ query: {
+ match: {
+ title: 'javascript'
+ }
+ }
+})
+
+for (const doc of documents) {
+ console.log(doc)
+}
+----
+
+
+[discrete]
+[[scroll-search-helper]]
+=== Scroll search helper
+
+~Added~ ~in~ ~`v7.7.0`~
+
+This helpers offers a simple and intuitive way to use the scroll search API.
+Once called, it returns an
+https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function[async iterator]
+which can be used in conjuction with a for-await...of. It handles automatically
+the `429` error and uses the `maxRetries` option of the client.
+
+[source,js]
+----
+const scrollSearch = client.helpers.scrollSearch({
+ index: 'stackoverflow',
+ query: {
+ match: {
+ title: 'javascript'
+ }
+ }
+})
+
+for await (const result of scrollSearch) {
+ console.log(result)
+}
+----
+
+
+[discrete]
+==== Clear a scroll search
+
+If needed, you can clear a scroll search by calling `result.clear()`:
+
+[source,js]
+----
+for await (const result of scrollSearch) {
+ if (condition) {
+ await result.clear()
+ }
+}
+----
+
+
+[discrete]
+==== Quickly getting the documents
+
+If you only need the documents from the result of a scroll search, you can
+access them via `result.documents`:
+
+[source,js]
+----
+for await (const result of scrollSearch) {
+ console.log(result.documents)
+}
+----
+
+
+[discrete]
+[[scroll-documents-helper]]
+=== Scroll documents helper
+
+~Added~ ~in~ ~`v7.7.0`~
+
+It works in the same way as the scroll search helper, but it returns only the
+documents instead. Note, every loop cycle returns a single document, and you
+can't use the `clear` method. For improving the performances, this helper
+automatically adds `filter_path=hits.hits._source` to the query string.
+
+[source,js]
+----
+const scrollSearch = client.helpers.scrollDocuments({
+ index: 'stackoverflow',
+ query: {
+ match: {
+ title: 'javascript'
+ }
+ }
+})
+
+for await (const doc of scrollSearch) {
+ console.log(doc)
+}
+----
+
+[discrete]
+[[esql-helper]]
+=== ES|QL helper
+
+ES|QL queries can return their results in {ref}/esql-rest.html#esql-rest-format[several formats].
+The default JSON format returned by ES|QL queries contains arrays of values
+for each row, with column names and types returned separately:
+
+[discrete]
+==== Usage
+
+[discrete]
+===== `toRecords`
+
+~Added~ ~in~ ~`v8.14.0`~
+
+The default JSON format returned by ES|QL queries contains arrays of values
+for each row, with column names and types returned separately:
+
+[source,json]
+----
+{
+ "columns": [
+ { "name": "@timestamp", "type": "date" },
+ { "name": "client_ip", "type": "ip" },
+ { "name": "event_duration", "type": "long" },
+ { "name": "message", "type": "keyword" }
+ ],
+ "values": [
+ [
+ "2023-10-23T12:15:03.360Z",
+ "172.21.2.162",
+ 3450233,
+ "Connected to 10.1.0.3"
+ ],
+ [
+ "2023-10-23T12:27:28.948Z",
+ "172.21.2.113",
+ 2764889,
+ "Connected to 10.1.0.2"
+ ]
+ ]
+}
+----
+
+In many cases, it's preferable to operate on an array of objects, one object per row,
+rather than an array of arrays. The ES|QL `toRecords` helper converts row data into objects.
+
+[source,js]
+----
+await client.helpers
+ .esql({ query: 'FROM sample_data | LIMIT 2' })
+ .toRecords()
+// =>
+// {
+// "columns": [
+// { "name": "@timestamp", "type": "date" },
+// { "name": "client_ip", "type": "ip" },
+// { "name": "event_duration", "type": "long" },
+// { "name": "message", "type": "keyword" }
+// ],
+// "records": [
+// {
+// "@timestamp": "2023-10-23T12:15:03.360Z",
+// "client_ip": "172.21.2.162",
+// "event_duration": 3450233,
+// "message": "Connected to 10.1.0.3"
+// },
+// {
+// "@timestamp": "2023-10-23T12:27:28.948Z",
+// "client_ip": "172.21.2.113",
+// "event_duration": 2764889,
+// "message": "Connected to 10.1.0.2"
+// },
+// ]
+// }
+----
+
+In TypeScript, you can declare the type that `toRecords` returns:
+
+[source,ts]
+----
+type EventLog = {
+ '@timestamp': string,
+ client_ip: string,
+ event_duration: number,
+ message: string,
+}
+
+const result = await client.helpers
+ .esql({ query: 'FROM sample_data | LIMIT 2' })
+ .toRecords()
+----
+
+[discrete]
+===== `toArrowReader`
+
+~Added~ ~in~ ~`v8.16.0`~
+
+ES|QL can return results in multiple binary formats, including https://arrow.apache.org/[Apache Arrow]'s streaming format. Because it is a very efficient format to read, it can be valuable for performing high-performance in-memory analytics. And, because the response is streamed as batches of records, it can be used to produce aggregations and other calculations on larger-than-memory data sets.
+
+`toArrowReader` returns a https://arrow.apache.org/docs/js/classes/Arrow_dom.RecordBatchReader.html[`RecordBatchStreamReader`].
+
+[source,ts]
+----
+const reader = await client.helpers
+ .esql({ query: 'FROM sample_data' })
+ .toArrowReader()
+
+// print each record as JSON
+for (const recordBatch of reader) {
+ for (const record of recordBatch) {
+ console.log(record.toJSON())
+ }
+}
+----
+
+[discrete]
+===== `toArrowTable`
+
+~Added~ ~in~ ~`v8.16.0`~
+
+If you would like to pull the entire data set in Arrow format but without streaming, you can use the `toArrowTable` helper to get a https://arrow.apache.org/docs/js/classes/Arrow_dom.Table.html[Table] back instead.
+
+[source,ts]
+----
+const table = await client.helpers
+ .esql({ query: 'FROM sample_data' })
+ .toArrowTable()
+
+console.log(table.toArray())
+----
diff --git a/docs/images/create-api-key.png b/docs/images/create-api-key.png
new file mode 100644
index 000000000..d75c23030
Binary files /dev/null and b/docs/images/create-api-key.png differ
diff --git a/docs/images/es-endpoint.jpg b/docs/images/es-endpoint.jpg
new file mode 100644
index 000000000..6da2e7565
Binary files /dev/null and b/docs/images/es-endpoint.jpg differ
diff --git a/docs/index-custom-title-page.html b/docs/index-custom-title-page.html
new file mode 100644
index 000000000..3efa92c00
--- /dev/null
+++ b/docs/index-custom-title-page.html
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
Documentation
+
+
+ The official Node.js client provides one-to-one mapping with Elasticsearch REST APIs.
+
+
+
+ Get started
+
+
+
+
+
+
+
+
+ Get to know the JavaScript client
+
+
+
+
+
+ Connecting
+
+
+
+
+
+
+
+
+
+ Using the JS client
+
+
+
+
+
+
+
+
+
+ API and developer docs
+
+
+
+
+
+ Explore by use case
+
+
+
+ View all Elastic docs
\ No newline at end of file
diff --git a/docs/index.asciidoc b/docs/index.asciidoc
index 2c4d7fb87..51206f0b0 100644
--- a/docs/index.asciidoc
+++ b/docs/index.asciidoc
@@ -1,51 +1,24 @@
-= @elastic/elasticsearch
+= Elasticsearch JavaScript Client
-The official Node.js client for Elasticsearch.
+include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[]
+include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
-== Features
-* One-to-one mapping with REST API.
-* Generalized, pluggable architecture.
-* Configurable, automatic discovery of cluster nodes.
-* Persistent, Keep-Alive connections.
-* Load balancing (with pluggable selection strategy) across all available nodes.
-* TypeScript support out of the box.
-
-== Install
-[source,sh]
-----
-npm install @elastic/elasticsearch
-----
-By default the latest version of the module will be installed, which is the same version of the current release of Elasticsearch. +
-If you need to work with older versions of Elasticsearch, you should install the same version of the client as well. +
-For example, if you are using Elasticsearch `v6.5.4`, you will need the client `v6`, and you can easily do that with `npm install @elastic/elasticsearch@6`.
-
-== Usage
-[source,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)
-})
-----
-
-== Reference
-* Client configuration
-* Client usage
-* API methods
-* TypeScript support
-* Extend the client
-* Breaking changes from old client
-* Authentication
-* Child client
+include::introduction.asciidoc[]
+include::getting-started.asciidoc[]
+include::changelog.asciidoc[]
+include::installation.asciidoc[]
+include::connecting.asciidoc[]
+include::configuration.asciidoc[]
+include::basic-config.asciidoc[]
+include::advanced-config.asciidoc[]
+include::child.asciidoc[]
+include::testing.asciidoc[]
+include::integrations.asciidoc[]
+include::observability.asciidoc[]
+include::transport.asciidoc[]
+include::typescript.asciidoc[]
+include::reference.asciidoc[]
+include::examples/index.asciidoc[]
+include::helpers.asciidoc[]
+include::redirects.asciidoc[]
+include::timeout-best-practices.asciidoc[]
diff --git a/docs/installation.asciidoc b/docs/installation.asciidoc
new file mode 100644
index 000000000..cd36cf3c2
--- /dev/null
+++ b/docs/installation.asciidoc
@@ -0,0 +1,116 @@
+[[installation]]
+== Installation
+
+This page guides you through the installation process of the client.
+
+To install the latest version of the client, run the following command:
+
+[source,sh]
+----
+npm install @elastic/elasticsearch
+----
+
+To install a specific major version of the client, run the following command:
+
+[source,sh]
+----
+npm install @elastic/elasticsearch@
+----
+
+To learn more about the supported major versions, please refer to the
+<>.
+
+[discrete]
+[[nodejs-support]]
+=== Node.js support
+
+NOTE: The minimum supported version of Node.js is `v18`.
+
+The client versioning follows the {stack} versioning, this means that
+major, minor, and patch releases are done following a precise schedule that
+often does not coincide with the https://nodejs.org/en/about/releases/[Node.js release] times.
+
+To avoid support insecure and unsupported versions of Node.js, the
+client *will drop the support of EOL versions of Node.js between minor releases*.
+Typically, as soon as a Node.js version goes into EOL, the client will continue
+to support that version for at least another minor release. If you are using the client
+with a version of Node.js that will be unsupported soon, you will see a warning
+in your logs (the client will start logging the warning with two minors in advance).
+
+Unless you are *always* using a supported version of Node.js,
+we recommend defining the client dependency in your
+`package.json` with the `~` instead of `^`. In this way, you will lock the
+dependency on the minor release and not the major. (for example, `~7.10.0` instead
+of `^7.10.0`).
+
+[%header,cols=3*]
+|===
+|Node.js Version
+|Node.js EOL date
+|End of support
+
+|`8.x`
+|December 2019
+|`7.11` (early 2021)
+
+|`10.x`
+|April 2021
+|`7.12` (mid 2021)
+
+|`12.x`
+|April 2022
+|`8.2` (early 2022)
+
+|`14.x`
+|April 2023
+|`8.8` (early 2023)
+
+|`16.x`
+|September 2023
+|`8.11` (late 2023)
+|===
+
+[discrete]
+[[js-compatibility-matrix]]
+=== Compatibility matrix
+
+Language clients are forward compatible; meaning that clients support
+communicating with greater or equal minor versions of {es} without breaking. It
+does not mean that the client automatically supports new features of newer {es}
+versions; it is only possible after a release of a new client version. For
+example, a 8.12 client version won't automatically support the new features of
+the 8.13 version of {es}, the 8.13 client version is required for that.
+{es} language clients are only backwards compatible with default distributions
+and without guarantees made.
+
+[%header,cols=3*]
+|===
+|{es} Version
+|Client Version
+|Supported
+
+|`8.x`
+|`8.x`
+|`8.x`
+
+|`7.x`
+|`7.x`
+|`7.17`
+
+|`6.x`
+|`6.x`
+|
+
+|`5.x`
+|`5.x`
+|
+|===
+
+
+[discrete]
+==== Browser
+
+WARNING: There is no official support for the browser environment. It exposes
+your {es} instance to everyone, which could lead to security issues. We
+recommend you to write a lightweight proxy that uses this client instead,
+you can see a proxy example https://github.com/elastic/elasticsearch-js/tree/master/docs/examples/proxy[here].
diff --git a/docs/integrations.asciidoc b/docs/integrations.asciidoc
new file mode 100644
index 000000000..84f854ab2
--- /dev/null
+++ b/docs/integrations.asciidoc
@@ -0,0 +1,8 @@
+[[integrations]]
+== Integrations
+
+The Client offers the following integration options for you:
+
+* <>
+* <>
+* <>
\ No newline at end of file
diff --git a/docs/introduction.asciidoc b/docs/introduction.asciidoc
new file mode 100644
index 000000000..e6b5963e0
--- /dev/null
+++ b/docs/introduction.asciidoc
@@ -0,0 +1,84 @@
+[[introduction]]
+== Introduction
+
+This is the official Node.js client for {es}. This page gives a quick overview
+about the features of the client.
+
+
+[discrete]
+=== 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.
+* TypeScript support out of the box.
+
+
+[discrete]
+==== Install multiple versions
+
+If you are using multiple versions of {es}, you need to use multiple versions of
+the client as well. In the past, installing multiple versions of the same
+package was not possible, but with `npm v6.9`, you can do it via aliasing.
+
+To install different version of the client, run the following command:
+
+[source,sh]
+----
+npm install @npm:@elastic/elasticsearch@
+----
+
+
+For example, if you need to install `7.x` and `6.x`, run the following commands:
+
+[source,sh]
+----
+npm install es6@npm:@elastic/elasticsearch@6
+npm install es7@npm:@elastic/elasticsearch@7
+----
+
+
+Your `package.json` will look similar to the following example:
+
+[source,json]
+----
+"dependencies": {
+ "es6": "npm:@elastic/elasticsearch@^6.7.0",
+ "es7": "npm:@elastic/elasticsearch@^7.0.0"
+}
+----
+
+
+Require the packages from your code by using the alias you have defined.
+
+[source,js]
+----
+const { Client: Client6 } = require('es6')
+const { Client: Client7 } = require('es7')
+
+const client6 = new Client6({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+const client7 = new Client7({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+client6.info().then(console.log, console.log)
+client7.info().then(console.log, console.log)
+----
+
+
+Finally, if you want to install the client for the next version of {es} (the one
+that lives in the {es} main branch), use the following command:
+
+[source,sh]
+----
+npm install esmain@github:elastic/elasticsearch-js
+----
+WARNING: This command installs the main branch of the client which is not
+considered stable.
\ No newline at end of file
diff --git a/docs/observability.asciidoc b/docs/observability.asciidoc
new file mode 100644
index 000000000..9436d457f
--- /dev/null
+++ b/docs/observability.asciidoc
@@ -0,0 +1,449 @@
+[[observability]]
+=== Observability
+
+To observe and measure Elasticsearch client usage, several client features are provided.
+
+First, as of 8.15.0, the client provides native support for OpenTelemetry, which allows you to send client usage data to any endpoint that supports OpenTelemetry without having to make any changes to your JavaScript codebase.
+
+Also, rather than providing a default logger, the client offers an event
+emitter interface to hook into internal events, such as `request` and
+`response`, allowing you to log the events you care about, or otherwise react
+to client usage however you might need.
+
+Correlating events can be hard, especially if your applications have a large codebase with many events happening at the same time. To help you with this, the client provides a correlation ID system, and other
+features.
+
+All of these observability features are documented below.
+
+[discrete]
+==== OpenTelemetry
+
+The client supports OpenTelemetry's https://opentelemetry.io/docs/zero-code/js/[zero-code
+instrumentation] to enable tracking each client request as an
+https://opentelemetry.io/docs/concepts/signals/traces/#spans[OpenTelemetry span]. These spans
+follow all of the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[semantic
+OpenTelemetry conventions for Elasticsearch] except for `db.query.text`.
+
+To start sending Elasticsearch trace data to your OpenTelemetry endpoint, follow
+https://opentelemetry.io/docs/zero-code/js/[OpenTelemetry's zero-code instrumentation guide],
+or the following steps:
+
+1. Install `@opentelemetry/api` and `@opentelemetry/auto-instrumentations-node` as Node.js dependencies
+2. Export the following environment variables with the appropriate values:
+ - `OTEL_EXPORTER_OTLP_ENDPOINT`
+ - `OTEL_EXPORTER_OTLP_HEADERS`
+ - `OTEL_RESOURCE_ATTRIBUTES`
+ - `OTEL_SERVICE_NAME`
+3. `require` the Node.js auto-instrumentation library at startup:
+[source,bash]
+----
+node --require '@opentelemetry/auto-instrumentations-node/register' index.js
+----
+
+[discrete]
+==== Events
+
+The client is an event emitter. This means that you can listen for its events to
+add additional logic to your code, without needing to change the client's internals
+or how you use the client. You can find the events' names by accessing the `events` key
+of the client:
+
+[source,js]
+----
+const { events } = require('@elastic/elasticsearch')
+console.log(events)
+----
+
+The event emitter functionality can be useful if you want to log every request,
+response or error that is created by the client:
+
+[source,js]
+----
+const logger = require('my-logger')()
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+client.diagnostic.on('response', (err, result) => {
+ if (err) {
+ logger.error(err)
+ } else {
+ logger.info(result)
+ }
+})
+----
+
+The client emits the following events:
+[cols=2*]
+|===
+|`serialization`
+a|Emitted before starting serialization and compression. If you want to measure this phase duration, you should measure the time elapsed between this event and `request`.
+[source,js]
+----
+client.diagnostic.on('serialization', (err, result) => {
+ console.log(err, result)
+})
+----
+
+|`request`
+a|Emitted before sending the actual request to {es} _(emitted multiple times in case of retries)_.
+[source,js]
+----
+client.diagnostic.on('request', (err, result) => {
+ console.log(err, result)
+})
+----
+
+|`deserialization`
+a|Emitted before starting deserialization and decompression. If you want to measure this phase duration, you should measure the time elapsed between this event and `response`. _(This event might not be emitted in certain situations)_.
+[source,js]
+----
+client.diagnostic.on('deserialization', (err, result) => {
+ console.log(err, result)
+})
+----
+
+|`response`
+a|Emitted once {es} response has been received and parsed.
+[source,js]
+----
+client.diagnostic.on('response', (err, result) => {
+ console.log(err, result)
+})
+----
+
+|`sniff`
+a|Emitted when the client ends a sniffing request.
+[source,js]
+----
+client.diagnostic.on('sniff', (err, result) => {
+ console.log(err, result)
+})
+----
+
+|`resurrect`
+a|Emitted if the client is able to resurrect a dead node.
+[source,js]
+----
+client.diagnostic.on('resurrect', (err, result) => {
+ console.log(err, result)
+})
+----
+
+|===
+
+The values of `result` in `serialization`, `request`, `deserialization`,
+`response` and `sniff` are:
+
+[source,ts]
+----
+body: any;
+statusCode: number | null;
+headers: anyObject | null;
+warnings: string[] | null;
+meta: {
+ context: any;
+ name: string;
+ request: {
+ params: TransportRequestParams;
+ options: TransportRequestOptions;
+ id: any;
+ };
+ connection: Connection;
+ attempts: number;
+ aborted: boolean;
+ sniff?: {
+ hosts: any[];
+ reason: string;
+ };
+};
+----
+
+While the `result` value in `resurrect` is:
+
+[source,ts]
+----
+strategy: string;
+isAlive: boolean;
+connection: Connection;
+name: string;
+request: {
+ id: any;
+};
+----
+
+[discrete]
+===== Events order
+
+The event order is described in the following graph, in some edge cases, the
+order is not guaranteed.
+You can find in
+https://github.com/elastic/elasticsearch-js/blob/main/test/acceptance/events-order.test.js[`test/acceptance/events-order.test.js`]
+how the order changes based on the situation.
+
+[source]
+----
+serialization
+ │
+ │ (serialization and compression happens between those two events)
+ │
+ └─▶ request
+ │
+ │ (actual time spent over the wire)
+ │
+ └─▶ deserialization
+ │
+ │ (deserialization and decompression happens between those two events)
+ │
+ └─▶ response
+----
+
+[discrete]
+==== Correlation ID
+
+Correlating events can be hard, especially if there are many events at the same
+time. The client offers you an automatic (and configurable) system to help you
+handle this problem.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+client.diagnostic.on('request', (err, result) => {
+ const { id } = result.meta.request
+ if (err) {
+ console.log({ error: err, reqId: id })
+ }
+})
+
+client.diagnostic.on('response', (err, result) => {
+ const { id } = result.meta.request
+ if (err) {
+ console.log({ error: err, reqId: id })
+ }
+})
+
+client.search({
+ index: 'my-index',
+ query: { match_all: {} }
+}).then(console.log, console.log)
+----
+
+By default the ID is an incremental integer, but you can configure it with the
+`generateRequestId` option:
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ // it takes two parameters, the request parameters and options
+ generateRequestId: function (params, options) {
+ // your id generation logic
+ // must be syncronous
+ return 'id'
+ }
+})
+----
+
+
+You can also specify a custom ID per request:
+
+[source,js]
+----
+client.search({
+ index: 'my-index',
+ query: { match_all: {} }
+}, {
+ id: 'custom-id'
+}).then(console.log, console.log)
+----
+
+
+[discrete]
+==== Context object
+
+Sometimes, you might need to make some custom data available in your events, you
+can do that via the `context` option of a request:
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+client.diagnostic.on('request', (err, result) => {
+ const { id } = result.meta.request
+ const { context } = result.meta
+ if (err) {
+ console.log({ error: err, reqId: id, context })
+ }
+})
+
+client.diagnostic.on('response', (err, result) => {
+ const { id } = result.meta.request
+ const { winter } = result.meta.context
+ if (err) {
+ console.log({ error: err, reqId: id, winter })
+ }
+})
+
+client.search({
+ index: 'my-index',
+ query: { match_all: {} }
+}, {
+ context: { winter: 'is coming' }
+}).then(console.log, console.log)
+----
+
+The context object can also be configured as a global option in the client
+configuration. If you provide both, the two context objects will be shallow
+merged, and the API level object will take precedence.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ context: { winter: 'is coming' }
+})
+
+client.diagnostic.on('request', (err, result) => {
+ const { id } = result.meta.request
+ const { context } = result.meta
+ if (err) {
+ console.log({ error: err, reqId: id, context })
+ }
+})
+
+client.diagnostic.on('response', (err, result) => {
+ const { id } = result.meta.request
+ const { winter } = result.meta.context
+ if (err) {
+ console.log({ error: err, reqId: id, winter })
+ }
+})
+
+client.search({
+ index: 'my-index',
+ query: { match_all: {} }
+}, {
+ context: { winter: 'has come' }
+}).then(console.log, console.log)
+----
+
+
+[discrete]
+==== Client name
+
+If you are using multiple instances of the client or if you are using multiple
+child clients _(which is the recommended way to have multiple instances of the
+client)_, you might need to recognize which client you are using. The `name`
+options help you in this regard.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ name: 'parent-client' // default to 'elasticsearch-js'
+})
+
+const child = client.child({
+ name: 'child-client'
+})
+
+console.log(client.name, child.name)
+
+client.diagnostic.on('request', (err, result) => {
+ const { id } = result.meta.request
+ const { name } = result.meta
+ if (err) {
+ console.log({ error: err, reqId: id, name })
+ }
+})
+
+client.diagnostic.on('response', (err, result) => {
+ const { id } = result.meta.request
+ const { name } = result.meta
+ if (err) {
+ console.log({ error: err, reqId: id, name })
+ }
+})
+
+client.search({
+ index: 'my-index',
+ query: { match_all: {} }
+}).then(console.log, console.log)
+
+child.search({
+ index: 'my-index',
+ query: { match_all: {} }
+}).then(console.log, console.log)
+----
+
+
+[discrete]
+==== X-Opaque-Id support
+
+To improve observability, the client offers an easy way to configure the
+`X-Opaque-Id` header. If you set the `X-Opaque-Id` in a specific request, this
+allows you to discover this identifier in the
+https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html#deprecation-logging[deprecation logs],
+helps you with https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html#_identifying_search_slow_log_origin[identifying search slow log origin]
+as well as https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#_identifying_running_tasks[identifying running tasks].
+
+The `X-Opaque-Id` should be configured in each request, for doing that you can
+use the `opaqueId` option, as you can see in the following example. The
+resulting header will be `{ 'X-Opaque-Id': 'my-search' }`.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+client.search({
+ index: 'my-index',
+ body: { foo: 'bar' }
+}, {
+ opaqueId: 'my-search'
+}).then(console.log, console.log)
+----
+
+Sometimes it may be useful to prefix all the `X-Opaque-Id` headers with a
+specific string, in case you need to identify a specific client or server. For
+doing this, the client offers a top-level configuration option:
+`opaqueIdPrefix`. In the following example, the resulting header will be
+`{ 'X-Opaque-Id': 'proxy-client::my-search' }`.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ opaqueIdPrefix: 'proxy-client::'
+})
+
+client.search({
+ index: 'my-index',
+ body: { foo: 'bar' }
+}, {
+ opaqueId: 'my-search'
+}).then(console.log, console.log)
+----
+
diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc
new file mode 100644
index 000000000..f2d0aecbb
--- /dev/null
+++ b/docs/redirects.asciidoc
@@ -0,0 +1,17 @@
+["appendix",role="exclude",id="redirects"]
+= Deleted pages
+
+The following pages have moved or been deleted.
+
+[role="exclude",id="auth-reference"]
+== Authentication
+
+This page has moved. See <>.
+
+[role="exclude",id="breaking-changes"]
+== Breaking changes
+
+For information about migrating from the legacy elasticsearch.js client to the
+new Elasticsearch JavaScript client, refer to the
+https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.17/breaking-changes.html[7.17
+JavaScript client migration guide].
diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc
index 856b5885e..2830d6453 100644
--- a/docs/reference.asciidoc
+++ b/docs/reference.asciidoc
@@ -1,6107 +1,12008 @@
-= API Reference
-
-=== Common parameters
-Parameters that are accepted by all API endpoints.
-https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html
-[cols=2*]
-|===
-|`pretty`
-|`boolean` - Pretty format the returned JSON response.
+[[api-reference]]
+////////
+===========================================================================================================================
+|| ||
+|| ||
+|| ||
+|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
+|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
+|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
+|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
+|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
+|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
+|| ||
+|| ||
+|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
+|| You should update the script that does the generation, which can be found in: ||
+|| https://github.com/elastic/elastic-client-generator-js ||
+|| ||
+|| You can run the script with the following command: ||
+|| npm run elasticsearch -- --version ||
+|| ||
+|| ||
+|| ||
+===========================================================================================================================
+////////
+== API Reference
+
+[discrete]
+=== bulk
+Bulk index or delete documents.
+Performs multiple indexing or delete operations in a single API call.
+This reduces overhead and can greatly increase indexing speed.
-|`human`
-|`boolean` - Return human readable values for statistics. +
- _Default:_ `true`
+{ref}/docs-bulk.html[Endpoint documentation]
+[source,ts]
+----
+client.bulk({ ... })
+----
+[discrete]
+==== Arguments
-|`error_trace` or `errorTrace`
-|`boolean` - Include the stack trace of returned errors.
+* *Request (object):*
+** *`index` (Optional, string)*: Name of the data stream, index, or index alias to perform bulk actions on.
+** *`operations` (Optional, { index, create, update, delete } | { detect_noop, doc, doc_as_upsert, script, scripted_upsert, _source, upsert } | object[])*
+** *`pipeline` (Optional, string)*: ID of the pipeline to use to preprocess incoming documents.
+If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
+If a final pipeline is configured it will always run, regardless of the value of this parameter.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.
+Valid values: `true`, `false`, `wait_for`.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`_source` (Optional, boolean | string | string[])*: `true` or `false` to return the `_source` field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude from the response.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+** *`timeout` (Optional, string | -1 | 0)*: Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+** *`require_alias` (Optional, boolean)*: If `true`, the request’s actions must target an index alias.
-|`source`
-|`string` - The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
+[discrete]
+=== clear_scroll
+Clear a scrolling search.
-|`filter_path` or `filterPath`
-|`list` - A comma-separated list of filters used to reduce the response.
+Clear the search context and results for a scrolling search.
-|===
-=== bulk
-[source,js]
+{ref}/clear-scroll-api.html[Endpoint documentation]
+[source,ts]
----
-client.bulk([params] [, options] [, callback])
+client.clearScroll({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
-[cols=2*]
-|===
-|`index`
-|`string` - Default index for items which don't provide one
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`scroll_id` (Optional, string | string[])*: List of scroll IDs to clear.
+To clear all scroll IDs, use `_all`.
-|`type`
-|`string` - Default document type for items which don't provide one
+[discrete]
+=== close_point_in_time
+Close a point in time.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the bulk 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)
+A point in time must be opened explicitly before being used in search requests.
+The `keep_alive` parameter tells Elasticsearch how long it should persist.
+A point in time is automatically closed when the `keep_alive` period has elapsed.
+However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
+
+{ref}/point-in-time-api.html[Endpoint documentation]
+[source,ts]
+----
+client.closePointInTime({ id })
+----
+[discrete]
+==== Arguments
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+* *Request (object):*
+** *`id` (string)*: The ID of the point-in-time.
-|`routing`
-|`string` - Specific routing value
+[discrete]
+=== count
+Count search results.
+Get the number of documents matching a query.
+
+{ref}/search-count.html[Endpoint documentation]
+[source,ts]
+----
+client.count({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search.
+Supports wildcards (`*`).
+To search all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`analyze_wildcard` (Optional, boolean)*: If `true`, wildcard and prefix queries are analyzed.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: `AND` or `OR`.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+** *`ignore_throttled` (Optional, boolean)*: If `true`, concrete, expanded or aliased indices are ignored when frozen.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+** *`min_score` (Optional, number)*: Sets the minimum `_score` value that documents must have to be included in the result.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard.
+If a query reaches this limit, Elasticsearch terminates the query early.
+Elasticsearch collects documents before sorting.
+** *`q` (Optional, string)*: Query in the Lucene query string syntax.
+
+[discrete]
+=== create
+Index a document.
+Adds a JSON document to the specified data stream or index and makes it searchable.
+If the target is an index and the document already exists, the request updates the document and increments its version.
+
+{ref}/docs-index_.html[Endpoint documentation]
+[source,ts]
+----
+client.create({ id, index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Unique identifier for the document.
+** *`index` (string)*: Name of the data stream or index to target.
+If the target doesn’t exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.
+If the target doesn’t exist and doesn’t match a data stream template, this request creates the index.
+** *`document` (Optional, object)*: A document.
+** *`pipeline` (Optional, string)*: ID of the pipeline to use to preprocess incoming documents.
+If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
+If a final pipeline is configured it will always run, regardless of the value of this parameter.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.
+Valid values: `true`, `false`, `wait_for`.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`timeout` (Optional, string | -1 | 0)*: Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+** *`version` (Optional, number)*: Explicit version number for concurrency control.
+The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: `external`, `external_gte`.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+=== delete
+Delete a document.
+Removes a JSON document from the specified index.
+
+{ref}/docs-delete.html[Endpoint documentation]
+[source,ts]
+----
+client.delete({ id, index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Unique identifier for the document.
+** *`index` (string)*: Name of the target index.
+** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
+** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.
+Valid values: `true`, `false`, `wait_for`.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for active shards.
+** *`version` (Optional, number)*: Explicit version number for concurrency control.
+The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: `external`, `external_gte`.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+=== delete_by_query
+Delete documents.
+Deletes documents that match the specified query.
+
+{ref}/docs-delete-by-query.html[Endpoint documentation]
+[source,ts]
+----
+client.deleteByQuery({ index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, and aliases to search.
+Supports wildcards (`*`).
+To search all data streams or indices, omit this parameter or use `*` or `_all`.
+** *`max_docs` (Optional, number)*: The maximum number of documents to delete.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specifies the documents to delete using the Query DSL.
+** *`slice` (Optional, { field, id, max })*: Slice the request manually using the provided slice ID and total number of slices.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
+** *`analyze_wildcard` (Optional, boolean)*: If `true`, wildcard and prefix queries are analyzed.
+** *`conflicts` (Optional, Enum("abort" | "proceed"))*: What to do if delete by query hits version conflicts: `abort` or `proceed`.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: `AND` or `OR`.
+** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`from` (Optional, number)*: Starting offset (default: 0)
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`refresh` (Optional, boolean)*: If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+** *`request_cache` (Optional, boolean)*: If `true`, the request cache is used for this request.
+Defaults to the index-level setting.
+** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`q` (Optional, string)*: Query in the Lucene query string syntax.
+** *`scroll` (Optional, string | -1 | 0)*: Period to retain the search context for scrolling.
+** *`scroll_size` (Optional, number)*: Size of the scroll request that powers the operation.
+** *`search_timeout` (Optional, string | -1 | 0)*: Explicit timeout for each search request.
+Defaults to no timeout.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: The type of the search operation.
+Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into.
+** *`sort` (Optional, string[])*: A list of : pairs.
+** *`stats` (Optional, string[])*: Specific `tag` of the request for logging and statistical purposes.
+** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard.
+If a query reaches this limit, Elasticsearch terminates the query early.
+Elasticsearch collects documents before sorting.
+Use with caution.
+Elasticsearch applies this parameter to each shard handling the request.
+When possible, let Elasticsearch perform early termination automatically.
+Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
+** *`timeout` (Optional, string | -1 | 0)*: Period each deletion request waits for active shards.
+** *`version` (Optional, boolean)*: If `true`, returns the document version as part of a hit.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the operation is complete.
+
+[discrete]
+=== delete_by_query_rethrottle
+Throttle a delete by query operation.
+
+Change the number of requests per second for a particular delete by query operation.
+Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.
+
+{ref}/docs-delete-by-query.html[Endpoint documentation]
+[source,ts]
+----
+client.deleteByQueryRethrottle({ task_id })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`task_id` (string | number)*: The ID for the task.
+** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second.
+
+[discrete]
+=== delete_script
+Delete a script or search template.
+Deletes a stored script or search template.
+
+{ref}/modules-scripting.html[Endpoint documentation]
+[source,ts]
+----
+client.deleteScript({ id })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the stored script or search template.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+=== exists
+Check a document.
+Checks if a specified document exists.
+
+{ref}/docs-get.html[Endpoint documentation]
+[source,ts]
+----
+client.exists({ id, index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier of the document.
+** *`index` (string)*: List of data streams, indices, and aliases.
+Supports wildcards (`*`).
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time.
+** *`refresh` (Optional, boolean)*: If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+** *`routing` (Optional, string)*: Target the specified primary shard.
+** *`_source` (Optional, boolean | string | string[])*: `true` or `false` to return the `_source` field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude in the response.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit.
+If no fields are specified, no stored fields are included in the response.
+If this field is specified, the `_source` parameter defaults to false.
+** *`version` (Optional, number)*: Explicit version number for concurrency control.
+The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: `external`, `external_gte`.
+
+[discrete]
+=== exists_source
+Check for a document source.
+Checks if a document's `_source` is stored.
+
+{ref}/docs-get.html[Endpoint documentation]
+[source,ts]
+----
+client.existsSource({ id, index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier of the document.
+** *`index` (string)*: List of data streams, indices, and aliases.
+Supports wildcards (`*`).
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`realtime` (Optional, boolean)*: If true, the request is real-time as opposed to near-real-time.
+** *`refresh` (Optional, boolean)*: If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+** *`routing` (Optional, string)*: Target the specified primary shard.
+** *`_source` (Optional, boolean | string | string[])*: `true` or `false` to return the `_source` field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude in the response.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+** *`version` (Optional, number)*: Explicit version number for concurrency control.
+The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: `external`, `external_gte`.
+
+[discrete]
+=== explain
+Explain a document match result.
+Returns information about why a specific document matches, or doesn’t match, a query.
+
+{ref}/search-explain.html[Endpoint documentation]
+[source,ts]
+----
+client.explain({ id, index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Defines the document ID.
+** *`index` (string)*: Index names used to limit the request.
+Only a single index name can be provided to this parameter.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
+** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`analyze_wildcard` (Optional, boolean)*: If `true`, wildcard and prefix queries are analyzed.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: `AND` or `OR`.
+** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
+** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`_source` (Optional, boolean | string | string[])*: True or false to return the `_source` field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude from the response.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+** *`stored_fields` (Optional, string | string[])*: A list of stored fields to return in the response.
+** *`q` (Optional, string)*: Query in the Lucene query string syntax.
+
+[discrete]
+=== field_caps
+Get the field capabilities.
+
+Get information about the capabilities of fields among multiple indices.
+
+For data streams, the API returns field capabilities among the stream’s backing indices.
+It returns runtime fields like any other field.
+For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.
+
+{ref}/search-field-caps.html[Endpoint documentation]
+[source,ts]
+----
+client.fieldCaps({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.
+** *`fields` (Optional, string | string[])*: List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.
+** *`index_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Allows to filter indices if the provided query rewrites to match_none on every shard.
+** *`runtime_mappings` (Optional, Record)*: Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
+These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias,
+or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request
+targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports a list of values, such as `open,hidden`.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, missing or closed indices are not included in the response.
+** *`include_unmapped` (Optional, boolean)*: If true, unmapped fields are included in the response.
+** *`filters` (Optional, string)*: An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
+** *`types` (Optional, string[])*: Only return results for fields that have one of the types in the list
+** *`include_empty_fields` (Optional, boolean)*: If false, empty fields are not included in the response.
+
+[discrete]
+=== get
+Get a document by its ID.
+Retrieves the document with the specified ID from an index.
-|`timeout`
-|`string` - Explicit operation timeout
+{ref}/docs-get.html[Endpoint documentation]
+[source,ts]
+----
+client.get({ id, index })
+----
+[discrete]
+==== Arguments
-|`type`
-|`string` - Default document type for items which don't provide one
+* *Request (object):*
+** *`id` (string)*: Unique identifier of the document.
+** *`index` (string)*: Name of the index that contains the document.
+** *`force_synthetic_source` (Optional, boolean)*: Should this request force synthetic _source?
+Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
+Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default.
+** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time.
+** *`refresh` (Optional, boolean)*: If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
+** *`routing` (Optional, string)*: Target the specified primary shard.
+** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude in the response.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit.
+If no fields are specified, no stored fields are included in the response.
+If this field is specified, the `_source` parameter defaults to false.
+** *`version` (Optional, number)*: Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: internal, external, external_gte.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
+[discrete]
+=== get_script
+Get a script or search template.
+Retrieves a stored script or search template.
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
+{ref}/modules-scripting.html[Endpoint documentation]
+[source,ts]
+----
+client.getScript({ id })
+----
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - Default list of fields to extract and return from the _source field, can be overridden on each sub-request
+* *Request (object):*
+** *`id` (string)*: Identifier for the stored script or search template.
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
-|`pipeline`
-|`string` - The pipeline id to preprocess incoming documents with
+[discrete]
+=== get_script_context
+Get script contexts.
-|`body`
-|`object` - The operation definition and data (action-data pairs), separated by newlines
+Get a list of supported script contexts and their methods.
-|===
-=== cat.aliases
-[source,js]
+{painless}/painless-contexts.html[Endpoint documentation]
+[source,ts]
----
-client.cat.aliases([params] [, options] [, callback])
+client.getScriptContext()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html
-[cols=2*]
-|===
-|`name`
-|`string, string[]` - A comma-separated list of alias names to return
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+[discrete]
+=== get_script_languages
+Get script languages.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+Get a list of available script types, languages, and contexts.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+{ref}/modules-scripting.html[Endpoint documentation]
+[source,ts]
+----
+client.getScriptLanguages()
+----
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+[discrete]
+=== get_source
+Get a document's source.
+Returns the source of a document.
-|`help`
-|`boolean` - Return help information
+{ref}/docs-get.html[Endpoint documentation]
+[source,ts]
+----
+client.getSource({ id, index })
+----
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`id` (string)*: Unique identifier of the document.
+** *`index` (string)*: Name of the index that contains the document.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default.
+** *`realtime` (Optional, boolean)*: Boolean) If true, the request is real-time as opposed to near-real-time.
+** *`refresh` (Optional, boolean)*: If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
+** *`routing` (Optional, string)*: Target the specified primary shard.
+** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude in the response.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+** *`stored_fields` (Optional, string | string[])*
+** *`version` (Optional, number)*: Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: internal, external, external_gte.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+=== health_report
+Returns the health of the cluster.
-|===
-=== cat.allocation
-[source,js]
+{ref}/health-api.html[Endpoint documentation]
+[source,ts]
----
-client.cat.allocation([params] [, options] [, callback])
+client.healthReport({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
-[cols=2*]
-|===
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information
+[discrete]
+==== Arguments
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+* *Request (object):*
+** *`feature` (Optional, string | string[])*: A feature of the cluster, as returned by the top-level health report API.
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout.
+** *`verbose` (Optional, boolean)*: Opt-in for more information about the health of the system.
+** *`size` (Optional, number)*: Limit the number of affected resources the health report API returns.
-|`bytes`
-|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values
+[discrete]
+=== index
+Index a document.
+Adds a JSON document to the specified data stream or index and makes it searchable.
+If the target is an index and the document already exists, the request updates the document and increments its version.
+
+{ref}/docs-index_.html[Endpoint documentation]
+[source,ts]
+----
+client.index({ index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Name of the data stream or index to target.
+** *`id` (Optional, string)*: Unique identifier for the document.
+** *`document` (Optional, object)*: A document.
+** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
+** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
+** *`op_type` (Optional, Enum("index" | "create"))*: Set to create to only index the document if it does not already exist (put if absent).
+If a document with the specified `_id` already exists, the indexing operation will fail.
+Same as using the `/_create` endpoint.
+Valid values: `index`, `create`.
+If document id is specified, it defaults to `index`.
+Otherwise, it defaults to `create`.
+** *`pipeline` (Optional, string)*: ID of the pipeline to use to preprocess incoming documents.
+If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
+If a final pipeline is configured it will always run, regardless of the value of this parameter.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.
+Valid values: `true`, `false`, `wait_for`.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`timeout` (Optional, string | -1 | 0)*: Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+** *`version` (Optional, number)*: Explicit version number for concurrency control.
+The specified version must match the current version of the document for the request to succeed.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: `external`, `external_gte`.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+** *`require_alias` (Optional, boolean)*: If `true`, the destination must be an index alias.
+
+[discrete]
+=== info
+Get cluster info.
+Returns basic information about the cluster.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+{ref}/index.html[Endpoint documentation]
+[source,ts]
+----
+client.info()
+----
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+=== knn_search
+Run a knn search.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+NOTE: The kNN search API has been replaced by the `knn` option in the search API.
-|`help`
-|`boolean` - Return help information
+Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents.
+Given a query vector, the API finds the k closest vectors and returns those documents as search hits.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+Elasticsearch uses the HNSW algorithm to support efficient kNN search.
+Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed.
+This means the results returned are not always the true k closest neighbors.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+The kNN search API supports restricting the search using a filter.
+The search will return the top k documents that also match the filter query.
-|===
-=== cat.count
-[source,js]
+{ref}/search-search.html[Endpoint documentation]
+[source,ts]
----
-client.cat.count([params] [, options] [, callback])
+client.knnSearch({ index, knn })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to limit the returned information
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: A list of index names to search;
+use `_all` or to perform the operation on all indices
+** *`knn` ({ field, query_vector, k, num_candidates })*: kNN query to execute
+** *`_source` (Optional, boolean | { excludes, includes })*: Indicates which source fields are returned for matching documents. These
+fields are returned in the hits._source property of the search response.
+** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: The request returns doc values for field names matching these patterns
+in the hits.fields property of the response. Accepts wildcard (*) patterns.
+** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit. If no fields are specified,
+no stored fields are included in the response. If this field is specified, the _source
+parameter defaults to false. You can pass _source: true to return both source fields
+and stored fields in the search response.
+** *`fields` (Optional, string | string[])*: The request returns values for field names matching these patterns
+in the hits.fields property of the response. Accepts wildcard (*) patterns.
+** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type } | { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type }[])*: Query to filter the documents that can match. The kNN search will return the top
+`k` documents that also match this filter. The value can be a single query or a
+list of queries. If `filter` isn't provided, all documents are allowed to match.
+** *`routing` (Optional, string)*: A list of specific routing values
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+[discrete]
+=== mget
+Get multiple documents.
+
+Get multiple JSON documents by ID from one or more indices.
+If you specify an index in the request URI, you only need to specify the document IDs in the request body.
+To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.
+
+{ref}/docs-multi-get.html[Endpoint documentation]
+[source,ts]
+----
+client.mget({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string)*: Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index.
+** *`docs` (Optional, { _id, _index, routing, _source, stored_fields, version, version_type }[])*: The documents you want to retrieve. Required if no index is specified in the request URI.
+** *`ids` (Optional, string | string[])*: The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.
+** *`force_synthetic_source` (Optional, boolean)*: Should this request force synthetic _source?
+Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
+Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default.
+** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time.
+** *`refresh` (Optional, boolean)*: If `true`, the request refreshes relevant shards before retrieving documents.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`_source` (Optional, boolean | string | string[])*: True or false to return the `_source` field or not, or a list of fields to return.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude from the response.
+You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.
+If the `_source` parameter is `false`, this parameter is ignored.
+** *`stored_fields` (Optional, string | string[])*: If `true`, retrieves the document fields stored in the index rather than the document `_source`.
+
+[discrete]
+=== msearch
+Run multiple searches.
+
+The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.
+The structure is as follows:
+
+```
+header\n
+body\n
+header\n
+body\n
+```
+
+This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.
+
+IMPORTANT: The final line of data must end with a newline character `\n`.
+Each newline character may be preceded by a carriage return `\r`.
+When sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.
+
+{ref}/search-multi-search.html[Endpoint documentation]
+[source,ts]
+----
+client.msearch({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases to search.
+** *`searches` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, index, preference, request_cache, routing, search_type, ccs_minimize_roundtrips, allow_partial_search_results, ignore_throttled } | { aggregations, collapse, query, explain, ext, stored_fields, docvalue_fields, knn, from, highlight, indices_boost, min_score, post_filter, profile, rescore, script_fields, search_after, size, sort, _source, fields, terminate_after, stats, timeout, track_scores, track_total_hits, version, runtime_mappings, seq_no_primary_term, pit, suggest }[])*
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
+** *`ccs_minimize_roundtrips` (Optional, boolean)*: If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded or aliased indices are ignored when frozen.
+** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response.
+** *`include_named_queries_score` (Optional, boolean)*: Indicates whether hit.matched_queries should be rendered as a map that includes
+the name of the matched query associated with its score (true)
+or as an array containing the name of the matched queries (false)
+This functionality reruns each named query on every hit in a search response.
+Typically, this adds a small overhead to a request.
+However, using computationally expensive named queries on a large number of hits may add significant overhead.
+** *`max_concurrent_searches` (Optional, number)*: Maximum number of concurrent searches the multi search API can execute.
+** *`max_concurrent_shard_requests` (Optional, number)*: Maximum number of concurrent shard requests that each sub-search request executes per node.
+** *`pre_filter_shard_size` (Optional, number)*: Defines 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 its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
+** *`rest_total_hits_as_int` (Optional, boolean)*: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
+** *`routing` (Optional, string)*: Custom routing value used to route search operations to a specific shard.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Indicates whether global term and document frequencies should be used when scoring returned documents.
+** *`typed_keys` (Optional, boolean)*: Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.
+
+[discrete]
+=== msearch_template
+Run multiple templated searches.
+
+{ref}/search-multi-search.html[Endpoint documentation]
+[source,ts]
+----
+client.msearchTemplate({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search.
+Supports wildcards (`*`).
+To search all data streams and indices, omit this parameter or use `*`.
+** *`search_templates` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, index, preference, request_cache, routing, search_type, ccs_minimize_roundtrips, allow_partial_search_results, ignore_throttled } | { aggregations, collapse, query, explain, ext, stored_fields, docvalue_fields, knn, from, highlight, indices_boost, min_score, post_filter, profile, rescore, script_fields, search_after, size, sort, _source, fields, terminate_after, stats, timeout, track_scores, track_total_hits, version, runtime_mappings, seq_no_primary_term, pit, suggest }[])*
+** *`ccs_minimize_roundtrips` (Optional, boolean)*: If `true`, network round-trips are minimized for cross-cluster search requests.
+** *`max_concurrent_searches` (Optional, number)*: Maximum number of concurrent searches the API can run.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: The type of the search operation.
+Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+** *`rest_total_hits_as_int` (Optional, boolean)*: If `true`, the response returns `hits.total` as an integer.
+If `false`, it returns `hits.total` as an object.
+** *`typed_keys` (Optional, boolean)*: If `true`, the response prefixes aggregation and suggester names with their respective types.
+
+[discrete]
+=== mtermvectors
+Get multiple term vectors.
+
+You can specify existing documents by index and ID or provide artificial documents in the body of the request.
+You can specify the index in the request body or request URI.
+The response contains a `docs` array with all the fetched termvectors.
+Each element has the structure provided by the termvectors API.
+
+{ref}/docs-multi-termvectors.html[Endpoint documentation]
+[source,ts]
+----
+client.mtermvectors({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string)*: Name of the index that contains the documents.
+** *`docs` (Optional, { _id, _index, routing, _source, stored_fields, version, version_type }[])*: Array of existing or artificial documents.
+** *`ids` (Optional, string[])*: Simplified syntax to specify documents by their ID if they're in the same index.
+** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics.
+Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
+** *`field_statistics` (Optional, boolean)*: If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.
+** *`offsets` (Optional, boolean)*: If `true`, the response includes term offsets.
+** *`payloads` (Optional, boolean)*: If `true`, the response includes term payloads.
+** *`positions` (Optional, boolean)*: If `true`, the response includes term positions.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`realtime` (Optional, boolean)*: If true, the request is real-time as opposed to near-real-time.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`term_statistics` (Optional, boolean)*: If true, the response includes term frequency and document frequency.
+** *`version` (Optional, number)*: If `true`, returns the document version as part of a hit.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type.
+
+[discrete]
+=== open_point_in_time
+Open a point in time.
+
+A search request by default runs against the most recent visible data of the target indices,
+which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
+state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
+search requests using the same point in time. For example, if refreshes happen between
+`search_after` requests, then the results of those requests might not be consistent as changes happening
+between searches are only visible to the more recent point in time.
+
+A point in time must be opened explicitly before being used in search requests.
+The `keep_alive` parameter tells Elasticsearch how long it should persist.
+
+{ref}/point-in-time-api.html[Endpoint documentation]
+[source,ts]
+----
+client.openPointInTime({ index, keep_alive })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: A list of index names to open point in time; use `_all` or empty string to perform the operation on all indices
+** *`keep_alive` (string | -1 | 0)*: Extends the time to live of the corresponding point in time.
+** *`index_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Allows to filter indices if the provided query rewrites to `match_none` on every shard.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`allow_partial_search_results` (Optional, boolean)*: If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.
+If `true`, the point in time will contain all the shards that are available at the time of the request.
+
+[discrete]
+=== ping
+Ping the cluster.
+Returns whether the cluster is running.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+{ref}/index.html[Endpoint documentation]
+[source,ts]
+----
+client.ping()
+----
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+=== put_script
+Create or update a script or search template.
+Creates or updates a stored script or search template.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/modules-scripting.html[Endpoint documentation]
+[source,ts]
+----
+client.putScript({ id, script })
+----
+[discrete]
+==== Arguments
-|`help`
-|`boolean` - Return help information
+* *Request (object):*
+** *`id` (string)*: Identifier for the stored script or search template.
+Must be unique within the cluster.
+** *`script` ({ lang, options, source })*: Contains the script or search template, its parameters, and its language.
+** *`context` (Optional, string)*: Context in which the script or search template should run.
+To prevent errors, the API immediately compiles the script or template in this context.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+[discrete]
+=== rank_eval
+Evaluate ranked search results.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+Evaluate the quality of ranked search results over a set of typical search queries.
-|===
-=== cat.fielddata
-[source,js]
+{ref}/search-rank-eval.html[Endpoint documentation]
+[source,ts]
----
-client.cat.fielddata([params] [, options] [, callback])
+client.rankEval({ requests })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
-[cols=2*]
-|===
-|`fields`
-|`string, string[]` - A comma-separated list of fields to return the fielddata size
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`requests` ({ id, request, ratings, template_id, params }[])*: A set of typical search requests, together with their provided ratings.
+** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases used to limit the request. Wildcard (`*`) expressions are supported.
+To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`.
+** *`metric` (Optional, { precision, recall, mean_reciprocal_rank, dcg, expected_reciprocal_rank })*: Definition of the evaluation metric to calculate.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, missing or closed indices are not included in the response.
+** *`search_type` (Optional, string)*: Search operation type
+
+[discrete]
+=== reindex
+Reindex documents.
+Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself.
+
+{ref}/docs-reindex.html[Endpoint documentation]
+[source,ts]
+----
+client.reindex({ dest, source })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`dest` ({ index, op_type, pipeline, routing, version_type })*: The destination you are copying to.
+** *`source` ({ index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source you are copying from.
+** *`conflicts` (Optional, Enum("abort" | "proceed"))*: Set to proceed to continue reindexing even if there are conflicts.
+** *`max_docs` (Optional, number)*: The maximum number of documents to reindex.
+** *`script` (Optional, { source, id, params, lang, options })*: The script to run to update the document source or metadata when reindexing.
+** *`size` (Optional, number)*
+** *`refresh` (Optional, boolean)*: If `true`, the request refreshes affected shards to make this operation visible to search.
+** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second.
+Defaults to no throttle.
+** *`scroll` (Optional, string | -1 | 0)*: Specifies how long a consistent view of the index should be maintained for scrolled search.
+** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into.
+Defaults to 1 slice, meaning the task isn’t sliced into subtasks.
+** *`timeout` (Optional, string | -1 | 0)*: Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the operation is complete.
+** *`require_alias` (Optional, boolean)*: If `true`, the destination must be an index alias.
+
+[discrete]
+=== reindex_rethrottle
+Throttle a reindex operation.
+
+Change the number of requests per second for a particular reindex operation.
+
+{ref}/docs-reindex.html[Endpoint documentation]
+[source,ts]
+----
+client.reindexRethrottle({ task_id })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`task_id` (string)*: Identifier for the task.
+** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second.
+
+[discrete]
+=== render_search_template
+Render a search template.
+
+Render a search template as a search request body.
+
+{ref}/render-search-template-api.html[Endpoint documentation]
+[source,ts]
+----
+client.renderSearchTemplate({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: ID of the search template to render.
+If no `source` is specified, this or the `id` request body parameter is required.
+** *`file` (Optional, string)*
+** *`params` (Optional, Record)*: Key-value pairs used to replace Mustache variables in the template.
+The key is the variable name.
+The value is the variable value.
+** *`source` (Optional, string)*: An inline search template.
+Supports the same parameters as the search API's request body.
+These parameters also support Mustache variables.
+If no `id` or `` is specified, this parameter is required.
+
+[discrete]
+=== scripts_painless_execute
+Run a script.
+Runs a script and returns a result.
+
+{painless}/painless-execute-api.html[Endpoint documentation]
+[source,ts]
+----
+client.scriptsPainlessExecute({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`context` (Optional, string)*: The context that the script should run in.
+** *`context_setup` (Optional, { document, index, query })*: Additional parameters for the `context`.
+** *`script` (Optional, { source, id, params, lang, options })*: The Painless script to execute.
+
+[discrete]
+=== scroll
+Run a scrolling search.
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).
-|`bytes`
-|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values
+The scroll API gets large sets of results from a single scrolling search request.
+To get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.
+The `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.
+The search response returns a scroll ID in the `_scroll_id` response body parameter.
+You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.
+If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/search-request-body.html[Endpoint documentation]
+[source,ts]
+----
+client.scroll({ scroll_id })
+----
+[discrete]
+==== Arguments
-|`help`
-|`boolean` - Return help information
+* *Request (object):*
+** *`scroll_id` (string)*: Scroll ID of the search.
+** *`scroll` (Optional, string | -1 | 0)*: Period to retain the search context for scrolling.
+** *`rest_total_hits_as_int` (Optional, boolean)*: If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+[discrete]
+=== search
+Run a search.
+
+Get search hits that match the query defined in the request.
+You can provide search queries using the `q` query string parameter or the request body.
+If both are specified, only the query parameter is used.
+
+{ref}/search-search.html[Endpoint documentation]
+[source,ts]
+----
+client.search({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search.
+Supports wildcards (`*`).
+To search all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`aggregations` (Optional, Record)*: Defines the aggregations that are run as part of the search request.
+** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*: Collapses search results the values of the specified field.
+** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit.
+** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins.
+** *`from` (Optional, number)*: Starting document offset.
+Needs to be non-negative.
+By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
+To page through more hits, use the `search_after` parameter.
+** *`highlight` (Optional, { encoder, fields })*: Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.
+** *`track_total_hits` (Optional, boolean | number)*: Number of hits matching the query to count accurately.
+If `true`, the exact number of hits is returned at the cost of some performance.
+If `false`, the response does not include the total number of hits matching the query.
+** *`indices_boost` (Optional, Record[])*: Boosts the _score of documents from specified indices.
+** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (`*`) patterns.
+The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
+** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity, inner_hits } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity, inner_hits }[])*: Defines the approximate kNN search to run.
+** *`rank` (Optional, { rrf })*: Defines the Reciprocal Rank Fusion (RRF) to use.
+** *`min_score` (Optional, number)*: Minimum `_score` for matching documents.
+Documents with a lower `_score` are not included in the search results.
+** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Use the `post_filter` parameter to filter search results.
+The search hits are filtered after the aggregations are calculated.
+A post filter has no impact on the aggregation results.
+** *`profile` (Optional, boolean)*: Set to `true` to return detailed timing information about the execution of individual components in a search request.
+NOTE: This is a debugging tool and adds significant overhead to search execution.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
+** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*: Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.
+** *`retriever` (Optional, { standard, knn, rrf, text_similarity_reranker, rule })*: A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn.
+** *`script_fields` (Optional, Record)*: Retrieve a script evaluation (based on different fields) for each hit.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Used to retrieve the next page of hits using a set of sort values from the previous page.
+** *`size` (Optional, number)*: The number of hits to return.
+By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
+To page through more hits, use the `search_after` parameter.
+** *`slice` (Optional, { field, id, max })*: Can be used to split a scrolled search into multiple slices that can be consumed independently.
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: A list of : pairs.
+** *`_source` (Optional, boolean | { excludes, includes })*: Indicates which source fields are returned for matching documents.
+These fields are returned in the hits._source property of the search response.
+** *`fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (`*`) patterns.
+The request returns values for field names matching these patterns in the `hits.fields` property of the response.
+** *`suggest` (Optional, { text })*: Defines a suggester that provides similar looking terms based on a provided text.
+** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard.
+If a query reaches this limit, Elasticsearch terminates the query early.
+Elasticsearch collects documents before sorting.
+Use with caution.
+Elasticsearch applies this parameter to each shard handling the request.
+When possible, let Elasticsearch perform early termination automatically.
+Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
+If set to `0` (default), the query does not terminate early.
+** *`timeout` (Optional, string)*: Specifies the period of time to wait for a response from each shard.
+If no response is received before the timeout expires, the request fails and returns an error.
+Defaults to no timeout.
+** *`track_scores` (Optional, boolean)*: If true, calculate and return document scores, even if the scores are not used for sorting.
+** *`version` (Optional, boolean)*: If true, returns document version as part of a hit.
+** *`seq_no_primary_term` (Optional, boolean)*: If `true`, returns sequence number and primary term of the last modification of each hit.
+** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit.
+If no fields are specified, no stored fields are included in the response.
+If this field is specified, the `_source` parameter defaults to `false`.
+You can pass `_source: true` to return both source fields and stored fields in the search response.
+** *`pit` (Optional, { id, keep_alive })*: Limits the search to a point in time (PIT).
+If you provide a PIT, you cannot specify an `` in the request path.
+** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request.
+These fields take precedence over mapped fields with the same name.
+** *`stats` (Optional, string[])*: Stats groups to associate with the search.
+Each group maintains a statistics aggregation for its associated searches.
+You can retrieve these stats using the indices stats API.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`allow_partial_search_results` (Optional, boolean)*: If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results.
+** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
+This parameter can only be used when the q query string parameter is specified.
+** *`analyze_wildcard` (Optional, boolean)*: If true, wildcard and prefix queries are analyzed.
+This parameter can only be used when the q query string parameter is specified.
+** *`batched_reduce_size` (Optional, number)*: The number of shard results that should be reduced at once on the coordinating node.
+This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
+** *`ccs_minimize_roundtrips` (Optional, boolean)*: If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: AND or OR.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
+This parameter can only be used when the q query string parameter is specified.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+** *`ignore_throttled` (Optional, boolean)*: If `true`, concrete, expanded or aliased indices will be ignored when frozen.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`include_named_queries_score` (Optional, boolean)*: Indicates whether hit.matched_queries should be rendered as a map that includes
+the name of the matched query associated with its score (true)
+or as an array containing the name of the matched queries (false)
+This functionality reruns each named query on every hit in a search response.
+Typically, this adds a small overhead to a request.
+However, using computationally expensive named queries on a large number of hits may add significant overhead.
+** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`max_concurrent_shard_requests` (Optional, number)*: Defines the number of concurrent shard requests per node this 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.
+** *`min_compatible_shard_node` (Optional, string)*: The minimum version of the node that can handle the request
+Any handling node with a lower version will fail the request.
+** *`preference` (Optional, string)*: Nodes and shards used for the search.
+By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are:
+`_only_local` to run the search only on shards on the local node;
+`_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method;
+`_only_nodes:,` to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method;
+`_prefer_nodes:,` to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method;
+`_shards:,` to run the search only on the specified shards;
+`` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order.
+** *`pre_filter_shard_size` (Optional, number)*: Defines 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 its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).
+When unspecified, the pre-filter phase is executed if any of these conditions is met:
+the request targets more than 128 shards;
+the request targets one or more read-only index;
+the primary sort of the query targets an indexed field.
+** *`request_cache` (Optional, boolean)*: If `true`, the caching of search results is enabled for requests where `size` is `0`.
+Defaults to index level settings.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`scroll` (Optional, string | -1 | 0)*: Period to retain the search context for scrolling. See Scroll search results.
+By default, this value cannot exceed `1d` (24 hours).
+You can change this limit using the `search.max_keep_alive` cluster-level setting.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: How distributed term frequencies are calculated for relevance scoring.
+** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions.
+** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))*: Specifies the suggest mode.
+This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+** *`suggest_size` (Optional, number)*: Number of suggestions to return.
+This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned.
+This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
+** *`typed_keys` (Optional, boolean)*: If `true`, aggregation and suggester names are be prefixed by their respective types in the response.
+** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.
+** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude from the response.
+You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
+If the `_source` parameter is `false`, this parameter is ignored.
+** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response.
+If this parameter is specified, only these source fields are returned.
+You can exclude fields from this subset using the `_source_excludes` query parameter.
+If the `_source` parameter is `false`, this parameter is ignored.
+** *`q` (Optional, string)*: Query in the Lucene query string syntax using query parameter search.
+Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
+** *`force_synthetic_source` (Optional, boolean)*: Should this request force synthetic _source?
+Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
+Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+
+[discrete]
+=== search_mvt
+Search a vector tile.
+
+Search a vector tile for geospatial values.
+
+{ref}/search-vector-tile-api.html[Endpoint documentation]
+[source,ts]
+----
+client.searchMvt({ index, field, zoom, x, y })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, or aliases to search
+** *`field` (string)*: Field containing geospatial data to return
+** *`zoom` (number)*: Zoom level for the vector tile to search
+** *`x` (number)*: X coordinate for the vector tile to search
+** *`y` (number)*: Y coordinate for the vector tile to search
+** *`aggs` (Optional, Record)*: Sub-aggregations for the geotile_grid.
+
+Supports the following aggregation types:
+- avg
+- cardinality
+- max
+- min
+- sum
+** *`buffer` (Optional, number)*: Size, in pixels, of a clipping buffer outside the tile. This allows renderers
+to avoid outline artifacts from geometries that extend past the extent of the tile.
+** *`exact_bounds` (Optional, boolean)*: If false, the meta layer’s feature is the bounding box of the tile.
+If true, the meta layer’s feature is a bounding box resulting from a
+geo_bounds aggregation. The aggregation runs on values that intersect
+the // tile with wrap_longitude set to false. The resulting
+bounding box may be larger than the vector tile.
+** *`extent` (Optional, number)*: Size, in pixels, of a side of the tile. Vector tiles are square with equal sides.
+** *`fields` (Optional, string | string[])*: Fields to return in the `hits` layer. Supports wildcards (`*`).
+This parameter does not support fields with array values. Fields with array
+values may return inconsistent results.
+** *`grid_agg` (Optional, Enum("geotile" | "geohex"))*: Aggregation used to create a grid for the `field`.
+** *`grid_precision` (Optional, number)*: Additional zoom levels available through the aggs layer. For example, if is 7
+and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results
+don’t include the aggs layer.
+** *`grid_type` (Optional, Enum("grid" | "point" | "centroid"))*: Determines the geometry type for features in the aggs layer. In the aggs layer,
+each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon
+of the cells bounding box. If 'point' each feature is a Point that is the centroid
+of the cell.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Query DSL used to filter documents for the search.
+** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take
+precedence over mapped fields with the same name.
+** *`size` (Optional, number)*: Maximum number of features to return in the hits layer. Accepts 0-10000.
+If 0, results don’t include the hits layer.
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: Sorts features in the hits layer. By default, the API calculates a bounding
+box for each feature. It sorts features based on this box’s diagonal length,
+from longest to shortest.
+** *`track_total_hits` (Optional, boolean | number)*: Number of hits matching the query to count accurately. If `true`, the exact number
+of hits is returned at the cost of some performance. If `false`, the response does
+not include the total number of hits matching the query.
+** *`with_labels` (Optional, boolean)*: If `true`, the hits and aggs layers will contain additional point features representing
+suggested label positions for the original features.
+
+[discrete]
+=== search_shards
+Get the search shards.
+
+Get the indices and shards that a search request would be run against.
+This information can be useful for working out issues or planning optimizations with routing and shard preferences.
+When filtered aliases are used, the filter is returned as part of the indices section.
+
+{ref}/search-shards.html[Endpoint documentation]
+[source,ts]
+----
+client.searchShards({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: Returns the indices and shards that a search request would be executed against.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+
+[discrete]
+=== search_template
+Run a search with a search template.
+
+{ref}/search-template.html[Endpoint documentation]
+[source,ts]
+----
+client.searchTemplate({ ... })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices,
+and aliases to search. Supports wildcards (*).
+** *`explain` (Optional, boolean)*: If `true`, returns detailed information about score calculation as part of each hit.
+** *`id` (Optional, string)*: ID of the search template to use. If no source is specified,
+this parameter is required.
+** *`params` (Optional, Record)*: Key-value pairs used to replace Mustache variables in the template.
+The key is the variable name.
+The value is the variable value.
+** *`profile` (Optional, boolean)*: If `true`, the query execution is profiled.
+** *`source` (Optional, string)*: An inline search template. Supports the same parameters as the search API's
+request body. Also supports Mustache variables. If no id is specified, this
+parameter is required.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`ccs_minimize_roundtrips` (Optional, boolean)*: If `true`, network round-trips are minimized for cross-cluster search requests.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_throttled` (Optional, boolean)*: If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`scroll` (Optional, string | -1 | 0)*: Specifies how long a consistent view of the index
+should be maintained for scrolled search.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: The type of the search operation.
+** *`rest_total_hits_as_int` (Optional, boolean)*: If true, hits.total are rendered as an integer in the response.
+** *`typed_keys` (Optional, boolean)*: If `true`, the response prefixes aggregation and suggester names with their respective types.
+
+[discrete]
+=== terms_enum
+Get terms in an index.
+
+Discover terms that match a partial string in an index.
+This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios.
+
+If the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.
+This can occur due to a few reasons, such as a request timeout or a node error.
+
+NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.
+
+{ref}/search-terms-enum.html[Endpoint documentation]
+[source,ts]
+----
+client.termsEnum({ index, field })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: List of data streams, indices, and index aliases to search. Wildcard (*) expressions are supported.
+** *`field` (string)*: The string to match at the start of indexed terms. If not provided, all terms in the field are considered.
+** *`size` (Optional, number)*: How many matching terms to return.
+** *`timeout` (Optional, string | -1 | 0)*: The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty.
+** *`case_insensitive` (Optional, boolean)*: When true the provided search string is matched against index terms without case sensitivity.
+** *`index_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Allows to filter an index shard if the provided query rewrites to match_none.
+** *`string` (Optional, string)*: The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request.
+** *`search_after` (Optional, string)*
+
+[discrete]
+=== termvectors
+Get term vector information.
+
+Get information and statistics about terms in the fields of a particular document.
+
+{ref}/docs-termvectors.html[Endpoint documentation]
+[source,ts]
+----
+client.termvectors({ index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Name of the index that contains the document.
+** *`id` (Optional, string)*: Unique identifier of the document.
+** *`doc` (Optional, object)*: An artificial document (a document not present in the index) for which you want to retrieve term vectors.
+** *`filter` (Optional, { max_doc_freq, max_num_terms, max_term_freq, max_word_length, min_doc_freq, min_term_freq, min_word_length })*: Filter terms based on their tf-idf scores.
+** *`per_field_analyzer` (Optional, Record)*: Overrides the default per-field analyzer.
+** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics.
+Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
+** *`field_statistics` (Optional, boolean)*: If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.
+** *`offsets` (Optional, boolean)*: If `true`, the response includes term offsets.
+** *`payloads` (Optional, boolean)*: If `true`, the response includes term payloads.
+** *`positions` (Optional, boolean)*: If `true`, the response includes term positions.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`realtime` (Optional, boolean)*: If true, the request is real-time as opposed to near-real-time.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`term_statistics` (Optional, boolean)*: If `true`, the response includes term frequency and document frequency.
+** *`version` (Optional, number)*: If `true`, returns the document version as part of a hit.
+** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type.
+
+[discrete]
+=== update
+Update a document.
+Updates a document by running a script or passing a partial document.
+
+{ref}/docs-update.html[Endpoint documentation]
+[source,ts]
+----
+client.update({ id, index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Document ID
+** *`index` (string)*: The name of the index
+** *`detect_noop` (Optional, boolean)*: Set to false to disable setting 'result' in the response
+to 'noop' if no change to the document occurred.
+** *`doc` (Optional, object)*: A partial update to an existing document.
+** *`doc_as_upsert` (Optional, boolean)*: Set to true to use the contents of 'doc' as the value of 'upsert'
+** *`script` (Optional, { source, id, params, lang, options })*: Script to execute to update the document.
+** *`scripted_upsert` (Optional, boolean)*: Set to true to execute the script whether or not the document exists.
+** *`_source` (Optional, boolean | { excludes, includes })*: Set to false to disable source retrieval. You can also specify a comma-separated
+list of the fields you want to retrieve.
+** *`upsert` (Optional, object)*: If the document does not already exist, the contents of 'upsert' are inserted as a
+new document. If the document exists, the 'script' is executed.
+** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
+** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
+** *`lang` (Optional, string)*: The script language.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation
+visible to search, if 'wait_for' then wait for a refresh to make this operation
+visible to search, if 'false' do nothing with refreshes.
+** *`require_alias` (Optional, boolean)*: If true, the destination must be an index alias.
+** *`retry_on_conflict` (Optional, number)*: Specify how many times should the operation be retried when a conflict occurs.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for dynamic mapping updates and active shards.
+This guarantees Elasticsearch waits for at least the timeout before failing.
+The actual wait time could be longer, particularly when multiple waits occur.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operations.
+Set to 'all' or any positive integer up to the total number of shards in the index
+(number_of_replicas+1). Defaults to 1 meaning the primary shard.
+** *`_source_excludes` (Optional, string | string[])*: Specify the source fields you want to exclude.
+** *`_source_includes` (Optional, string | string[])*: Specify the source fields you want to retrieve.
+
+[discrete]
+=== update_by_query
+Update documents.
+Updates documents that match the specified query.
+If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
+
+{ref}/docs-update-by-query.html[Endpoint documentation]
+[source,ts]
+----
+client.updateByQuery({ index })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, and aliases to search.
+Supports wildcards (`*`).
+To search all data streams or indices, omit this parameter or use `*` or `_all`.
+** *`max_docs` (Optional, number)*: The maximum number of documents to update.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specifies the documents to update using the Query DSL.
+** *`script` (Optional, { source, id, params, lang, options })*: The script to run to update the document source or metadata when updating.
+** *`slice` (Optional, { field, id, max })*: Slice the request manually using the provided slice ID and total number of slices.
+** *`conflicts` (Optional, Enum("abort" | "proceed"))*: What to do if update by query hits version conflicts: `abort` or `proceed`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
+** *`analyze_wildcard` (Optional, boolean)*: If `true`, wildcard and prefix queries are analyzed.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: `AND` or `OR`.
+** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`from` (Optional, number)*: Starting offset (default: 0)
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+** *`pipeline` (Optional, string)*: ID of the pipeline to use to preprocess incoming documents.
+If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
+If a final pipeline is configured it will always run, regardless of the value of this parameter.
+** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
+Random by default.
+** *`q` (Optional, string)*: Query in the Lucene query string syntax.
+** *`refresh` (Optional, boolean)*: If `true`, Elasticsearch refreshes affected shards to make the operation visible to search.
+** *`request_cache` (Optional, boolean)*: If `true`, the request cache is used for this request.
+** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`scroll` (Optional, string | -1 | 0)*: Period to retain the search context for scrolling.
+** *`scroll_size` (Optional, number)*: Size of the scroll request that powers the operation.
+** *`search_timeout` (Optional, string | -1 | 0)*: Explicit timeout for each search request.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`.
+** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into.
+** *`sort` (Optional, string[])*: A list of : pairs.
+** *`stats` (Optional, string[])*: Specific `tag` of the request for logging and statistical purposes.
+** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard.
+If a query reaches this limit, Elasticsearch terminates the query early.
+Elasticsearch collects documents before sorting.
+Use with caution.
+Elasticsearch applies this parameter to each shard handling the request.
+When possible, let Elasticsearch perform early termination automatically.
+Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
+** *`timeout` (Optional, string | -1 | 0)*: Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.
+** *`version` (Optional, boolean)*: If `true`, returns the document version as part of a hit.
+** *`version_type` (Optional, boolean)*: Should the document increment the version number (internal) on hit or not (reindex)
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the operation is complete.
+
+[discrete]
+=== update_by_query_rethrottle
+Throttle an update by query operation.
+
+Change the number of requests per second for a particular update by query operation.
+Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.
+
+{ref}/docs-update-by-query.html[Endpoint documentation]
+[source,ts]
+----
+client.updateByQueryRethrottle({ task_id })
+----
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`task_id` (string)*: The ID for the task.
+** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second.
+
+[discrete]
+=== async_search
+[discrete]
+==== delete
+Delete an async search.
+
+If the asynchronous search is still running, it is cancelled.
+Otherwise, the saved search results are deleted.
+If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
+
+{ref}/async-search.html[Endpoint documentation]
+[source,ts]
+----
+client.asyncSearch.delete({ id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: A unique identifier for the async search.
+
+[discrete]
+==== get
+Get async search results.
+
+Retrieve the results of a previously submitted asynchronous search request.
+If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
+
+{ref}/async-search.html[Endpoint documentation]
+[source,ts]
+----
+client.asyncSearch.get({ id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: A unique identifier for the async search.
+** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search should be available in the cluster.
+When not specified, the `keep_alive` set with the corresponding submit async request will be used.
+Otherwise, it is possible to override the value and extend the validity of the request.
+When this period expires, the search, if still running, is cancelled.
+If the search is completed, its saved results are deleted.
+** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Specifies to wait for the search to be completed up until the provided timeout.
+Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires.
+By default no timeout is set meaning that the currently available results will be returned without any additional wait.
+
+[discrete]
+==== status
+Get the async search status.
+
+Get the status of a previously submitted async search request given its identifier, without retrieving search results.
+If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
+
+{ref}/async-search.html[Endpoint documentation]
+[source,ts]
+----
+client.asyncSearch.status({ id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: A unique identifier for the async search.
+** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search needs to be available.
+Ongoing async searches and any saved search results are deleted after this period.
+
+[discrete]
+==== submit
+Run an async search.
+
+When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
+
+Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
+
+By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
+The maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.
+
+{ref}/async-search.html[Endpoint documentation]
+[source,ts]
+----
+client.asyncSearch.submit({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices
+** *`aggregations` (Optional, Record)*
+** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*
+** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit.
+** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins.
+** *`from` (Optional, number)*: Starting document offset. By default, you cannot page through more than 10,000
+hits using the from and size parameters. To page through more hits, use the
+search_after parameter.
+** *`highlight` (Optional, { encoder, fields })*
+** *`track_total_hits` (Optional, boolean | number)*: Number of hits matching the query to count accurately. If true, the exact
+number of hits is returned at the cost of some performance. If false, the
+response does not include the total number of hits matching the query.
+Defaults to 10,000 hits.
+** *`indices_boost` (Optional, Record[])*: Boosts the _score of documents from specified indices.
+** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns doc values for field
+names matching these patterns in the hits.fields property of the response.
+** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity, inner_hits } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity, inner_hits }[])*: Defines the approximate kNN search to run.
+** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are
+not included in the search results.
+** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*
+** *`profile` (Optional, boolean)*
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
+** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*
+** *`script_fields` (Optional, Record)*: Retrieve a script evaluation (based on different fields) for each hit.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*
+** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more
+than 10,000 hits using the from and size parameters. To page through more
+hits, use the search_after parameter.
+** *`slice` (Optional, { field, id, max })*
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*
+** *`_source` (Optional, boolean | { excludes, includes })*: Indicates which source fields are returned for matching documents. These
+fields are returned in the hits._source property of the search response.
+** *`fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns values for field names
+matching these patterns in the hits.fields property of the response.
+** *`suggest` (Optional, { text })*
+** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard. If a query reaches this
+limit, Elasticsearch terminates the query early. Elasticsearch collects documents
+before sorting. Defaults to 0, which does not terminate query execution early.
+** *`timeout` (Optional, string)*: Specifies the period of time to wait for a response from each shard. If no response
+is received before the timeout expires, the request fails and returns an error.
+Defaults to no timeout.
+** *`track_scores` (Optional, boolean)*: If true, calculate and return document scores, even if the scores are not used for sorting.
+** *`version` (Optional, boolean)*: If true, returns document version as part of a hit.
+** *`seq_no_primary_term` (Optional, boolean)*: If true, returns sequence number and primary term of the last modification
+of each hit. See Optimistic concurrency control.
+** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit. If no fields are specified,
+no stored fields are included in the response. If this field is specified, the _source
+parameter defaults to false. You can pass _source: true to return both source fields
+and stored fields in the search response.
+** *`pit` (Optional, { id, keep_alive })*: Limits the search to a point in time (PIT). If you provide a PIT, you
+cannot specify an in the request path.
+** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take
+precedence over mapped fields with the same name.
+** *`stats` (Optional, string[])*: Stats groups to associate with the search. Each group maintains a statistics
+aggregation for its associated searches. You can retrieve these stats using
+the indices stats API.
+** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Blocks and waits until the search is completed up to a certain timeout.
+When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
+** *`keep_on_completion` (Optional, boolean)*: If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
+** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+** *`allow_partial_search_results` (Optional, boolean)*: Indicate if an error should be returned if there is a partial search failure or timeout
+** *`analyzer` (Optional, string)*: The analyzer to use for the query string
+** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false)
+** *`batched_reduce_size` (Optional, number)*: Affects how often partial results become available, which happens whenever shard results are reduced.
+A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).
+** *`ccs_minimize_roundtrips` (Optional, boolean)*: The default value is the only supported value.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR)
+** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`ignore_throttled` (Optional, boolean)*: Whether specified concrete, expanded or aliased indices should be ignored when throttled
+** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
+** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+** *`max_concurrent_shard_requests` (Optional, number)*: The number of concurrent shard requests per node this 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
+** *`min_compatible_shard_node` (Optional, string)*
+** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random)
+** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to true
+** *`routing` (Optional, string)*: A list of specific routing values
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type
+** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions.
+** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))*: Specify suggest mode
+** *`suggest_size` (Optional, number)*: How many suggestions to return in response
+** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned.
+** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field
+** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field
+** *`q` (Optional, string)*: Query in the Lucene query string syntax
+
+[discrete]
+=== autoscaling
+[discrete]
+==== delete_autoscaling_policy
+Delete an autoscaling policy.
+
+NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
+
+{ref}/autoscaling-delete-autoscaling-policy.html[Endpoint documentation]
+[source,ts]
+----
+client.autoscaling.deleteAutoscalingPolicy({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: the name of the autoscaling policy
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== get_autoscaling_capacity
+Get the autoscaling capacity.
+
+NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
+
+This API gets the current autoscaling capacity based on the configured autoscaling policy.
+It will return information to size the cluster appropriately to the current workload.
+
+The `required_capacity` is calculated as the maximum of the `required_capacity` result of all individual deciders that are enabled for the policy.
+
+The operator should verify that the `current_nodes` match the operator’s knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information.
+
+The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required.
+This information is provided for diagnosis only.
+Do not use this information to make autoscaling decisions.
+
+{ref}/autoscaling-get-autoscaling-capacity.html[Endpoint documentation]
+[source,ts]
+----
+client.autoscaling.getAutoscalingCapacity({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== get_autoscaling_policy
+Get an autoscaling policy.
-|`fields`
-|`string, string[]` - A comma-separated list of fields to return in the output
+NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
-|===
-=== cat.health
-[source,js]
+{ref}/autoscaling-get-autoscaling-capacity.html[Endpoint documentation]
+[source,ts]
----
-client.cat.health([params] [, options] [, callback])
+client.autoscaling.getAutoscalingPolicy({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: the name of the autoscaling policy
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== put_autoscaling_policy
+Create or update an autoscaling policy.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
+
+{ref}/autoscaling-put-autoscaling-policy.html[Endpoint documentation]
+[source,ts]
+----
+client.autoscaling.putAutoscalingPolicy({ name })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`name` (string)*: the name of the autoscaling policy
+** *`policy` (Optional, { roles, deciders })*
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`ts`
-|`boolean` - Set to false to disable timestamping +
- _Default:_ `true`
+[discrete]
+=== cat
+[discrete]
+==== aliases
+Get aliases.
+Retrieves the cluster’s index aliases, including filter and routing information.
+The API does not return data stream aliases.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
-|===
-=== cat.help
-[source,js]
+{ref}/cat-alias.html[Endpoint documentation]
+[source,ts]
----
-client.cat.help([params] [, options] [, callback])
+client.cat.aliases({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
-[cols=2*]
-|===
-|`help`
-|`boolean` - Return help information
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string | string[])*: A list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
-|===
-=== cat.indices
-[source,js]
+[discrete]
+==== allocation
+Provides a snapshot of the number of shards allocated to each data node and their disk space.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
+
+{ref}/cat-allocation.html[Endpoint documentation]
+[source,ts]
----
-client.cat.indices([params] [, options] [, callback])
+client.cat.allocation({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to limit the returned information
-
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`bytes`
-|`'b', 'k', 'm', 'g'` - The unit in which to display byte values
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: List of node identifiers or names used to limit the returned information.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== component_templates
+Get component templates.
+Returns information about component templates in a cluster.
+Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+CAT APIs are only intended for human consumption using the command line or Kibana console.
+They are not intended for use by applications. For application consumption, use the get component template API.
-|`health`
-|`'green', 'yellow', 'red'` - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
+{ref}/cat-component-templates.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.componentTemplates({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`pri`
-|`boolean` - Set to true to return stats only for primary shards
+* *Request (object):*
+** *`name` (Optional, string)*: The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+[discrete]
+==== count
+Get a document count.
+Provides quick access to a document count for a data stream, an index, or an entire cluster.
+The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+CAT APIs are only intended for human consumption using the command line or Kibana console.
+They are not intended for use by applications. For application consumption, use the count API.
-|===
-=== cat.master
-[source,js]
+{ref}/cat-count.html[Endpoint documentation]
+[source,ts]
----
-client.cat.master([params] [, options] [, callback])
+client.cat.count({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+[discrete]
+==== fielddata
+Returns the amount of heap memory currently used by the field data cache on every data node in the cluster.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
+They are not intended for use by applications. For application consumption, use the nodes stats API.
+
+{ref}/cat-fielddata.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.fielddata({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`fields` (Optional, string | string[])*: List of fields used to limit returned information.
+To retrieve all fields, omit this parameter.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== health
+Returns the health status of a cluster, similar to the cluster health API.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
+They are not intended for use by applications. For application consumption, use the cluster health API.
+This API is often used to check malfunctioning clusters.
+To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats:
+`HH:MM:SS`, which is human-readable but includes no date information;
+`Unix epoch time`, which is machine-sortable and includes date information.
+The latter format is useful for cluster recoveries that take multiple days.
+You can use the cat health API to verify cluster health across multiple nodes.
+You also can use the API to track the recovery of a large cluster over a longer period of time.
-|===
-=== cat.nodeattrs
-[source,js]
+{ref}/cat-health.html[Endpoint documentation]
+[source,ts]
----
-client.cat.nodeattrs([params] [, options] [, callback])
+client.cat.health({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
+** *`ts` (Optional, boolean)*: If true, returns `HH:MM:SS` and Unix epoch timestamps.
+
+[discrete]
+==== help
+Get CAT help.
+Returns help for the CAT APIs.
+
+{ref}/cat.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.help()
+----
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+[discrete]
+==== indices
+Get index information.
+Returns high-level information about indices in a cluster, including backing indices for data streams.
-|`help`
-|`boolean` - Return help information
+Use this request to get the following information for each index in a cluster:
+- shard count
+- document count
+- deleted document count
+- primary store size
+- total store size of all shards, including shard replicas
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.
+To get an accurate count of Elasticsearch documents, use the cat count or count APIs.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+CAT APIs are only intended for human consumption using the command line or Kibana console.
+They are not intended for use by applications. For application consumption, use an index endpoint.
-|===
-=== cat.nodes
-[source,js]
+{ref}/cat-indices.html[Endpoint documentation]
+[source,ts]
----
-client.cat.nodes([params] [, options] [, callback])
+client.cat.indices({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`full_id` or `fullId`
-|`boolean` - Return the full node ID instead of the shortened version (default: false)
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: The type of index that wildcard patterns can match.
+** *`health` (Optional, Enum("green" | "yellow" | "red"))*: The health status used to limit returned indices. By default, the response includes indices of any health status.
+** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory.
+** *`pri` (Optional, boolean)*: If true, the response only includes information from primary shards.
+** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== master
+Returns information about the master node, including the ID, bound IP address, and name.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/cat-master.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.master()
+----
-|`help`
-|`boolean` - Return help information
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+[discrete]
+==== ml_data_frame_analytics
+Get data frame analytics jobs.
+Returns configuration and usage information about data frame analytics jobs.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+CAT APIs are only intended for human consumption using the Kibana
+console or command line. They are not intended for use by applications. For
+application consumption, use the get data frame analytics jobs statistics API.
-|===
-=== cat.pendingTasks
-[source,js]
+{ref}/cat-dfanalytics.html[Endpoint documentation]
+[source,ts]
----
-client.cat.pendingTasks([params] [, options] [, callback])
+client.cat.mlDataFrameAnalytics({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`id` (Optional, string)*: The ID of the data frame analytics to fetch
+** *`allow_no_match` (Optional, boolean)*: Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit in which to display byte values
+** *`h` (Optional, Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version") | Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version")[])*: List of column names to display.
+** *`s` (Optional, Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version") | Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version")[])*: List of column names or column aliases used to sort the
+response.
+** *`time` (Optional, string | -1 | 0)*: Unit used to display time values.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+[discrete]
+==== ml_datafeeds
+Get datafeeds.
+Returns configuration and usage information about datafeeds.
+This API returns a maximum of 10,000 datafeeds.
+If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
+cluster privileges to use this API.
-|`help`
-|`boolean` - Return help information
+CAT APIs are only intended for human consumption using the Kibana
+console or command line. They are not intended for use by applications. For
+application consumption, use the get datafeed statistics API.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
-
-|`v`
-|`boolean` - Verbose mode. Display column headers
-
-|===
-=== cat.plugins
-[source,js]
+{ref}/cat-datafeeds.html[Endpoint documentation]
+[source,ts]
----
-client.cat.plugins([params] [, options] [, callback])
+client.cat.mlDatafeeds({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`datafeed_id` (Optional, string)*: A numerical character string that uniquely identifies the datafeed.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+* Contains wildcard expressions and there are no datafeeds that match.
+* Contains the `_all` string or no identifiers and there are no matches.
+* Contains wildcard expressions and there are only partial matches.
-|`help`
-|`boolean` - Return help information
+If `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when
+there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only
+partial matches.
+** *`h` (Optional, Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s") | Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s")[])*: List of column names to display.
+** *`s` (Optional, Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s") | Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s")[])*: List of column names or column aliases used to sort the response.
+** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+[discrete]
+==== ml_jobs
+Get anomaly detection jobs.
+Returns configuration and usage information for anomaly detection jobs.
+This API returns a maximum of 10,000 jobs.
+If the Elasticsearch security features are enabled, you must have `monitor_ml`,
+`monitor`, `manage_ml`, or `manage` cluster privileges to use this API.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+CAT APIs are only intended for human consumption using the Kibana
+console or command line. They are not intended for use by applications. For
+application consumption, use the get anomaly detection job statistics API.
-|===
-=== cat.recovery
-[source,js]
+{ref}/cat-anomaly-detectors.html[Endpoint documentation]
+[source,ts]
----
-client.cat.recovery([params] [, options] [, callback])
+client.cat.mlJobs({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to limit the returned information
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+[discrete]
+==== Arguments
-|`bytes`
-|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values
+* *Request (object):*
+** *`job_id` (Optional, string)*: Identifier for the anomaly detection job.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* Contains wildcard expressions and there are no jobs that match.
+* Contains the `_all` string or no identifiers and there are no matches.
+* Contains wildcard expressions and there are only partial matches.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+If `true`, the API returns an empty jobs array when there are no matches and the subset of results when there
+are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial
+matches.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
+** *`h` (Optional, Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state") | Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state")[])*: List of column names to display.
+** *`s` (Optional, Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state") | Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state")[])*: List of column names or column aliases used to sort the response.
+** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== ml_trained_models
+Get trained models.
+Returns configuration and usage information about inference trained models.
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+CAT APIs are only intended for human consumption using the Kibana
+console or command line. They are not intended for use by applications. For
+application consumption, use the get trained models statistics API.
-|`v`
-|`boolean` - Verbose mode. Display column headers
-
-|===
-=== cat.repositories
-[source,js]
+{ref}/cat-trained-model.html[Endpoint documentation]
+[source,ts]
----
-client.cat.repositories([params] [, options] [, callback])
+client.cat.mlTrainedModels({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`model_id` (Optional, string)*: A unique identifier for the trained model.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: contains wildcard expressions and there are no models that match; contains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches.
+If `true`, the API returns an empty array when there are no matches and the subset of results when there are partial matches.
+If `false`, the API returns a 404 status code when there are no matches or only partial matches.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
+** *`h` (Optional, Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version") | Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version")[])*: A list of column names to display.
+** *`s` (Optional, Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version") | Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version")[])*: A list of column names or aliases used to sort the response.
+** *`from` (Optional, number)*: Skips the specified number of transforms.
+** *`size` (Optional, number)*: The maximum number of transforms to display.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+[discrete]
+==== nodeattrs
+Returns information about custom node attributes.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
-|`help`
-|`boolean` - Return help information
+{ref}/cat-nodeattrs.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.nodeattrs()
+----
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== nodes
+Returns information about the nodes in a cluster.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
-|===
-=== cat.segments
-[source,js]
+{ref}/cat-nodes.html[Endpoint documentation]
+[source,ts]
----
-client.cat.segments([params] [, options] [, callback])
+client.cat.nodes({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to limit the returned information
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+[discrete]
+==== Arguments
-|`bytes`
-|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values
+* *Request (object):*
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
+** *`full_id` (Optional, boolean | string)*: If `true`, return the full node ID. If `false`, return the shortened node ID.
+** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+[discrete]
+==== pending_tasks
+Returns cluster-level changes that have not yet been executed.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.
-|`help`
-|`boolean` - Return help information
+{ref}/cat-pending-tasks.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.pendingTasks()
+----
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== plugins
+Returns a list of plugins running on each node of a cluster.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
-|===
-=== cat.shards
-[source,js]
+{ref}/cat-plugins.html[Endpoint documentation]
+[source,ts]
----
-client.cat.shards([params] [, options] [, callback])
+client.cat.plugins()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to limit the returned information
-
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`bytes`
-|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== recovery
+Returns information about ongoing and completed shard recoveries.
+Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing.
+For data streams, the API returns information about the stream’s backing indices.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
-
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/cat-recovery.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.recovery({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`active_only` (Optional, boolean)*: If `true`, the response only includes ongoing shard recoveries.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
+** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== repositories
+Returns the snapshot repositories for a cluster.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.
-|===
-=== cat.snapshots
-[source,js]
+{ref}/cat-repositories.html[Endpoint documentation]
+[source,ts]
----
-client.cat.snapshots([params] [, options] [, callback])
+client.cat.repositories()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string, string[]` - Name of repository from which to fetch the snapshot information
-
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Set to true to ignore unavailable snapshots
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== segments
+Returns low-level information about the Lucene segments in index shards.
+For data streams, the API returns information about the backing indices.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/cat-segments.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.segments({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== shards
+Returns information about the shards in a cluster.
+For data streams, the API returns information about the backing indices.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
-|===
-=== cat.tasks
-[source,js]
+{ref}/cat-shards.html[Endpoint documentation]
+[source,ts]
----
-client.cat.tasks([params] [, options] [, callback])
+client.cat.shards({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+[discrete]
+==== Arguments
-|`actions`
-|`string, string[]` - A comma-separated list of actions that should be returned. Leave empty to return all.
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
-|`detailed`
-|`boolean` - Return detailed task information (default: false)
+[discrete]
+==== snapshots
+Returns information about the snapshots stored in one or more repositories.
+A snapshot is a backup of an index or running Elasticsearch cluster.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.
-|`parent_task` or `parentTask`
-|`number` - Return tasks with specified parent task id. Set to -1 to return all.
-
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/cat-snapshots.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.snapshots({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`repository` (Optional, string | string[])*: A list of snapshot repositories used to limit the request.
+Accepts wildcard expressions.
+`_all` returns all repositories.
+If any repository fails during the request, Elasticsearch returns an error.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, the response does not include information from unavailable snapshots.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== tasks
+Returns information about tasks currently executing in the cluster.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
-|===
-=== cat.templates
-[source,js]
+{ref}/tasks.html[Endpoint documentation]
+[source,ts]
----
-client.cat.templates([params] [, options] [, callback])
+client.cat.tasks({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
-[cols=2*]
-|===
-|`name`
-|`string` - A pattern that returned template names must match
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`actions` (Optional, string[])*: The task action names, which are used to limit the response.
+** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
+** *`node_id` (Optional, string[])*: Unique node identifiers, which are used to limit the response.
+** *`parent_task_id` (Optional, string)*: The parent task identifier, which is used to limit the response.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== templates
+Returns information about index templates in a cluster.
+You can use index templates to apply index settings and field mappings to new indices at creation.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/cat-templates.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.templates({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`name` (Optional, string)*: The name of the template to return.
+Accepts wildcard expressions. If omitted, all templates are returned.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+==== thread_pool
+Returns thread pool statistics for each node in a cluster.
+Returned information includes all built-in thread pools and custom thread pools.
+IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
-|===
-=== cat.threadPool
-[source,js]
+{ref}/cat-thread-pool.html[Endpoint documentation]
+[source,ts]
----
-client.cat.threadPool([params] [, options] [, callback])
+client.cat.threadPool({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
-[cols=2*]
-|===
-|`thread_pool_patterns` or `threadPoolPatterns`
-|`string, string[]` - A comma-separated list of regular-expressions to filter the thread pools in the output
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
+[discrete]
+==== Arguments
-|`size`
-|`'', 'k', 'm', 'g', 't', 'p'` - The multiplier in which to display values
+* *Request (object):*
+** *`thread_pool_patterns` (Optional, string | string[])*: A list of thread pool names used to limit the request.
+Accepts wildcard expressions.
+** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== transforms
+Get transforms.
+Returns configuration and usage information about transforms.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+CAT APIs are only intended for human consumption using the Kibana
+console or command line. They are not intended for use by applications. For
+application consumption, use the get transform statistics API.
-|`h`
-|`string, string[]` - Comma-separated list of column names to display
+{ref}/cat-transforms.html[Endpoint documentation]
+[source,ts]
+----
+client.cat.transforms({ ... })
+----
-|`help`
-|`boolean` - Return help information
+[discrete]
+==== Arguments
-|`s`
-|`string, string[]` - Comma-separated list of column names or column aliases to sort by
+* *Request (object):*
+** *`transform_id` (Optional, string)*: A transform identifier or a wildcard expression.
+If you do not specify one of these options, the API returns information for all transforms.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; contains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches.
+If `true`, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches.
+If `false`, the request returns a 404 status code when there are no matches or only partial matches.
+** *`from` (Optional, number)*: Skips the specified number of transforms.
+** *`h` (Optional, Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version") | Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version")[])*: List of column names to display.
+** *`s` (Optional, Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version") | Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version")[])*: List of column names or column aliases used to sort the response.
+** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
+** *`size` (Optional, number)*: The maximum number of transforms to obtain.
-|`v`
-|`boolean` - Verbose mode. Display column headers
+[discrete]
+=== ccr
+[discrete]
+==== delete_auto_follow_pattern
+Deletes auto-follow patterns.
-|===
-=== clearScroll
-[source,js]
+{ref}/ccr-delete-auto-follow-pattern.html[Endpoint documentation]
+[source,ts]
----
-client.clearScroll([params] [, options] [, callback])
+client.ccr.deleteAutoFollowPattern({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html
-[cols=2*]
-|===
-|`scroll_id` or `scrollId`
-|`string, string[]` - A comma-separated list of scroll IDs to clear
-|`body`
-|`object` - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the auto follow pattern.
-|===
-=== cluster.allocationExplain
-[source,js]
+[discrete]
+==== follow
+Creates a new follower index configured to follow the referenced leader index.
+
+{ref}/ccr-put-follow.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.allocationExplain([params] [, options] [, callback])
+client.ccr.follow({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
-[cols=2*]
-|===
-|`include_yes_decisions` or `includeYesDecisions`
-|`boolean` - Return 'YES' decisions in explanation (default: false)
-|`include_disk_info` or `includeDiskInfo`
-|`boolean` - Return information about disk usage and shard sizes (default: false)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: The name of the follower index
+** *`leader_index` (Optional, string)*
+** *`max_outstanding_read_requests` (Optional, number)*
+** *`max_outstanding_write_requests` (Optional, number)*
+** *`max_read_request_operation_count` (Optional, number)*
+** *`max_read_request_size` (Optional, string)*
+** *`max_retry_delay` (Optional, string | -1 | 0)*
+** *`max_write_buffer_count` (Optional, number)*
+** *`max_write_buffer_size` (Optional, string)*
+** *`max_write_request_operation_count` (Optional, number)*
+** *`max_write_request_size` (Optional, string)*
+** *`read_poll_timeout` (Optional, string | -1 | 0)*
+** *`remote_cluster` (Optional, string)*
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before returning. Defaults to 0. 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)
-|`body`
-|`object` - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
+[discrete]
+==== follow_info
+Retrieves information about all follower indices, including parameters and status for each follower index
-|===
-=== cluster.getSettings
-[source,js]
+{ref}/ccr-get-follow-info.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.getSettings([params] [, options] [, callback])
+client.ccr.followInfo({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
-[cols=2*]
-|===
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`index` (string | string[])*: A list of index patterns; use `_all` to perform the operation on all indices
-|`include_defaults` or `includeDefaults`
-|`boolean` - Whether to return all default clusters setting.
+[discrete]
+==== follow_stats
+Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.
-|===
-=== cluster.health
-[source,js]
+{ref}/ccr-get-follow-stats.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.health([params] [, options] [, callback])
+client.ccr.followStats({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - Limit the information returned to a specific index
-|`level`
-|`'cluster', 'indices', 'shards'` - Specify the level of detail for returned information +
- _Default:_ `cluster`
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`index` (string | string[])*: A list of index patterns; use `_all` to perform the operation on all indices
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== forget_follower
+Removes the follower retention leases from the leader.
-|`timeout`
-|`string` - Explicit operation timeout
+{ref}/ccr-post-forget-follower.html[Endpoint documentation]
+[source,ts]
+----
+client.ccr.forgetFollower({ index })
+----
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Wait until the specified number of shards is active
+[discrete]
+==== Arguments
-|`wait_for_nodes` or `waitForNodes`
-|`string` - Wait until the specified number of nodes is available
+* *Request (object):*
+** *`index` (string)*: the name of the leader index for which specified follower retention leases should be removed
+** *`follower_cluster` (Optional, string)*
+** *`follower_index` (Optional, string)*
+** *`follower_index_uuid` (Optional, string)*
+** *`leader_remote_cluster` (Optional, string)*
-|`wait_for_events` or `waitForEvents`
-|`'immediate', 'urgent', 'high', 'normal', 'low', 'languid'` - Wait until all currently queued events with the given priority are processed
+[discrete]
+==== get_auto_follow_pattern
+Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.
+
+{ref}/ccr-get-auto-follow-pattern.html[Endpoint documentation]
+[source,ts]
+----
+client.ccr.getAutoFollowPattern({ ... })
+----
-|`wait_for_no_relocating_shards` or `waitForNoRelocatingShards`
-|`boolean` - Whether to wait until there are no relocating shards in the cluster
+[discrete]
+==== Arguments
-|`wait_for_no_initializing_shards` or `waitForNoInitializingShards`
-|`boolean` - Whether to wait until there are no initializing shards in the cluster
+* *Request (object):*
+** *`name` (Optional, string)*: Specifies the auto-follow pattern collection that you want to retrieve. If you do not specify a name, the API returns information for all collections.
-|`wait_for_status` or `waitForStatus`
-|`'green', 'yellow', 'red'` - Wait until cluster is in a specific state
+[discrete]
+==== pause_auto_follow_pattern
+Pauses an auto-follow pattern
-|===
-=== cluster.pendingTasks
-[source,js]
+{ref}/ccr-pause-auto-follow-pattern.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.pendingTasks([params] [, options] [, callback])
+client.ccr.pauseAutoFollowPattern({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
-[cols=2*]
-|===
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the auto follow pattern that should pause discovering new indices to follow.
-|===
-=== cluster.putSettings
-[source,js]
+[discrete]
+==== pause_follow
+Pauses a follower index. The follower index will not fetch any additional operations from the leader index.
+
+{ref}/ccr-post-pause-follow.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.putSettings([params] [, options] [, callback])
+client.ccr.pauseFollow({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
-[cols=2*]
-|===
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`index` (string)*: The name of the follower index that should pause following its leader index.
-|`body`
-|`object` - The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
+[discrete]
+==== put_auto_follow_pattern
+Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.
-|===
-=== cluster.remoteInfo
-[source,js]
-----
-client.cluster.remoteInfo([params] [, options] [, callback])
+{ref}/ccr-put-auto-follow-pattern.html[Endpoint documentation]
+[source,ts]
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
-[cols=2*]
-|===
-|===
-=== cluster.reroute
-[source,js]
+client.ccr.putAutoFollowPattern({ name, remote_cluster })
----
-client.cluster.reroute([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
-[cols=2*]
-|===
-|`dry_run` or `dryRun`
-|`boolean` - Simulate the operation only and return the resulting state
-|`explain`
-|`boolean` - Return an explanation of why the commands can or cannot be executed
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the collection of auto-follow patterns.
+** *`remote_cluster` (string)*: The remote cluster containing the leader indices to match against.
+** *`follow_index_pattern` (Optional, string)*: The name of follower index. The template {{leader_index}} can be used to derive the name of the follower index from the name of the leader index. When following a data stream, use {{leader_index}}; CCR does not support changes to the names of a follower data stream’s backing indices.
+** *`leader_index_patterns` (Optional, string[])*: An array of simple index patterns to match against indices in the remote cluster specified by the remote_cluster field.
+** *`leader_index_exclusion_patterns` (Optional, string[])*: An array of simple index patterns that can be used to exclude indices from being auto-followed. Indices in the remote cluster whose names are matching one or more leader_index_patterns and one or more leader_index_exclusion_patterns won’t be followed.
+** *`max_outstanding_read_requests` (Optional, number)*: The maximum number of outstanding reads requests from the remote cluster.
+** *`settings` (Optional, Record)*: Settings to override from the leader index. Note that certain settings can not be overrode (e.g., index.number_of_shards).
+** *`max_outstanding_write_requests` (Optional, number)*: The maximum number of outstanding reads requests from the remote cluster.
+** *`read_poll_timeout` (Optional, string | -1 | 0)*: The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index. When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics. Then the follower will immediately attempt to read from the leader again.
+** *`max_read_request_operation_count` (Optional, number)*: The maximum number of operations to pull per read from the remote cluster.
+** *`max_read_request_size` (Optional, number | string)*: The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
+** *`max_retry_delay` (Optional, string | -1 | 0)*: The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when retrying.
+** *`max_write_buffer_count` (Optional, number)*: The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the number of queued operations goes below the limit.
+** *`max_write_buffer_size` (Optional, number | string)*: The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the total bytes of queued operations goes below the limit.
+** *`max_write_request_operation_count` (Optional, number)*: The maximum number of operations per bulk write request executed on the follower.
+** *`max_write_request_size` (Optional, number | string)*: The maximum total bytes of operations per bulk write request executed on the follower.
-|`retry_failed` or `retryFailed`
-|`boolean` - Retries allocation of shards that are blocked due to too many subsequent allocation failures
+[discrete]
+==== resume_auto_follow_pattern
+Resumes an auto-follow pattern that has been paused
-|`metric`
-|`string, string[]` - Limit the information returned to the specified metrics. Defaults to all but metadata
+{ref}/ccr-resume-auto-follow-pattern.html[Endpoint documentation]
+[source,ts]
+----
+client.ccr.resumeAutoFollowPattern({ name })
+----
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`name` (string)*: The name of the auto follow pattern to resume discovering new indices to follow.
-|`body`
-|`object` - The definition of `commands` to perform (`move`, `cancel`, `allocate`)
+[discrete]
+==== resume_follow
+Resumes a follower index that has been paused
-|===
-=== cluster.state
-[source,js]
+{ref}/ccr-post-resume-follow.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.state([params] [, options] [, callback])
+client.ccr.resumeFollow({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`metric`
-|`string, string[]` - Limit the information returned to the specified metrics
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`index` (string)*: The name of the follow index to resume following.
+** *`max_outstanding_read_requests` (Optional, number)*
+** *`max_outstanding_write_requests` (Optional, number)*
+** *`max_read_request_operation_count` (Optional, number)*
+** *`max_read_request_size` (Optional, string)*
+** *`max_retry_delay` (Optional, string | -1 | 0)*
+** *`max_write_buffer_count` (Optional, number)*
+** *`max_write_buffer_size` (Optional, string)*
+** *`max_write_request_operation_count` (Optional, number)*
+** *`max_write_request_size` (Optional, string)*
+** *`read_poll_timeout` (Optional, string | -1 | 0)*
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== stats
+Gets all stats related to cross-cluster replication.
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+{ref}/ccr-get-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.ccr.stats()
+----
-|`wait_for_metadata_version` or `waitForMetadataVersion`
-|`number` - Wait for the metadata version to be equal or greater than the specified metadata version
-|`wait_for_timeout` or `waitForTimeout`
-|`string` - The maximum time to wait for wait_for_metadata_version before timing out
+[discrete]
+==== unfollow
+Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
+
+{ref}/ccr-post-unfollow.html[Endpoint documentation]
+[source,ts]
+----
+client.ccr.unfollow({ index })
+----
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`index` (string)*: The name of the follower index that should be turned into a regular index.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+=== cluster
+[discrete]
+==== allocation_explain
+Provides explanations for shard allocations in the cluster.
-|===
-=== cluster.stats
-[source,js]
+{ref}/cluster-allocation-explain.html[Endpoint documentation]
+[source,ts]
----
-client.cluster.stats([params] [, options] [, callback])
+client.cluster.allocationExplain({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
-[cols=2*]
-|===
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`current_node` (Optional, string)*: Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node.
+** *`index` (Optional, string)*: Specifies the name of the index that you would like an explanation for.
+** *`primary` (Optional, boolean)*: If true, returns explanation for the primary shard for the given shard ID.
+** *`shard` (Optional, number)*: Specifies the ID of the shard that you would like an explanation for.
+** *`include_disk_info` (Optional, boolean)*: If true, returns information about disk usage and shard sizes.
+** *`include_yes_decisions` (Optional, boolean)*: If true, returns YES decisions in explanation.
-|===
-=== count
-[source,js]
+[discrete]
+==== delete_component_template
+Delete component templates.
+Deletes component templates.
+Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
+
+{ref}/indices-component-template.html[Endpoint documentation]
+[source,ts]
----
-client.count([params] [, options] [, callback])
+client.cluster.deleteComponentTemplate({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of indices to restrict the results
-
-|`type`
-|`string, string[]` - A comma-separated list of types to restrict the results
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`ignore_throttled` or `ignoreThrottled`
-|`boolean` - Whether specified concrete, expanded or aliased indices should be ignored when throttled
+* *Request (object):*
+** *`name` (string | string[])*: List or wildcard expression of component template names used to limit the request.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== delete_voting_config_exclusions
+Clears cluster voting config exclusions.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+{ref}/voting-config-exclusions.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.deleteVotingConfigExclusions({ ... })
+----
-|`min_score` or `minScore`
-|`number` - Include only documents with a specific `_score` value in the result
+[discrete]
+==== Arguments
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+* *Request (object):*
+** *`wait_for_removal` (Optional, boolean)*: Specifies whether to wait for all excluded nodes to be removed from the
+cluster before clearing the voting configuration exclusions list.
+Defaults to true, meaning that all excluded nodes must be removed from
+the cluster before this API takes any action. If set to false then the
+voting configuration exclusions list is cleared even if some excluded
+nodes are still in the cluster.
-|`routing`
-|`string, string[]` - A comma-separated list of specific routing values
+[discrete]
+==== exists_component_template
+Check component templates.
+Returns information about whether a particular component template exists.
-|`q`
-|`string` - Query in the Lucene query string syntax
+{ref}/indices-component-template.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.existsComponentTemplate({ name })
+----
-|`analyzer`
-|`string` - The analyzer to use for the query string
+[discrete]
+==== Arguments
-|`analyze_wildcard` or `analyzeWildcard`
-|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)
+* *Request (object):*
+** *`name` (string | string[])*: List of component template names used to limit the request.
+Wildcard (*) expressions are supported.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is
+received before the timeout expires, the request fails and returns an
+error.
+** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only.
+Defaults to false, which means information is retrieved from the master node.
-|`default_operator` or `defaultOperator`
-|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
- _Default:_ `OR`
+[discrete]
+==== get_component_template
+Get component templates.
+Retrieves information about component templates.
-|`df`
-|`string` - The field to use as default where no field prefix is given in the query string
+{ref}/indices-component-template.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.getComponentTemplate({ ... })
+----
-|`lenient`
-|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+[discrete]
+==== Arguments
-|`terminate_after` or `terminateAfter`
-|`number` - The maximum count for each shard, upon reaching which the query execution will terminate early
+* *Request (object):*
+** *`name` (Optional, string)*: List of component template names used to limit the request.
+Wildcard (`*`) expressions are supported.
+** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`include_defaults` (Optional, boolean)*: Return all default configurations for the component template (default: false)
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+If `false`, information is retrieved from the master node.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`body`
-|`object` - A query to restrict the results specified with the Query DSL (optional)
+[discrete]
+==== get_settings
+Returns cluster-wide settings.
+By default, it returns only settings that have been explicitly defined.
-|===
-=== create
-[source,js]
+{ref}/cluster-get-settings.html[Endpoint documentation]
+[source,ts]
----
-client.create([params] [, options] [, callback])
+client.cluster.getSettings({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
-[cols=2*]
-|===
-|`id`
-|`string` - Document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document
+* *Request (object):*
+** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`include_defaults` (Optional, boolean)*: If `true`, returns default cluster settings from the local node.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the index 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)
+[discrete]
+==== health
+The cluster health API returns a simple status on the health of the cluster. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices.
+The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.
-|`parent`
-|`string` - ID of the parent document
+{ref}/cluster-health.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.health({ ... })
+----
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+[discrete]
+==== Arguments
-|`routing`
-|`string` - Specific routing value
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or `*`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Can be one of cluster, indices or shards. Controls the details level of the health information returned.
+** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.
+** *`wait_for_events` (Optional, Enum("immediate" | "urgent" | "high" | "normal" | "low" | "languid"))*: Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed.
+** *`wait_for_nodes` (Optional, string | number)*: The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and yellow > red. By default, will not wait for any status.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== info
+Get cluster info.
+Returns basic information about the cluster.
-|`version`
-|`number` - Explicit version number for concurrency control
+{ref}/cluster-info.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.info({ target })
+----
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+[discrete]
+==== Arguments
-|`pipeline`
-|`string` - The pipeline id to preprocess incoming documents with
+* *Request (object):*
+** *`target` (Enum("_all" | "http" | "ingest" | "thread_pool" | "script") | Enum("_all" | "http" | "ingest" | "thread_pool" | "script")[])*: Limits the information returned to the specific target. Supports a list, such as http,ingest.
-|`body`
-|`object` - The document
+[discrete]
+==== pending_tasks
+Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed.
+NOTE: This API returns a list of any pending updates to the cluster state.
+These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests.
+However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.
-|===
-=== delete
-[source,js]
+{ref}/cluster-pending.html[Endpoint documentation]
+[source,ts]
----
-client.delete([params] [, options] [, callback])
+client.cluster.pendingTasks({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
-[cols=2*]
-|===
-|`id`
-|`string` - The document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document
+* *Request (object):*
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+If `false`, information is retrieved from the master node.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the delete 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)
+[discrete]
+==== post_voting_config_exclusions
+Updates the cluster voting config exclusions by node ids or node names.
-|`parent`
-|`string` - ID of parent document
+{ref}/voting-config-exclusions.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.postVotingConfigExclusions({ ... })
+----
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+[discrete]
+==== Arguments
-|`routing`
-|`string` - Specific routing value
+* *Request (object):*
+** *`node_names` (Optional, string | string[])*: A list of the names of the nodes to exclude from the
+voting configuration. If specified, you may not also specify node_ids.
+** *`node_ids` (Optional, string | string[])*: A list of the persistent ids of the nodes to exclude
+from the voting configuration. If specified, you may not also specify node_names.
+** *`timeout` (Optional, string | -1 | 0)*: When adding a voting configuration exclusion, the API waits for the
+specified nodes to be excluded from the voting configuration before
+returning. If the timeout expires before the appropriate condition
+is satisfied, the request fails and returns an error.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== put_component_template
+Create or update a component template.
+Creates or updates a component template.
+Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
-|`if_seq_no` or `ifSeqNo`
-|`number` - only perform the delete operation if the last operation that has changed the document has the specified sequence number
+An index template can be composed of multiple component templates.
+To use a component template, specify it in an index template’s `composed_of` list.
+Component templates are only applied to new data streams and indices as part of a matching index template.
-|`if_primary_term` or `ifPrimaryTerm`
-|`number` - only perform the delete operation if the last operation that has changed the document has the specified primary term
+Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.
-|`version`
-|`number` - Explicit version number for concurrency control
+Component templates are only used during index creation.
+For data streams, this includes data stream creation and the creation of a stream’s backing indices.
+Changes to component templates do not affect existing indices, including a stream’s backing indices.
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+You can use C-style `/* *\/` block comments in component templates.
+You can include comments anywhere in the request body except before the opening curly bracket.
-|===
-=== deleteByQuery
-[source,js]
+{ref}/indices-component-template.html[Endpoint documentation]
+[source,ts]
----
-client.deleteByQuery([params] [, options] [, callback])
+client.cluster.putComponentTemplate({ name, template })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types
+[discrete]
+==== Arguments
-|`analyzer`
-|`string` - The analyzer to use for the query string
+* *Request (object):*
+** *`name` (string)*: Name of the component template to create.
+Elasticsearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.
+Elastic Agent uses these templates to configure backing indices for its data streams.
+If you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version.
+If you don’t use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.
+** *`template` ({ aliases, mappings, settings, defaults, data_stream, lifecycle })*: The template to be applied which includes mappings, settings, or aliases configuration.
+** *`version` (Optional, number)*: Version number used to manage component templates externally.
+This number isn't automatically generated or incremented by Elasticsearch.
+To unset a version, replace the template without specifying a version.
+** *`_meta` (Optional, Record)*: Optional user metadata about the component template.
+May have any contents. This map is not automatically generated by Elasticsearch.
+This information is stored in the cluster state, so keeping it short is preferable.
+To unset `_meta`, replace the template without specifying this information.
+** *`deprecated` (Optional, boolean)*: Marks this index template as deprecated. When creating or updating a non-deprecated index template
+that uses deprecated components, Elasticsearch will emit a deprecation warning.
+** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing component templates.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`analyze_wildcard` or `analyzeWildcard`
-|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)
+[discrete]
+==== put_settings
+Updates the cluster settings.
-|`default_operator` or `defaultOperator`
-|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
- _Default:_ `OR`
-
-|`df`
-|`string` - The field to use as default where no field prefix is given in the query string
+{ref}/cluster-update-settings.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.putSettings({ ... })
+----
-|`from`
-|`number` - Starting offset (default: 0)
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+* *Request (object):*
+** *`persistent` (Optional, Record)*
+** *`transient` (Optional, Record)*
+** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false)
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== remote_info
+The cluster remote info API allows you to retrieve all of the configured
+remote cluster information. It returns connection and endpoint information
+keyed by the configured remote cluster alias.
-|`conflicts`
-|`'abort', 'proceed'` - What to do when the delete by query hits version conflicts? +
- _Default:_ `abort`
+{ref}/cluster-remote-info.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.remoteInfo()
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
-|`lenient`
-|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+[discrete]
+==== reroute
+Allows to manually change the allocation of individual shards in the cluster.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+{ref}/cluster-reroute.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.reroute({ ... })
+----
-|`q`
-|`string` - Query in the Lucene query string syntax
+[discrete]
+==== Arguments
-|`routing`
-|`string, string[]` - A comma-separated list of specific routing values
+* *Request (object):*
+** *`commands` (Optional, { cancel, move, allocate_replica, allocate_stale_primary, allocate_empty_primary }[])*: Defines the commands to perform.
+** *`dry_run` (Optional, boolean)*: If true, then the request simulates the operation only and returns the resulting state.
+** *`explain` (Optional, boolean)*: If true, then the response contains an explanation of why the commands can or cannot be executed.
+** *`metric` (Optional, string | string[])*: Limits the information returned to the specified metrics.
+** *`retry_failed` (Optional, boolean)*: If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`scroll`
-|`string` - Specify how long a consistent view of the index should be maintained for scrolled search
+[discrete]
+==== state
+Returns a comprehensive information about the state of the cluster.
-|`search_type` or `searchType`
-|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type
+{ref}/cluster-state.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.state({ ... })
+----
-|`search_timeout` or `searchTimeout`
-|`string` - Explicit timeout for each search request. Defaults to no timeout.
+[discrete]
+==== Arguments
-|`size`
-|`number` - Number of hits to return (default: 10)
+* *Request (object):*
+** *`metric` (Optional, string | string[])*: Limit the information returned to the specified metrics
+** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices
+** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false)
+** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
+** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false)
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
+** *`wait_for_metadata_version` (Optional, number)*: Wait for the metadata version to be equal or greater than the specified metadata version
+** *`wait_for_timeout` (Optional, string | -1 | 0)*: The maximum time to wait for wait_for_metadata_version before timing out
-|`sort`
-|`string, string[]` - A comma-separated list of : pairs
+[discrete]
+==== stats
+Returns cluster statistics.
+It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+{ref}/cluster-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.cluster.stats({ ... })
+----
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: List of node filters used to limit returned information. Defaults to all nodes in the cluster.
+** *`include_remotes` (Optional, boolean)*: Include remote cluster data into the response
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for each node to respond.
+If a node does not respond before its timeout expires, the response does not include its stats.
+However, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.
-|`terminate_after` or `terminateAfter`
-|`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
+[discrete]
+=== connector
+[discrete]
+==== check_in
+Check in a connector.
-|`stats`
-|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes
+Update the `last_seen` field in the connector and set it to the current timestamp.
-|`version`
-|`boolean` - Specify whether to return document version as part of a hit
+{ref}/check-in-connector-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.checkIn({ connector_id })
+----
-|`request_cache` or `requestCache`
-|`boolean` - Specify if request cache should be used for this request or not, defaults to index level setting
+[discrete]
+==== Arguments
-|`refresh`
-|`boolean` - Should the effected indexes be refreshed?
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be checked in
-|`timeout`
-|`string` - Time each individual bulk request should wait for shards that are unavailable. +
- _Default:_ `1m`
+[discrete]
+==== delete
+Delete a connector.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the delete by query 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)
+Removes a connector and associated sync jobs.
+This is a destructive action that is not recoverable.
+NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector.
+These need to be removed manually.
-|`scroll_size` or `scrollSize`
-|`number` - Size on the scroll request powering the delete by query
+{ref}/delete-connector-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.delete({ connector_id })
+----
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should the request should block until the delete by query is complete. +
- _Default:_ `true`
+[discrete]
+==== Arguments
-|`requests_per_second` or `requestsPerSecond`
-|`number` - The throttle for this request in sub-requests per second. -1 means no throttle.
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be deleted
+** *`delete_sync_jobs` (Optional, boolean)*: A flag indicating if associated sync jobs should be also removed. Defaults to false.
-|`slices`
-|`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +
- _Default:_ `1`
+[discrete]
+==== get
+Get a connector.
-|`body`
-|`object` - The search definition using the Query DSL
+Get the details about a connector.
-|===
-=== deleteByQueryRethrottle
-[source,js]
+{ref}/get-connector-api.html[Endpoint documentation]
+[source,ts]
----
-client.deleteByQueryRethrottle([params] [, options] [, callback])
+client.connector.get({ connector_id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
-[cols=2*]
-|===
-|`task_id` or `taskId`
-|`string` - The task id to rethrottle
-|`requests_per_second` or `requestsPerSecond`
-|`number` - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
+[discrete]
+==== Arguments
-|===
-=== deleteScript
-[source,js]
-----
-client.deleteScript([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
-[cols=2*]
-|===
-|`id`
-|`string` - Script ID
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== list
+Get all connectors.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+Get information about all connectors.
-|===
-=== exists
-[source,js]
+{ref}/list-connector-api.html[Endpoint documentation]
+[source,ts]
----
-client.exists([params] [, options] [, callback])
+client.connector.list({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
-[cols=2*]
-|===
-|`id`
-|`string` - The document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types)
+* *Request (object):*
+** *`from` (Optional, number)*: Starting offset (default: 0)
+** *`size` (Optional, number)*: Specifies a max number of results to get
+** *`index_name` (Optional, string | string[])*: A list of connector index names to fetch connector documents for
+** *`connector_name` (Optional, string | string[])*: A list of connector names to fetch connector documents for
+** *`service_type` (Optional, string | string[])*: A list of connector service types to fetch connector documents for
+** *`query` (Optional, string)*: A wildcard query string that filters connectors with matching name, description or index name
-|`stored_fields` or `storedFields`
-|`string, string[]` - A comma-separated list of stored fields to return in the response
+[discrete]
+==== post
+Create a connector.
-|`parent`
-|`string` - The ID of the parent document
+Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.
+Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud.
+Self-managed connectors (Connector clients) are self-managed on your infrastructure.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+{ref}/create-connector-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.post({ ... })
+----
-|`realtime`
-|`boolean` - Specify whether to perform the operation in realtime or search mode
+[discrete]
+==== Arguments
-|`refresh`
-|`boolean` - Refresh the shard containing the document before performing the operation
+* *Request (object):*
+** *`description` (Optional, string)*
+** *`index_name` (Optional, string)*
+** *`is_native` (Optional, boolean)*
+** *`language` (Optional, string)*
+** *`name` (Optional, string)*
+** *`service_type` (Optional, string)*
-|`routing`
-|`string` - Specific routing value
+[discrete]
+==== put
+Create or update a connector.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+{ref}/create-connector-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.put({ ... })
+----
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`connector_id` (Optional, string)*: The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.
+** *`description` (Optional, string)*
+** *`index_name` (Optional, string)*
+** *`is_native` (Optional, boolean)*
+** *`language` (Optional, string)*
+** *`name` (Optional, string)*
+** *`service_type` (Optional, string)*
-|`version`
-|`number` - Explicit version number for concurrency control
+[discrete]
+==== sync_job_cancel
+Cancel a connector sync job.
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+Cancel a connector sync job, which sets the status to cancelling and updates `cancellation_requested_at` to the current time.
+The connector service is then responsible for setting the status of connector sync jobs to cancelled.
-|===
-=== existsSource
-[source,js]
+{ref}/cancel-connector-sync-job-api.html[Endpoint documentation]
+[source,ts]
----
-client.existsSource([params] [, options] [, callback])
+client.connector.syncJobCancel({ connector_sync_job_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
-[cols=2*]
-|===
-|`id`
-|`string` - The document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document; deprecated and optional starting with 7.0
+* *Request (object):*
+** *`connector_sync_job_id` (string)*: The unique identifier of the connector sync job
-|`parent`
-|`string` - The ID of the parent document
+[discrete]
+==== sync_job_check_in
+Checks in a connector sync job (refreshes 'last_seen').
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+{ref}/check-in-connector-sync-job-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.syncJobCheckIn()
+----
-|`realtime`
-|`boolean` - Specify whether to perform the operation in realtime or search mode
-|`refresh`
-|`boolean` - Refresh the shard containing the document before performing the operation
+[discrete]
+==== sync_job_claim
+Claims a connector sync job.
+[source,ts]
+----
+client.connector.syncJobClaim()
+----
+
-|`routing`
-|`string` - Specific routing value
+[discrete]
+==== sync_job_delete
+Delete a connector sync job.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+Remove a connector sync job and its associated data.
+This is a destructive action that is not recoverable.
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+{ref}/delete-connector-sync-job-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.syncJobDelete({ connector_sync_job_id })
+----
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+[discrete]
+==== Arguments
-|`version`
-|`number` - Explicit version number for concurrency control
+* *Request (object):*
+** *`connector_sync_job_id` (string)*: The unique identifier of the connector sync job to be deleted
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+[discrete]
+==== sync_job_error
+Sets an error for a connector sync job.
-|===
-=== explain
-[source,js]
+{ref}/set-connector-sync-job-error-api.html[Endpoint documentation]
+[source,ts]
----
-client.explain([params] [, options] [, callback])
+client.connector.syncJobError()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
-[cols=2*]
-|===
-|`id`
-|`string` - The document ID
-|`index`
-|`string` - The name of the index
-|`type`
-|`string` - The type of the document
+[discrete]
+==== sync_job_get
+Get a connector sync job.
-|`analyze_wildcard` or `analyzeWildcard`
-|`boolean` - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
+{ref}/get-connector-sync-job-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.syncJobGet({ connector_sync_job_id })
+----
-|`analyzer`
-|`string` - The analyzer for the query string query
+[discrete]
+==== Arguments
-|`default_operator` or `defaultOperator`
-|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
- _Default:_ `OR`
+* *Request (object):*
+** *`connector_sync_job_id` (string)*: The unique identifier of the connector sync job
-|`df`
-|`string` - The default field for query string query (default: _all)
+[discrete]
+==== sync_job_list
+Get all connector sync jobs.
-|`stored_fields` or `storedFields`
-|`string, string[]` - A comma-separated list of stored fields to return in the response
+Get information about all stored connector sync jobs listed by their creation date in ascending order.
-|`lenient`
-|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+{ref}/list-connector-sync-jobs-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.syncJobList({ ... })
+----
-|`parent`
-|`string` - The ID of the parent document
+[discrete]
+==== Arguments
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+* *Request (object):*
+** *`from` (Optional, number)*: Starting offset (default: 0)
+** *`size` (Optional, number)*: Specifies a max number of results to get
+** *`status` (Optional, Enum("canceling" | "canceled" | "completed" | "error" | "in_progress" | "pending" | "suspended"))*: A sync job status to fetch connector sync jobs for
+** *`connector_id` (Optional, string)*: A connector id to fetch connector sync jobs for
+** *`job_type` (Optional, Enum("full" | "incremental" | "access_control") | Enum("full" | "incremental" | "access_control")[])*: A list of job types to fetch the sync jobs for
-|`q`
-|`string` - Query in the Lucene query string syntax
+[discrete]
+==== sync_job_post
+Create a connector sync job.
-|`routing`
-|`string` - Specific routing value
+Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+{ref}/create-connector-sync-job-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.syncJobPost({ id })
+----
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`id` (string)*: The id of the associated connector
+** *`job_type` (Optional, Enum("full" | "incremental" | "access_control"))*
+** *`trigger_method` (Optional, Enum("on_demand" | "scheduled"))*
-|`body`
-|`object` - The query definition using the Query DSL
+[discrete]
+==== sync_job_update_stats
+Updates the stats fields in the connector sync job document.
-|===
-=== fieldCaps
-[source,js]
+{ref}/set-connector-sync-job-stats-api.html[Endpoint documentation]
+[source,ts]
----
-client.fieldCaps([params] [, options] [, callback])
+client.connector.syncJobUpdateStats()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`fields`
-|`string, string[]` - A comma-separated list of field names
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== update_active_filtering
+Activate the connector draft filter.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+Activates the valid draft filtering for a connector.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
-
-|===
-=== get
-[source,js]
+{ref}/update-connector-filtering-api.html[Endpoint documentation]
+[source,ts]
----
-client.get([params] [, options] [, callback])
+client.connector.updateActiveFiltering({ connector_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
-[cols=2*]
-|===
-|`id`
-|`string` - The document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types)
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
-|`stored_fields` or `storedFields`
-|`string, string[]` - A comma-separated list of stored fields to return in the response
+[discrete]
+==== update_api_key_id
+Update the connector API key ID.
-|`parent`
-|`string` - The ID of the parent document
+Update the `api_key_id` and `api_key_secret_id` fields of a connector.
+You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored.
+The connector secret ID is required only for Elastic managed (native) connectors.
+Self-managed connectors (connector clients) do not use this field.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
-
-|`realtime`
-|`boolean` - Specify whether to perform the operation in realtime or search mode
+{ref}/update-connector-api-key-id-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.updateApiKeyId({ connector_id })
+----
-|`refresh`
-|`boolean` - Refresh the shard containing the document before performing the operation
+[discrete]
+==== Arguments
-|`routing`
-|`string` - Specific routing value
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`api_key_id` (Optional, string)*
+** *`api_key_secret_id` (Optional, string)*
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+[discrete]
+==== update_configuration
+Update the connector configuration.
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+Update the configuration field in the connector document.
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+{ref}/update-connector-configuration-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.updateConfiguration({ connector_id })
+----
-|`_source_exclude` or `_sourceExclude`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_include` or `_sourceInclude`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`configuration` (Optional, Record)*
+** *`values` (Optional, Record)*
-|`version`
-|`number` - Explicit version number for concurrency control
+[discrete]
+==== update_error
+Update the connector error field.
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+Set the error field for the connector.
+If the error provided in the request body is non-null, the connector’s status is updated to error.
+Otherwise, if the error is reset to null, the connector status is updated to connected.
-|===
-=== getScript
-[source,js]
+{ref}/update-connector-error-api.html[Endpoint documentation]
+[source,ts]
----
-client.getScript([params] [, options] [, callback])
+client.connector.updateError({ connector_id, error })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
-[cols=2*]
-|===
-|`id`
-|`string` - Script ID
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`error` (T | null)*
-|===
-=== getSource
-[source,js]
+[discrete]
+==== update_features
+Updates the connector features in the connector document.
+
+{ref}/update-connector-features-api.html[Endpoint documentation]
+[source,ts]
----
-client.getSource([params] [, options] [, callback])
+client.connector.updateFeatures()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
-[cols=2*]
-|===
-|`id`
-|`string` - The document ID
-|`index`
-|`string` - The name of the index
-|`type`
-|`string` - The type of the document; deprecated and optional starting with 7.0
+[discrete]
+==== update_filtering
+Update the connector filtering.
-|`parent`
-|`string` - The ID of the parent document
+Update the draft filtering configuration of a connector and marks the draft validation state as edited.
+The filtering draft is activated once validated by the running Elastic connector service.
+The filtering property is used to configure sync rules (both basic and advanced) for a connector.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+{ref}/update-connector-filtering-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.updateFiltering({ connector_id })
+----
-|`realtime`
-|`boolean` - Specify whether to perform the operation in realtime or search mode
+[discrete]
+==== Arguments
-|`refresh`
-|`boolean` - Refresh the shard containing the document before performing the operation
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`filtering` (Optional, { active, domain, draft }[])*
+** *`rules` (Optional, { created_at, field, id, order, policy, rule, updated_at, value }[])*
+** *`advanced_snippet` (Optional, { created_at, updated_at, value })*
-|`routing`
-|`string` - Specific routing value
+[discrete]
+==== update_filtering_validation
+Update the connector draft filtering validation.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+Update the draft filtering validation info for a connector.
+[source,ts]
+----
+client.connector.updateFilteringValidation({ connector_id, validation })
+----
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`validation` ({ errors, state })*
-|`version`
-|`number` - Explicit version number for concurrency control
+[discrete]
+==== update_index_name
+Update the connector index name.
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+Update the `index_name` field of a connector, specifying the index where the data ingested by the connector is stored.
-|===
-=== index
-[source,js]
+{ref}/update-connector-index-name-api.html[Endpoint documentation]
+[source,ts]
----
-client.index([params] [, options] [, callback])
+client.connector.updateIndexName({ connector_id, index_name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
-[cols=2*]
-|===
-|`id`
-|`string` - Document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`index_name` (T | null)*
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the index 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)
+[discrete]
+==== update_name
+Update the connector name and description.
-|`op_type` or `opType`
-|`'index', 'create'` - Explicit operation type +
- _Default:_ `index`
+{ref}/update-connector-name-description-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.updateName({ connector_id })
+----
-|`parent`
-|`string` - ID of the parent document
+[discrete]
+==== Arguments
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`name` (Optional, string)*
+** *`description` (Optional, string)*
+
+[discrete]
+==== update_native
+Update the connector is_native flag.
+[source,ts]
+----
+client.connector.updateNative({ connector_id, is_native })
+----
-|`routing`
-|`string` - Specific routing value
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`is_native` (boolean)*
-|`version`
-|`number` - Explicit version number for concurrency control
+[discrete]
+==== update_pipeline
+Update the connector pipeline.
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+When you create a new connector, the configuration of an ingest pipeline is populated with default settings.
-|`if_seq_no` or `ifSeqNo`
-|`number` - only perform the index operation if the last operation that has changed the document has the specified sequence number
+{ref}/update-connector-pipeline-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.updatePipeline({ connector_id, pipeline })
+----
-|`if_primary_term` or `ifPrimaryTerm`
-|`number` - only perform the index operation if the last operation that has changed the document has the specified primary term
+[discrete]
+==== Arguments
-|`pipeline`
-|`string` - The pipeline id to preprocess incoming documents with
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`pipeline` ({ extract_binary_content, name, reduce_whitespace, run_ml_inference })*
-|`body`
-|`object` - The document
+[discrete]
+==== update_scheduling
+Update the connector scheduling.
-|===
-=== indices.analyze
-[source,js]
+{ref}/update-connector-scheduling-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.analyze([params] [, options] [, callback])
+client.connector.updateScheduling({ connector_id, scheduling })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index to scope the operation
-|`index`
-|`string` - The name of the index to scope the operation
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`scheduling` ({ access_control, full, incremental })*
-|`body`
-|`object` - Define analyzer/tokenizer parameters and the text on which the analysis should be performed
+[discrete]
+==== update_service_type
+Update the connector service type.
-|===
-=== indices.clearCache
-[source,js]
+{ref}/update-connector-service-type-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.clearCache([params] [, options] [, callback])
+client.connector.updateServiceType({ connector_id, service_type })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index name to limit the operation
-|`fielddata`
-|`boolean` - Clear field data
+[discrete]
+==== Arguments
-|`fields`
-|`string, string[]` - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`service_type` (string)*
-|`query`
-|`boolean` - Clear query caches
+[discrete]
+==== update_status
+Update the connector status.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/update-connector-status-api.html[Endpoint documentation]
+[source,ts]
+----
+client.connector.updateStatus({ connector_id, status })
+----
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+* *Request (object):*
+** *`connector_id` (string)*: The unique identifier of the connector to be updated
+** *`status` (Enum("created" | "needs_configuration" | "configured" | "connected" | "error"))*
-|`index`
-|`string, string[]` - A comma-separated list of index name to limit the operation
+[discrete]
+=== dangling_indices
+[discrete]
+==== delete_dangling_index
+Delete a dangling index.
-|`request`
-|`boolean` - Clear request cache
+If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
+For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
-|===
-=== indices.close
-[source,js]
+{ref}/modules-gateway-dangling-indices.html[Endpoint documentation]
+[source,ts]
----
-client.indices.close([params] [, options] [, callback])
+client.danglingIndices.deleteDanglingIndex({ index_uuid, accept_data_loss })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma separated list of indices to close
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`index_uuid` (string)*: The UUID of the index to delete. Use the get dangling indices API to find the UUID.
+** *`accept_data_loss` (boolean)*: This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== import_dangling_index
+Import a dangling index.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
+For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
-
-|===
-=== indices.create
-[source,js]
+{ref}/modules-gateway-dangling-indices.html[Endpoint documentation]
+[source,ts]
----
-client.indices.create([params] [, options] [, callback])
+client.danglingIndices.importDanglingIndex({ index_uuid, accept_data_loss })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether a type should be expected in the body of the mappings.
+[discrete]
+==== Arguments
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Set the number of active shards to wait for before the operation returns.
+* *Request (object):*
+** *`index_uuid` (string)*: The UUID of the index to import. Use the get dangling indices API to locate the UUID.
+** *`accept_data_loss` (boolean)*: This parameter must be set to true to import a dangling index.
+Because Elasticsearch cannot know where the dangling index data came from or determine which shard copies are fresh and which are stale, it cannot guarantee that the imported data represents the latest state of the index when it was last in the cluster.
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== list_dangling_indices
+Get the dangling indices.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
+For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
-|`body`
-|`object` - The configuration for the index (`settings` and `mappings`)
+Use this API to list dangling indices, which you can then import or delete.
-|===
-=== indices.delete
-[source,js]
+{ref}/modules-gateway-dangling-indices.html[Endpoint documentation]
+[source,ts]
----
-client.indices.delete([params] [, options] [, callback])
+client.danglingIndices.listDanglingIndices()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
-|`timeout`
-|`string` - Explicit operation timeout
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+=== enrich
+[discrete]
+==== delete_policy
+Delete an enrich policy.
+Deletes an existing enrich policy and its enrich index.
+
+{ref}/delete-enrich-policy-api.html[Endpoint documentation]
+[source,ts]
+----
+client.enrich.deletePolicy({ name })
+----
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Ignore unavailable indexes (default: false)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false)
+* *Request (object):*
+** *`name` (string)*: Enrich policy to delete.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) +
- _Default:_ `open`
+[discrete]
+==== execute_policy
+Run an enrich policy.
+Create the enrich index for an existing enrich policy.
-|===
-=== indices.deleteAlias
-[source,js]
+{ref}/execute-enrich-policy-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.deleteAlias([params] [, options] [, callback])
+client.enrich.executePolicy({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names (supports wildcards); use `_all` for all indices
-|`name`
-|`string, string[]` - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit timestamp for the document
+* *Request (object):*
+** *`name` (string)*: Enrich policy to execute.
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks other enrich policy execution requests until complete.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== get_policy
+Get an enrich policy.
+Returns information about an enrich policy.
-|===
-=== indices.deleteTemplate
-[source,js]
+{ref}/get-enrich-policy-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.deleteTemplate([params] [, options] [, callback])
+client.enrich.getPolicy({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
-[cols=2*]
-|===
-|`name`
-|`string` - The name of the template
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`name` (Optional, string | string[])*: List of enrich policy names used to limit the request.
+To return information for all enrich policies, omit this parameter.
-|===
-=== indices.exists
-[source,js]
+[discrete]
+==== put_policy
+Create an enrich policy.
+Creates an enrich policy.
+
+{ref}/put-enrich-policy-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.exists([params] [, options] [, callback])
+client.enrich.putPolicy({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Ignore unavailable indexes (default: false)
+* *Request (object):*
+** *`name` (string)*: Name of the enrich policy to create or update.
+** *`geo_match` (Optional, { enrich_fields, indices, match_field, query, name, elasticsearch_version })*: Matches enrich data to incoming documents based on a `geo_shape` query.
+** *`match` (Optional, { enrich_fields, indices, match_field, query, name, elasticsearch_version })*: Matches enrich data to incoming documents based on a `term` query.
+** *`range` (Optional, { enrich_fields, indices, match_field, query, name, elasticsearch_version })*: Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a `term` query.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false)
+[discrete]
+==== stats
+Get enrich stats.
+Returns enrich coordinator statistics and information about enrich policies that are currently executing.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) +
- _Default:_ `open`
+{ref}/enrich-stats-api.html[Endpoint documentation]
+[source,ts]
+----
+client.enrich.stats()
+----
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
-|`include_defaults` or `includeDefaults`
-|`boolean` - Whether to return all default setting for each of the indices.
+[discrete]
+=== eql
+[discrete]
+==== delete
+Delete an async EQL search.
+Delete an async EQL search or a stored synchronous EQL search.
+The API also deletes results for the search.
-|===
-=== indices.existsAlias
-[source,js]
+{ref}/eql-search-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.existsAlias([params] [, options] [, callback])
+client.eql.delete({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to filter aliases
-
-|`name`
-|`string, string[]` - A comma-separated list of alias names to return
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`id` (string)*: Identifier for the search to delete.
+A search ID is provided in the EQL search API's response for an async search.
+A search ID is also provided if the request’s `keep_on_completion` parameter is `true`.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `all`
+[discrete]
+==== get
+Get async EQL search results.
+Get the current status and available results for an async EQL search or a stored synchronous EQL search.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
-
-|===
-=== indices.existsTemplate
-[source,js]
+{ref}/get-async-eql-search-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.existsTemplate([params] [, options] [, callback])
+client.eql.get({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
-[cols=2*]
-|===
-|`name`
-|`string, string[]` - The comma separated names of the index templates
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`id` (string)*: Identifier for the search.
+** *`keep_alive` (Optional, string | -1 | 0)*: Period for which the search and its results are stored on the cluster.
+Defaults to the keep_alive value set by the search’s EQL search API request.
+** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Timeout duration to wait for the request to finish.
+Defaults to no timeout, meaning the request waits for complete search results.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== get_status
+Get the async EQL status.
+Get the current status for an async EQL search or a stored synchronous EQL search without returning results.
-|===
-=== indices.existsType
-[source,js]
+{ref}/get-async-eql-status-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.existsType([params] [, options] [, callback])
+client.eql.getStatus({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` to check the types across all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to check
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the search.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== search
+Get EQL search results.
+Returns search results for an Event Query Language (EQL) query.
+EQL assumes each document in a data stream or index corresponds to an event.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/eql-search-api.html[Endpoint documentation]
+[source,ts]
+----
+client.eql.search({ index, query })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`index` (string | string[])*: The name of the index to scope the operation
+** *`query` (string)*: EQL query you wish to run.
+** *`case_sensitive` (Optional, boolean)*
+** *`event_category_field` (Optional, string)*: Field containing the event classification, such as process, file, or network.
+** *`tiebreaker_field` (Optional, string)*: Field used to sort hits with the same timestamp in ascending order
+** *`timestamp_field` (Optional, string)*: Field containing event timestamp. Default "@timestamp"
+** *`fetch_size` (Optional, number)*: Maximum number of events to search at a time for sequence queries.
+** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type } | { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type }[])*: Query, written in Query DSL, used to filter the events on which the EQL query runs.
+** *`keep_alive` (Optional, string | -1 | 0)*
+** *`keep_on_completion` (Optional, boolean)*
+** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*
+** *`size` (Optional, number)*: For basic queries, the maximum number of matching events to return. Defaults to 10
+** *`fields` (Optional, { field, format, include_unmapped } | { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.
+** *`result_position` (Optional, Enum("tail" | "head"))*
+** *`runtime_mappings` (Optional, Record)*
+** *`allow_no_indices` (Optional, boolean)*
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*
+** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response.
-|===
-=== indices.flush
-[source,js]
+[discrete]
+=== esql
+[discrete]
+==== async_query
+Executes an ESQL request asynchronously
+
+{ref}/esql-async-query-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.flush([params] [, options] [, callback])
+client.esql.asyncQuery()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string for all indices
-|`force`
-|`boolean` - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
-|`wait_if_ongoing` or `waitIfOngoing`
-|`boolean` - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
+[discrete]
+==== async_query_get
+Retrieves the results of a previously submitted async query request given its ID.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/esql-async-query-get-api.html[Endpoint documentation]
+[source,ts]
+----
+client.esql.asyncQueryGet()
+----
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== query
+Run an ES|QL query.
+Get search results for an ES|QL (Elasticsearch query language) query.
-|===
-=== indices.flushSynced
-[source,js]
+{ref}/esql-rest.html[Endpoint documentation]
+[source,ts]
----
-client.indices.flushSynced([params] [, options] [, callback])
+client.esql.query({ query })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string for all indices
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`query` (string)*: The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.
+** *`columnar` (Optional, boolean)*: By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.
+** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
+** *`locale` (Optional, string)*
+** *`params` (Optional, number | number | string | boolean | null | User-defined value[])*: To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
+** *`profile` (Optional, boolean)*: If provided and `true` the response will include an extra `profile` object
+with information on how the query was executed. This information is for human debugging
+and its format can change at any time but it can give some insight into the performance
+of each part of the query.
+** *`tables` (Optional, Record>)*: Tables to use with the LOOKUP operation. The top level key is the table
+name and the next level key is the column name.
+** *`format` (Optional, Enum("csv" | "json" | "tsv" | "txt" | "yaml" | "cbor" | "smile" | "arrow"))*: A short version of the Accept header, e.g. json, yaml.
+** *`delimiter` (Optional, string)*: The character to use between values within a CSV row. Only valid for the CSV format.
+** *`drop_null_columns` (Optional, boolean)*: Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?
+Defaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+=== features
+[discrete]
+==== get_features
+Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
+
+{ref}/get-features-api.html[Endpoint documentation]
+[source,ts]
+----
+client.features.getFeatures()
+----
+
+
+[discrete]
+==== reset_features
+Resets the internal state of features, usually by deleting system indices
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
+----
+client.features.resetFeatures()
+----
+
+
+[discrete]
+=== fleet
+[discrete]
+==== global_checkpoints
+Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.
+
+{ref}/get-global-checkpoints.html[Endpoint documentation]
+[source,ts]
+----
+client.fleet.globalCheckpoints({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string)*: A single index or index alias that resolves to a single index.
+** *`wait_for_advance` (Optional, boolean)*: A boolean value which controls whether to wait (until the timeout) for the global checkpoints
+to advance past the provided `checkpoints`.
+** *`wait_for_index` (Optional, boolean)*: A boolean value which controls whether to wait (until the timeout) for the target index to exist
+and all primary shards be active. Can only be true when `wait_for_advance` is true.
+** *`checkpoints` (Optional, number[])*: A comma separated list of previous global checkpoints. When used in combination with `wait_for_advance`,
+the API will only return once the global checkpoints advances past the checkpoints. Providing an empty list
+will cause Elasticsearch to immediately return the current global checkpoints.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a global checkpoints to advance past `checkpoints`.
+
+[discrete]
+==== msearch
+Executes several [fleet searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) with a single API request.
+The API follows the same structure as the [multi search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) API. However, similar to the fleet search API, it
+supports the wait_for_checkpoints parameter.
+[source,ts]
+----
+client.fleet.msearch({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string)*: A single target to search. If the target is an index alias, it must resolve to a single index.
+** *`searches` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, index, preference, request_cache, routing, search_type, ccs_minimize_roundtrips, allow_partial_search_results, ignore_throttled } | { aggregations, collapse, query, explain, ext, stored_fields, docvalue_fields, knn, from, highlight, indices_boost, min_score, post_filter, profile, rescore, script_fields, search_after, size, sort, _source, fields, terminate_after, stats, timeout, track_scores, track_total_hits, version, runtime_mappings, seq_no_primary_term, pit, suggest }[])*
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
+** *`ccs_minimize_roundtrips` (Optional, boolean)*: If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded or aliased indices are ignored when frozen.
+** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response.
+** *`max_concurrent_searches` (Optional, number)*: Maximum number of concurrent searches the multi search API can execute.
+** *`max_concurrent_shard_requests` (Optional, number)*: Maximum number of concurrent shard requests that each sub-search request executes per node.
+** *`pre_filter_shard_size` (Optional, number)*: Defines 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 its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Indicates whether global term and document frequencies should be used when scoring returned documents.
+** *`rest_total_hits_as_int` (Optional, boolean)*: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
+** *`typed_keys` (Optional, boolean)*: Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.
+** *`wait_for_checkpoints` (Optional, number[])*: A comma separated list of checkpoints. When configured, the search API will only be executed on a shard
+after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause
+Elasticsearch to immediately execute the search.
+** *`allow_partial_search_results` (Optional, boolean)*: If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns
+an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
+which is true by default.
+
+[discrete]
+==== search
+The purpose of the fleet search api is to provide a search api where the search will only be executed
+after provided checkpoint has been processed and is visible for searches inside of Elasticsearch.
+[source,ts]
+----
+client.fleet.search({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string)*: A single target to search. If the target is an index alias, it must resolve to a single index.
+** *`aggregations` (Optional, Record)*
+** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*
+** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit.
+** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins.
+** *`from` (Optional, number)*: Starting document offset. By default, you cannot page through more than 10,000
+hits using the from and size parameters. To page through more hits, use the
+search_after parameter.
+** *`highlight` (Optional, { encoder, fields })*
+** *`track_total_hits` (Optional, boolean | number)*: Number of hits matching the query to count accurately. If true, the exact
+number of hits is returned at the cost of some performance. If false, the
+response does not include the total number of hits matching the query.
+Defaults to 10,000 hits.
+** *`indices_boost` (Optional, Record[])*: Boosts the _score of documents from specified indices.
+** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns doc values for field
+names matching these patterns in the hits.fields property of the response.
+** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are
+not included in the search results.
+** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*
+** *`profile` (Optional, boolean)*
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
+** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*
+** *`script_fields` (Optional, Record)*: Retrieve a script evaluation (based on different fields) for each hit.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*
+** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more
+than 10,000 hits using the from and size parameters. To page through more
+hits, use the search_after parameter.
+** *`slice` (Optional, { field, id, max })*
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*
+** *`_source` (Optional, boolean | { excludes, includes })*: Indicates which source fields are returned for matching documents. These
+fields are returned in the hits._source property of the search response.
+** *`fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns values for field names
+matching these patterns in the hits.fields property of the response.
+** *`suggest` (Optional, { text })*
+** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard. If a query reaches this
+limit, Elasticsearch terminates the query early. Elasticsearch collects documents
+before sorting. Defaults to 0, which does not terminate query execution early.
+** *`timeout` (Optional, string)*: Specifies the period of time to wait for a response from each shard. If no response
+is received before the timeout expires, the request fails and returns an error.
+Defaults to no timeout.
+** *`track_scores` (Optional, boolean)*: If true, calculate and return document scores, even if the scores are not used for sorting.
+** *`version` (Optional, boolean)*: If true, returns document version as part of a hit.
+** *`seq_no_primary_term` (Optional, boolean)*: If true, returns sequence number and primary term of the last modification
+of each hit. See Optimistic concurrency control.
+** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit. If no fields are specified,
+no stored fields are included in the response. If this field is specified, the _source
+parameter defaults to false. You can pass _source: true to return both source fields
+and stored fields in the search response.
+** *`pit` (Optional, { id, keep_alive })*: Limits the search to a point in time (PIT). If you provide a PIT, you
+cannot specify an in the request path.
+** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take
+precedence over mapped fields with the same name.
+** *`stats` (Optional, string[])*: Stats groups to associate with the search. Each group maintains a statistics
+aggregation for its associated searches. You can retrieve these stats using
+the indices stats API.
+** *`allow_no_indices` (Optional, boolean)*
+** *`analyzer` (Optional, string)*
+** *`analyze_wildcard` (Optional, boolean)*
+** *`batched_reduce_size` (Optional, number)*
+** *`ccs_minimize_roundtrips` (Optional, boolean)*
+** *`default_operator` (Optional, Enum("and" | "or"))*
+** *`df` (Optional, string)*
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*
+** *`ignore_throttled` (Optional, boolean)*
+** *`ignore_unavailable` (Optional, boolean)*
+** *`lenient` (Optional, boolean)*
+** *`max_concurrent_shard_requests` (Optional, number)*
+** *`min_compatible_shard_node` (Optional, string)*
+** *`preference` (Optional, string)*
+** *`pre_filter_shard_size` (Optional, number)*
+** *`request_cache` (Optional, boolean)*
+** *`routing` (Optional, string)*
+** *`scroll` (Optional, string | -1 | 0)*
+** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*
+** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions.
+** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))*
+** *`suggest_size` (Optional, number)*
+** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned.
+** *`typed_keys` (Optional, boolean)*
+** *`rest_total_hits_as_int` (Optional, boolean)*
+** *`_source_excludes` (Optional, string | string[])*
+** *`_source_includes` (Optional, string | string[])*
+** *`q` (Optional, string)*
+** *`wait_for_checkpoints` (Optional, number[])*: A comma separated list of checkpoints. When configured, the search API will only be executed on a shard
+after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause
+Elasticsearch to immediately execute the search.
+** *`allow_partial_search_results` (Optional, boolean)*: If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns
+an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
+which is true by default.
+
+[discrete]
+=== graph
+[discrete]
+==== explore
+Explore graph analytics.
+Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.
+The easiest way to understand the behavior of this API is to use the Graph UI to explore connections.
+An initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.
+Subsequent requests enable you to spider out from one more vertices of interest.
+You can exclude vertices that have already been returned.
+
+{ref}/graph-explore-api.html[Endpoint documentation]
+[source,ts]
+----
+client.graph.explore({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: Name of the index.
+** *`connections` (Optional, { connections, query, vertices })*: Specifies or more fields from which you want to extract terms that are associated with the specified vertices.
+** *`controls` (Optional, { sample_diversity, sample_size, timeout, use_significance })*: Direct the Graph API how to build the graph.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: A seed query that identifies the documents of interest. Can be any valid Elasticsearch query.
+** *`vertices` (Optional, { exclude, field, include, min_doc_count, shard_min_doc_count, size }[])*: Specifies one or more fields that contain the terms you want to include in the graph as vertices.
+** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
+** *`timeout` (Optional, string | -1 | 0)*: Specifies the period of time to wait for a response from each shard.
+If no response is received before the timeout expires, the request fails and returns an error.
+Defaults to no timeout.
+
+[discrete]
+=== ilm
+[discrete]
+==== delete_lifecycle
+Deletes the specified lifecycle policy definition. You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.
+
+{ref}/ilm-delete-lifecycle.html[Endpoint documentation]
+[source,ts]
+----
+client.ilm.deleteLifecycle({ policy })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`policy` (string)*: Identifier for the policy.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== explain_lifecycle
+Retrieves information about the index’s current lifecycle state, such as the currently executing phase, action, and step. Shows when the index entered each one, the definition of the running phase, and information about any failures.
+
+{ref}/ilm-explain-lifecycle.html[Endpoint documentation]
+[source,ts]
+----
+client.ilm.explainLifecycle({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: List of data streams, indices, and aliases to target. Supports wildcards (`*`).
+To target all data streams and indices, use `*` or `_all`.
+** *`only_errors` (Optional, boolean)*: Filters the returned indices to only indices that are managed by ILM and are in an error state, either due to an encountering an error while executing the policy, or attempting to use a policy that does not exist.
+** *`only_managed` (Optional, boolean)*: Filters the returned indices to only indices that are managed by ILM.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== get_lifecycle
+Retrieves a lifecycle policy.
-|===
-=== indices.forcemerge
-[source,js]
+{ref}/ilm-get-lifecycle.html[Endpoint documentation]
+[source,ts]
----
-client.indices.forcemerge([params] [, options] [, callback])
+client.ilm.getLifecycle({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`flush`
-|`boolean` - Specify whether the index should be flushed after performing the operation (default: true)
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+* *Request (object):*
+** *`policy` (Optional, string)*: Identifier for the policy.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== get_status
+Retrieves the current index lifecycle management (ILM) status.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+{ref}/ilm-get-status.html[Endpoint documentation]
+[source,ts]
+----
+client.ilm.getStatus()
+----
-|`max_num_segments` or `maxNumSegments`
-|`number` - The number of segments the index should be merged into (default: dynamic)
-|`only_expunge_deletes` or `onlyExpungeDeletes`
-|`boolean` - Specify whether the operation should only expunge deleted documents
+[discrete]
+==== migrate_to_data_tiers
+Switches the indices, ILM policies, and legacy, composable and component templates from using custom node attributes and
+attribute-based allocation filters to using data tiers, and optionally deletes one legacy index template.+
+Using node roles enables ILM to automatically move the indices between data tiers.
-|===
-=== indices.get
-[source,js]
+{ref}/ilm-migrate-to-data-tiers.html[Endpoint documentation]
+[source,ts]
----
-client.indices.get([params] [, options] [, callback])
+client.ilm.migrateToDataTiers({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether to add the type name to the response (default: false)
+[discrete]
+==== Arguments
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+* *Request (object):*
+** *`legacy_template_to_delete` (Optional, string)*
+** *`node_attribute` (Optional, string)*
+** *`dry_run` (Optional, boolean)*: If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration.
+This provides a way to retrieve the indices and ILM policies that need to be migrated.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Ignore unavailable indexes (default: false)
+[discrete]
+==== move_to_step
+Manually moves an index into the specified step and executes that step.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false)
-
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) +
- _Default:_ `open`
+{ref}/ilm-move-to-step.html[Endpoint documentation]
+[source,ts]
+----
+client.ilm.moveToStep({ index, current_step, next_step })
+----
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+[discrete]
+==== Arguments
-|`include_defaults` or `includeDefaults`
-|`boolean` - Whether to return all default setting for each of the indices.
+* *Request (object):*
+** *`index` (string)*: The name of the index whose lifecycle step is to change
+** *`current_step` ({ action, name, phase })*
+** *`next_step` ({ action, name, phase })*
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== put_lifecycle
+Creates a lifecycle policy. If the specified policy exists, the policy is replaced and the policy version is incremented.
-|===
-=== indices.getAlias
-[source,js]
+{ref}/ilm-put-lifecycle.html[Endpoint documentation]
+[source,ts]
----
-client.indices.getAlias([params] [, options] [, callback])
+client.ilm.putLifecycle({ policy })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to filter aliases
-
-|`name`
-|`string, string[]` - A comma-separated list of alias names to return
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`policy` (string)*: Identifier for the policy.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `all`
+[discrete]
+==== remove_policy
+Removes the assigned lifecycle policy and stops managing the specified index
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
-
-|===
-=== indices.getFieldMapping
-[source,js]
+{ref}/ilm-remove-policy.html[Endpoint documentation]
+[source,ts]
----
-client.indices.getFieldMapping([params] [, options] [, callback])
+client.ilm.removePolicy({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names
-
-|`type`
-|`string, string[]` - A comma-separated list of document types
-|`fields`
-|`string, string[]` - A comma-separated list of fields
+[discrete]
+==== Arguments
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether a type should be returned in the body of the mappings.
+* *Request (object):*
+** *`index` (string)*: The name of the index to remove policy on
-|`include_defaults` or `includeDefaults`
-|`boolean` - Whether the default mapping values should be returned as well
+[discrete]
+==== retry
+Retries executing the policy for an index that is in the ERROR step.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/ilm-retry-policy.html[Endpoint documentation]
+[source,ts]
+----
+client.ilm.retry({ index })
+----
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+* *Request (object):*
+** *`index` (string)*: The name of the indices (comma-separated) whose failed lifecycle step is to be retry
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== start
+Start the index lifecycle management (ILM) plugin.
-|===
-=== indices.getMapping
-[source,js]
+{ref}/ilm-start.html[Endpoint documentation]
+[source,ts]
----
-client.indices.getMapping([params] [, options] [, callback])
+client.ilm.start({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names
-|`type`
-|`string, string[]` - A comma-separated list of document types
+[discrete]
+==== Arguments
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether to add the type name to the response (default: false)
+* *Request (object):*
+** *`master_timeout` (Optional, string | -1 | 0)*
+** *`timeout` (Optional, string | -1 | 0)*
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== stop
+Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/ilm-stop.html[Endpoint documentation]
+[source,ts]
+----
+client.ilm.stop({ ... })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`master_timeout` (Optional, string | -1 | 0)*
+** *`timeout` (Optional, string | -1 | 0)*
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+=== indices
+[discrete]
+==== add_block
+Add an index block.
+Limits the operations allowed on an index by blocking specific operation types.
-|===
-=== indices.getSettings
-[source,js]
+{ref}/index-modules-blocks.html[Endpoint documentation]
+[source,ts]
----
-client.indices.getSettings([params] [, options] [, callback])
+client.indices.addBlock({ index, block })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`name`
-|`string, string[]` - The name of the settings that should be included
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`index` (string)*: A comma separated list of indices to add a block to
+** *`block` (Enum("metadata" | "read" | "read_only" | "write"))*: The block to add (one of read, write, read_only or metadata)
+** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== analyze
+Get tokens from text analysis.
+The analyze API performs [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html) on a text string and returns the resulting tokens.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/indices-analyze.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.analyze({ ... })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open,closed`
+[discrete]
+==== Arguments
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+* *Request (object):*
+** *`index` (Optional, string)*: Index used to derive the analyzer.
+If specified, the `analyzer` or field parameter overrides this value.
+If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.
+** *`analyzer` (Optional, string)*: The name of the analyzer that should be applied to the provided `text`.
+This could be a built-in analyzer, or an analyzer that’s been configured in the index.
+** *`attributes` (Optional, string[])*: Array of token attributes used to filter the output of the `explain` parameter.
+** *`char_filter` (Optional, string | { type, escaped_tags } | { type, mappings, mappings_path } | { type, flags, pattern, replacement } | { type, mode, name } | { type, normalize_kana, normalize_kanji }[])*: Array of character filters used to preprocess characters before the tokenizer.
+** *`explain` (Optional, boolean)*: If `true`, the response includes token attributes and additional details.
+** *`field` (Optional, string)*: Field used to derive the analyzer.
+To use this parameter, you must specify an index.
+If specified, the `analyzer` parameter overrides this value.
+** *`filter` (Optional, string | { type, preserve_original } | { type, common_words, common_words_path, ignore_case, query_mode } | { type, filter, script } | { type, delimiter, encoding } | { type, max_gram, min_gram, side, preserve_original } | { type, articles, articles_path, articles_case } | { type, max_output_size, separator } | { type, dedup, dictionary, locale, longest_only } | { type } | { type, mode, types } | { type, keep_words, keep_words_case, keep_words_path } | { type, ignore_case, keywords, keywords_path, keywords_pattern } | { type } | { type, max, min } | { type, consume_all_tokens, max_token_count } | { type, language } | { type, filters, preserve_original } | { type, max_gram, min_gram, preserve_original } | { type, stoptags } | { type, patterns, preserve_original } | { type, all, flags, pattern, replacement } | { type } | { type, script } | { type } | { type } | { type, filler_token, max_shingle_size, min_shingle_size, output_unigrams, output_unigrams_if_no_shingles, token_separator } | { type, language } | { type, rules, rules_path } | { type, language } | { type, ignore_case, remove_trailing, stopwords, stopwords_path } | { type, expand, format, lenient, synonyms, synonyms_path, synonyms_set, tokenizer, updateable } | { type, expand, format, lenient, synonyms, synonyms_path, synonyms_set, tokenizer, updateable } | { type } | { type, length } | { type, only_on_same_position } | { type } | { type, adjust_offsets, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, ignore_keywords, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, minimum_length } | { type, use_romaji } | { type, stoptags } | { type, alternate, case_first, case_level, country, decomposition, hiragana_quaternary_mode, language, numeric, rules, strength, variable_top, variant } | { type, unicode_set_filter } | { type, name } | { type, dir, id } | { type, encoder, languageset, max_code_len, name_type, replace, rule_type } | { type }[])*: Array of token filters used to apply after the tokenizer.
+** *`normalizer` (Optional, string)*: Normalizer to use to convert text into a single token.
+** *`text` (Optional, string | string[])*: Text to analyze.
+If an array of strings is provided, it is analyzed as a multi-value field.
+** *`tokenizer` (Optional, string | { type, tokenize_on_chars, max_token_length } | { type, max_token_length } | { type, custom_token_chars, max_gram, min_gram, token_chars } | { type, buffer_size } | { type } | { type } | { type, custom_token_chars, max_gram, min_gram, token_chars } | { type, buffer_size, delimiter, replacement, reverse, skip } | { type, flags, group, pattern } | { type, pattern } | { type, pattern } | { type, max_token_length } | { type } | { type, max_token_length } | { type, max_token_length } | { type, rule_files } | { type, discard_punctuation, mode, nbest_cost, nbest_examples, user_dictionary, user_dictionary_rules, discard_compound_token } | { type, decompound_mode, discard_punctuation, user_dictionary, user_dictionary_rules })*: Tokenizer to use to convert text into tokens.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== clear_cache
+Clears the caches of one or more indices.
+For data streams, the API clears the caches of the stream’s backing indices.
+
+{ref}/indices-clearcache.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.clearCache({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`fielddata` (Optional, boolean)*: If `true`, clears the fields cache.
+Use the `fields` parameter to clear the cache of specific fields only.
+** *`fields` (Optional, string | string[])*: List of field names used to limit the `fielddata` parameter.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`query` (Optional, boolean)*: If `true`, clears the query cache.
+** *`request` (Optional, boolean)*: If `true`, clears the request cache.
+
+[discrete]
+==== clone
+Clones an existing index.
+
+{ref}/indices-clone-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.clone({ index, target })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Name of the source index to clone.
+** *`target` (string)*: Name of the target index to create.
+** *`aliases` (Optional, Record)*: Aliases for the resulting index.
+** *`settings` (Optional, Record)*: Configuration options for the target index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== close
+Closes an index.
+
+{ref}/indices-close.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.close({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List or wildcard expression of index names used to limit the request.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== create
+Create an index.
+Creates a new index.
+
+{ref}/indices-create-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.create({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Name of the index you wish to create.
+** *`aliases` (Optional, Record)*: Aliases for the index.
+** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })*: Mapping for fields in the index. If specified, this mapping can include:
+- Field names
+- Field data types
+- Mapping parameters
+** *`settings` (Optional, { index, mode, routing_path, soft_deletes, sort, number_of_shards, number_of_replicas, number_of_routing_shards, check_on_startup, codec, routing_partition_size, load_fixed_bitset_filters_eagerly, hidden, auto_expand_replicas, merge, search, refresh_interval, max_result_window, max_inner_result_window, max_rescore_window, max_docvalue_fields_search, max_script_fields, max_ngram_diff, max_shingle_diff, blocks, max_refresh_listeners, analyze, highlight, max_terms_count, max_regex_length, routing, gc_deletes, default_pipeline, final_pipeline, lifecycle, provided_name, creation_date, creation_date_string, uuid, version, verified_before_close, format, max_slices_per_scroll, translog, query_string, priority, top_metrics_max_size, analysis, settings, time_series, queries, similarity, mapping, indexing.slowlog, indexing_pressure, store })*: Configuration options for the index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== create_data_stream
+Create a data stream.
+Creates a data stream.
+You must have a matching index template with data stream enabled.
+
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.createDataStream({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: Name of the data stream, which must meet the following criteria:
+Lowercase only;
+Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`, `#`, `:`, or a space character;
+Cannot start with `-`, `_`, `+`, or `.ds-`;
+Cannot be `.` or `..`;
+Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== data_streams_stats
+Get data stream stats.
+Retrieves statistics for one or more data streams.
+
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.dataStreamsStats({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string)*: List of data streams used to limit the request.
+Wildcard expressions (`*`) are supported.
+To target all data streams in a cluster, omit this parameter or use `*`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
+Supports a list of values, such as `open,hidden`.
+
+[discrete]
+==== delete
+Delete indices.
+Deletes one or more indices.
+
+{ref}/indices-delete-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.delete({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of indices to delete.
+You cannot specify index aliases.
+By default, this parameter does not support wildcards (`*`) or `_all`.
+To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`include_defaults` or `includeDefaults`
-|`boolean` - Whether to return all default setting for each of the indices.
+[discrete]
+==== delete_alias
+Delete an alias.
+Removes a data stream or index from an alias.
-|===
-=== indices.getTemplate
-[source,js]
+{ref}/indices-aliases.html[Endpoint documentation]
+[source,ts]
----
-client.indices.getTemplate([params] [, options] [, callback])
+client.indices.deleteAlias({ index, name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
-[cols=2*]
-|===
-|`name`
-|`string, string[]` - The comma separated names of the index templates
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether a type should be returned in the body of the mappings.
+[discrete]
+==== Arguments
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams or indices used to limit the request.
+Supports wildcards (`*`).
+** *`name` (string | string[])*: List of aliases to remove.
+Supports wildcards (`*`). To remove all aliases, use `*` or `_all`.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== delete_data_lifecycle
+Delete data stream lifecycles.
+Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
-
-|===
-=== indices.getUpgrade
-[source,js]
+{ref}/data-streams-delete-lifecycle.html[Endpoint documentation]
+[source,ts]
----
-client.indices.getUpgrade([params] [, options] [, callback])
+client.indices.deleteDataLifecycle({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`name` (string | string[])*: A list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open)
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
+** *`timeout` (Optional, string | -1 | 0)*: Explicit timestamp for the document
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== delete_data_stream
+Delete data streams.
+Deletes one or more data streams and their backing indices.
-|===
-=== indices.open
-[source,js]
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
----
-client.indices.open([params] [, options] [, callback])
+client.indices.deleteDataStream({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma separated list of indices to open
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string | string[])*: List of data streams to delete. Wildcard (`*`) expressions are supported.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match. Supports a list of values,such as `open,hidden`.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== delete_index_template
+Delete an index template.
+The provided may contain multiple template names separated by a comma. If multiple template
+names are specified then there is no wildcard support and the provided names should match completely with
+existing templates.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/indices-delete-template.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.deleteIndexTemplate({ name })
+----
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `closed`
+* *Request (object):*
+** *`name` (string | string[])*: List of index template names used to limit the request. Wildcard (*) expressions are supported.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of active shards to wait for before the operation returns.
+[discrete]
+==== delete_template
+Deletes a legacy index template.
-|===
-=== indices.putAlias
-[source,js]
+{ref}/indices-delete-template-v1.html[Endpoint documentation]
+[source,ts]
----
-client.indices.putAlias([params] [, options] [, callback])
+client.indices.deleteTemplate({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
-|`name`
-|`string` - The name of the alias to be created or updated
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit timestamp for the document
+* *Request (object):*
+** *`name` (string)*: The name of the legacy index template to delete.
+Wildcard (`*`) expressions are supported.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== disk_usage
+Analyzes the disk usage of each field of an index or data stream.
-|`body`
-|`object` - The settings for the alias, such as `routing` or `filter`
-
-|===
-=== indices.putMapping
-[source,js]
+{ref}/indices-disk-usage.html[Endpoint documentation]
+[source,ts]
----
-client.indices.putMapping([params] [, options] [, callback])
+client.indices.diskUsage({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
-
-|`type`
-|`string` - The name of the document type
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether a type should be expected in the body of the mappings.
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, and aliases used to limit the request.
+It’s recommended to execute this API with a single index (or the latest backing index of a data stream) as the API consumes resources significantly.
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+** *`flush` (Optional, boolean)*: If `true`, the API performs a flush before analysis.
+If `false`, the response may not include uncommitted data.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, missing or closed indices are not included in the response.
+** *`run_expensive_tasks` (Optional, boolean)*: Analyzing field disk usage is resource-intensive.
+To use the API, this parameter must be set to `true`.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== downsample
+Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/indices-downsample-data-stream.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.downsample({ index, target_index })
+----
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+* *Request (object):*
+** *`index` (string)*: Name of the time series index to downsample.
+** *`target_index` (string)*: Name of the index to create.
+** *`config` (Optional, { fixed_interval })*
-|`body`
-|`object` - The mapping definition
+[discrete]
+==== exists
+Check indices.
+Checks if one or more indices, index aliases, or data streams exist.
-|===
-=== indices.putSettings
-[source,js]
+{ref}/indices-exists.html[Endpoint documentation]
+[source,ts]
----
-client.indices.putSettings([params] [, options] [, callback])
+client.indices.exists({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, and aliases. Supports wildcards (`*`).
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`include_defaults` (Optional, boolean)*: If `true`, return all default settings in the response.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
-|`preserve_existing` or `preserveExisting`
-|`boolean` - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
+[discrete]
+==== exists_alias
+Check aliases.
+Checks if one or more data stream or index aliases exist.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/indices-aliases.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.existsAlias({ name })
+----
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+* *Request (object):*
+** *`name` (string | string[])*: List of aliases to check. Supports wildcards (`*`).
+** *`index` (Optional, string | string[])*: List of data streams or indices used to limit the request. Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, requests that include a missing data stream or index in the target indices or data streams return an error.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+[discrete]
+==== exists_index_template
+Check index templates.
+Check whether index templates exist.
-|`body`
-|`object` - The index settings to be updated
+{ref}/index-templates.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.existsIndexTemplate({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: List of index template names used to limit the request. Wildcard (*) expressions are supported.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== exists_template
+Check existence of index templates.
+Returns information about whether a particular index template exists.
-|===
-=== indices.putTemplate
-[source,js]
+{ref}/indices-template-exists-v1.html[Endpoint documentation]
+[source,ts]
----
-client.indices.putTemplate([params] [, options] [, callback])
+client.indices.existsTemplate({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
-[cols=2*]
-|===
-|`name`
-|`string` - The name of the template
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether a type should be returned in the body of the mappings.
+[discrete]
+==== Arguments
-|`order`
-|`number` - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
+* *Request (object):*
+** *`name` (string | string[])*: The comma separated names of the index templates
+** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false)
+** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false)
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
-|`create`
-|`boolean` - Whether the index template should only be added if new or can also replace an existing one
+[discrete]
+==== explain_data_lifecycle
+Get the status for a data stream lifecycle.
+Retrieves information about an index or data stream’s current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.
+
+{ref}/data-streams-explain-lifecycle.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.explainDataLifecycle({ index })
+----
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`index` (string | string[])*: The name of the index to explain
+** *`include_defaults` (Optional, boolean)*: indicates if the API should return the default values the system uses for the index's lifecycle
+** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+[discrete]
+==== field_usage_stats
+Returns field usage information for each shard and field of an index.
+
+{ref}/field-usage-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.fieldUsageStats({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List or wildcard expression of index names used to limit the request.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, missing or closed indices are not included in the response.
+** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== flush
+Flushes one or more data streams or indices.
+
+{ref}/indices-flush.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.flush({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to flush.
+Supports wildcards (`*`).
+To flush all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`force` (Optional, boolean)*: If `true`, the request forces a flush even if there are no changes to commit to the index.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`wait_if_ongoing` (Optional, boolean)*: If `true`, the flush operation blocks until execution when another flush operation is running.
+If `false`, Elasticsearch returns an error if you request a flush when another flush operation is running.
+
+[discrete]
+==== forcemerge
+Performs the force merge operation on one or more indices.
+
+{ref}/indices-forcemerge.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.forcemerge({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices
+** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`flush` (Optional, boolean)*: Specify whether the index should be flushed after performing the operation (default: true)
+** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
+** *`max_num_segments` (Optional, number)*: The number of segments the index should be merged into (default: dynamic)
+** *`only_expunge_deletes` (Optional, boolean)*: Specify whether the operation should only expunge deleted documents
+** *`wait_for_completion` (Optional, boolean)*: Should the request wait until the force merge is completed.
+
+[discrete]
+==== get
+Get index information.
+Returns information about one or more indices. For data streams, the API returns information about the
+stream’s backing indices.
+
+{ref}/indices-get-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.get({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, and index aliases used to limit the request.
+Wildcard expressions (*) are supported.
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only
+missing or closed indices. This behavior applies even if the request targets other open indices. For example,
+a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument
+determines whether wildcard expressions match hidden data streams. Supports a list of values,
+such as open,hidden.
+** *`flat_settings` (Optional, boolean)*: If true, returns settings in flat format.
+** *`ignore_unavailable` (Optional, boolean)*: If false, requests that target a missing index return an error.
+** *`include_defaults` (Optional, boolean)*: If true, return all default settings in the response.
+** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`features` (Optional, { name, description } | { name, description }[])*: Return only information on specified index features
+
+[discrete]
+==== get_alias
+Get aliases.
+Retrieves information for one or more data stream or index aliases.
+
+{ref}/indices-aliases.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getAlias({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string | string[])*: List of aliases to retrieve.
+Supports wildcards (`*`).
+To retrieve all aliases, omit this parameter or use `*` or `_all`.
+** *`index` (Optional, string | string[])*: List of data streams or indices used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+
+[discrete]
+==== get_data_lifecycle
+Get data stream lifecycles.
+Retrieves the data stream lifecycle configuration of one or more data streams.
+
+{ref}/data-streams-get-lifecycle.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getDataLifecycle({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string | string[])*: List of data streams to limit the request.
+Supports wildcards (`*`).
+To target all data streams, omit this parameter or use `*` or `_all`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`include_defaults` (Optional, boolean)*: If `true`, return all default settings in the response.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== get_data_stream
+Get data streams.
+Retrieves information about one or more data streams.
+
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getDataStream({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string | string[])*: List of data stream names used to limit the request.
+Wildcard (`*`) expressions are supported. If omitted, all data streams are returned.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
+Supports a list of values, such as `open,hidden`.
+** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`verbose` (Optional, boolean)*: Whether the maximum timestamp for each data stream should be calculated and returned.
+
+[discrete]
+==== get_field_mapping
+Get mapping definitions.
+Retrieves mapping definitions for one or more fields.
+For data streams, the API retrieves field mappings for the stream’s backing indices.
+
+{ref}/indices-get-field-mapping.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getFieldMapping({ fields })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`fields` (string | string[])*: List or wildcard expression of fields used to limit returned information.
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`include_defaults` (Optional, boolean)*: If `true`, return all default settings in the response.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+
+[discrete]
+==== get_index_template
+Get index templates.
+Returns information about one or more index templates.
+
+{ref}/indices-get-template.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getIndexTemplate({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string)*: List of index template names used to limit the request. Wildcard (*) expressions are supported.
+** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
+** *`flat_settings` (Optional, boolean)*: If true, returns settings in flat format.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
+
+[discrete]
+==== get_mapping
+Get mapping definitions.
+Retrieves mapping definitions for one or more indices.
+For data streams, the API retrieves mappings for the stream’s backing indices.
+
+{ref}/indices-get-mapping.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getMapping({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== get_settings
+Get index settings.
+Returns setting information for one or more indices. For data streams,
+returns setting information for the stream’s backing indices.
+
+{ref}/indices-get-settings.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getSettings({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit
+the request. Supports wildcards (`*`). To target all data streams and
+indices, omit this parameter or use `*` or `_all`.
+** *`name` (Optional, string | string[])*: List or wildcard expression of settings to retrieve.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index
+alias, or `_all` value targets only missing or closed indices. This
+behavior applies even if the request targets other open indices. For
+example, a request targeting `foo*,bar*` returns an error if an index
+starts with foo but no index starts with `bar`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`include_defaults` (Optional, boolean)*: If `true`, return all default settings in the response.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only. If
+`false`, information is retrieved from the master node.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is
+received before the timeout expires, the request fails and returns an
+error.
+
+[discrete]
+==== get_template
+Get index templates.
+Retrieves information about one or more index templates.
+
+{ref}/indices-get-template-v1.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.getTemplate({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string | string[])*: List of index template names used to limit the request.
+Wildcard (`*`) expressions are supported.
+To return all index templates, omit this parameter or use a value of `_all` or `*`.
+** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== migrate_to_data_stream
+Convert an index alias to a data stream.
+Converts an index alias to a data stream.
+You must have a matching index template that is data stream enabled.
+The alias must meet the following criteria:
+The alias must have a write index;
+All indices for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` field type;
+The alias must not have any filters;
+The alias must not use custom routing.
+If successful, the request removes the alias and creates a data stream with the same name.
+The indices for the alias become hidden backing indices for the stream.
+The write index for the alias becomes the write index for the stream.
+
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.migrateToDataStream({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: Name of the index alias to convert to a data stream.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== modify_data_stream
+Update data streams.
+Performs one or more data stream modification actions in a single atomic operation.
+
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.modifyDataStream({ actions })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`actions` ({ add_backing_index, remove_backing_index }[])*: Actions to perform.
+
+[discrete]
+==== open
+Opens a closed index.
+For data streams, the API opens any closed backing indices.
+
+{ref}/indices-open-close.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.open({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+By default, you must explicitly name the indices you using to limit the request.
+To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false.
+You can update this setting in the `elasticsearch.yml` file or using the cluster update settings API.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== promote_data_stream
+Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
+
+{ref}/data-streams.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.promoteDataStream({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the data stream
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== put_alias
+Create or update an alias.
+Adds a data stream or index to an alias.
+
+{ref}/indices-aliases.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.putAlias({ index, name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: List of data streams or indices to add.
+Supports wildcards (`*`).
+Wildcard patterns that match both data streams and indices return an error.
+** *`name` (string)*: Alias to update.
+If the alias doesn’t exist, the request creates it.
+Index alias names support date math.
+** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Query used to limit documents the alias can access.
+** *`index_routing` (Optional, string)*: Value used to route indexing operations to a specific shard.
+If specified, this overwrites the `routing` value for indexing operations.
+Data stream aliases don’t support this parameter.
+** *`is_write_index` (Optional, boolean)*: If `true`, sets the write index or data stream for the alias.
+If an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.
+If an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.
+Data stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.
+** *`routing` (Optional, string)*: Value used to route indexing and search operations to a specific shard.
+Data stream aliases don’t support this parameter.
+** *`search_routing` (Optional, string)*: Value used to route search operations to a specific shard.
+If specified, this overwrites the `routing` value for search operations.
+Data stream aliases don’t support this parameter.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== put_data_lifecycle
+Update data stream lifecycles.
+Update the data stream lifecycle of the specified data streams.
+
+{ref}/data-streams-put-lifecycle.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.putDataLifecycle({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string | string[])*: List of data streams used to limit the request.
+Supports wildcards (`*`).
+To target all data streams use `*` or `_all`.
+** *`data_retention` (Optional, string | -1 | 0)*: If defined, every document added to this data stream will be stored at least for this time frame.
+Any time after this duration the document could be deleted.
+When empty, every document in this data stream will be stored indefinitely.
+** *`downsampling` (Optional, { rounds })*: If defined, every backing index will execute the configured downsampling configuration after the backing
+index is not the data stream write index anymore.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `hidden`, `open`, `closed`, `none`.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is
+received before the timeout expires, the request fails and returns an
+error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== put_index_template
+Create or update an index template.
+Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
+
+{ref}/indices-put-template.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.putIndexTemplate({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: Index or template name
+** *`index_patterns` (Optional, string | string[])*: Name of the index template to create.
+** *`composed_of` (Optional, string[])*: An ordered list of component template names.
+Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+** *`template` (Optional, { aliases, mappings, settings, lifecycle })*: Template to be applied.
+It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+** *`data_stream` (Optional, { hidden, allow_custom_routing })*: If this object is included, the template is used to create data streams and their backing indices.
+Supports an empty object.
+Data streams require a matching index template with a `data_stream` object.
+** *`priority` (Optional, number)*: Priority to determine index template precedence when a new data stream or index is created.
+The index template with the highest priority is chosen.
+If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
+This number is not automatically generated by Elasticsearch.
+** *`version` (Optional, number)*: Version number used to manage index templates externally.
+This number is not automatically generated by Elasticsearch.
+** *`_meta` (Optional, Record)*: Optional user metadata about the index template.
+May have any contents.
+This map is not automatically generated by Elasticsearch.
+** *`allow_auto_create` (Optional, boolean)*: This setting overrides the value of the `action.auto_create_index` cluster setting.
+If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
+If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+** *`ignore_missing_component_templates` (Optional, string[])*: The configuration option ignore_missing_component_templates can be used when an index template
+references a component template that might not exist
+** *`deprecated` (Optional, boolean)*: Marks this index template as deprecated. When creating or updating a non-deprecated index template
+that uses deprecated components, Elasticsearch will emit a deprecation warning.
+** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing index templates.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`cause` (Optional, string)*: User defined reason for creating/updating the index template
+
+[discrete]
+==== put_mapping
+Update field mappings.
+Adds new fields to an existing data stream or index.
+You can also use this API to change the search settings of existing fields.
+For data streams, these changes are applied to all backing indices by default.
+
+{ref}/indices-put-mapping.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.putMapping({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: A list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
+** *`date_detection` (Optional, boolean)*: Controls whether dynamic date detection is enabled.
+** *`dynamic` (Optional, Enum("strict" | "runtime" | true | false))*: Controls whether new fields are added dynamically.
+** *`dynamic_date_formats` (Optional, string[])*: If date detection is enabled then new string fields are checked
+against 'dynamic_date_formats' and if the value matches then
+a new date field is added instead of string.
+** *`dynamic_templates` (Optional, Record | Record[])*: Specify dynamic templates for the mapping.
+** *`_field_names` (Optional, { enabled })*: Control whether field names are enabled for the index.
+** *`_meta` (Optional, Record)*: A mapping type can have custom meta data associated with it. These are
+not used at all by Elasticsearch, but can be used to store
+application-specific metadata.
+** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
+** *`properties` (Optional, Record)*: Mapping for a field. For new fields, this mapping can include:
+
+- Field name
+- Field data type
+- Mapping parameters
+** *`_routing` (Optional, { required })*: Enable making a routing value required on indexed documents.
+** *`_source` (Optional, { compress, compress_threshold, enabled, excludes, includes, mode })*: Control whether the _source field is enabled on the index.
+** *`runtime` (Optional, Record)*: Mapping of runtime fields for the index.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`write_index_only` (Optional, boolean)*: If `true`, the mappings are applied only to the current write index for the target.
+
+[discrete]
+==== put_settings
+Update index settings.
+Changes dynamic index settings in real time. For data streams, index setting
+changes are applied to all backing indices by default.
+
+{ref}/indices-update-settings.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.putSettings({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit
+the request. Supports wildcards (`*`). To target all data streams and
+indices, omit this parameter or use `*` or `_all`.
+** *`settings` (Optional, { index, mode, routing_path, soft_deletes, sort, number_of_shards, number_of_replicas, number_of_routing_shards, check_on_startup, codec, routing_partition_size, load_fixed_bitset_filters_eagerly, hidden, auto_expand_replicas, merge, search, refresh_interval, max_result_window, max_inner_result_window, max_rescore_window, max_docvalue_fields_search, max_script_fields, max_ngram_diff, max_shingle_diff, blocks, max_refresh_listeners, analyze, highlight, max_terms_count, max_regex_length, routing, gc_deletes, default_pipeline, final_pipeline, lifecycle, provided_name, creation_date, creation_date_string, uuid, version, verified_before_close, format, max_slices_per_scroll, translog, query_string, priority, top_metrics_max_size, analysis, settings, time_series, queries, similarity, mapping, indexing.slowlog, indexing_pressure, store })*
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index
+alias, or `_all` value targets only missing or closed indices. This
+behavior applies even if the request targets other open indices. For
+example, a request targeting `foo*,bar*` returns an error if an index
+starts with `foo` but no index starts with `bar`.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target
+data streams, this argument determines whether wildcard expressions match
+hidden data streams. Supports a list of values, such as
+`open,hidden`.
+** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, returns settings in flat format.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is
+received before the timeout expires, the request fails and returns an
+error.
+** *`preserve_existing` (Optional, boolean)*: If `true`, existing index settings remain unchanged.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the
+ timeout expires, the request fails and returns an error.
+
+[discrete]
+==== put_template
+Create or update an index template.
+Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
+
+{ref}/indices-templates-v1.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.putTemplate({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the template
+** *`aliases` (Optional, Record)*: Aliases for the index.
+** *`index_patterns` (Optional, string | string[])*: Array of wildcard expressions used to match the names
+of indices during creation.
+** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })*: Mapping for fields in the index.
+** *`order` (Optional, number)*: Order in which Elasticsearch applies this template if index
+matches multiple templates.
+
+Templates with lower 'order' values are merged first. Templates with higher
+'order' values are merged later, overriding templates with lower values.
+** *`settings` (Optional, { index, mode, routing_path, soft_deletes, sort, number_of_shards, number_of_replicas, number_of_routing_shards, check_on_startup, codec, routing_partition_size, load_fixed_bitset_filters_eagerly, hidden, auto_expand_replicas, merge, search, refresh_interval, max_result_window, max_inner_result_window, max_rescore_window, max_docvalue_fields_search, max_script_fields, max_ngram_diff, max_shingle_diff, blocks, max_refresh_listeners, analyze, highlight, max_terms_count, max_regex_length, routing, gc_deletes, default_pipeline, final_pipeline, lifecycle, provided_name, creation_date, creation_date_string, uuid, version, verified_before_close, format, max_slices_per_scroll, translog, query_string, priority, top_metrics_max_size, analysis, settings, time_series, queries, similarity, mapping, indexing.slowlog, indexing_pressure, store })*: Configuration options for the index.
+** *`version` (Optional, number)*: Version number used to manage index templates externally. This number
+is not automatically generated by Elasticsearch.
+** *`create` (Optional, boolean)*: If true, this request cannot replace or update existing index templates.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is
+received before the timeout expires, the request fails and returns an error.
+** *`cause` (Optional, string)*
+
+[discrete]
+==== recovery
+Returns information about ongoing and completed shard recoveries for one or more indices.
+For data streams, the API returns information for the stream’s backing indices.
+
+{ref}/indices-recovery.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.recovery({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`active_only` (Optional, boolean)*: If `true`, the response only includes ongoing shard recoveries.
+** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
+
+[discrete]
+==== refresh
+Refresh an index.
+A refresh makes recent operations performed on one or more indices available for search.
+For data streams, the API runs the refresh operation on the stream’s backing indices.
+
+{ref}/indices-refresh.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.refresh({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+
+[discrete]
+==== reload_search_analyzers
+Reloads an index's search analyzers and their resources.
+
+{ref}/indices-reload-analyzers.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.reloadSearchAnalyzers({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string | string[])*: A list of index names to reload analyzers for
+** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
+
+[discrete]
+==== resolve_cluster
+Resolves the specified index expressions to return information about each cluster, including
+the local cluster, if included.
+Multiple patterns and remote clusters are supported.
+
+{ref}/indices-resolve-cluster-api.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.resolveCluster({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string | string[])*: Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.
+Resources on remote clusters can be specified using the ``:`` syntax.
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing
+or closed indices. This behavior applies even if the request targets other open indices. For example, a request
+targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded or aliased indices are ignored when frozen. Defaults to false.
+** *`ignore_unavailable` (Optional, boolean)*: If false, the request returns an error if it targets a missing or closed index. Defaults to false.
+
+[discrete]
+==== resolve_index
+Resolve indices.
+Resolve the names and/or index patterns for indices, aliases, and data streams.
+Multiple patterns and remote clusters are supported.
+
+{ref}/indices-resolve-index-api.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.resolveIndex({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string | string[])*: Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.
+Resources on remote clusters can be specified using the ``:`` syntax.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
+
+[discrete]
+==== rollover
+Roll over to a new index.
+Creates a new index for a data stream or index alias.
+
+{ref}/indices-rollover-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.rollover({ alias })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`alias` (string)*: Name of the data stream or index alias to roll over.
+** *`new_index` (Optional, string)*: Name of the index to create.
+Supports date math.
+Data streams do not support this parameter.
+** *`aliases` (Optional, Record)*: Aliases for the target index.
+Data streams do not support this parameter.
+** *`conditions` (Optional, { min_age, max_age, max_age_millis, min_docs, max_docs, max_size, max_size_bytes, min_size, min_size_bytes, max_primary_shard_size, max_primary_shard_size_bytes, min_primary_shard_size, min_primary_shard_size_bytes, max_primary_shard_docs, min_primary_shard_docs })*: Conditions for the rollover.
+If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions.
+If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
+If conditions are specified, at least one of them must be a `max_*` condition.
+The index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.
+** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })*: Mapping for fields in the index.
+If specified, this mapping can include field names, field data types, and mapping paramaters.
+** *`settings` (Optional, Record)*: Configuration options for the index.
+Data streams do not support this parameter.
+** *`dry_run` (Optional, boolean)*: If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== segments
+Returns low-level information about the Lucene segments in index shards.
+For data streams, the API returns information about the stream’s backing indices.
+
+{ref}/indices-segments.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.segments({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+Supports wildcards (`*`).
+To target all data streams and indices, omit this parameter or use `*` or `_all`.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`verbose` (Optional, boolean)*: If `true`, the request returns a verbose response.
+
+[discrete]
+==== shard_stores
+Retrieves store information about replica shards in one or more indices.
+For data streams, the API retrieves store information for the stream’s backing indices.
+
+{ref}/indices-shards-stores.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.shardStores({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request.
+** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all
+value targets only missing or closed indices. This behavior applies even if the request
+targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams,
+this argument determines whether wildcard expressions match hidden data streams.
+** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response.
+** *`status` (Optional, Enum("green" | "yellow" | "red" | "all") | Enum("green" | "yellow" | "red" | "all")[])*: List of shard health statuses used to limit the request.
+
+[discrete]
+==== shrink
+Shrinks an existing index into a new index with fewer primary shards.
+
+{ref}/indices-shrink-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.shrink({ index, target })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Name of the source index to shrink.
+** *`target` (string)*: Name of the target index to create.
+** *`aliases` (Optional, Record)*: The key is the alias name.
+Index alias names support date math.
+** *`settings` (Optional, Record)*: Configuration options for the target index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== simulate_index_template
+Simulate an index.
+Returns the index configuration that would be applied to the specified index from an existing index template.
+
+{ref}/indices-simulate-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.simulateIndexTemplate({ name })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: Name of the index to simulate
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
+
+[discrete]
+==== simulate_template
+Simulate an index template.
+Returns the index configuration that would be applied by a particular index template.
+
+{ref}/indices-simulate-template.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.simulateTemplate({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (Optional, string)*: Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
+this parameter and specify the template configuration in the request body.
+** *`allow_auto_create` (Optional, boolean)*: This setting overrides the value of the `action.auto_create_index` cluster setting.
+If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
+If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+** *`index_patterns` (Optional, string | string[])*: Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.
+** *`composed_of` (Optional, string[])*: An ordered list of component template names.
+Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+** *`template` (Optional, { aliases, mappings, settings, lifecycle })*: Template to be applied.
+It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+** *`data_stream` (Optional, { hidden, allow_custom_routing })*: If this object is included, the template is used to create data streams and their backing indices.
+Supports an empty object.
+Data streams require a matching index template with a `data_stream` object.
+** *`priority` (Optional, number)*: Priority to determine index template precedence when a new data stream or index is created.
+The index template with the highest priority is chosen.
+If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
+This number is not automatically generated by Elasticsearch.
+** *`version` (Optional, number)*: Version number used to manage index templates externally.
+This number is not automatically generated by Elasticsearch.
+** *`_meta` (Optional, Record)*: Optional user metadata about the index template.
+May have any contents.
+This map is not automatically generated by Elasticsearch.
+** *`ignore_missing_component_templates` (Optional, string[])*: The configuration option ignore_missing_component_templates can be used when an index template
+references a component template that might not exist
+** *`deprecated` (Optional, boolean)*: Marks this index template as deprecated. When creating or updating a non-deprecated index template
+that uses deprecated components, Elasticsearch will emit a deprecation warning.
+** *`create` (Optional, boolean)*: If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
+
+[discrete]
+==== split
+Splits an existing index into a new index with more primary shards.
+
+{ref}/indices-split-index.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.split({ index, target })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Name of the source index to split.
+** *`target` (string)*: Name of the target index to create.
+** *`aliases` (Optional, Record)*: Aliases for the resulting index.
+** *`settings` (Optional, Record)*: Configuration options for the target index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== stats
+Returns statistics for one or more indices.
+For data streams, the API retrieves statistics for the stream’s backing indices.
+
+{ref}/indices-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.stats({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`metric` (Optional, string | string[])*: Limit the information returned the specific metrics.
+** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices
+** *`completion_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata and suggest statistics.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument
+determines whether wildcard expressions match hidden data streams. Supports a list of values,
+such as `open,hidden`.
+** *`fielddata_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata statistics.
+** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics.
+** *`forbid_closed_indices` (Optional, boolean)*: If true, statistics are not collected from closed indices.
+** *`groups` (Optional, string | string[])*: List of search groups to include in the search statistics.
+** *`include_segment_file_sizes` (Optional, boolean)*: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).
+** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory.
+** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Indicates whether statistics are aggregated at the cluster, index, or shard level.
+
+[discrete]
+==== unfreeze
+Unfreezes an index.
+
+{ref}/unfreeze-index-api.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.unfreeze({ index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (string)*: Identifier for the index.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_active_shards` (Optional, string)*: The number of shard copies that must be active before proceeding with the operation.
+Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
+
+[discrete]
+==== update_aliases
+Create or update an alias.
+Adds a data stream or index to an alias.
+
+{ref}/indices-aliases.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.updateAliases({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`actions` (Optional, { add_backing_index, remove_backing_index }[])*: Actions to perform.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== validate_query
+Validate a query.
+Validates a query without running it.
+
+{ref}/search-validate.html[Endpoint documentation]
+[source,ts]
+----
+client.indices.validateQuery({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search.
+Supports wildcards (`*`).
+To search all data streams or indices, omit this parameter or use `*` or `_all`.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Query in the Lucene query string syntax.
+** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
+This behavior applies even if the request targets other open indices.
+** *`all_shards` (Optional, boolean)*: If `true`, the validation is executed on all shards instead of one random shard per index.
+** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`analyze_wildcard` (Optional, boolean)*: If `true`, wildcard and prefix queries are analyzed.
+** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: `AND` or `OR`.
+** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
+This parameter can only be used when the `q` query string parameter is specified.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
+If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
+Supports a list of values, such as `open,hidden`.
+Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
+** *`explain` (Optional, boolean)*: If `true`, the response returns detailed information if an error has occurred.
+** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
+** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+** *`rewrite` (Optional, boolean)*: If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed.
+** *`q` (Optional, string)*: Query in the Lucene query string syntax.
-|`body`
-|`object` - The template definition
+[discrete]
+=== inference
+[discrete]
+==== delete
+Delete an inference endpoint
-|===
-=== indices.recovery
-[source,js]
+{ref}/delete-inference-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.recovery([params] [, options] [, callback])
+client.inference.delete({ inference_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`detailed`
-|`boolean` - Whether to display detailed information about shard recovery
+[discrete]
+==== Arguments
-|`active_only` or `activeOnly`
-|`boolean` - Display only those recoveries that are currently on-going
+* *Request (object):*
+** *`inference_id` (string)*: The inference Id
+** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
+** *`dry_run` (Optional, boolean)*: When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned
+** *`force` (Optional, boolean)*: When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields
-|===
-=== indices.refresh
-[source,js]
+[discrete]
+==== get
+Get an inference endpoint
+
+{ref}/get-inference-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.refresh([params] [, options] [, callback])
+client.inference.get({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
+** *`inference_id` (Optional, string)*: The inference Id
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== inference
+Perform inference on the service
-|===
-=== indices.rollover
-[source,js]
+{ref}/post-inference-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.rollover([params] [, options] [, callback])
+client.inference.inference({ inference_id, input })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
-[cols=2*]
-|===
-|`alias`
-|`string` - The name of the alias to rollover
-
-|`new_index` or `newIndex`
-|`string` - The name of the rollover index
-|`include_type_name` or `includeTypeName`
-|`boolean` - Whether a type should be included in the body of the mappings.
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`inference_id` (string)*: The inference Id
+** *`input` (string | string[])*: Inference input.
+Either a string or an array of strings.
+** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
+** *`query` (Optional, string)*: Query input, required for rerank task.
+Not required for other tasks.
+** *`task_settings` (Optional, User-defined value)*: Optional task settings
+** *`timeout` (Optional, string | -1 | 0)*: Specifies the amount of time to wait for the inference request to complete.
-|`dry_run` or `dryRun`
-|`boolean` - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
+[discrete]
+==== put
+Create an inference endpoint
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+{ref}/put-inference-api.html[Endpoint documentation]
+[source,ts]
+----
+client.inference.put({ inference_id })
+----
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Set the number of active shards to wait for on the newly created rollover index before the operation returns.
+[discrete]
+==== Arguments
-|`body`
-|`object` - The conditions that needs to be met for executing rollover
+* *Request (object):*
+** *`inference_id` (string)*: The inference Id
+** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
+** *`inference_config` (Optional, { service, service_settings, task_settings })*
-|===
-=== indices.segments
-[source,js]
+[discrete]
+==== stream_inference
+Perform streaming inference
+[source,ts]
----
-client.indices.segments([params] [, options] [, callback])
+client.inference.streamInference()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
-
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
-|`verbose`
-|`boolean` - Includes detailed memory usage by Lucene.
+[discrete]
+=== ingest
+[discrete]
+==== delete_geoip_database
+Delete GeoIP database configurations.
+Delete one or more IP geolocation database configurations.
-|===
-=== indices.shardStores
-[source,js]
+{ref}/delete-geoip-database-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.shardStores([params] [, options] [, callback])
+client.ingest.deleteGeoipDatabase({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`status`
-|`string, string[]` - A comma-separated list of statuses used to filter on shards to get store information for
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+* *Request (object):*
+** *`id` (string | string[])*: A list of geoip database configurations to delete
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== delete_ip_location_database
+Deletes an ip location database configuration
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
-
-|===
-=== indices.shrink
-[source,js]
+{ref}/delete-ip-location-database-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.shrink([params] [, options] [, callback])
+client.ingest.deleteIpLocationDatabase()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the source index to shrink
-|`target`
-|`string` - The name of the target index to shrink into
-|`copy_settings` or `copySettings`
-|`boolean` - whether or not to copy settings from the source index (defaults to false)
+[discrete]
+==== delete_pipeline
+Delete pipelines.
+Delete one or more ingest pipelines.
-|`timeout`
-|`string` - Explicit operation timeout
+{ref}/delete-pipeline-api.html[Endpoint documentation]
+[source,ts]
+----
+client.ingest.deletePipeline({ id })
+----
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== Arguments
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Set the number of active shards to wait for on the shrunken index before the operation returns.
+* *Request (object):*
+** *`id` (string)*: Pipeline ID or wildcard expression of pipeline IDs used to limit the request.
+To delete all ingest pipelines in a cluster, use a value of `*`.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`body`
-|`object` - The configuration for the target index (`settings` and `aliases`)
+[discrete]
+==== geo_ip_stats
+Get GeoIP statistics.
+Get download statistics for GeoIP2 databases that are used with the GeoIP processor.
-|===
-=== indices.split
-[source,js]
+{ref}/geoip-processor.html[Endpoint documentation]
+[source,ts]
----
-client.indices.split([params] [, options] [, callback])
+client.ingest.geoIpStats()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the source index to split
-|`target`
-|`string` - The name of the target index to split into
-|`copy_settings` or `copySettings`
-|`boolean` - whether or not to copy settings from the source index (defaults to false)
+[discrete]
+==== get_geoip_database
+Get GeoIP database configurations.
+Get information about one or more IP geolocation database configurations.
-|`timeout`
-|`string` - Explicit operation timeout
+{ref}/get-geoip-database-api.html[Endpoint documentation]
+[source,ts]
+----
+client.ingest.getGeoipDatabase({ ... })
+----
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== Arguments
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Set the number of active shards to wait for on the shrunken index before the operation returns.
+* *Request (object):*
+** *`id` (Optional, string | string[])*: List of database configuration IDs to retrieve.
+Wildcard (`*`) expressions are supported.
+To get all database configurations, omit this parameter or use `*`.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`body`
-|`object` - The configuration for the target index (`settings` and `aliases`)
+[discrete]
+==== get_ip_location_database
+Returns the specified ip location database configuration
-|===
-=== indices.stats
-[source,js]
+{ref}/get-ip-location-database-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.stats([params] [, options] [, callback])
+client.ingest.getIpLocationDatabase()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-
-|`metric`
-|`string, string[]` - Limit the information returned the specific metrics.
-|`completion_fields` or `completionFields`
-|`string, string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
-|`fielddata_fields` or `fielddataFields`
-|`string, string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
+[discrete]
+==== get_pipeline
+Get pipelines.
+Get information about one or more ingest pipelines.
+This API returns a local reference of the pipeline.
-|`fields`
-|`string, string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
-
-|`groups`
-|`string, string[]` - A comma-separated list of search groups for `search` index metric
+{ref}/get-pipeline-api.html[Endpoint documentation]
+[source,ts]
+----
+client.ingest.getPipeline({ ... })
+----
-|`level`
-|`'cluster', 'indices', 'shards'` - Return stats aggregated at cluster, index or shard level +
- _Default:_ `indices`
+[discrete]
+==== Arguments
-|`types`
-|`string, string[]` - A comma-separated list of document types for the `indexing` index metric
+* *Request (object):*
+** *`id` (Optional, string)*: List of pipeline IDs to retrieve.
+Wildcard (`*`) expressions are supported.
+To get all ingest pipelines, omit this parameter or use `*`.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`summary` (Optional, boolean)*: Return pipelines without their definitions (default: false)
-|`include_segment_file_sizes` or `includeSegmentFileSizes`
-|`boolean` - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
+[discrete]
+==== processor_grok
+Run a grok processor.
+Extract structured fields out of a single text field within a document.
+You must choose which field to extract matched fields from, as well as the grok pattern you expect will match.
+A grok pattern is like a regular expression that supports aliased expressions that can be reused.
-|===
-=== indices.updateAliases
-[source,js]
+{ref}/grok-processor.html[Endpoint documentation]
+[source,ts]
----
-client.indices.updateAliases([params] [, options] [, callback])
+client.ingest.processorGrok()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
-[cols=2*]
-|===
-|`timeout`
-|`string` - Request timeout
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
-|`body`
-|`object` - The definition of `actions` to perform
+[discrete]
+==== put_geoip_database
+Create or update GeoIP database configurations.
+Create or update IP geolocation database configurations.
-|===
-=== indices.upgrade
-[source,js]
+{ref}/put-geoip-database-api.html[Endpoint documentation]
+[source,ts]
----
-client.indices.upgrade([params] [, options] [, callback])
+client.ingest.putGeoipDatabase({ id, name, maxmind })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: ID of the database configuration to create or update.
+** *`name` (string)*: The provider-assigned name of the IP geolocation database to download.
+** *`maxmind` ({ account_id })*: The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading.
+At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== put_ip_location_database
+Puts the configuration for a ip location database to be downloaded
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/put-ip-location-database-api.html[Endpoint documentation]
+[source,ts]
+----
+client.ingest.putIpLocationDatabase()
+----
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Specify whether the request should block until the all segments are upgraded (default: false)
-|`only_ancient_segments` or `onlyAncientSegments`
-|`boolean` - If true, only ancient (an older Lucene major release) segments will be upgraded
+[discrete]
+==== put_pipeline
+Create or update a pipeline.
+Changes made using this API take effect immediately.
-|===
-=== indices.validateQuery
-[source,js]
+{ref}/ingest.html[Endpoint documentation]
+[source,ts]
----
-client.indices.validateQuery([params] [, options] [, callback])
+client.ingest.putPipeline({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
+[discrete]
+==== Arguments
-|`explain`
-|`boolean` - Return detailed information about the error
+* *Request (object):*
+** *`id` (string)*: ID of the ingest pipeline to create or update.
+** *`_meta` (Optional, Record)*: Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch.
+** *`description` (Optional, string)*: Description of the ingest pipeline.
+** *`on_failure` (Optional, { append, attachment, bytes, circle, community_id, convert, csv, date, date_index_name, dissect, dot_expander, drop, enrich, fail, fingerprint, foreach, ip_location, geo_grid, geoip, grok, gsub, html_strip, inference, join, json, kv, lowercase, network_direction, pipeline, redact, registered_domain, remove, rename, reroute, script, set, set_security_user, sort, split, terminate, trim, uppercase, urldecode, uri_parts, user_agent }[])*: Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors.
+** *`processors` (Optional, { append, attachment, bytes, circle, community_id, convert, csv, date, date_index_name, dissect, dot_expander, drop, enrich, fail, fingerprint, foreach, ip_location, geo_grid, geoip, grok, gsub, html_strip, inference, join, json, kv, lowercase, network_direction, pipeline, redact, registered_domain, remove, rename, reroute, script, set, set_security_user, sort, split, terminate, trim, uppercase, urldecode, uri_parts, user_agent }[])*: Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.
+** *`version` (Optional, number)*: Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers.
+** *`deprecated` (Optional, boolean)*: Marks this ingest pipeline as deprecated.
+When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+** *`if_version` (Optional, number)*: Required version for optimistic concurrency control for pipeline updates
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== simulate
+Simulate a pipeline.
+Run an ingest pipeline against a set of provided documents.
+You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/simulate-pipeline-api.html[Endpoint documentation]
+[source,ts]
+----
+client.ingest.simulate({ docs })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== Arguments
-|`q`
-|`string` - Query in the Lucene query string syntax
+* *Request (object):*
+** *`docs` ({ _id, _index, _source }[])*: Sample documents to test in the pipeline.
+** *`id` (Optional, string)*: Pipeline to test.
+If you don’t specify a `pipeline` in the request body, this parameter is required.
+** *`pipeline` (Optional, { description, on_failure, processors, version, deprecated, _meta })*: Pipeline to test.
+If you don’t specify the `pipeline` request path parameter, this parameter is required.
+If you specify both this and the request path parameter, the API only uses the request path parameter.
+** *`verbose` (Optional, boolean)*: If `true`, the response includes output data for each processor in the executed pipeline.
-|`analyzer`
-|`string` - The analyzer to use for the query string
+[discrete]
+=== license
+[discrete]
+==== delete
+Deletes licensing information for the cluster
-|`analyze_wildcard` or `analyzeWildcard`
-|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)
+{ref}/delete-license.html[Endpoint documentation]
+[source,ts]
+----
+client.license.delete()
+----
-|`default_operator` or `defaultOperator`
-|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
- _Default:_ `OR`
-|`df`
-|`string` - The field to use as default where no field prefix is given in the query string
+[discrete]
+==== get
+Get license information.
+Returns information about your Elastic license, including its type, its status, when it was issued, and when it expires.
+For more information about the different types of licenses, refer to [Elastic Stack subscriptions](https://www.elastic.co/subscriptions).
-|`lenient`
-|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+{ref}/get-license.html[Endpoint documentation]
+[source,ts]
+----
+client.license.get({ ... })
+----
-|`rewrite`
-|`boolean` - Provide a more detailed explanation showing the actual Lucene query that will be executed.
+[discrete]
+==== Arguments
-|`all_shards` or `allShards`
-|`boolean` - Execute validation on all shards instead of one random shard per index
+* *Request (object):*
+** *`accept_enterprise` (Optional, boolean)*: If `true`, this parameter returns enterprise for Enterprise license types. If `false`, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility.
+This parameter is deprecated and will always be set to true in 8.x.
+** *`local` (Optional, boolean)*: Specifies whether to retrieve local information. The default value is `false`, which means the information is retrieved from the master node.
-|`body`
-|`object` - The query definition specified with the Query DSL
+[discrete]
+==== get_basic_status
+Retrieves information about the status of the basic license.
-|===
-=== info
-[source,js]
-----
-client.info([params] [, options] [, callback])
+{ref}/get-basic-status.html[Endpoint documentation]
+[source,ts]
----
-http://www.elastic.co/guide/
-[cols=2*]
-|===
-|===
-=== ingest.deletePipeline
-[source,js]
+client.license.getBasicStatus()
----
-client.ingest.deletePipeline([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html
-[cols=2*]
-|===
-|`id`
-|`string` - Pipeline ID
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== get_trial_status
+Retrieves information about the status of the trial license.
-|===
-=== ingest.getPipeline
-[source,js]
+{ref}/get-trial-status.html[Endpoint documentation]
+[source,ts]
----
-client.ingest.getPipeline([params] [, options] [, callback])
+client.license.getTrialStatus()
----
-https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html
-[cols=2*]
-|===
-|`id`
-|`string` - Comma separated list of pipeline ids. Wildcards supported
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
-|===
-=== ingest.processorGrok
-[source,js]
-----
-client.ingest.processorGrok([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html
-[cols=2*]
-|===
-|===
-=== ingest.putPipeline
-[source,js]
+[discrete]
+==== post
+Updates the license for the cluster.
+
+{ref}/update-license.html[Endpoint documentation]
+[source,ts]
----
-client.ingest.putPipeline([params] [, options] [, callback])
+client.license.post({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html
-[cols=2*]
-|===
-|`id`
-|`string` - Pipeline ID
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`license` (Optional, { expiry_date_in_millis, issue_date_in_millis, start_date_in_millis, issued_to, issuer, max_nodes, max_resource_units, signature, type, uid })*
+** *`licenses` (Optional, { expiry_date_in_millis, issue_date_in_millis, start_date_in_millis, issued_to, issuer, max_nodes, max_resource_units, signature, type, uid }[])*: A sequence of one or more JSON documents containing the license information.
+** *`acknowledge` (Optional, boolean)*: Specifies whether you acknowledge the license changes.
-|`body`
-|`object` - The ingest definition
+[discrete]
+==== post_start_basic
+The start basic API enables you to initiate an indefinite basic license, which gives access to all the basic features. If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true.
+To check the status of your basic license, use the following API: [Get basic status](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html).
-|===
-=== ingest.simulate
-[source,js]
+{ref}/start-basic.html[Endpoint documentation]
+[source,ts]
----
-client.ingest.simulate([params] [, options] [, callback])
+client.license.postStartBasic({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html
-[cols=2*]
-|===
-|`id`
-|`string` - Pipeline ID
-|`verbose`
-|`boolean` - Verbose mode. Display data output for each processor in executed pipeline
+[discrete]
+==== Arguments
-|`body`
-|`object` - The simulate definition
+* *Request (object):*
+** *`acknowledge` (Optional, boolean)*: whether the user has acknowledged acknowledge messages (default: false)
-|===
-=== mget
-[source,js]
+[discrete]
+==== post_start_trial
+The start trial API enables you to start a 30-day trial, which gives access to all subscription features.
+
+{ref}/start-trial.html[Endpoint documentation]
+[source,ts]
----
-client.mget([params] [, options] [, callback])
+client.license.postStartTrial({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index
-|`type`
-|`string` - The type of the document
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`acknowledge` (Optional, boolean)*: whether the user has acknowledged acknowledge messages (default: false)
+** *`type_query_string` (Optional, string)*
-|`stored_fields` or `storedFields`
-|`string, string[]` - A comma-separated list of stored fields to return in the response
+[discrete]
+=== logstash
+[discrete]
+==== delete_pipeline
+Deletes a pipeline used for Logstash Central Management.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+{ref}/logstash-api-delete-pipeline.html[Endpoint documentation]
+[source,ts]
+----
+client.logstash.deletePipeline({ id })
+----
-|`realtime`
-|`boolean` - Specify whether to perform the operation in realtime or search mode
+[discrete]
+==== Arguments
-|`refresh`
-|`boolean` - Refresh the shard containing the document before performing the operation
+* *Request (object):*
+** *`id` (string)*: Identifier for the pipeline.
-|`routing`
-|`string` - Specific routing value
+[discrete]
+==== get_pipeline
+Retrieves pipelines used for Logstash Central Management.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+{ref}/logstash-api-get-pipeline.html[Endpoint documentation]
+[source,ts]
+----
+client.logstash.getPipeline({ ... })
+----
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`id` (Optional, string | string[])*: List of pipeline identifiers.
-|`body`
-|`object` - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.
+[discrete]
+==== put_pipeline
+Creates or updates a pipeline used for Logstash Central Management.
-|===
-=== msearch
-[source,js]
+{ref}/logstash-api-put-pipeline.html[Endpoint documentation]
+[source,ts]
----
-client.msearch([params] [, options] [, callback])
+client.logstash.putPipeline({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to use as default
-
-|`type`
-|`string, string[]` - A comma-separated list of document types to use as default
-|`search_type` or `searchType`
-|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type
+[discrete]
+==== Arguments
-|`max_concurrent_searches` or `maxConcurrentSearches`
-|`number` - Controls the maximum number of concurrent searches the multi search api will execute
+* *Request (object):*
+** *`id` (string)*: Identifier for the pipeline.
+** *`pipeline` (Optional, { description, on_failure, processors, version, deprecated, _meta })*
-|`typed_keys` or `typedKeys`
-|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+[discrete]
+=== migration
+[discrete]
+==== deprecations
+Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.
-|`pre_filter_shard_size` or `preFilterShardSize`
-|`number` - 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. +
- _Default:_ `128`
-
-|`max_concurrent_shard_requests` or `maxConcurrentShardRequests`
-|`number` - 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 +
- _Default:_ `The default grows with the number of nodes in the cluster but is at most 256.`
+{ref}/migration-api-deprecation.html[Endpoint documentation]
+[source,ts]
+----
+client.migration.deprecations({ ... })
+----
-|`rest_total_hits_as_int` or `restTotalHitsAsInt`
-|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+[discrete]
+==== Arguments
-|`ccs_minimize_roundtrips` or `ccsMinimizeRoundtrips`
-|`boolean` - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +
- _Default:_ `true`
+* *Request (object):*
+** *`index` (Optional, string)*: Comma-separate list of data streams or indices to check. Wildcard (*) expressions are supported.
-|`body`
-|`object` - The request definitions (metadata-search request definition pairs), separated by newlines
+[discrete]
+==== get_feature_upgrade_status
+Find out whether system features need to be upgraded or not
-|===
-=== msearchTemplate
-[source,js]
+{ref}/migration-api-feature-upgrade.html[Endpoint documentation]
+[source,ts]
----
-client.msearchTemplate([params] [, options] [, callback])
+client.migration.getFeatureUpgradeStatus()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to use as default
-|`type`
-|`string, string[]` - A comma-separated list of document types to use as default
-|`search_type` or `searchType`
-|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type
+[discrete]
+==== post_feature_upgrade
+Begin upgrades for system features
-|`typed_keys` or `typedKeys`
-|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
-
-|`max_concurrent_searches` or `maxConcurrentSearches`
-|`number` - Controls the maximum number of concurrent searches the multi search api will execute
-
-|`rest_total_hits_as_int` or `restTotalHitsAsInt`
-|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+{ref}/migration-api-feature-upgrade.html[Endpoint documentation]
+[source,ts]
+----
+client.migration.postFeatureUpgrade()
+----
-|`ccs_minimize_roundtrips` or `ccsMinimizeRoundtrips`
-|`boolean` - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +
- _Default:_ `true`
-|`body`
-|`object` - The request definitions (metadata-search request definition pairs), separated by newlines
+[discrete]
+=== ml
+[discrete]
+==== clear_trained_model_deployment_cache
+Clear trained model deployment cache.
+Cache will be cleared on all nodes where the trained model is assigned.
+A trained model deployment may have an inference cache enabled.
+As requests are handled by each allocated node, their responses may be cached on that individual node.
+Calling this API clears the caches without restarting the deployment.
-|===
-=== mtermvectors
-[source,js]
+{ref}/clear-trained-model-deployment-cache.html[Endpoint documentation]
+[source,ts]
----
-client.mtermvectors([params] [, options] [, callback])
+client.ml.clearTrainedModelDeploymentCache({ model_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
-[cols=2*]
-|===
-|`index`
-|`string` - The index in which the document resides.
-|`type`
-|`string` - The type of the document.
+[discrete]
+==== Arguments
-|`ids`
-|`string, string[]` - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
-|`term_statistics` or `termStatistics`
-|`boolean` - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+[discrete]
+==== close_job
+Close anomaly detection jobs.
+A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
+When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
+If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
+When a datafeed that has a specified end date stops, it automatically closes its associated job.
-|`field_statistics` or `fieldStatistics`
-|`boolean` - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
- _Default:_ `true`
+{ref}/ml-close-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.closeJob({ job_id })
+----
-|`fields`
-|`string, string[]` - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+[discrete]
+==== Arguments
-|`offsets`
-|`boolean` - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
- _Default:_ `true`
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a list of jobs, or a wildcard expression. You can close all jobs by using `_all` or by specifying `*` as the job identifier.
+** *`allow_no_match` (Optional, boolean)*: Refer to the description for the `allow_no_match` query parameter.
+** *`force` (Optional, boolean)*: Refer to the descriptiion for the `force` query parameter.
+** *`timeout` (Optional, string | -1 | 0)*: Refer to the description for the `timeout` query parameter.
-|`positions`
-|`boolean` - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
- _Default:_ `true`
+[discrete]
+==== delete_calendar
+Delete a calendar.
+Removes all scheduled events from a calendar, then deletes it.
-|`payloads`
-|`boolean` - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
- _Default:_ `true`
+{ref}/ml-delete-calendar.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteCalendar({ calendar_id })
+----
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
+[discrete]
+==== Arguments
-|`routing`
-|`string` - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
-|`parent`
-|`string` - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
+[discrete]
+==== delete_calendar_event
+Delete events from a calendar.
-|`realtime`
-|`boolean` - Specifies if requests are real-time as opposed to near-real-time (default: true).
+{ref}/ml-delete-calendar-event.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteCalendarEvent({ calendar_id, event_id })
+----
-|`version`
-|`number` - Explicit version number for concurrency control
+[discrete]
+==== Arguments
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
+** *`event_id` (string)*: Identifier for the scheduled event.
+You can obtain this identifier by using the get calendar events API.
-|`body`
-|`object` - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
+[discrete]
+==== delete_calendar_job
+Delete anomaly jobs from a calendar.
-|===
-=== nodes.hotThreads
-[source,js]
+{ref}/ml-delete-calendar-job.html[Endpoint documentation]
+[source,ts]
----
-client.nodes.hotThreads([params] [, options] [, callback])
+client.ml.deleteCalendarJob({ calendar_id, job_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
-[cols=2*]
-|===
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
-|`interval`
-|`string` - The interval for the second sampling of threads
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
+** *`job_id` (string | string[])*: An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a
+list of jobs or groups.
-|`snapshots`
-|`number` - Number of samples of thread stacktrace (default: 10)
+[discrete]
+==== delete_data_frame_analytics
+Delete a data frame analytics job.
-|`threads`
-|`number` - Specify the number of threads to provide information for (default: 3)
+{ref}/delete-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteDataFrameAnalytics({ id })
+----
-|`ignore_idle_threads` or `ignoreIdleThreads`
-|`boolean` - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
+[discrete]
+==== Arguments
-|`type`
-|`'cpu', 'wait', 'block'` - The type to sample (default: cpu)
+* *Request (object):*
+** *`id` (string)*: Identifier for the data frame analytics job.
+** *`force` (Optional, boolean)*: If `true`, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job.
+** *`timeout` (Optional, string | -1 | 0)*: The time to wait for the job to be deleted.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== delete_datafeed
+Delete a datafeed.
-|===
-=== nodes.info
-[source,js]
+{ref}/ml-delete-datafeed.html[Endpoint documentation]
+[source,ts]
----
-client.nodes.info([params] [, options] [, callback])
+client.ml.deleteDatafeed({ datafeed_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
-[cols=2*]
-|===
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
-|`metric`
-|`string, string[]` - A comma-separated list of metrics you wish returned. Leave empty to return all.
+[discrete]
+==== Arguments
-|`flat_settings` or `flatSettings`
-|`boolean` - Return settings in flat format (default: false)
+* *Request (object):*
+** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. This
+identifier can contain lowercase alphanumeric characters (a-z and 0-9),
+hyphens, and underscores. It must start and end with alphanumeric
+characters.
+** *`force` (Optional, boolean)*: Use to forcefully delete a started datafeed; this method is quicker than
+stopping and deleting the datafeed.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== delete_expired_data
+Delete expired ML data.
+Deletes all job results, model snapshots and forecast data that have exceeded
+their retention days period. Machine learning state documents that are not
+associated with any job are also deleted.
+You can limit the request to a single or set of anomaly detection jobs by
+using a job identifier, a group name, a comma-separated list of jobs, or a
+wildcard expression. You can delete expired data for all anomaly detection
+jobs by using _all, by specifying * as the , or by omitting the
+.
-|===
-=== nodes.reloadSecureSettings
-[source,js]
+{ref}/ml-delete-expired-data.html[Endpoint documentation]
+[source,ts]
----
-client.nodes.reloadSecureSettings([params] [, options] [, callback])
+client.ml.deleteExpiredData({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
-[cols=2*]
-|===
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
-|===
-=== nodes.stats
-[source,js]
-----
-client.nodes.stats([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
-[cols=2*]
-|===
-|`metric`
-|`string, string[]` - Limit the information returned to the specified metrics
+* *Request (object):*
+** *`job_id` (Optional, string)*: Identifier for an anomaly detection job. It can be a job identifier, a
+group name, or a wildcard expression.
+** *`requests_per_second` (Optional, float)*: The desired requests per second for the deletion processes. The default
+behavior is no throttling.
+** *`timeout` (Optional, string | -1 | 0)*: How long can the underlying delete processes run until they are canceled.
-|`index_metric` or `indexMetric`
-|`string, string[]` - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
+[discrete]
+==== delete_filter
+Delete a filter.
+If an anomaly detection job references the filter, you cannot delete the
+filter. You must update or delete the job before you can delete the filter.
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+{ref}/ml-delete-filter.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteFilter({ filter_id })
+----
-|`completion_fields` or `completionFields`
-|`string, string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
+[discrete]
+==== Arguments
-|`fielddata_fields` or `fielddataFields`
-|`string, string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
+* *Request (object):*
+** *`filter_id` (string)*: A string that uniquely identifies a filter.
-|`fields`
-|`string, string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
+[discrete]
+==== delete_forecast
+Delete forecasts from a job.
+By default, forecasts are retained for 14 days. You can specify a
+different retention period with the `expires_in` parameter in the forecast
+jobs API. The delete forecast API enables you to delete one or more
+forecasts before they expire.
-|`groups`
-|`boolean` - A comma-separated list of search groups for `search` index metric
+{ref}/ml-delete-forecast.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteForecast({ job_id })
+----
-|`level`
-|`'indices', 'node', 'shards'` - Return indices stats aggregated at index, node or shard level +
- _Default:_ `node`
+[discrete]
+==== Arguments
-|`types`
-|`string, string[]` - A comma-separated list of document types for the `indexing` index metric
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`forecast_id` (Optional, string)*: A list of forecast identifiers. If you do not specify
+this optional parameter or if you specify `_all` or `*` the API deletes
+all forecasts from the job.
+** *`allow_no_forecasts` (Optional, boolean)*: Specifies whether an error occurs when there are no forecasts. In
+particular, if this parameter is set to `false` and there are no
+forecasts associated with the job, attempts to delete all forecasts
+return an error.
+** *`timeout` (Optional, string | -1 | 0)*: Specifies the period of time to wait for the completion of the delete
+operation. When this period of time elapses, the API fails and returns an
+error.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== delete_job
+Delete an anomaly detection job.
+All job configuration, model state and results are deleted.
+It is not currently possible to delete multiple jobs using wildcards or a
+comma separated list. If you delete a job that has a datafeed, the request
+first tries to delete the datafeed. This behavior is equivalent to calling
+the delete datafeed API with the same timeout and force parameters as the
+delete job request.
-|`include_segment_file_sizes` or `includeSegmentFileSizes`
-|`boolean` - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
+{ref}/ml-delete-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteJob({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`force` (Optional, boolean)*: Use to forcefully delete an opened job; this method is quicker than
+closing and deleting the job.
+** *`delete_user_annotations` (Optional, boolean)*: Specifies whether annotations that have been added by the
+user should be deleted along with any auto-generated annotations when the job is
+reset.
+** *`wait_for_completion` (Optional, boolean)*: Specifies whether the request should return immediately or wait until the
+job deletion completes.
+
+[discrete]
+==== delete_model_snapshot
+Delete a model snapshot.
+You cannot delete the active model snapshot. To delete that snapshot, first
+revert to a different one. To identify the active model snapshot, refer to
+the `model_snapshot_id` in the results from the get jobs API.
-|===
-=== nodes.usage
-[source,js]
+{ref}/ml-delete-snapshot.html[Endpoint documentation]
+[source,ts]
----
-client.nodes.usage([params] [, options] [, callback])
+client.ml.deleteModelSnapshot({ job_id, snapshot_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
-[cols=2*]
-|===
-|`metric`
-|`string, string[]` - Limit the information returned to the specified metrics
-|`node_id` or `nodeId`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`snapshot_id` (string)*: Identifier for the model snapshot.
+
+[discrete]
+==== delete_trained_model
+Delete an unreferenced trained model.
+The request deletes a trained inference model that is not referenced by an ingest pipeline.
-|===
-=== ping
-[source,js]
-----
-client.ping([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/
-[cols=2*]
-|===
-|===
-=== putScript
-[source,js]
+{ref}/delete-trained-models.html[Endpoint documentation]
+[source,ts]
----
-client.putScript([params] [, options] [, callback])
+client.ml.deleteTrainedModel({ model_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
-[cols=2*]
-|===
-|`id`
-|`string` - Script ID
-|`context`
-|`string` - Script context
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
+** *`force` (Optional, boolean)*: Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment.
+
+[discrete]
+==== delete_trained_model_alias
+Delete a trained model alias.
+This API deletes an existing model alias that refers to a trained model. If
+the model alias is missing or refers to a model other than the one identified
+by the `model_id`, this API returns an error.
+
+{ref}/delete-trained-models-aliases.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.deleteTrainedModelAlias({ model_alias, model_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_alias` (string)*: The model alias to delete.
+** *`model_id` (string)*: The trained model ID to which the model alias refers.
+
+[discrete]
+==== estimate_model_memory
+Estimate job model memory usage.
+Makes an estimation of the memory usage for an anomaly detection job model.
+It is based on analysis configuration details for the job and cardinality
+estimates for the fields it references.
+
+{ref}/ml-apis.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.estimateModelMemory({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`analysis_config` (Optional, { bucket_span, categorization_analyzer, categorization_field_name, categorization_filters, detectors, influencers, latency, model_prune_window, multivariate_by_fields, per_partition_categorization, summary_count_field_name })*: For a list of the properties that you can specify in the
+`analysis_config` component of the body of this API.
+** *`max_bucket_cardinality` (Optional, Record)*: Estimates of the highest cardinality in a single bucket that is observed
+for influencer fields over the time period that the job analyzes data.
+To produce a good answer, values must be provided for all influencer
+fields. Providing values for fields that are not listed as `influencers`
+has no effect on the estimation.
+** *`overall_cardinality` (Optional, Record)*: Estimates of the cardinality that is observed for fields over the whole
+time period that the job analyzes data. To produce a good answer, values
+must be provided for fields referenced in the `by_field_name`,
+`over_field_name` and `partition_field_name` of any detectors. Providing
+values for other fields has no effect on the estimation. It can be
+omitted from the request if no detectors have a `by_field_name`,
+`over_field_name` or `partition_field_name`.
+
+[discrete]
+==== evaluate_data_frame
+Evaluate data frame analytics.
+The API packages together commonly used evaluation metrics for various types
+of machine learning features. This has been designed for use on indexes
+created by data frame analytics. Evaluation requires both a ground truth
+field and an analytics result field to be present.
+
+{ref}/evaluate-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.evaluateDataFrame({ evaluation, index })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`evaluation` ({ classification, outlier_detection, regression })*: Defines the type of evaluation you want to perform.
+** *`index` (string)*: Defines the `index` in which the evaluation will be performed.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: A query clause that retrieves a subset of data from the source index.
+
+[discrete]
+==== explain_data_frame_analytics
+Explain data frame analytics config.
+This API provides explanations for a data frame analytics config that either
+exists already or one that has not been created yet. The following
+explanations are provided:
+* which fields are included or not in the analysis and why,
+* how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
+If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
+
+{ref}/explain-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.explainDataFrameAnalytics({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: Identifier for the data frame analytics job. This identifier can contain
+lowercase alphanumeric characters (a-z and 0-9), hyphens, and
+underscores. It must start and end with alphanumeric characters.
+** *`source` (Optional, { index, query, runtime_mappings, _source })*: The configuration of how to source the analysis data. It requires an
+index. Optionally, query and _source may be specified.
+** *`dest` (Optional, { index, results_field })*: The destination configuration, consisting of index and optionally
+results_field (ml by default).
+** *`analysis` (Optional, { classification, outlier_detection, regression })*: The analysis configuration, which contains the information necessary to
+perform one of the following types of analysis: classification, outlier
+detection, or regression.
+** *`description` (Optional, string)*: A description of the job.
+** *`model_memory_limit` (Optional, string)*: The approximate maximum amount of memory resources that are permitted for
+analytical processing. If your `elasticsearch.yml` file contains an
+`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to
+create data frame analytics jobs that have `model_memory_limit` values
+greater than that setting.
+** *`max_num_threads` (Optional, number)*: The maximum number of threads to be used by the analysis. Using more
+threads may decrease the time necessary to complete the analysis at the
+cost of using more CPU. Note that the process may use additional threads
+for operational functionality other than the analysis itself.
+** *`analyzed_fields` (Optional, { includes, excludes })*: Specify includes and/or excludes patterns to select which fields will be
+included in the analysis. The patterns specified in excludes are applied
+last, therefore excludes takes precedence. In other words, if the same
+field is specified in both includes and excludes, then the field will not
+be included in the analysis.
+** *`allow_lazy_start` (Optional, boolean)*: Specifies whether this job can start when there is insufficient machine
+learning node capacity for it to be immediately assigned to a node.
+
+[discrete]
+==== flush_job
+Force buffered data to be processed.
+The flush jobs API is only applicable when sending data for analysis using
+the post data API. Depending on the content of the buffer, then it might
+additionally calculate new results. Both flush and close operations are
+similar, however the flush is more efficient if you are expecting to send
+more data for analysis. When flushing, the job remains open and is available
+to continue analyzing data. A close operation additionally prunes and
+persists the model state to disk and the job must be opened again before
+analyzing further data.
+
+{ref}/ml-flush-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.flushJob({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`advance_time` (Optional, string | Unit)*: Refer to the description for the `advance_time` query parameter.
+** *`calc_interim` (Optional, boolean)*: Refer to the description for the `calc_interim` query parameter.
+** *`end` (Optional, string | Unit)*: Refer to the description for the `end` query parameter.
+** *`skip_time` (Optional, string | Unit)*: Refer to the description for the `skip_time` query parameter.
+** *`start` (Optional, string | Unit)*: Refer to the description for the `start` query parameter.
+
+[discrete]
+==== forecast
+Predict future behavior of a time series.
+
+Forecasts are not supported for jobs that perform population analysis; an
+error occurs if you try to create a forecast for a job that has an
+`over_field_name` in its configuration. Forcasts predict future behavior
+based on historical data.
+
+{ref}/ml-forecast.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.forecast({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job. The job must be open when you
+create a forecast; otherwise, an error occurs.
+** *`duration` (Optional, string | -1 | 0)*: Refer to the description for the `duration` query parameter.
+** *`expires_in` (Optional, string | -1 | 0)*: Refer to the description for the `expires_in` query parameter.
+** *`max_model_memory` (Optional, string)*: Refer to the description for the `max_model_memory` query parameter.
+
+[discrete]
+==== get_buckets
+Get anomaly detection job results for buckets.
+The API presents a chronological view of the records, grouped by bucket.
+
+{ref}/ml-get-bucket.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getBuckets({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`timestamp` (Optional, string | Unit)*: The timestamp of a single bucket result. If you do not specify this
+parameter, the API returns information about all buckets.
+** *`anomaly_score` (Optional, number)*: Refer to the description for the `anomaly_score` query parameter.
+** *`desc` (Optional, boolean)*: Refer to the description for the `desc` query parameter.
+** *`end` (Optional, string | Unit)*: Refer to the description for the `end` query parameter.
+** *`exclude_interim` (Optional, boolean)*: Refer to the description for the `exclude_interim` query parameter.
+** *`expand` (Optional, boolean)*: Refer to the description for the `expand` query parameter.
+** *`page` (Optional, { from, size })*
+** *`sort` (Optional, string)*: Refer to the desription for the `sort` query parameter.
+** *`start` (Optional, string | Unit)*: Refer to the description for the `start` query parameter.
+** *`from` (Optional, number)*: Skips the specified number of buckets.
+** *`size` (Optional, number)*: Specifies the maximum number of buckets to obtain.
+
+[discrete]
+==== get_calendar_events
+Get info about events in calendars.
+
+{ref}/ml-get-calendar-event.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getCalendarEvents({ calendar_id })
+----
+
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar. You can get information for multiple calendars by using a list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.
+** *`end` (Optional, string | Unit)*: Specifies to get events with timestamps earlier than this time.
+** *`from` (Optional, number)*: Skips the specified number of events.
+** *`job_id` (Optional, string)*: Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of `_all` or `*`.
+** *`size` (Optional, number)*: Specifies the maximum number of events to obtain.
+** *`start` (Optional, string | Unit)*: Specifies to get events with timestamps after this time.
-|`context`
-|`string` - Context name to compile script against
+[discrete]
+==== get_calendars
+Get calendar configuration info.
-|`body`
-|`object` - The document
-
-|===
-=== rankEval
-[source,js]
+{ref}/ml-get-calendar.html[Endpoint documentation]
+[source,ts]
----
-client.rankEval([params] [, options] [, callback])
+client.ml.getCalendars({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`calendar_id` (Optional, string)*: A string that uniquely identifies a calendar. You can get information for multiple calendars by using a list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.
+** *`page` (Optional, { from, size })*: This object is supported only when you omit the calendar identifier.
+** *`from` (Optional, number)*: Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.
+** *`size` (Optional, number)*: Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.
+
+[discrete]
+==== get_categories
+Get anomaly detection job results for categories.
+
+{ref}/ml-get-category.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getCategories({ job_id })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== Arguments
-|`body`
-|`object` - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`category_id` (Optional, string)*: Identifier for the category, which is unique in the job. If you specify
+neither the category ID nor the partition_field_value, the API returns
+information about all categories. If you specify only the
+partition_field_value, it returns information about all categories for
+the specified partition.
+** *`page` (Optional, { from, size })*: Configures pagination.
+This parameter has the `from` and `size` properties.
+** *`from` (Optional, number)*: Skips the specified number of categories.
+** *`partition_field_value` (Optional, string)*: Only return categories for the specified partition.
+** *`size` (Optional, number)*: Specifies the maximum number of categories to obtain.
+
+[discrete]
+==== get_data_frame_analytics
+Get data frame analytics job configuration info.
+You can get information for multiple data frame analytics jobs in a single
+API request by using a comma-separated list of data frame analytics jobs or a
+wildcard expression.
+
+{ref}/get-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getDataFrameAnalytics({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: Identifier for the data frame analytics job. If you do not specify this
+option, the API returns information for the first hundred data frame
+analytics jobs.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no data frame analytics
+jobs that match.
+2. Contains the `_all` string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+The default value returns an empty data_frame_analytics array when there
+are no matches and the subset of results when there are partial matches.
+If this parameter is `false`, the request returns a 404 status code when
+there are no matches or only partial matches.
+** *`from` (Optional, number)*: Skips the specified number of data frame analytics jobs.
+** *`size` (Optional, number)*: Specifies the maximum number of data frame analytics jobs to obtain.
+** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on
+retrieval. This allows the configuration to be in an acceptable format to
+be retrieved and then added to another cluster.
+
+[discrete]
+==== get_data_frame_analytics_stats
+Get data frame analytics jobs usage info.
+
+{ref}/get-dfanalytics-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getDataFrameAnalyticsStats({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: Identifier for the data frame analytics job. If you do not specify this
+option, the API returns information for the first hundred data frame
+analytics jobs.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no data frame analytics
+jobs that match.
+2. Contains the `_all` string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+The default value returns an empty data_frame_analytics array when there
+are no matches and the subset of results when there are partial matches.
+If this parameter is `false`, the request returns a 404 status code when
+there are no matches or only partial matches.
+** *`from` (Optional, number)*: Skips the specified number of data frame analytics jobs.
+** *`size` (Optional, number)*: Specifies the maximum number of data frame analytics jobs to obtain.
+** *`verbose` (Optional, boolean)*: Defines whether the stats response should be verbose.
+
+[discrete]
+==== get_datafeed_stats
+Get datafeeds usage info.
+You can get statistics for multiple datafeeds in a single API request by
+using a comma-separated list of datafeeds or a wildcard expression. You can
+get statistics for all datafeeds by using `_all`, by specifying `*` as the
+``, or by omitting the ``. If the datafeed is stopped, the
+only information you receive is the `datafeed_id` and the `state`.
+This API returns a maximum of 10,000 datafeeds.
+
+{ref}/ml-get-datafeed-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getDatafeedStats({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (Optional, string | string[])*: Identifier for the datafeed. It can be a datafeed identifier or a
+wildcard expression. If you do not specify one of these options, the API
+returns information about all datafeeds.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no datafeeds that match.
+2. Contains the `_all` string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+The default value is `true`, which returns an empty `datafeeds` array
+when there are no matches and the subset of results when there are
+partial matches. If this parameter is `false`, the request returns a
+`404` status code when there are no matches or only partial matches.
+
+[discrete]
+==== get_datafeeds
+Get datafeeds configuration info.
+You can get information for multiple datafeeds in a single API request by
+using a comma-separated list of datafeeds or a wildcard expression. You can
+get information for all datafeeds by using `_all`, by specifying `*` as the
+``, or by omitting the ``.
+This API returns a maximum of 10,000 datafeeds.
+
+{ref}/ml-get-datafeed.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getDatafeeds({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (Optional, string | string[])*: Identifier for the datafeed. It can be a datafeed identifier or a
+wildcard expression. If you do not specify one of these options, the API
+returns information about all datafeeds.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no datafeeds that match.
+2. Contains the `_all` string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+The default value is `true`, which returns an empty `datafeeds` array
+when there are no matches and the subset of results when there are
+partial matches. If this parameter is `false`, the request returns a
+`404` status code when there are no matches or only partial matches.
+** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on
+retrieval. This allows the configuration to be in an acceptable format to
+be retrieved and then added to another cluster.
+
+[discrete]
+==== get_filters
+Get filters.
+You can get a single filter or all filters.
+
+{ref}/ml-get-filter.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getFilters({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`filter_id` (Optional, string | string[])*: A string that uniquely identifies a filter.
+** *`from` (Optional, number)*: Skips the specified number of filters.
+** *`size` (Optional, number)*: Specifies the maximum number of filters to obtain.
+
+[discrete]
+==== get_influencers
+Get anomaly detection job results for influencers.
+Influencers are the entities that have contributed to, or are to blame for,
+the anomalies. Influencer results are available only if an
+`influencer_field_name` is specified in the job configuration.
+
+{ref}/ml-get-influencer.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getInfluencers({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`page` (Optional, { from, size })*: Configures pagination.
+This parameter has the `from` and `size` properties.
+** *`desc` (Optional, boolean)*: If true, the results are sorted in descending order.
+** *`end` (Optional, string | Unit)*: Returns influencers with timestamps earlier than this time.
+The default value means it is unset and results are not limited to
+specific timestamps.
+** *`exclude_interim` (Optional, boolean)*: If true, the output excludes interim results. By default, interim results
+are included.
+** *`influencer_score` (Optional, number)*: Returns influencers with anomaly scores greater than or equal to this
+value.
+** *`from` (Optional, number)*: Skips the specified number of influencers.
+** *`size` (Optional, number)*: Specifies the maximum number of influencers to obtain.
+** *`sort` (Optional, string)*: Specifies the sort field for the requested influencers. By default, the
+influencers are sorted by the `influencer_score` value.
+** *`start` (Optional, string | Unit)*: Returns influencers with timestamps after this time. The default value
+means it is unset and results are not limited to specific timestamps.
+
+[discrete]
+==== get_job_stats
+Get anomaly detection jobs usage info.
+
+{ref}/ml-get-job-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getJobStats({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (Optional, string)*: Identifier for the anomaly detection job. It can be a job identifier, a
+group name, a list of jobs, or a wildcard expression. If
+you do not specify one of these options, the API returns information for
+all anomaly detection jobs.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no jobs that match.
+2. Contains the _all string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
-|===
-=== reindex
-[source,js]
-----
-client.reindex([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
-[cols=2*]
-|===
-|`refresh`
-|`boolean` - Should the effected indexes be refreshed?
+If `true`, the API returns an empty `jobs` array when
+there are no matches and the subset of results when there are partial
+matches. If `false`, the API returns a `404` status
+code when there are no matches or only partial matches.
+
+[discrete]
+==== get_jobs
+Get anomaly detection jobs configuration info.
+You can get information for multiple anomaly detection jobs in a single API
+request by using a group name, a comma-separated list of jobs, or a wildcard
+expression. You can get information for all anomaly detection jobs by using
+`_all`, by specifying `*` as the ``, or by omitting the ``.
+
+{ref}/ml-get-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getJobs({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (Optional, string | string[])*: Identifier for the anomaly detection job. It can be a job identifier, a
+group name, or a wildcard expression. If you do not specify one of these
+options, the API returns information for all anomaly detection jobs.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no jobs that match.
+2. Contains the _all string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+The default value is `true`, which returns an empty `jobs` array when
+there are no matches and the subset of results when there are partial
+matches. If this parameter is `false`, the request returns a `404` status
+code when there are no matches or only partial matches.
+** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on
+retrieval. This allows the configuration to be in an acceptable format to
+be retrieved and then added to another cluster.
+
+[discrete]
+==== get_memory_stats
+Get machine learning memory usage info.
+Get information about how machine learning jobs and trained models are using memory,
+on each node, both within the JVM heap, and natively, outside of the JVM.
+
+{ref}/get-ml-memory.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getMemoryStats({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`node_id` (Optional, string)*: The names of particular nodes in the cluster to target. For example, `nodeId1,nodeId2` or
+`ml:true`
+** *`human` (Optional, boolean)*: Specify this query parameter to include the fields with units in the response. Otherwise only
+the `_in_bytes` sizes are returned in the response.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout
+expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request
+fails and returns an error.
+
+[discrete]
+==== get_model_snapshot_upgrade_stats
+Get anomaly detection job model snapshot upgrade usage info.
+
+{ref}/ml-get-job-model-snapshot-upgrade-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getModelSnapshotUpgradeStats({ job_id, snapshot_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`snapshot_id` (string)*: A numerical character string that uniquely identifies the model snapshot. You can get information for multiple
+snapshots by using a list or a wildcard expression. You can get all snapshots by using `_all`,
+by specifying `*` as the snapshot ID, or by omitting the snapshot ID.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+ - Contains wildcard expressions and there are no jobs that match.
+ - Contains the _all string or no identifiers and there are no matches.
+ - Contains wildcard expressions and there are only partial matches.
+
+The default value is true, which returns an empty jobs array when there are no matches and the subset of results
+when there are partial matches. If this parameter is false, the request returns a 404 status code when there are
+no matches or only partial matches.
+
+[discrete]
+==== get_model_snapshots
+Get model snapshots info.
+
+{ref}/ml-get-snapshot.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getModelSnapshots({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`snapshot_id` (Optional, string)*: A numerical character string that uniquely identifies the model snapshot. You can get information for multiple
+snapshots by using a list or a wildcard expression. You can get all snapshots by using `_all`,
+by specifying `*` as the snapshot ID, or by omitting the snapshot ID.
+** *`desc` (Optional, boolean)*: Refer to the description for the `desc` query parameter.
+** *`end` (Optional, string | Unit)*: Refer to the description for the `end` query parameter.
+** *`page` (Optional, { from, size })*
+** *`sort` (Optional, string)*: Refer to the description for the `sort` query parameter.
+** *`start` (Optional, string | Unit)*: Refer to the description for the `start` query parameter.
+** *`from` (Optional, number)*: Skips the specified number of snapshots.
+** *`size` (Optional, number)*: Specifies the maximum number of snapshots to obtain.
+
+[discrete]
+==== get_overall_buckets
+Get overall bucket results.
+
+Retrievs overall bucket results that summarize the bucket results of
+multiple anomaly detection jobs.
+
+The `overall_score` is calculated by combining the scores of all the
+buckets within the overall bucket span. First, the maximum
+`anomaly_score` per anomaly detection job in the overall bucket is
+calculated. Then the `top_n` of those scores are averaged to result in
+the `overall_score`. This means that you can fine-tune the
+`overall_score` so that it is more or less sensitive to the number of
+jobs that detect an anomaly at the same time. For example, if you set
+`top_n` to `1`, the `overall_score` is the maximum bucket score in the
+overall bucket. Alternatively, if you set `top_n` to the number of jobs,
+the `overall_score` is high only when all jobs detect anomalies in that
+overall bucket. If you set the `bucket_span` parameter (to a value
+greater than its default), the `overall_score` is the maximum
+`overall_score` of the overall buckets that have a span equal to the
+jobs' largest bucket span.
+
+{ref}/ml-get-overall-buckets.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getOverallBuckets({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job. It can be a job identifier, a
+group name, a list of jobs or groups, or a wildcard
+expression.
+
+You can summarize the bucket results for all anomaly detection jobs by
+using `_all` or by specifying `*` as the ``.
+** *`allow_no_match` (Optional, boolean)*: Refer to the description for the `allow_no_match` query parameter.
+** *`bucket_span` (Optional, string | -1 | 0)*: Refer to the description for the `bucket_span` query parameter.
+** *`end` (Optional, string | Unit)*: Refer to the description for the `end` query parameter.
+** *`exclude_interim` (Optional, boolean)*: Refer to the description for the `exclude_interim` query parameter.
+** *`overall_score` (Optional, number | string)*: Refer to the description for the `overall_score` query parameter.
+** *`start` (Optional, string | Unit)*: Refer to the description for the `start` query parameter.
+** *`top_n` (Optional, number)*: Refer to the description for the `top_n` query parameter.
+
+[discrete]
+==== get_records
+Get anomaly records for an anomaly detection job.
+Records contain the detailed analytical results. They describe the anomalous
+activity that has been identified in the input data based on the detector
+configuration.
+There can be many anomaly records depending on the characteristics and size
+of the input data. In practice, there are often too many to be able to
+manually process them. The machine learning features therefore perform a
+sophisticated aggregation of the anomaly records into buckets.
+The number of record results depends on the number of anomalies found in each
+bucket, which relates to the number of time series being modeled and the
+number of detectors.
+
+{ref}/ml-get-record.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getRecords({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`desc` (Optional, boolean)*: Refer to the description for the `desc` query parameter.
+** *`end` (Optional, string | Unit)*: Refer to the description for the `end` query parameter.
+** *`exclude_interim` (Optional, boolean)*: Refer to the description for the `exclude_interim` query parameter.
+** *`page` (Optional, { from, size })*
+** *`record_score` (Optional, number)*: Refer to the description for the `record_score` query parameter.
+** *`sort` (Optional, string)*: Refer to the description for the `sort` query parameter.
+** *`start` (Optional, string | Unit)*: Refer to the description for the `start` query parameter.
+** *`from` (Optional, number)*: Skips the specified number of records.
+** *`size` (Optional, number)*: Specifies the maximum number of records to obtain.
+
+[discrete]
+==== get_trained_models
+Get trained model configuration info.
+
+{ref}/get-trained-models.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getTrainedModels({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (Optional, string | string[])*: The unique identifier of the trained model or a model alias.
+
+You can get information for multiple trained models in a single API
+request by using a list of model IDs or a wildcard
+expression.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+- Contains wildcard expressions and there are no models that match.
+- Contains the _all string or no identifiers and there are no matches.
+- Contains wildcard expressions and there are only partial matches.
+
+If true, it returns an empty array when there are no matches and the
+subset of results when there are partial matches.
+** *`decompress_definition` (Optional, boolean)*: Specifies whether the included model definition should be returned as a
+JSON map (true) or in a custom compressed format (false).
+** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on
+retrieval. This allows the configuration to be in an acceptable format to
+be retrieved and then added to another cluster.
+** *`from` (Optional, number)*: Skips the specified number of models.
+** *`include` (Optional, Enum("definition" | "feature_importance_baseline" | "hyperparameters" | "total_feature_importance" | "definition_status"))*: A comma delimited string of optional fields to include in the response
+body.
+** *`size` (Optional, number)*: Specifies the maximum number of models to obtain.
+** *`tags` (Optional, string | string[])*: A comma delimited string of tags. A trained model can have many tags, or
+none. When supplied, only trained models that contain all the supplied
+tags are returned.
-|`timeout`
-|`string` - Time each individual bulk request should wait for shards that are unavailable. +
- _Default:_ `1m`
+[discrete]
+==== get_trained_models_stats
+Get trained models usage info.
+You can get usage information for multiple trained
+models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - 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)
+{ref}/get-trained-models-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.getTrainedModelsStats({ ... })
+----
+
+[discrete]
+==== Arguments
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should the request should block until the reindex is complete. +
- _Default:_ `true`
+* *Request (object):*
+** *`model_id` (Optional, string | string[])*: The unique identifier of the trained model or a model alias. It can be a
+list or a wildcard expression.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
-|`requests_per_second` or `requestsPerSecond`
-|`number` - The throttle to set on this request in sub-requests per second. -1 means no throttle.
+- Contains wildcard expressions and there are no models that match.
+- Contains the _all string or no identifiers and there are no matches.
+- Contains wildcard expressions and there are only partial matches.
-|`slices`
-|`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +
- _Default:_ `1`
+If true, it returns an empty array when there are no matches and the
+subset of results when there are partial matches.
+** *`from` (Optional, number)*: Skips the specified number of models.
+** *`size` (Optional, number)*: Specifies the maximum number of models to obtain.
-|`body`
-|`object` - The search definition using the Query DSL and the prototype for the index request.
+[discrete]
+==== infer_trained_model
+Evaluate a trained model.
-|===
-=== reindexRethrottle
-[source,js]
+{ref}/infer-trained-model.html[Endpoint documentation]
+[source,ts]
----
-client.reindexRethrottle([params] [, options] [, callback])
+client.ml.inferTrainedModel({ model_id, docs })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
-[cols=2*]
-|===
-|`task_id` or `taskId`
-|`string` - The task id to rethrottle
-|`requests_per_second` or `requestsPerSecond`
-|`number` - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
+** *`docs` (Record[])*: An array of objects to pass to the model for inference. The objects should contain a fields matching your
+configured trained model input. Typically, for NLP models, the field name is `text_field`.
+Currently, for NLP models, only a single value is allowed.
+** *`inference_config` (Optional, { regression, classification, text_classification, zero_shot_classification, fill_mask, ner, pass_through, text_embedding, text_expansion, question_answering })*: The inference configuration updates to apply on the API call
+** *`timeout` (Optional, string | -1 | 0)*: Controls the amount of time to wait for inference results.
+
+[discrete]
+==== info
+Return ML defaults and limits.
+Returns defaults and limits used by machine learning.
+This endpoint is designed to be used by a user interface that needs to fully
+understand machine learning configurations where some options are not
+specified, meaning that the defaults should be used. This endpoint may be
+used to find out what those defaults are. It also provides information about
+the maximum size of machine learning jobs that could run in the current
+cluster configuration.
-|===
-=== renderSearchTemplate
-[source,js]
+{ref}/get-ml-info.html[Endpoint documentation]
+[source,ts]
----
-client.renderSearchTemplate([params] [, options] [, callback])
+client.ml.info()
----
-http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
-[cols=2*]
-|===
-|`id`
-|`string` - The id of the stored search template
-|`body`
-|`object` - The search definition template and its params
-|===
-=== scriptsPainlessExecute
-[source,js]
+[discrete]
+==== open_job
+Open anomaly detection jobs.
+An anomaly detection job must be opened to be ready to receive and analyze
+data. It can be opened and closed multiple times throughout its lifecycle.
+When you open a new job, it starts with an empty model.
+When you open an existing job, the most recent model state is automatically
+loaded. The job is ready to resume its analysis from where it left off, once
+new data is received.
+
+{ref}/ml-open-job.html[Endpoint documentation]
+[source,ts]
----
-client.scriptsPainlessExecute([params] [, options] [, callback])
+client.ml.openJob({ job_id })
----
-https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
-[cols=2*]
-|===
-|`body`
-|`object` - The script to execute
-|===
-=== scroll
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`timeout` (Optional, string | -1 | 0)*: Refer to the description for the `timeout` query parameter.
+
+[discrete]
+==== post_calendar_events
+Add scheduled events to the calendar.
+
+{ref}/ml-post-calendar-event.html[Endpoint documentation]
+[source,ts]
----
-client.scroll([params] [, options] [, callback])
+client.ml.postCalendarEvents({ calendar_id, events })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html
-[cols=2*]
-|===
-|`scroll_id` or `scrollId`
-|`string` - The scroll ID
-|`scroll`
-|`string` - Specify how long a consistent view of the index should be maintained for scrolled search
+[discrete]
+==== Arguments
-|`scroll_id` or `scrollId`
-|`string` - The scroll ID for scrolled search
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
+** *`events` ({ calendar_id, event_id, description, end_time, start_time }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format.
-|`rest_total_hits_as_int` or `restTotalHitsAsInt`
-|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+[discrete]
+==== post_data
+Send data to an anomaly detection job for analysis.
-|`body`
-|`object` - The scroll ID if not passed by URL or query parameter.
+IMPORTANT: For each job, data can be accepted from only a single connection at a time.
+It is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.
-|===
-=== search
-[source,js]
+{ref}/ml-post-data.html[Endpoint documentation]
+[source,ts]
----
-client.search([params] [, options] [, callback])
+client.ml.postData({ job_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types
+[discrete]
+==== Arguments
-|`analyzer`
-|`string` - The analyzer to use for the query string
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job. The job must have a state of open to receive and process the data.
+** *`data` (Optional, TData[])*
+** *`reset_end` (Optional, string | Unit)*: Specifies the end of the bucket resetting range.
+** *`reset_start` (Optional, string | Unit)*: Specifies the start of the bucket resetting range.
-|`analyze_wildcard` or `analyzeWildcard`
-|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)
+[discrete]
+==== preview_data_frame_analytics
+Preview features used by data frame analytics.
+Previews the extracted features used by a data frame analytics config.
-|`ccs_minimize_roundtrips` or `ccsMinimizeRoundtrips`
-|`boolean` - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +
- _Default:_ `true`
+{ref}/preview-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.previewDataFrameAnalytics({ ... })
+----
+
+[discrete]
+==== Arguments
-|`default_operator` or `defaultOperator`
-|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
- _Default:_ `OR`
+* *Request (object):*
+** *`id` (Optional, string)*: Identifier for the data frame analytics job.
+** *`config` (Optional, { source, analysis, model_memory_limit, max_num_threads, analyzed_fields })*: A data frame analytics config as described in create data frame analytics
+jobs. Note that `id` and `dest` don’t need to be provided in the context of
+this API.
-|`df`
-|`string` - The field to use as default where no field prefix is given in the query string
+[discrete]
+==== preview_datafeed
+Preview a datafeed.
+This API returns the first "page" of search results from a datafeed.
+You can preview an existing datafeed or provide configuration details for a datafeed
+and anomaly detection job in the API. The preview shows the structure of the data
+that will be passed to the anomaly detection engine.
+IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that
+called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the
+datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.
+You can also use secondary authorization headers to supply the credentials.
-|`explain`
-|`boolean` - Specify whether to return detailed information about score computation as part of a hit
+{ref}/ml-preview-datafeed.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.previewDatafeed({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (Optional, string)*: A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase
+alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric
+characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job
+configuration details in the request body.
+** *`datafeed_config` (Optional, { aggregations, chunking_config, datafeed_id, delayed_data_check_config, frequency, indices, indices_options, job_id, max_empty_searches, query, query_delay, runtime_mappings, script_fields, scroll_size })*: The datafeed definition to preview.
+** *`job_config` (Optional, { allow_lazy_open, analysis_config, analysis_limits, background_persist_interval, custom_settings, daily_model_snapshot_retention_after_days, data_description, datafeed_config, description, groups, job_id, job_type, model_plot_config, model_snapshot_retention_days, renormalization_window_days, results_index_name, results_retention_days })*: The configuration details for the anomaly detection job that is associated with the datafeed. If the
+`datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must
+supply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is
+used. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object.
+** *`start` (Optional, string | Unit)*: The start time from where the datafeed preview should begin
+** *`end` (Optional, string | Unit)*: The end time when the datafeed preview should stop
+
+[discrete]
+==== put_calendar
+Create a calendar.
+
+{ref}/ml-put-calendar.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putCalendar({ calendar_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
+** *`job_ids` (Optional, string[])*: An array of anomaly detection job identifiers.
+** *`description` (Optional, string)*: A description of the calendar.
+
+[discrete]
+==== put_calendar_job
+Add anomaly detection job to calendar.
+
+{ref}/ml-put-calendar-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putCalendarJob({ calendar_id, job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
+** *`job_id` (string | string[])*: An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a list of jobs or groups.
+
+[discrete]
+==== put_data_frame_analytics
+Create a data frame analytics job.
+This API creates a data frame analytics job that performs an analysis on the
+source indices and stores the outcome in a destination index.
+
+{ref}/put-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putDataFrameAnalytics({ id, analysis, dest, source })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain
+lowercase alphanumeric characters (a-z and 0-9), hyphens, and
+underscores. It must start and end with alphanumeric characters.
+** *`analysis` ({ classification, outlier_detection, regression })*: The analysis configuration, which contains the information necessary to
+perform one of the following types of analysis: classification, outlier
+detection, or regression.
+** *`dest` ({ index, results_field })*: The destination configuration.
+** *`source` ({ index, query, runtime_mappings, _source })*: The configuration of how to source the analysis data.
+** *`allow_lazy_start` (Optional, boolean)*: Specifies whether this job can start when there is insufficient machine
+learning node capacity for it to be immediately assigned to a node. If
+set to `false` and a machine learning node with capacity to run the job
+cannot be immediately found, the API returns an error. If set to `true`,
+the API does not return an error; the job waits in the `starting` state
+until sufficient machine learning node capacity is available. This
+behavior is also affected by the cluster-wide
+`xpack.ml.max_lazy_ml_nodes` setting.
+** *`analyzed_fields` (Optional, { includes, excludes })*: Specifies `includes` and/or `excludes` patterns to select which fields
+will be included in the analysis. The patterns specified in `excludes`
+are applied last, therefore `excludes` takes precedence. In other words,
+if the same field is specified in both `includes` and `excludes`, then
+the field will not be included in the analysis. If `analyzed_fields` is
+not set, only the relevant fields will be included. For example, all the
+numeric fields for outlier detection.
+The supported fields vary for each type of analysis. Outlier detection
+requires numeric or `boolean` data to analyze. The algorithms don’t
+support missing values therefore fields that have data types other than
+numeric or boolean are ignored. Documents where included fields contain
+missing values, null values, or an array are also ignored. Therefore the
+`dest` index may contain documents that don’t have an outlier score.
+Regression supports fields that are numeric, `boolean`, `text`,
+`keyword`, and `ip` data types. It is also tolerant of missing values.
+Fields that are supported are included in the analysis, other fields are
+ignored. Documents where included fields contain an array with two or
+more values are also ignored. Documents in the `dest` index that don’t
+contain a results field are not included in the regression analysis.
+Classification supports fields that are numeric, `boolean`, `text`,
+`keyword`, and `ip` data types. It is also tolerant of missing values.
+Fields that are supported are included in the analysis, other fields are
+ignored. Documents where included fields contain an array with two or
+more values are also ignored. Documents in the `dest` index that don’t
+contain a results field are not included in the classification analysis.
+Classification analysis can be improved by mapping ordinal variable
+values to a single number. For example, in case of age ranges, you can
+model the values as `0-14 = 0`, `15-24 = 1`, `25-34 = 2`, and so on.
+** *`description` (Optional, string)*: A description of the job.
+** *`max_num_threads` (Optional, number)*: The maximum number of threads to be used by the analysis. Using more
+threads may decrease the time necessary to complete the analysis at the
+cost of using more CPU. Note that the process may use additional threads
+for operational functionality other than the analysis itself.
+** *`model_memory_limit` (Optional, string)*: The approximate maximum amount of memory resources that are permitted for
+analytical processing. If your `elasticsearch.yml` file contains an
+`xpack.ml.max_model_memory_limit` setting, an error occurs when you try
+to create data frame analytics jobs that have `model_memory_limit` values
+greater than that setting.
+** *`headers` (Optional, Record)*
+** *`version` (Optional, string)*
+
+[discrete]
+==== put_datafeed
+Create a datafeed.
+Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
+You can associate only one datafeed with each anomaly detection job.
+The datafeed contains a query that runs at a defined interval (`frequency`).
+If you are concerned about delayed data, you can add a delay (`query_delay') at each interval.
+When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
+at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
+those credentials are used instead.
+You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed
+directly to the `.ml-config` index. Do not give users `write` privileges on the `.ml-config` index.
+
+{ref}/ml-put-datafeed.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putDatafeed({ datafeed_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed.
+This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
+It must start and end with alphanumeric characters.
+** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches.
+Support for aggregations is limited and should be used only with low cardinality data.
+** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might be required to search over long time periods, for several months or years.
+This search is split into time chunks in order to ensure the load on Elasticsearch is managed.
+Chunking configuration controls how the size of these time chunks are calculated;
+it is an advanced configuration option.
+** *`delayed_data_check_config` (Optional, { check_window, enabled })*: Specifies whether the datafeed checks for missing data and the size of the window.
+The datafeed can optionally search over indices that have already been read in an effort to determine whether
+any data has subsequently been added to the index. If missing data is found, it is a good indication that the
+`query_delay` is set too low and the data is being indexed after the datafeed has passed that moment in time.
+This check runs only on real-time datafeeds.
+** *`frequency` (Optional, string | -1 | 0)*: The interval at which scheduled queries are made while the datafeed runs in real time.
+The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible
+fraction of the bucket span. When `frequency` is shorter than the bucket span, interim results for the last
+(partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses
+aggregations, this value must be divisible by the interval of the date histogram aggregation.
+** *`indices` (Optional, string | string[])*: An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine
+learning nodes must have the `remote_cluster_client` role.
+** *`indices_options` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, ignore_throttled })*: Specifies index expansion options that are used during search
+** *`job_id` (Optional, string)*: Identifier for the anomaly detection job.
+** *`max_empty_searches` (Optional, number)*: If a real-time datafeed has never seen any data (including during any initial training period), it automatically
+stops and closes the associated job after this many real-time searches return no documents. In other words,
+it stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no
+end time that sees no data remains started until it is explicitly stopped. By default, it is not set.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an
+Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this
+object is passed verbatim to Elasticsearch.
+** *`query_delay` (Optional, string | -1 | 0)*: The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might
+not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default
+value is randomly selected between `60s` and `120s`. This randomness improves the query performance
+when there are multiple jobs running on the same node.
+** *`runtime_mappings` (Optional, Record)*: Specifies runtime fields for the datafeed search.
+** *`script_fields` (Optional, Record)*: Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.
+The detector configuration objects in a job can contain functions that use these script fields.
+** *`scroll_size` (Optional, number)*: The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.
+The maximum value is the value of `index.max_result_window`, which is 10,000 by default.
+** *`headers` (Optional, Record)*
+** *`allow_no_indices` (Optional, boolean)*: If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the `_all`
+string or when no indices are specified.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines
+whether wildcard expressions match hidden data streams. Supports a list of values.
+** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded, or aliased indices are ignored when frozen.
+** *`ignore_unavailable` (Optional, boolean)*: If true, unavailable indices (missing or closed) are ignored.
+
+[discrete]
+==== put_filter
+Create a filter.
+A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
+Specifically, filters are referenced in the `custom_rules` property of detector configuration objects.
+
+{ref}/ml-put-filter.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putFilter({ filter_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`filter_id` (string)*: A string that uniquely identifies a filter.
+** *`description` (Optional, string)*: A description of the filter.
+** *`items` (Optional, string[])*: The items of the filter. A wildcard `*` can be used at the beginning or the end of an item.
+Up to 10000 items are allowed in each filter.
+
+[discrete]
+==== put_job
+Create an anomaly detection job.
+If you include a `datafeed_config`, you must have read index privileges on the source index.
+
+{ref}/ml-put-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putJob({ job_id, analysis_config, data_description })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters.
+** *`analysis_config` ({ bucket_span, categorization_analyzer, categorization_field_name, categorization_filters, detectors, influencers, latency, model_prune_window, multivariate_by_fields, per_partition_categorization, summary_count_field_name })*: Specifies how to analyze the data. After you create a job, you cannot change the analysis configuration; all the properties are informational.
+** *`data_description` ({ format, time_field, time_format, field_delimiter })*: Defines the format of the input data when you send data to the job by using the post data API. Note that when configure a datafeed, these properties are automatically set. When data is received via the post data API, it is not stored in Elasticsearch. Only the results for anomaly detection are retained.
+** *`allow_lazy_open` (Optional, boolean)*: Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available.
+** *`analysis_limits` (Optional, { categorization_examples_limit, model_memory_limit })*: Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes.
+** *`background_persist_interval` (Optional, string | -1 | 0)*: Advanced configuration option. The time between each periodic persistence of the model. The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. The smallest allowed value is 1 hour. For very large models (several GB), persistence could take 10-20 minutes, so do not set the `background_persist_interval` value too low.
+** *`custom_settings` (Optional, User-defined value)*: Advanced configuration option. Contains custom meta data about the job.
+** *`daily_model_snapshot_retention_after_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to `model_snapshot_retention_days`.
+** *`datafeed_config` (Optional, { aggregations, chunking_config, datafeed_id, delayed_data_check_config, frequency, indices, indices_options, job_id, max_empty_searches, query, query_delay, runtime_mappings, script_fields, scroll_size })*: Defines a datafeed for the anomaly detection job. If Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead.
+** *`description` (Optional, string)*: A description of the job.
+** *`groups` (Optional, string[])*: A list of job groups. A job can belong to no groups or many.
+** *`model_plot_config` (Optional, { annotations_enabled, enabled, terms })*: This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced.
+** *`model_snapshot_retention_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted.
+** *`renormalization_window_days` (Optional, number)*: Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen. The default value is the longer of 30 days or 100 bucket spans.
+** *`results_index_name` (Optional, string)*: A text string that affects the name of the machine learning results index. By default, the job generates an index named `.ml-anomalies-shared`.
+** *`results_retention_days` (Optional, number)*: Advanced configuration option. The period of time (in days) that results are retained. Age is calculated relative to the timestamp of the latest bucket result. If this property has a non-null value, once per day at 00:30 (server time), results that are the specified number of days older than the latest bucket result are deleted from Elasticsearch. The default value is null, which means all results are retained. Annotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results. Annotations added by users are retained forever.
+
+[discrete]
+==== put_trained_model
+Create a trained model.
+Enable you to supply a trained model that is not created by data frame analytics.
+
+{ref}/put-trained-models.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putTrainedModel({ model_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
+** *`compressed_definition` (Optional, string)*: The compressed (GZipped and Base64 encoded) inference definition of the
+model. If compressed_definition is specified, then definition cannot be
+specified.
+** *`definition` (Optional, { preprocessors, trained_model })*: The inference definition for the model. If definition is specified, then
+compressed_definition cannot be specified.
+** *`description` (Optional, string)*: A human-readable description of the inference trained model.
+** *`inference_config` (Optional, { regression, classification, text_classification, zero_shot_classification, fill_mask, ner, pass_through, text_embedding, text_expansion, question_answering })*: The default configuration for inference. This can be either a regression
+or classification configuration. It must match the underlying
+definition.trained_model's target_type. For pre-packaged models such as
+ELSER the config is not required.
+** *`input` (Optional, { field_names })*: The input field names for the model definition.
+** *`metadata` (Optional, User-defined value)*: An object map that contains metadata about the model.
+** *`model_type` (Optional, Enum("tree_ensemble" | "lang_ident" | "pytorch"))*: The model type.
+** *`model_size_bytes` (Optional, number)*: The estimated memory usage in bytes to keep the trained model in memory.
+This property is supported only if defer_definition_decompression is true
+or the model definition is not supplied.
+** *`platform_architecture` (Optional, string)*: The platform architecture (if applicable) of the trained mode. If the model
+only works on one platform, because it is heavily optimized for a particular
+processor architecture and OS combination, then this field specifies which.
+The format of the string must match the platform identifiers used by Elasticsearch,
+so one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,
+or `windows-x86_64`. For portable models (those that work independent of processor
+architecture or OS features), leave this field unset.
+** *`tags` (Optional, string[])*: An array of tags to organize the model.
+** *`prefix_strings` (Optional, { ingest, search })*: Optional prefix strings applied at inference
+** *`defer_definition_decompression` (Optional, boolean)*: If set to `true` and a `compressed_definition` is provided,
+the request defers definition decompression and skips relevant
+validations.
+** *`wait_for_completion` (Optional, boolean)*: Whether to wait for all child operations (e.g. model download)
+to complete.
+
+[discrete]
+==== put_trained_model_alias
+Create or update a trained model alias.
+A trained model alias is a logical name used to reference a single trained
+model.
+You can use aliases instead of trained model identifiers to make it easier to
+reference your models. For example, you can use aliases in inference
+aggregations and processors.
+An alias must be unique and refer to only a single trained model. However,
+you can have multiple aliases for each trained model.
+If you use this API to update an alias such that it references a different
+trained model ID and the model uses a different type of data frame analytics,
+an error occurs. For example, this situation occurs if you have a trained
+model for regression analysis and a trained model for classification
+analysis; you cannot reassign an alias from one type of trained model to
+another.
+If you use this API to update an alias and there are very few input fields in
+common between the old and new trained models for the model alias, the API
+returns a warning.
+
+{ref}/put-trained-models-aliases.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putTrainedModelAlias({ model_alias, model_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_alias` (string)*: The alias to create or update. This value cannot end in numbers.
+** *`model_id` (string)*: The identifier for the trained model that the alias refers to.
+** *`reassign` (Optional, boolean)*: Specifies whether the alias gets reassigned to the specified trained
+model if it is already assigned to a different model. If the alias is
+already assigned and this parameter is false, the API returns an error.
+
+[discrete]
+==== put_trained_model_definition_part
+Create part of a trained model definition.
+
+{ref}/put-trained-model-definition-part.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putTrainedModelDefinitionPart({ model_id, part, definition, total_definition_length, total_parts })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
+** *`part` (number)*: The definition part number. When the definition is loaded for inference the definition parts are streamed in the
+order of their part number. The first part must be `0` and the final part must be `total_parts - 1`.
+** *`definition` (string)*: The definition part for the model. Must be a base64 encoded string.
+** *`total_definition_length` (number)*: The total uncompressed definition length in bytes. Not base64 encoded.
+** *`total_parts` (number)*: The total number of parts that will be uploaded. Must be greater than 0.
+
+[discrete]
+==== put_trained_model_vocabulary
+Create a trained model vocabulary.
+This API is supported only for natural language processing (NLP) models.
+The vocabulary is stored in the index as described in `inference_config.*.vocabulary` of the trained model definition.
+
+{ref}/put-trained-model-vocabulary.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.putTrainedModelVocabulary({ model_id, vocabulary })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
+** *`vocabulary` (string[])*: The model vocabulary, which must not be empty.
+** *`merges` (Optional, string[])*: The optional model merges if required by the tokenizer.
+** *`scores` (Optional, number[])*: The optional vocabulary value scores if required by the tokenizer.
+
+[discrete]
+==== reset_job
+Reset an anomaly detection job.
+All model state and results are deleted. The job is ready to start over as if
+it had just been created.
+It is not currently possible to reset multiple jobs using wildcards or a
+comma separated list.
+
+{ref}/ml-reset-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.resetJob({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: The ID of the job to reset.
+** *`wait_for_completion` (Optional, boolean)*: Should this request wait until the operation has completed before
+returning.
+** *`delete_user_annotations` (Optional, boolean)*: Specifies whether annotations that have been added by the
+user should be deleted along with any auto-generated annotations when the job is
+reset.
+
+[discrete]
+==== revert_model_snapshot
+Revert to a snapshot.
+The machine learning features react quickly to anomalous input, learning new
+behaviors in data. Highly anomalous input increases the variance in the
+models whilst the system learns whether this is a new step-change in behavior
+or a one-off event. In the case where this anomalous input is known to be a
+one-off, then it might be appropriate to reset the model state to a time
+before this event. For example, you might consider reverting to a saved
+snapshot after Black Friday or a critical system failure.
-|`stored_fields` or `storedFields`
-|`string, string[]` - A comma-separated list of stored fields to return as part of a hit
+{ref}/ml-revert-snapshot.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.revertModelSnapshot({ job_id, snapshot_id })
+----
-|`docvalue_fields` or `docvalueFields`
-|`string, string[]` - A comma-separated list of fields to return as the docvalue representation of a field for each hit
+[discrete]
+==== Arguments
-|`from`
-|`number` - Starting offset (default: 0)
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`snapshot_id` (string)*: You can specify `empty` as the . Reverting to the empty
+snapshot means the anomaly detection job starts learning a new model from
+scratch when it is started.
+** *`delete_intervening_results` (Optional, boolean)*: Refer to the description for the `delete_intervening_results` query parameter.
+
+[discrete]
+==== set_upgrade_mode
+Set upgrade_mode for ML indices.
+Sets a cluster wide upgrade_mode setting that prepares machine learning
+indices for an upgrade.
+When upgrading your cluster, in some circumstances you must restart your
+nodes and reindex your machine learning indices. In those circumstances,
+there must be no machine learning jobs running. You can close the machine
+learning jobs, do the upgrade, then open all the jobs again. Alternatively,
+you can use this API to temporarily halt tasks associated with the jobs and
+datafeeds and prevent new jobs from opening. You can also use this API
+during upgrades that do not require you to reindex your machine learning
+indices, though stopping jobs is not a requirement in that case.
+You can see the current value for the upgrade_mode setting by using the get
+machine learning info API.
+
+{ref}/ml-set-upgrade-mode.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.setUpgradeMode({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`enabled` (Optional, boolean)*: When `true`, it enables `upgrade_mode` which temporarily halts all job
+and datafeed tasks and prohibits new job and datafeed tasks from
+starting.
+** *`timeout` (Optional, string | -1 | 0)*: The time to wait for the request to be completed.
+
+[discrete]
+==== start_data_frame_analytics
+Start a data frame analytics job.
+A data frame analytics job can be started and stopped multiple times
+throughout its lifecycle.
+If the destination index does not exist, it is created automatically the
+first time you start the data frame analytics job. The
+`index.number_of_shards` and `index.number_of_replicas` settings for the
+destination index are copied from the source index. If there are multiple
+source indices, the destination index copies the highest setting values. The
+mappings for the destination index are also copied from the source indices.
+If there are any mapping conflicts, the job fails to start.
+If the destination index exists, it is used as is. You can therefore set up
+the destination index in advance with custom settings and mappings.
+
+{ref}/start-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.startDataFrameAnalytics({ id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain
+lowercase alphanumeric characters (a-z and 0-9), hyphens, and
+underscores. It must start and end with alphanumeric characters.
+** *`timeout` (Optional, string | -1 | 0)*: Controls the amount of time to wait until the data frame analytics job
+starts.
+
+[discrete]
+==== start_datafeed
+Start datafeeds.
+
+A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
+multiple times throughout its lifecycle.
+
+Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
+
+If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
+If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
+
+When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
+update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
+authorization headers when you created or updated the datafeed, those credentials are used instead.
+
+{ref}/ml-start-datafeed.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.startDatafeed({ datafeed_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase
+alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric
+characters.
+** *`end` (Optional, string | Unit)*: Refer to the description for the `end` query parameter.
+** *`start` (Optional, string | Unit)*: Refer to the description for the `start` query parameter.
+** *`timeout` (Optional, string | -1 | 0)*: Refer to the description for the `timeout` query parameter.
+
+[discrete]
+==== start_trained_model_deployment
+Start a trained model deployment.
+It allocates the model to every machine learning node.
+
+{ref}/start-trained-model-deployment.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.startTrainedModelDeployment({ model_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model. Currently, only PyTorch models are supported.
+** *`cache_size` (Optional, number | string)*: The inference cache size (in memory outside the JVM heap) per node for the model.
+The default value is the same size as the `model_size_bytes`. To disable the cache,
+`0b` can be provided.
+** *`deployment_id` (Optional, string)*: A unique identifier for the deployment of the model.
+** *`number_of_allocations` (Optional, number)*: The number of model allocations on each node where the model is deployed.
+All allocations on a node share the same copy of the model in memory but use
+a separate set of threads to evaluate the model.
+Increasing this value generally increases the throughput.
+If this setting is greater than the number of hardware threads
+it will automatically be changed to a value less than the number of hardware threads.
+** *`priority` (Optional, Enum("normal" | "low"))*: The deployment priority.
+** *`queue_capacity` (Optional, number)*: Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds
+this value, new requests are rejected with a 429 error.
+** *`threads_per_allocation` (Optional, number)*: Sets the number of threads used by each model allocation during inference. This generally increases
+the inference speed. The inference process is a compute-bound process; any number
+greater than the number of available hardware threads on the machine does not increase the
+inference speed. If this setting is greater than the number of hardware threads
+it will automatically be changed to a value less than the number of hardware threads.
+** *`timeout` (Optional, string | -1 | 0)*: Specifies the amount of time to wait for the model to deploy.
+** *`wait_for` (Optional, Enum("started" | "starting" | "fully_allocated"))*: Specifies the allocation status to wait for before returning.
+
+[discrete]
+==== stop_data_frame_analytics
+Stop data frame analytics jobs.
+A data frame analytics job can be started and stopped multiple times
+throughout its lifecycle.
+
+{ref}/stop-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.stopDataFrameAnalytics({ id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain
+lowercase alphanumeric characters (a-z and 0-9), hyphens, and
+underscores. It must start and end with alphanumeric characters.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no data frame analytics
+jobs that match.
+2. Contains the _all string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+The default value is true, which returns an empty data_frame_analytics
+array when there are no matches and the subset of results when there are
+partial matches. If this parameter is false, the request returns a 404
+status code when there are no matches or only partial matches.
+** *`force` (Optional, boolean)*: If true, the data frame analytics job is stopped forcefully.
+** *`timeout` (Optional, string | -1 | 0)*: Controls the amount of time to wait until the data frame analytics job
+stops. Defaults to 20 seconds.
+
+[discrete]
+==== stop_datafeed
+Stop datafeeds.
+A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
+multiple times throughout its lifecycle.
+
+{ref}/ml-stop-datafeed.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.stopDatafeed({ datafeed_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (string)*: Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated
+list of datafeeds or a wildcard expression. You can close all datafeeds by using `_all` or by specifying `*` as
+the identifier.
+** *`allow_no_match` (Optional, boolean)*: Refer to the description for the `allow_no_match` query parameter.
+** *`force` (Optional, boolean)*: Refer to the description for the `force` query parameter.
+** *`timeout` (Optional, string | -1 | 0)*: Refer to the description for the `timeout` query parameter.
+
+[discrete]
+==== stop_trained_model_deployment
+Stop a trained model deployment.
+
+{ref}/stop-trained-model-deployment.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.stopTrainedModelDeployment({ model_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
+contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
+there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
+If `false`, the request returns a 404 status code when there are no matches or only partial matches.
+** *`force` (Optional, boolean)*: Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you
+restart the model deployment.
+
+[discrete]
+==== update_data_frame_analytics
+Update a data frame analytics job.
+
+{ref}/update-dfanalytics.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.updateDataFrameAnalytics({ id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain
+lowercase alphanumeric characters (a-z and 0-9), hyphens, and
+underscores. It must start and end with alphanumeric characters.
+** *`description` (Optional, string)*: A description of the job.
+** *`model_memory_limit` (Optional, string)*: The approximate maximum amount of memory resources that are permitted for
+analytical processing. If your `elasticsearch.yml` file contains an
+`xpack.ml.max_model_memory_limit` setting, an error occurs when you try
+to create data frame analytics jobs that have `model_memory_limit` values
+greater than that setting.
+** *`max_num_threads` (Optional, number)*: The maximum number of threads to be used by the analysis. Using more
+threads may decrease the time necessary to complete the analysis at the
+cost of using more CPU. Note that the process may use additional threads
+for operational functionality other than the analysis itself.
+** *`allow_lazy_start` (Optional, boolean)*: Specifies whether this job can start when there is insufficient machine
+learning node capacity for it to be immediately assigned to a node.
+
+[discrete]
+==== update_datafeed
+Update a datafeed.
+You must stop and start the datafeed for the changes to be applied.
+When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
+the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
+those credentials are used instead.
+
+{ref}/ml-update-datafeed.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.updateDatafeed({ datafeed_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed.
+This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
+It must start and end with alphanumeric characters.
+** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only
+with low cardinality data.
+** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might search over long time periods, for several months or years. This search is split into time
+chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of
+these time chunks are calculated; it is an advanced configuration option.
+** *`delayed_data_check_config` (Optional, { check_window, enabled })*: Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally
+search over indices that have already been read in an effort to determine whether any data has subsequently been
+added to the index. If missing data is found, it is a good indication that the `query_delay` is set too low and
+the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time
+datafeeds.
+** *`frequency` (Optional, string | -1 | 0)*: The interval at which scheduled queries are made while the datafeed runs in real time. The default value is
+either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket
+span. When `frequency` is shorter than the bucket span, interim results for the last (partial) bucket are
+written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value
+must be divisible by the interval of the date histogram aggregation.
+** *`indices` (Optional, string[])*: An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine
+learning nodes must have the `remote_cluster_client` role.
+** *`indices_options` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, ignore_throttled })*: Specifies index expansion options that are used during search.
+** *`job_id` (Optional, string)*
+** *`max_empty_searches` (Optional, number)*: If a real-time datafeed has never seen any data (including during any initial training period), it automatically
+stops and closes the associated job after this many real-time searches return no documents. In other words,
+it stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no
+end time that sees no data remains started until it is explicitly stopped. By default, it is not set.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an
+Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this
+object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also
+changed. Therefore, the time required to learn might be long and the understandability of the results is
+unpredictable. If you want to make significant changes to the source data, it is recommended that you
+clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one
+when you are satisfied with the results of the job.
+** *`query_delay` (Optional, string | -1 | 0)*: The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might
+not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default
+value is randomly selected between `60s` and `120s`. This randomness improves the query performance
+when there are multiple jobs running on the same node.
+** *`runtime_mappings` (Optional, Record)*: Specifies runtime fields for the datafeed search.
+** *`script_fields` (Optional, Record)*: Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.
+The detector configuration objects in a job can contain functions that use these script fields.
+** *`scroll_size` (Optional, number)*: The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.
+The maximum value is the value of `index.max_result_window`.
+** *`allow_no_indices` (Optional, boolean)*: If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the
+`_all` string or when no indices are specified.
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines
+whether wildcard expressions match hidden data streams. Supports a list of values. Valid values are:
+
+* `all`: Match any data stream or index, including hidden ones.
+* `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
+* `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.
+* `none`: Wildcard patterns are not accepted.
+* `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
+** *`ignore_throttled` (Optional, boolean)*: If `true`, concrete, expanded or aliased indices are ignored when frozen.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, unavailable indices (missing or closed) are ignored.
+
+[discrete]
+==== update_filter
+Update a filter.
+Updates the description of a filter, adds items, or removes items from the list.
+
+{ref}/ml-update-filter.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.updateFilter({ filter_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`filter_id` (string)*: A string that uniquely identifies a filter.
+** *`add_items` (Optional, string[])*: The items to add to the filter.
+** *`description` (Optional, string)*: A description for the filter.
+** *`remove_items` (Optional, string[])*: The items to remove from the filter.
+
+[discrete]
+==== update_job
+Update an anomaly detection job.
+Updates certain properties of an anomaly detection job.
+
+{ref}/ml-update-job.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.updateJob({ job_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the job.
+** *`allow_lazy_open` (Optional, boolean)*: Advanced configuration option. Specifies whether this job can open when
+there is insufficient machine learning node capacity for it to be
+immediately assigned to a node. If `false` and a machine learning node
+with capacity to run the job cannot immediately be found, the open
+anomaly detection jobs API returns an error. However, this is also
+subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this
+option is set to `true`, the open anomaly detection jobs API does not
+return an error and the job waits in the opening state until sufficient
+machine learning node capacity is available.
+** *`analysis_limits` (Optional, { model_memory_limit })*
+** *`background_persist_interval` (Optional, string | -1 | 0)*: Advanced configuration option. The time between each periodic persistence
+of the model.
+The default value is a randomized value between 3 to 4 hours, which
+avoids all jobs persisting at exactly the same time. The smallest allowed
+value is 1 hour.
+For very large models (several GB), persistence could take 10-20 minutes,
+so do not set the value too low.
+If the job is open when you make the update, you must stop the datafeed,
+close the job, then reopen the job and restart the datafeed for the
+changes to take effect.
+** *`custom_settings` (Optional, Record)*: Advanced configuration option. Contains custom meta data about the job.
+For example, it can contain custom URL information as shown in Adding
+custom URLs to machine learning results.
+** *`categorization_filters` (Optional, string[])*
+** *`description` (Optional, string)*: A description of the job.
+** *`model_plot_config` (Optional, { annotations_enabled, enabled, terms })*
+** *`model_prune_window` (Optional, string | -1 | 0)*
+** *`daily_model_snapshot_retention_after_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old
+model snapshots for this job. It specifies a period of time (in days)
+after which only the first snapshot per day is retained. This period is
+relative to the timestamp of the most recent snapshot for this job. Valid
+values range from 0 to `model_snapshot_retention_days`. For jobs created
+before version 7.8.0, the default value matches
+`model_snapshot_retention_days`.
+** *`model_snapshot_retention_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old
+model snapshots for this job. It specifies the maximum period of time (in
+days) that snapshots are retained. This period is relative to the
+timestamp of the most recent snapshot for this job.
+** *`renormalization_window_days` (Optional, number)*: Advanced configuration option. The period over which adjustments to the
+score are applied, as new data is seen.
+** *`results_retention_days` (Optional, number)*: Advanced configuration option. The period of time (in days) that results
+are retained. Age is calculated relative to the timestamp of the latest
+bucket result. If this property has a non-null value, once per day at
+00:30 (server time), results that are the specified number of days older
+than the latest bucket result are deleted from Elasticsearch. The default
+value is null, which means all results are retained.
+** *`groups` (Optional, string[])*: A list of job groups. A job can belong to no groups or many.
+** *`detectors` (Optional, { by_field_name, custom_rules, detector_description, detector_index, exclude_frequent, field_name, function, over_field_name, partition_field_name, use_null }[])*: An array of detector update objects.
+** *`per_partition_categorization` (Optional, { enabled, stop_on_warn })*: Settings related to how categorization interacts with partition fields.
+
+[discrete]
+==== update_model_snapshot
+Update a snapshot.
+Updates certain properties of a snapshot.
+
+{ref}/ml-update-snapshot.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.updateModelSnapshot({ job_id, snapshot_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`snapshot_id` (string)*: Identifier for the model snapshot.
+** *`description` (Optional, string)*: A description of the model snapshot.
+** *`retain` (Optional, boolean)*: If `true`, this snapshot will not be deleted during automatic cleanup of
+snapshots older than `model_snapshot_retention_days`. However, this
+snapshot will be deleted when the job is deleted.
+
+[discrete]
+==== update_trained_model_deployment
+Update a trained model deployment.
+
+{ref}/update-trained-model-deployment.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.updateTrainedModelDeployment({ model_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`model_id` (string)*: The unique identifier of the trained model. Currently, only PyTorch models are supported.
+** *`number_of_allocations` (Optional, number)*: The number of model allocations on each node where the model is deployed.
+All allocations on a node share the same copy of the model in memory but use
+a separate set of threads to evaluate the model.
+Increasing this value generally increases the throughput.
+If this setting is greater than the number of hardware threads
+it will automatically be changed to a value less than the number of hardware threads.
+
+[discrete]
+==== upgrade_job_snapshot
+Upgrade a snapshot.
+Upgrades an anomaly detection model snapshot to the latest major version.
+Over time, older snapshot formats are deprecated and removed. Anomaly
+detection jobs support only snapshots that are from the current or previous
+major version.
+This API provides a means to upgrade a snapshot to the current major version.
+This aids in preparing the cluster for an upgrade to the next major version.
+Only one snapshot per anomaly detection job can be upgraded at a time and the
+upgraded snapshot cannot be the current snapshot of the anomaly detection
+job.
+
+{ref}/ml-upgrade-job-model-snapshot.html[Endpoint documentation]
+[source,ts]
+----
+client.ml.upgradeJobSnapshot({ job_id, snapshot_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`job_id` (string)*: Identifier for the anomaly detection job.
+** *`snapshot_id` (string)*: A numerical character string that uniquely identifies the model snapshot.
+** *`wait_for_completion` (Optional, boolean)*: When true, the API won’t respond until the upgrade is complete.
+Otherwise, it responds as soon as the upgrade task is assigned to a node.
+** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the request to complete.
+
+[discrete]
+=== monitoring
+[discrete]
+==== bulk
+Used by the monitoring features to send monitoring data.
+
+{ref}/monitor-elasticsearch-cluster.html[Endpoint documentation]
+[source,ts]
+----
+client.monitoring.bulk({ system_id, system_api_version, interval })
+----
+
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+* *Request (object):*
+** *`system_id` (string)*: Identifier of the monitored system
+** *`system_api_version` (string)*
+** *`interval` (string | -1 | 0)*: Collection interval (e.g., '10s' or '10000ms') of the payload
+** *`type` (Optional, string)*: Default document type for items which don't provide one
+** *`operations` (Optional, { index, create, update, delete } | { detect_noop, doc, doc_as_upsert, script, scripted_upsert, _source, upsert } | object[])*
-|`ignore_throttled` or `ignoreThrottled`
-|`boolean` - Whether specified concrete, expanded or aliased indices should be ignored when throttled
+[discrete]
+=== nodes
+[discrete]
+==== clear_repositories_metering_archive
+You can use this API to clear the archived repositories metering information in the cluster.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/clear-repositories-metering-archive-api.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.clearRepositoriesMeteringArchive({ node_id, max_archive_version })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== Arguments
-|`lenient`
-|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+* *Request (object):*
+** *`node_id` (string | string[])*: List of node IDs or names used to limit returned information.
+All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
+** *`max_archive_version` (number)*: Specifies the maximum [archive_version](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html#get-repositories-metering-api-response-body) to be cleared from the archive.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+[discrete]
+==== get_repositories_metering_info
+You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
+This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the
+information needed to compute aggregations over a period of time. Additionally, the information exposed by this
+API is volatile, meaning that it won’t be present after node restarts.
-|`q`
-|`string` - Query in the Lucene query string syntax
+{ref}/get-repositories-metering-api.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.getRepositoriesMeteringInfo({ node_id })
+----
-|`routing`
-|`string, string[]` - A comma-separated list of specific routing values
+[discrete]
+==== Arguments
-|`scroll`
-|`string` - Specify how long a consistent view of the index should be maintained for scrolled search
+* *Request (object):*
+** *`node_id` (string | string[])*: List of node IDs or names used to limit returned information.
+All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
-|`search_type` or `searchType`
-|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type
+[discrete]
+==== hot_threads
+This API yields a breakdown of the hot threads on each selected node in the cluster.
+The output is plain text with a breakdown of each node’s top hot threads.
-|`size`
-|`number` - Number of hits to return (default: 10)
+{ref}/cluster-nodes-hot-threads.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.hotThreads({ ... })
+----
-|`sort`
-|`string, string[]` - A comma-separated list of : pairs
+[discrete]
+==== Arguments
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: List of node IDs or names used to limit returned information.
+** *`ignore_idle_threads` (Optional, boolean)*: If true, known idle threads (e.g. waiting in a socket select, or to get
+a task from an empty queue) are filtered out.
+** *`interval` (Optional, string | -1 | 0)*: The interval to do the second sampling of threads.
+** *`snapshots` (Optional, number)*: Number of samples of thread stacktrace.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response
+is received before the timeout expires, the request fails and
+returns an error.
+** *`threads` (Optional, number)*: Specifies the number of hot threads to provide information for.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received
+before the timeout expires, the request fails and returns an error.
+** *`type` (Optional, Enum("cpu" | "wait" | "block" | "gpu" | "mem"))*: The type to sample.
+** *`sort` (Optional, Enum("cpu" | "wait" | "block" | "gpu" | "mem"))*: The sort order for 'cpu' type (default: total)
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== info
+Returns cluster nodes information.
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+{ref}/cluster-nodes-info.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.info({ ... })
+----
-|`terminate_after` or `terminateAfter`
-|`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
+[discrete]
+==== Arguments
-|`stats`
-|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: List of node IDs or names used to limit returned information.
+** *`metric` (Optional, string | string[])*: Limits the information returned to the specific metrics. Supports a list, such as http,ingest.
+** *`flat_settings` (Optional, boolean)*: If true, returns settings in flat format.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`suggest_field` or `suggestField`
-|`string` - Specify which field to use for suggestions
+[discrete]
+==== reload_secure_settings
+Reloads the keystore on nodes in the cluster.
-|`suggest_mode` or `suggestMode`
-|`'missing', 'popular', 'always'` - Specify suggest mode +
- _Default:_ `missing`
+{ref}/secure-settings.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.reloadSecureSettings({ ... })
+----
-|`suggest_size` or `suggestSize`
-|`number` - How many suggestions to return in response
+[discrete]
+==== Arguments
-|`suggest_text` or `suggestText`
-|`string` - The source text for which the suggestions should be returned
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: The names of particular nodes in the cluster to target.
+** *`secure_settings_password` (Optional, string)*: The password for the Elasticsearch keystore.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== stats
+Returns cluster nodes statistics.
-|`track_scores` or `trackScores`
-|`boolean` - Whether to calculate and return scores even if they are not used for sorting
+{ref}/cluster-nodes-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.stats({ ... })
+----
-|`track_total_hits` or `trackTotalHits`
-|`boolean` - Indicate if the number of documents that match the query should be tracked
+[discrete]
+==== Arguments
-|`allow_partial_search_results` or `allowPartialSearchResults`
-|`boolean` - Indicate if an error should be returned if there is a partial search failure or timeout +
- _Default:_ `true`
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: List of node IDs or names used to limit returned information.
+** *`metric` (Optional, string | string[])*: Limit the information returned to the specified metrics
+** *`index_metric` (Optional, string | string[])*: Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.
+** *`completion_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata and suggest statistics.
+** *`fielddata_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata statistics.
+** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics.
+** *`groups` (Optional, boolean)*: List of search groups to include in the search statistics.
+** *`include_segment_file_sizes` (Optional, boolean)*: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).
+** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Indicates whether statistics are aggregated at the cluster, index, or shard level.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+** *`types` (Optional, string[])*: A list of document types for the indexing index metric.
+** *`include_unloaded_segments` (Optional, boolean)*: If `true`, the response includes information from segments that are not loaded into memory.
-|`typed_keys` or `typedKeys`
-|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+[discrete]
+==== usage
+Returns information on the usage of features.
-|`version`
-|`boolean` - Specify whether to return document version as part of a hit
+{ref}/cluster-nodes-usage.html[Endpoint documentation]
+[source,ts]
+----
+client.nodes.usage({ ... })
+----
-|`seq_no_primary_term` or `seqNoPrimaryTerm`
-|`boolean` - Specify whether to return sequence number and primary term of the last modification of each hit
+[discrete]
+==== Arguments
-|`request_cache` or `requestCache`
-|`boolean` - Specify if request cache should be used for this request or not, defaults to index level setting
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: A list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+** *`metric` (Optional, string | string[])*: Limits the information returned to the specific metrics.
+A list of the following options: `_all`, `rest_actions`.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
-|`batched_reduce_size` or `batchedReduceSize`
-|`number` - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. +
- _Default:_ `512`
+[discrete]
+=== query_rules
+[discrete]
+==== delete_rule
+Delete a query rule.
+Delete a query rule within a query ruleset.
-|`max_concurrent_shard_requests` or `maxConcurrentShardRequests`
-|`number` - The number of concurrent shard requests per node this 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 +
- _Default:_ `The default is 5.`
+{ref}/delete-query-rule.html[Endpoint documentation]
+[source,ts]
+----
+client.queryRules.deleteRule({ ruleset_id, rule_id })
+----
-|`pre_filter_shard_size` or `preFilterShardSize`
-|`number` - 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. +
- _Default:_ `128`
+[discrete]
+==== Arguments
-|`rest_total_hits_as_int` or `restTotalHitsAsInt`
-|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset containing the rule to delete
+** *`rule_id` (string)*: The unique identifier of the query rule within the specified ruleset to delete
-|`body`
-|`object` - The search definition using the Query DSL
+[discrete]
+==== delete_ruleset
+Delete a query ruleset.
-|===
-=== searchShards
-[source,js]
+{ref}/delete-query-ruleset.html[Endpoint documentation]
+[source,ts]
----
-client.searchShards([params] [, options] [, callback])
+client.queryRules.deleteRuleset({ ruleset_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+[discrete]
+==== Arguments
-|`routing`
-|`string` - Specific routing value
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset to delete
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== get_rule
+Get a query rule.
+Get details about a query rule within a query ruleset.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+{ref}/get-query-rule.html[Endpoint documentation]
+[source,ts]
+----
+client.queryRules.getRule({ ruleset_id, rule_id })
+----
+
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset containing the rule to retrieve
+** *`rule_id` (string)*: The unique identifier of the query rule within the specified ruleset to retrieve
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== get_ruleset
+Get a query ruleset.
+Get details about a query ruleset.
-|===
-=== searchTemplate
-[source,js]
+{ref}/get-query-ruleset.html[Endpoint documentation]
+[source,ts]
----
-client.searchTemplate([params] [, options] [, callback])
+client.queryRules.getRuleset({ ruleset_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset
-|`ignore_throttled` or `ignoreThrottled`
-|`boolean` - Whether specified concrete, expanded or aliased indices should be ignored when throttled
+[discrete]
+==== list_rulesets
+Get all query rulesets.
+Get summarized information about the query rulesets.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/list-query-rulesets.html[Endpoint documentation]
+[source,ts]
+----
+client.queryRules.listRulesets({ ... })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+[discrete]
+==== Arguments
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+* *Request (object):*
+** *`from` (Optional, number)*: Starting offset (default: 0)
+** *`size` (Optional, number)*: specifies a max number of results to get
-|`routing`
-|`string, string[]` - A comma-separated list of specific routing values
+[discrete]
+==== put_rule
+Create or update a query rule.
+Create or update a query rule within a query ruleset.
-|`scroll`
-|`string` - Specify how long a consistent view of the index should be maintained for scrolled search
+{ref}/put-query-rule.html[Endpoint documentation]
+[source,ts]
+----
+client.queryRules.putRule({ ruleset_id, rule_id, type, criteria, actions })
+----
-|`search_type` or `searchType`
-|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type
+[discrete]
+==== Arguments
-|`explain`
-|`boolean` - Specify whether to return detailed information about score computation as part of a hit
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset containing the rule to be created or updated
+** *`rule_id` (string)*: The unique identifier of the query rule within the specified ruleset to be created or updated
+** *`type` (Enum("pinned" | "exclude"))*
+** *`criteria` ({ type, metadata, values } | { type, metadata, values }[])*
+** *`actions` ({ ids, docs })*
+** *`priority` (Optional, number)*
-|`profile`
-|`boolean` - Specify whether to profile the query execution
+[discrete]
+==== put_ruleset
+Create or update a query ruleset.
-|`typed_keys` or `typedKeys`
-|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+{ref}/put-query-ruleset.html[Endpoint documentation]
+[source,ts]
+----
+client.queryRules.putRuleset({ ruleset_id, rules })
+----
-|`rest_total_hits_as_int` or `restTotalHitsAsInt`
-|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+[discrete]
+==== Arguments
-|`ccs_minimize_roundtrips` or `ccsMinimizeRoundtrips`
-|`boolean` - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +
- _Default:_ `true`
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset to be created or updated
+** *`rules` ({ rule_id, type, criteria, actions, priority } | { rule_id, type, criteria, actions, priority }[])*
-|`body`
-|`object` - The search definition template and its params
+[discrete]
+==== test
+Test a query ruleset.
+Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.
-|===
-=== snapshot.create
-[source,js]
+{ref}/test-query-ruleset.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.create([params] [, options] [, callback])
+client.queryRules.test({ ruleset_id, match_criteria })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-
-|`snapshot`
-|`string` - A snapshot name
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should this request wait until the operation has completed before returning
+* *Request (object):*
+** *`ruleset_id` (string)*: The unique identifier of the query ruleset to be created or updated
+** *`match_criteria` (Record)*
-|`body`
-|`object` - The snapshot definition
+[discrete]
+=== rollup
+[discrete]
+==== delete_job
+Deletes an existing rollup job.
-|===
-=== snapshot.createRepository
-[source,js]
+{ref}/rollup-delete-job.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.createRepository([params] [, options] [, callback])
+client.rollup.deleteJob({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`id` (string)*: Identifier for the job.
-|`verify`
-|`boolean` - Whether to verify the repository after creation
+[discrete]
+==== get_jobs
+Retrieves the configuration, stats, and status of rollup jobs.
-|`body`
-|`object` - The repository definition
-
-|===
-=== snapshot.delete
-[source,js]
+{ref}/rollup-get-job.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.delete([params] [, options] [, callback])
+client.rollup.getJobs({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-|`snapshot`
-|`string` - A snapshot name
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: Identifier for the rollup job.
+If it is `_all` or omitted, the API returns all rollup jobs.
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== get_rollup_caps
+Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
-|===
-=== snapshot.deleteRepository
-[source,js]
+{ref}/rollup-get-rollup-caps.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.deleteRepository([params] [, options] [, callback])
+client.rollup.getRollupCaps({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string, string[]` - A comma-separated list of repository names
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: Index, indices or index-pattern to return rollup capabilities for.
+`_all` may be used to fetch rollup capabilities from all jobs.
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== get_rollup_index_caps
+Returns the rollup capabilities of all jobs inside of a rollup index (for example, the index where rollup data is stored).
-|===
-=== snapshot.get
-[source,js]
+{ref}/rollup-get-rollup-index-caps.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.get([params] [, options] [, callback])
+client.rollup.getRollupIndexCaps({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-|`snapshot`
-|`string, string[]` - A comma-separated list of snapshot names
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`index` (string | string[])*: Data stream or index to check for rollup capabilities.
+Wildcard (`*`) expressions are supported.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
+[discrete]
+==== put_job
+Creates a rollup job.
-|`verbose`
-|`boolean` - Whether to show verbose snapshot info or only show the basic info found in the repository index blob
-
-|===
-=== snapshot.getRepository
-[source,js]
+{ref}/rollup-put-job.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.getRepository([params] [, options] [, callback])
+client.rollup.putJob({ id, cron, groups, index_pattern, page_size, rollup_index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string, string[]` - A comma-separated list of repository names
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the rollup job. This can be any alphanumeric string and uniquely identifies the
+data that is associated with the rollup job. The ID is persistent; it is stored with the rolled
+up data. If you create a job, let it run for a while, then delete the job, the data that the job
+rolled up is still be associated with this job ID. You cannot create a new job with the same ID
+since that could lead to problems with mismatched job configurations.
+** *`cron` (string)*: A cron string which defines the intervals when the rollup job should be executed. When the interval
+triggers, the indexer attempts to rollup the data in the index pattern. The cron pattern is unrelated
+to the time interval of the data being rolled up. For example, you may wish to create hourly rollups
+of your document but to only run the indexer on a daily basis at midnight, as defined by the cron. The
+cron pattern is defined just like a Watcher cron schedule.
+** *`groups` ({ date_histogram, histogram, terms })*: Defines the grouping fields and aggregations that are defined for this rollup job. These fields will then be
+available later for aggregating into buckets. These aggs and fields can be used in any combination. Think of
+the groups configuration as defining a set of tools that can later be used in aggregations to partition the
+data. Unlike raw data, we have to think ahead to which fields and aggregations might be used. Rollups provide
+enough flexibility that you simply need to determine which fields are needed, not in what order they are needed.
+** *`index_pattern` (string)*: The index or index pattern to roll up. Supports wildcard-style patterns (`logstash-*`). The job attempts to
+rollup the entire index or index-pattern.
+** *`page_size` (number)*: The number of bucket results that are processed on each iteration of the rollup indexer. A larger value tends
+to execute faster, but requires more memory during processing. This value has no effect on how the data is
+rolled up; it is merely used for tweaking the speed or memory cost of the indexer.
+** *`rollup_index` (string)*: The index that contains the rollup results. The index can be shared with other rollup jobs. The data is stored so that it doesn’t interfere with unrelated jobs.
+** *`metrics` (Optional, { field, metrics }[])*: Defines the metrics to collect for each grouping tuple. By default, only the doc_counts are collected for each
+group. To make rollup useful, you will often add metrics like averages, mins, maxes, etc. Metrics are defined
+on a per-field basis and for each field you configure which metric should be collected.
+** *`timeout` (Optional, string | -1 | 0)*: Time to wait for the request to complete.
+** *`headers` (Optional, Record)*
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
+[discrete]
+==== rollup_search
+Enables searching rolled-up data using the standard Query DSL.
-|===
-=== snapshot.restore
-[source,js]
+{ref}/rollup-search.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.restore([params] [, options] [, callback])
+client.rollup.rollupSearch({ index })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-
-|`snapshot`
-|`string` - A snapshot name
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should this request wait until the operation has completed before returning
+* *Request (object):*
+** *`index` (string | string[])*: Enables searching rolled-up data using the standard Query DSL.
+** *`aggregations` (Optional, Record)*: Specifies aggregations.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specifies a DSL query.
+** *`size` (Optional, number)*: Must be zero if set, as rollups work on pre-aggregated data.
+** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response
-|`body`
-|`object` - Details of what to restore
+[discrete]
+==== start_job
+Starts an existing, stopped rollup job.
-|===
-=== snapshot.status
-[source,js]
+{ref}/rollup-start-job.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.status([params] [, options] [, callback])
+client.rollup.startJob({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-|`snapshot`
-|`string, string[]` - A comma-separated list of snapshot names
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+* *Request (object):*
+** *`id` (string)*: Identifier for the rollup job.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
+[discrete]
+==== stop_job
+Stops an existing, started rollup job.
-|===
-=== snapshot.verifyRepository
-[source,js]
+{ref}/rollup-stop-job.html[Endpoint documentation]
+[source,ts]
----
-client.snapshot.verifyRepository([params] [, options] [, callback])
+client.rollup.stopJob({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
-[cols=2*]
-|===
-|`repository`
-|`string` - A repository name
-|`master_timeout` or `masterTimeout`
-|`string` - Explicit operation timeout for connection to master node
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`id` (string)*: Identifier for the rollup job.
+** *`timeout` (Optional, string | -1 | 0)*: If `wait_for_completion` is `true`, the API blocks for (at maximum) the specified duration while waiting for the job to stop.
+If more than `timeout` time has passed, the API throws a timeout exception.
+** *`wait_for_completion` (Optional, boolean)*: If set to `true`, causes the API to block until the indexer state completely stops.
+If set to `false`, the API returns immediately and the indexer is stopped asynchronously in the background.
-|===
-=== tasks.cancel
-[source,js]
+[discrete]
+=== search_application
+[discrete]
+==== delete
+Delete a search application.
+Remove a search application and its associated alias. Indices attached to the search application are not removed.
+
+{ref}/delete-search-application.html[Endpoint documentation]
+[source,ts]
----
-client.tasks.cancel([params] [, options] [, callback])
+client.searchApplication.delete({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
-[cols=2*]
-|===
-|`task_id` or `taskId`
-|`string` - Cancel the task with specified task id (node_id:task_number)
-|`nodes`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+[discrete]
+==== Arguments
-|`actions`
-|`string, string[]` - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
+* *Request (object):*
+** *`name` (string)*: The name of the search application to delete
-|`parent_task_id` or `parentTaskId`
-|`string` - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
+[discrete]
+==== delete_behavioral_analytics
+Delete a behavioral analytics collection.
+The associated data stream is also deleted.
-|===
-=== tasks.get
-[source,js]
+{ref}/delete-analytics-collection.html[Endpoint documentation]
+[source,ts]
----
-client.tasks.get([params] [, options] [, callback])
+client.searchApplication.deleteBehavioralAnalytics({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
-[cols=2*]
-|===
-|`task_id` or `taskId`
-|`string` - Return the task with specified id (node_id:task_number)
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Wait for the matching tasks to complete (default: false)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the analytics collection to be deleted
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== get
+Get search application details.
-|===
-=== tasks.list
-[source,js]
+{ref}/get-search-application.html[Endpoint documentation]
+[source,ts]
----
-client.tasks.list([params] [, options] [, callback])
+client.searchApplication.get({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
-[cols=2*]
-|===
-|`nodes`
-|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
-|`actions`
-|`string, string[]` - A comma-separated list of actions that should be returned. Leave empty to return all.
+[discrete]
+==== Arguments
-|`detailed`
-|`boolean` - Return detailed task information (default: false)
+* *Request (object):*
+** *`name` (string)*: The name of the search application
-|`parent_task_id` or `parentTaskId`
-|`string` - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
+[discrete]
+==== get_behavioral_analytics
+Get behavioral analytics collections.
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Wait for the matching tasks to complete (default: false)
+{ref}/list-analytics-collection.html[Endpoint documentation]
+[source,ts]
+----
+client.searchApplication.getBehavioralAnalytics({ ... })
+----
-|`group_by` or `groupBy`
-|`'nodes', 'parents', 'none'` - Group tasks by nodes or parent/child relationships +
- _Default:_ `nodes`
+[discrete]
+==== Arguments
-|`timeout`
-|`string` - Explicit operation timeout
+* *Request (object):*
+** *`name` (Optional, string[])*: A list of analytics collections to limit the returned information
-|===
-=== termvectors
-[source,js]
+[discrete]
+==== list
+Returns the existing search applications.
+
+{ref}/list-search-applications.html[Endpoint documentation]
+[source,ts]
----
-client.termvectors([params] [, options] [, callback])
+client.searchApplication.list({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
-[cols=2*]
-|===
-|`index`
-|`string` - The index in which the document resides.
-|`type`
-|`string` - The type of the document.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`q` (Optional, string)*: Query in the Lucene query string syntax.
+** *`from` (Optional, number)*: Starting offset.
+** *`size` (Optional, number)*: Specifies a max number of results to get.
+
+[discrete]
+==== post_behavioral_analytics_event
+Creates a behavioral analytics event for existing collection.
-|`id`
-|`string` - The id of the document, when not specified a doc param should be supplied.
+http://todo.com/tbd[Endpoint documentation]
+[source,ts]
+----
+client.searchApplication.postBehavioralAnalyticsEvent()
+----
-|`term_statistics` or `termStatistics`
-|`boolean` - Specifies if total term frequency and document frequency should be returned.
-|`field_statistics` or `fieldStatistics`
-|`boolean` - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. +
- _Default:_ `true`
+[discrete]
+==== put
+Create or update a search application.
-|`fields`
-|`string, string[]` - A comma-separated list of fields to return.
+{ref}/put-search-application.html[Endpoint documentation]
+[source,ts]
+----
+client.searchApplication.put({ name })
+----
-|`offsets`
-|`boolean` - Specifies if term offsets should be returned. +
- _Default:_ `true`
+[discrete]
+==== Arguments
-|`positions`
-|`boolean` - Specifies if term positions should be returned. +
- _Default:_ `true`
+* *Request (object):*
+** *`name` (string)*: The name of the search application to be created or updated.
+** *`search_application` (Optional, { name, indices, updated_at_millis, analytics_collection_name, template })*
+** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing Search Applications.
-|`payloads`
-|`boolean` - Specifies if term payloads should be returned. +
- _Default:_ `true`
+[discrete]
+==== put_behavioral_analytics
+Create a behavioral analytics collection.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random).
+{ref}/put-analytics-collection.html[Endpoint documentation]
+[source,ts]
+----
+client.searchApplication.putBehavioralAnalytics({ name })
+----
-|`routing`
-|`string` - Specific routing value.
+[discrete]
+==== Arguments
-|`parent`
-|`string` - Parent id of documents.
+* *Request (object):*
+** *`name` (string)*: The name of the analytics collection to be created or updated.
-|`realtime`
-|`boolean` - Specifies if request is real-time as opposed to near-real-time (default: true).
+[discrete]
+==== render_query
+Renders a query for given search application search parameters
-|`version`
-|`number` - Explicit version number for concurrency control
+{ref}/search-application-render-query.html[Endpoint documentation]
+[source,ts]
+----
+client.searchApplication.renderQuery()
+----
-|`version_type` or `versionType`
-|`'internal', 'external', 'external_gte', 'force'` - Specific version type
-|`body`
-|`object` - Define parameters and or supply a document to get termvectors for. See documentation.
+[discrete]
+==== search
+Run a search application search.
+Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.
+Unspecified template parameters are assigned their default values if applicable.
-|===
-=== update
-[source,js]
+{ref}/search-application-search.html[Endpoint documentation]
+[source,ts]
----
-client.update([params] [, options] [, callback])
+client.searchApplication.search({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
-[cols=2*]
-|===
-|`id`
-|`string` - Document ID
-|`index`
-|`string` - The name of the index
+[discrete]
+==== Arguments
-|`type`
-|`string` - The type of the document
+* *Request (object):*
+** *`name` (string)*: The name of the search application to be searched.
+** *`params` (Optional, Record)*: Query parameters specific to this request, which will override any defaults specified in the template.
+** *`typed_keys` (Optional, boolean)*: Determines whether aggregation names are prefixed by their respective types in the response.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the update 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)
+[discrete]
+=== searchable_snapshots
+[discrete]
+==== cache_stats
+Retrieve node-level cache statistics about searchable snapshots.
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+{ref}/searchable-snapshots-apis.html[Endpoint documentation]
+[source,ts]
+----
+client.searchableSnapshots.cacheStats({ ... })
+----
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== Arguments
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: A list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
+** *`master_timeout` (Optional, string | -1 | 0)*
-|`lang`
-|`string` - The script language (default: painless)
+[discrete]
+==== clear_cache
+Clear the cache of searchable snapshots.
-|`parent`
-|`string` - ID of the parent document. Is is only used for routing and when for the upsert request
+{ref}/searchable-snapshots-apis.html[Endpoint documentation]
+[source,ts]
+----
+client.searchableSnapshots.clearCache({ ... })
+----
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
+[discrete]
+==== Arguments
-|`retry_on_conflict` or `retryOnConflict`
-|`number` - Specify how many times should the operation be retried when a conflict occurs (default: 0)
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of index names
+** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
+** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
+** *`pretty` (Optional, boolean)*
+** *`human` (Optional, boolean)*
-|`routing`
-|`string` - Specific routing value
+[discrete]
+==== mount
+Mount a snapshot as a searchable index.
-|`timeout`
-|`string` - Explicit operation timeout
+{ref}/searchable-snapshots-api-mount-snapshot.html[Endpoint documentation]
+[source,ts]
+----
+client.searchableSnapshots.mount({ repository, snapshot, index })
+----
-|`if_seq_no` or `ifSeqNo`
-|`number` - only perform the update operation if the last operation that has changed the document has the specified sequence number
+[discrete]
+==== Arguments
-|`if_primary_term` or `ifPrimaryTerm`
-|`number` - only perform the update operation if the last operation that has changed the document has the specified primary term
+* *Request (object):*
+** *`repository` (string)*: The name of the repository containing the snapshot of the index to mount
+** *`snapshot` (string)*: The name of the snapshot of the index to mount
+** *`index` (string)*
+** *`renamed_index` (Optional, string)*
+** *`index_settings` (Optional, Record)*
+** *`ignore_index_settings` (Optional, string[])*
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`wait_for_completion` (Optional, boolean)*: Should this request wait until the operation has completed before returning
+** *`storage` (Optional, string)*: Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy`
-|`body`
-|`object` - The request definition requires either `script` or partial `doc`
+[discrete]
+==== stats
+Retrieve shard-level statistics about searchable snapshots.
-|===
-=== updateByQuery
-[source,js]
+{ref}/searchable-snapshots-apis.html[Endpoint documentation]
+[source,ts]
----
-client.updateByQuery([params] [, options] [, callback])
+client.searchableSnapshots.stats({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types
+[discrete]
+==== Arguments
-|`analyzer`
-|`string` - The analyzer to use for the query string
+* *Request (object):*
+** *`index` (Optional, string | string[])*: A list of index names
+** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Return stats aggregated at cluster, index or shard level
-|`analyze_wildcard` or `analyzeWildcard`
-|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)
+[discrete]
+=== security
+[discrete]
+==== activate_user_profile
+Activate a user profile.
-|`default_operator` or `defaultOperator`
-|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
- _Default:_ `OR`
+Create or update a user profile on behalf of another user.
-|`df`
-|`string` - The field to use as default where no field prefix is given in the query string
+{ref}/security-api-activate-user-profile.html[Endpoint documentation]
+[source,ts]
+----
+client.security.activateUserProfile({ grant_type })
+----
-|`from`
-|`number` - Starting offset (default: 0)
+[discrete]
+==== Arguments
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+* *Request (object):*
+** *`grant_type` (Enum("password" | "access_token"))*
+** *`access_token` (Optional, string)*
+** *`password` (Optional, string)*
+** *`username` (Optional, string)*
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== authenticate
+Authenticate a user.
-|`conflicts`
-|`'abort', 'proceed'` - What to do when the update by query hits version conflicts? +
- _Default:_ `abort`
+Authenticates a user and returns information about the authenticated user.
+Include the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication).
+A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.
+If the user cannot be authenticated, this API returns a 401 status code.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+{ref}/security-api-authenticate.html[Endpoint documentation]
+[source,ts]
+----
+client.security.authenticate()
+----
-|`lenient`
-|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
-|`pipeline`
-|`string` - Ingest pipeline to set on index requests made by this action. (default: none)
+[discrete]
+==== bulk_delete_role
+Bulk delete roles.
-|`preference`
-|`string` - Specify the node or shard the operation should be performed on (default: random)
+The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+The bulk delete roles API cannot delete roles that are defined in roles files.
-|`q`
-|`string` - Query in the Lucene query string syntax
+{ref}/security-api-bulk-delete-role.html[Endpoint documentation]
+[source,ts]
+----
+client.security.bulkDeleteRole({ names })
+----
-|`routing`
-|`string, string[]` - A comma-separated list of specific routing values
+[discrete]
+==== Arguments
-|`scroll`
-|`string` - Specify how long a consistent view of the index should be maintained for scrolled search
+* *Request (object):*
+** *`names` (string[])*: An array of role names to delete
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`search_type` or `searchType`
-|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type
+[discrete]
+==== bulk_put_role
+Bulk create or update roles.
-|`search_timeout` or `searchTimeout`
-|`string` - Explicit timeout for each search request. Defaults to no timeout.
+The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+The bulk create or update roles API cannot update roles that are defined in roles files.
-|`size`
-|`number` - Number of hits to return (default: 10)
+{ref}/security-api-bulk-put-role.html[Endpoint documentation]
+[source,ts]
+----
+client.security.bulkPutRole({ roles })
+----
-|`sort`
-|`string, string[]` - A comma-separated list of : pairs
+[discrete]
+==== Arguments
-|`_source`
-|`string, string[]` - True or false to return the _source field or not, or a list of fields to return
+* *Request (object):*
+** *`roles` (Record)*: A dictionary of role name to RoleDescriptor objects to add or update
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`_source_excludes` or `_sourceExcludes`
-|`string, string[]` - A list of fields to exclude from the returned _source field
+[discrete]
+==== bulk_update_api_keys
+Updates the attributes of multiple existing API keys.
-|`_source_includes` or `_sourceIncludes`
-|`string, string[]` - A list of fields to extract and return from the _source field
+{ref}/security-api-bulk-update-api-keys.html[Endpoint documentation]
+[source,ts]
+----
+client.security.bulkUpdateApiKeys()
+----
-|`terminate_after` or `terminateAfter`
-|`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
-|`stats`
-|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes
+[discrete]
+==== change_password
+Change passwords.
-|`version`
-|`boolean` - Specify whether to return document version as part of a hit
+Change the passwords of users in the native realm and built-in users.
-|`version_type` or `versionType`
-|`boolean` - Should the document increment the version number (internal) on hit or not (reindex)
+{ref}/security-api-change-password.html[Endpoint documentation]
+[source,ts]
+----
+client.security.changePassword({ ... })
+----
-|`request_cache` or `requestCache`
-|`boolean` - Specify if request cache should be used for this request or not, defaults to index level setting
+[discrete]
+==== Arguments
-|`refresh`
-|`boolean` - Should the effected indexes be refreshed?
+* *Request (object):*
+** *`username` (Optional, string)*: The user whose password you want to change. If you do not specify this
+parameter, the password is changed for the current user.
+** *`password` (Optional, string)*: The new password value. Passwords must be at least 6 characters long.
+** *`password_hash` (Optional, string)*: A hash of the new password value. This must be produced using the same
+hashing algorithm as has been configured for password storage. For more details,
+see the explanation of the `xpack.security.authc.password_hashing.algorithm`
+setting.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`timeout`
-|`string` - Time each individual bulk request should wait for shards that are unavailable. +
- _Default:_ `1m`
+[discrete]
+==== clear_api_key_cache
+Clear the API key cache.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before proceeding with the update by query 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)
+Evict a subset of all entries from the API key cache.
+The cache is also automatically cleared on state changes of the security index.
-|`scroll_size` or `scrollSize`
-|`number` - Size on the scroll request powering the update by query
+{ref}/security-api-clear-api-key-cache.html[Endpoint documentation]
+[source,ts]
+----
+client.security.clearApiKeyCache({ ids })
+----
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should the request should block until the update by query operation is complete. +
- _Default:_ `true`
+[discrete]
+==== Arguments
-|`requests_per_second` or `requestsPerSecond`
-|`number` - The throttle to set on this request in sub-requests per second. -1 means no throttle.
+* *Request (object):*
+** *`ids` (string | string[])*: List of API key IDs to evict from the API key cache.
+To evict all API keys, use `*`.
+Does not support other wildcard patterns.
-|`slices`
-|`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +
- _Default:_ `1`
+[discrete]
+==== clear_cached_privileges
+Clear the privileges cache.
-|`body`
-|`object` - The search definition using the Query DSL
+Evict privileges from the native application privilege cache.
+The cache is also automatically cleared for applications that have their privileges updated.
-|===
-=== updateByQueryRethrottle
-[source,js]
+{ref}/security-api-clear-privilege-cache.html[Endpoint documentation]
+[source,ts]
----
-client.updateByQueryRethrottle([params] [, options] [, callback])
+client.security.clearCachedPrivileges({ application })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
-[cols=2*]
-|===
-|`task_id` or `taskId`
-|`string` - The task id to rethrottle
-|`requests_per_second` or `requestsPerSecond`
-|`number` - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
+[discrete]
+==== Arguments
-|===
-=== ccr.deleteAutoFollowPattern
-[source,js]
-----
-client.ccr.deleteAutoFollowPattern([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
-[cols=2*]
-|===
-|`name`
-|`string` - The name of the auto follow pattern.
+* *Request (object):*
+** *`application` (string)*: A list of application names
+
+[discrete]
+==== clear_cached_realms
+Clear the user cache.
+
+Evict users from the user cache. You can completely clear the cache or evict specific users.
-|===
-=== ccr.follow
-[source,js]
+{ref}/security-api-clear-cache.html[Endpoint documentation]
+[source,ts]
----
-client.ccr.follow([params] [, options] [, callback])
+client.security.clearCachedRealms({ realms })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the follower index
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of shard copies that must be active before returning. Defaults to 0. 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) +
- _Default:_ `0`
+[discrete]
+==== Arguments
-|`body`
-|`object` - The name of the leader index and other optional ccr related parameters
+* *Request (object):*
+** *`realms` (string | string[])*: List of realms to clear
+** *`usernames` (Optional, string[])*: List of usernames to clear from the cache
-|===
-=== ccr.followInfo
-[source,js]
-----
-client.ccr.followInfo([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index patterns; use `_all` to perform the operation on all indices
+[discrete]
+==== clear_cached_roles
+Clear the roles cache.
-|===
-=== ccr.followStats
-[source,js]
-----
-client.ccr.followStats([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index patterns; use `_all` to perform the operation on all indices
+Evict roles from the native role cache.
-|===
-=== ccr.getAutoFollowPattern
-[source,js]
+{ref}/security-api-clear-role-cache.html[Endpoint documentation]
+[source,ts]
----
-client.ccr.getAutoFollowPattern([params] [, options] [, callback])
+client.security.clearCachedRoles({ name })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
-[cols=2*]
-|===
-|`name`
-|`string` - The name of the auto follow pattern.
-|===
-=== ccr.pauseFollow
-[source,js]
-----
-client.ccr.pauseFollow([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the follower index that should pause following its leader index.
+[discrete]
+==== Arguments
-|===
-=== ccr.putAutoFollowPattern
-[source,js]
-----
-client.ccr.putAutoFollowPattern([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
-[cols=2*]
-|===
-|`name`
-|`string` - The name of the auto follow pattern.
+* *Request (object):*
+** *`name` (string | string[])*: Role name
+
+[discrete]
+==== clear_cached_service_tokens
+Clear service account token caches.
-|`body`
-|`object` - The specification of the auto follow pattern
+Evict a subset of all entries from the service account token caches.
-|===
-=== ccr.resumeFollow
-[source,js]
+{ref}/security-api-clear-service-token-caches.html[Endpoint documentation]
+[source,ts]
----
-client.ccr.resumeFollow([params] [, options] [, callback])
+client.security.clearCachedServiceTokens({ namespace, service, name })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the follow index to resume following.
-|`body`
-|`object` - The name of the leader index and other optional ccr related parameters
+[discrete]
+==== Arguments
-|===
-=== ccr.stats
-[source,js]
-----
-client.ccr.stats([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
-[cols=2*]
-|===
-|===
-=== ccr.unfollow
-[source,js]
-----
-client.ccr.unfollow([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/current
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the follower index that should be turned into a regular index.
+* *Request (object):*
+** *`namespace` (string)*: An identifier for the namespace
+** *`service` (string)*: An identifier for the service name
+** *`name` (string | string[])*: A list of service token names
-|===
-=== ilm.deleteLifecycle
-[source,js]
-----
-client.ilm.deleteLifecycle([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html
-[cols=2*]
-|===
-|`policy`
-|`string` - The name of the index lifecycle policy
+[discrete]
+==== create_api_key
+Create an API key.
-|===
-=== ilm.explainLifecycle
-[source,js]
+Create an API key for access without requiring basic authentication.
+A successful request returns a JSON structure that contains the API key, its unique id, and its name.
+If applicable, it also returns expiration information for the API key in milliseconds.
+NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
+
+{ref}/security-api-create-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ilm.explainLifecycle([params] [, options] [, callback])
+client.security.createApiKey({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index to explain
-|`human`
-|`boolean` - Return data such as dates in a human readable format +
- _Default:_ `false`
+[discrete]
+==== Arguments
-|===
-=== ilm.getLifecycle
-[source,js]
-----
-client.ilm.getLifecycle([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
-[cols=2*]
-|===
-|`policy`
-|`string` - The name of the index lifecycle policy
+* *Request (object):*
+** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key. By default, API keys never expire.
+** *`name` (Optional, string)*: Specifies the name for this API key.
+** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
+** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with `_` are reserved for system usage.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|===
-=== ilm.getStatus
-[source,js]
-----
-client.ilm.getStatus([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
-[cols=2*]
-|===
-|===
-=== ilm.moveToStep
-[source,js]
-----
-client.ilm.moveToStep([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index whose lifecycle step is to change
+[discrete]
+==== create_cross_cluster_api_key
+Create a cross-cluster API key.
-|`body`
-|`object` - The new lifecycle step to move to
+Create an API key of the `cross_cluster` type for the API key based remote cluster access.
+A `cross_cluster` API key cannot be used to authenticate through the REST interface.
-|===
-=== ilm.putLifecycle
-[source,js]
-----
-client.ilm.putLifecycle([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
-[cols=2*]
-|===
-|`policy`
-|`string` - The name of the index lifecycle policy
+IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.
-|`body`
-|`object` - The lifecycle policy definition to register
+Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.
-|===
-=== ilm.removePolicy
-[source,js]
-----
-client.ilm.removePolicy([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index to remove policy on
+NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the `access` property.
-|===
-=== ilm.retry
-[source,js]
-----
-client.ilm.retry([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the indices (comma-separated) whose failed lifecycle step is to be retry
+A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds.
-|===
-=== ilm.start
-[source,js]
-----
-client.ilm.start([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html
-[cols=2*]
-|===
-|===
-=== ilm.stop
-[source,js]
+By default, API keys never expire. You can specify expiration information when you create the API keys.
+
+Cross-cluster API keys can only be updated with the update cross-cluster API key API.
+Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.
+
+{ref}/security-api-create-cross-cluster-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ilm.stop([params] [, options] [, callback])
+client.security.createCrossClusterApiKey({ access, name })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html
-[cols=2*]
-|===
-|===
-=== indices.freeze
-[source,js]
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`access` ({ replication, search })*: The access to be granted to this API key.
+The access is composed of permissions for cross-cluster search and cross-cluster replication.
+At least one of them must be specified.
+
+NOTE: No explicit privileges should be specified for either search or replication access.
+The creation process automatically converts the access specification to a role descriptor which has relevant privileges assigned accordingly.
+** *`name` (string)*: Specifies the name for this API key.
+** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key.
+By default, API keys never expire.
+** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key.
+It supports nested data structure.
+Within the metadata object, keys beginning with `_` are reserved for system usage.
+
+[discrete]
+==== create_service_token
+Create a service account token.
+
+Create a service accounts token for access without requiring basic authentication.
+
+{ref}/security-api-create-service-token.html[Endpoint documentation]
+[source,ts]
----
-client.indices.freeze([params] [, options] [, callback])
+client.security.createServiceToken({ namespace, service })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index to freeze
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+* *Request (object):*
+** *`namespace` (string)*: An identifier for the namespace
+** *`service` (string)*: An identifier for the service name
+** *`name` (Optional, string)*: An identifier for the token name
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== delete_privileges
+Delete application privileges.
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+{ref}/security-api-delete-privilege.html[Endpoint documentation]
+[source,ts]
+----
+client.security.deletePrivileges({ application, name })
+----
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `closed`
+[discrete]
+==== Arguments
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of active shards to wait for before the operation returns.
+* *Request (object):*
+** *`application` (string)*: Application name
+** *`name` (string | string[])*: Privilege name
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|===
-=== indices.unfreeze
-[source,js]
+[discrete]
+==== delete_role
+Delete roles.
+
+Delete roles in the native realm.
+
+{ref}/security-api-delete-role.html[Endpoint documentation]
+[source,ts]
----
-client.indices.unfreeze([params] [, options] [, callback])
+client.security.deleteRole({ name })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index to unfreeze
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: Role name
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for connection to master
+[discrete]
+==== delete_role_mapping
+Delete role mappings.
+
+{ref}/security-api-delete-role-mapping.html[Endpoint documentation]
+[source,ts]
+----
+client.security.deleteRoleMapping({ name })
+----
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+==== Arguments
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+* *Request (object):*
+** *`name` (string)*: Role-mapping name
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `closed`
+[discrete]
+==== delete_service_token
+Delete service account tokens.
-|`wait_for_active_shards` or `waitForActiveShards`
-|`string` - Sets the number of active shards to wait for before the operation returns.
+Delete service account tokens for a service in a specified namespace.
-|===
-=== ml.closeJob
-[source,js]
+{ref}/security-api-delete-service-token.html[Endpoint documentation]
+[source,ts]
----
-client.ml.closeJob([params] [, options] [, callback])
+client.security.deleteServiceToken({ namespace, service, name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The name of the job to close
-|`allow_no_jobs` or `allowNoJobs`
-|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+[discrete]
+==== Arguments
-|`force`
-|`boolean` - True if the job should be forcefully closed
+* *Request (object):*
+** *`namespace` (string)*: An identifier for the namespace
+** *`service` (string)*: An identifier for the service name
+** *`name` (string)*: An identifier for the token name
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`timeout`
-|`string` - Controls the time to wait until a job has closed. Default to 30 minutes
+[discrete]
+==== delete_user
+Delete users.
-|`body`
-|`object` - The URL params optionally sent in the body
+Delete users from the native realm.
-|===
-=== ml.deleteCalendar
-[source,js]
+{ref}/security-api-delete-user.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteCalendar([params] [, options] [, callback])
+client.security.deleteUser({ username })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to delete
+[discrete]
+==== Arguments
-|===
-=== ml.deleteCalendarEvent
-[source,js]
+* *Request (object):*
+** *`username` (string)*: username
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+
+[discrete]
+==== disable_user
+Disable users.
+
+Disable users in the native realm.
+
+{ref}/security-api-disable-user.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteCalendarEvent([params] [, options] [, callback])
+client.security.disableUser({ username })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to modify
+[discrete]
+==== Arguments
-|`event_id` or `eventId`
-|`string` - The ID of the event to remove from the calendar
+* *Request (object):*
+** *`username` (string)*: The username of the user to disable
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|===
-=== ml.deleteCalendarJob
-[source,js]
+[discrete]
+==== disable_user_profile
+Disable a user profile.
+
+Disable user profiles so that they are not visible in user profile searches.
+
+{ref}/security-api-disable-user-profile.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteCalendarJob([params] [, options] [, callback])
+client.security.disableUserProfile({ uid })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to modify
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`uid` (string)*: Unique identifier for the user profile.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation
+visible to search, if 'wait_for' then wait for a refresh to make this operation
+visible to search, if 'false' do nothing with refreshes.
-|`job_id` or `jobId`
-|`string` - The ID of the job to remove from the calendar
+[discrete]
+==== enable_user
+Enable users.
-|===
-=== ml.deleteDatafeed
-[source,js]
+Enable users in the native realm.
+
+{ref}/security-api-enable-user.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteDatafeed([params] [, options] [, callback])
+client.security.enableUser({ username })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeed to delete
-|`force`
-|`boolean` - True if the datafeed should be forcefully deleted
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`username` (string)*: The username of the user to enable
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+
+[discrete]
+==== enable_user_profile
+Enable a user profile.
-|===
-=== ml.deleteExpiredData
-[source,js]
+Enable user profiles to make them visible in user profile searches.
+
+{ref}/security-api-enable-user-profile.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteExpiredData([params] [, options] [, callback])
+client.security.enableUserProfile({ uid })
----
-[cols=2*]
-|===
-|===
-=== ml.deleteFilter
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`uid` (string)*: Unique identifier for the user profile.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation
+visible to search, if 'wait_for' then wait for a refresh to make this operation
+visible to search, if 'false' do nothing with refreshes.
+
+[discrete]
+==== enroll_kibana
+Enroll Kibana.
+
+Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.
+
+{ref}/security-api-kibana-enrollment.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteFilter([params] [, options] [, callback])
+client.security.enrollKibana()
----
-[cols=2*]
-|===
-|`filter_id` or `filterId`
-|`string` - The ID of the filter to delete
-|===
-=== ml.deleteForecast
-[source,js]
+[discrete]
+==== enroll_node
+Enroll a node.
+
+Enroll a new node to allow it to join an existing cluster with security features enabled.
+
+{ref}/security-api-node-enrollment.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteForecast([params] [, options] [, callback])
+client.security.enrollNode()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job from which to delete forecasts
-|`forecast_id` or `forecastId`
-|`string` - The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all`
-|`allow_no_forecasts` or `allowNoForecasts`
-|`boolean` - Whether to ignore if `_all` matches no forecasts
+[discrete]
+==== get_api_key
+Get API key information.
-|`timeout`
-|`string` - Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds
+Retrieves information for one or more API keys.
+NOTE: If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.
+If you have `read_security`, `manage_api_key` or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.
-|===
-=== ml.deleteJob
-[source,js]
+{ref}/security-api-get-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteJob([params] [, options] [, callback])
+client.security.getApiKey({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to delete
-|`force`
-|`boolean` - True if the job should be forcefully deleted
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (Optional, string)*: An API key id.
+This parameter cannot be used with any of `name`, `realm_name` or `username`.
+** *`name` (Optional, string)*: An API key name.
+This parameter cannot be used with any of `id`, `realm_name` or `username`.
+It supports prefix search with wildcard.
+** *`owner` (Optional, boolean)*: A boolean flag that can be used to query API keys owned by the currently authenticated user.
+The `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.
+** *`realm_name` (Optional, string)*: The name of an authentication realm.
+This parameter cannot be used with either `id` or `name` or when `owner` flag is set to `true`.
+** *`username` (Optional, string)*: The username of a user.
+This parameter cannot be used with either `id` or `name` or when `owner` flag is set to `true`.
+** *`with_limited_by` (Optional, boolean)*: Return the snapshot of the owner user's role descriptors
+associated with the API key. An API key's actual
+permission is the intersection of its assigned role
+descriptors and the owner user's role descriptors.
+** *`active_only` (Optional, boolean)*: A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as `owner` or `name`. If `active_only` is false, the response will include both active and inactive (expired or invalidated) keys.
+** *`with_profile_uid` (Optional, boolean)*: Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should this request wait until the operation has completed before returning +
- _Default:_ `true`
+[discrete]
+==== get_builtin_privileges
+Get builtin privileges.
-|===
-=== ml.deleteModelSnapshot
-[source,js]
+Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
+
+{ref}/security-api-get-builtin-privileges.html[Endpoint documentation]
+[source,ts]
----
-client.ml.deleteModelSnapshot([params] [, options] [, callback])
+client.security.getBuiltinPrivileges()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to fetch
-|`snapshot_id` or `snapshotId`
-|`string` - The ID of the snapshot to delete
-|===
-=== ml.findFileStructure
-[source,js]
+[discrete]
+==== get_privileges
+Get application privileges.
+
+{ref}/security-api-get-privileges.html[Endpoint documentation]
+[source,ts]
----
-client.ml.findFileStructure([params] [, options] [, callback])
+client.security.getPrivileges({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html
-[cols=2*]
-|===
-|`lines_to_sample` or `linesToSample`
-|`number` - How many lines of the file should be included in the analysis +
- _Default:_ `1000`
-|`timeout`
-|`string` - Timeout after which the analysis will be aborted +
- _Default:_ `25s`
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`application` (Optional, string)*: Application name
+** *`name` (Optional, string | string[])*: Privilege name
-|`charset`
-|`string` - Optional parameter to specify the character set of the file
+[discrete]
+==== get_role
+Get roles.
-|`format`
-|`'ndjson', 'xml', 'delimited', 'semi_structured_text'` - Optional parameter to specify the high level file format
+Get roles in the native realm.
+The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+The get roles API cannot retrieve roles that are defined in roles files.
-|`has_header_row` or `hasHeaderRow`
-|`boolean` - Optional parameter to specify whether a delimited file includes the column names in its first row
+{ref}/security-api-get-role.html[Endpoint documentation]
+[source,ts]
+----
+client.security.getRole({ ... })
+----
-|`column_names` or `columnNames`
-|`string, string[]` - Optional parameter containing a comma separated list of the column names for a delimited file
+[discrete]
+==== Arguments
-|`delimiter`
-|`string` - Optional parameter to specify the delimiter character for a delimited file - must be a single character
+* *Request (object):*
+** *`name` (Optional, string | string[])*: The name of the role. You can specify multiple roles as a list. If you do not specify this parameter, the API returns information about all roles.
-|`quote`
-|`string` - Optional parameter to specify the quote character for a delimited file - must be a single character
+[discrete]
+==== get_role_mapping
+Get role mappings.
-|`should_trim_fields` or `shouldTrimFields`
-|`boolean` - Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
+Role mappings define which roles are assigned to each user.
+The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.
+The get role mappings API cannot retrieve role mappings that are defined in role mapping files.
-|`grok_pattern` or `grokPattern`
-|`string` - Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
+{ref}/security-api-get-role-mapping.html[Endpoint documentation]
+[source,ts]
+----
+client.security.getRoleMapping({ ... })
+----
-|`timestamp_field` or `timestampField`
-|`string` - Optional parameter to specify the timestamp field in the file
+[discrete]
+==== Arguments
-|`timestamp_format` or `timestampFormat`
-|`string` - Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
+* *Request (object):*
+** *`name` (Optional, string | string[])*: The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. You can specify multiple mapping names as a list. If you do not specify this parameter, the API returns information about all role mappings.
-|`explain`
-|`boolean` - Whether to include a commentary on how the structure was derived
+[discrete]
+==== get_service_accounts
+Get service accounts.
-|`body`
-|`object` - The contents of the file to be analyzed
+Get a list of service accounts that match the provided path parameters.
-|===
-=== ml.flushJob
-[source,js]
+{ref}/security-api-get-service-accounts.html[Endpoint documentation]
+[source,ts]
----
-client.ml.flushJob([params] [, options] [, callback])
+client.security.getServiceAccounts({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The name of the job to flush
-|`calc_interim` or `calcInterim`
-|`boolean` - Calculates interim results for the most recent bucket or all buckets within the latency period
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`namespace` (Optional, string)*: Name of the namespace. Omit this parameter to retrieve information about all service accounts. If you omit this parameter, you must also omit the `service` parameter.
+** *`service` (Optional, string)*: Name of the service name. Omit this parameter to retrieve information about all service accounts that belong to the specified `namespace`.
-|`start`
-|`string` - When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
+[discrete]
+==== get_service_credentials
+Get service account credentials.
-|`end`
-|`string` - When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results
+{ref}/security-api-get-service-credentials.html[Endpoint documentation]
+[source,ts]
+----
+client.security.getServiceCredentials({ namespace, service })
+----
-|`advance_time` or `advanceTime`
-|`string` - Advances time to the given value generating results and updating the model for the advanced interval
+[discrete]
+==== Arguments
-|`skip_time` or `skipTime`
-|`string` - Skips time to the given value without generating results or updating the model for the skipped interval
+* *Request (object):*
+** *`namespace` (string)*: Name of the namespace.
+** *`service` (string)*: Name of the service name.
-|`body`
-|`object` - Flush parameters
+[discrete]
+==== get_settings
+Retrieve settings for the security system indices
-|===
-=== ml.forecast
-[source,js]
+{ref}/security-api-get-settings.html[Endpoint documentation]
+[source,ts]
----
-client.ml.forecast([params] [, options] [, callback])
+client.security.getSettings()
----
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to forecast for
-|`duration`
-|`string` - The duration of the forecast
+[discrete]
+==== get_token
+Get a token.
-|`expires_in` or `expiresIn`
-|`string` - The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity.
+Create a bearer token for access without requiring basic authentication.
-|===
-=== ml.getBuckets
-[source,js]
+{ref}/security-api-get-token.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getBuckets([params] [, options] [, callback])
+client.security.getToken({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - ID of the job to get bucket results from
-|`timestamp`
-|`string` - The timestamp of the desired single bucket result
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`grant_type` (Optional, Enum("password" | "client_credentials" | "_kerberos" | "refresh_token"))*
+** *`scope` (Optional, string)*
+** *`password` (Optional, string)*
+** *`kerberos_ticket` (Optional, string)*
+** *`refresh_token` (Optional, string)*
+** *`username` (Optional, string)*
+
+[discrete]
+==== get_user
+Get users.
-|`expand`
-|`boolean` - Include anomaly records
+Get information about users in the native realm and built-in users.
-|`exclude_interim` or `excludeInterim`
-|`boolean` - Exclude interim results
+{ref}/security-api-get-user.html[Endpoint documentation]
+[source,ts]
+----
+client.security.getUser({ ... })
+----
-|`from`
-|`number` - skips a number of buckets
+[discrete]
+==== Arguments
-|`size`
-|`number` - specifies a max number of buckets to get
+* *Request (object):*
+** *`username` (Optional, string | string[])*: An identifier for the user. You can specify multiple usernames as a list. If you omit this parameter, the API retrieves information about all users.
+** *`with_profile_uid` (Optional, boolean)*: If true will return the User Profile ID for a user, if any.
-|`start`
-|`string` - Start time filter for buckets
+[discrete]
+==== get_user_privileges
+Get user privileges.
-|`end`
-|`string` - End time filter for buckets
+{ref}/security-api-get-user-privileges.html[Endpoint documentation]
+[source,ts]
+----
+client.security.getUserPrivileges({ ... })
+----
-|`anomaly_score` or `anomalyScore`
-|`number` - Filter for the most anomalous buckets
+[discrete]
+==== Arguments
-|`sort`
-|`string` - Sort buckets by a particular field
+* *Request (object):*
+** *`application` (Optional, string)*: The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications.
+** *`priviledge` (Optional, string)*: The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application.
+** *`username` (Optional, string | null)*
-|`desc`
-|`boolean` - Set the sort direction
+[discrete]
+==== get_user_profile
+Get a user profile.
-|`body`
-|`object` - Bucket selection details if not provided in URI
+Get a user's profile using the unique profile ID.
-|===
-=== ml.getCalendarEvents
-[source,js]
+{ref}/security-api-get-user-profile.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getCalendarEvents([params] [, options] [, callback])
+client.security.getUserProfile({ uid })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar containing the events
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`uid` (string | string[])*: A unique identifier for the user profile.
+** *`data` (Optional, string | string[])*: List of filters for the `data` field of the profile document.
+To return all content use `data=*`. To return a subset of content
+use `data=` to retrieve content nested under the specified ``.
+By default returns no `data` content.
-|`job_id` or `jobId`
-|`string` - Get events for the job. When this option is used calendar_id must be '_all'
+[discrete]
+==== grant_api_key
+Grant an API key.
-|`start`
-|`string` - Get events after this time
+Create an API key on behalf of another user.
+This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API.
+The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created.
+It is not possible to use this API to create an API key without that user’s credentials.
+The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user.
+In this case, the API key will be created on behalf of the impersonated user.
-|`end`
-|`string` - Get events before this time
+This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
-|`from`
-|`number` - Skips a number of events
+A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.
+If applicable, it also returns expiration information for the API key in milliseconds.
-|`size`
-|`number` - Specifies a max number of events to get
+By default, API keys never expire. You can specify expiration information when you create the API keys.
-|===
-=== ml.getCalendars
-[source,js]
+{ref}/security-api-grant-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getCalendars([params] [, options] [, callback])
+client.security.grantApiKey({ api_key, grant_type })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to fetch
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`api_key` ({ name, expiration, role_descriptors, metadata })*: Defines the API key.
+** *`grant_type` (Enum("access_token" | "password"))*: The type of grant. Supported grant types are: `access_token`, `password`.
+** *`access_token` (Optional, string)*: The user’s access token.
+If you specify the `access_token` grant type, this parameter is required.
+It is not valid with other grant types.
+** *`username` (Optional, string)*: The user name that identifies the user.
+If you specify the `password` grant type, this parameter is required.
+It is not valid with other grant types.
+** *`password` (Optional, string)*: The user’s password. If you specify the `password` grant type, this parameter is required.
+It is not valid with other grant types.
+** *`run_as` (Optional, string)*: The name of the user to be impersonated.
-|`from`
-|`number` - skips a number of calendars
+[discrete]
+==== has_privileges
+Check user privileges.
-|`size`
-|`number` - specifies a max number of calendars to get
+Determine whether the specified user has a specified list of privileges.
-|===
-=== ml.getCategories
-[source,js]
+{ref}/security-api-has-privileges.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getCategories([params] [, options] [, callback])
+client.security.hasPrivileges({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The name of the job
-|`category_id` or `categoryId`
-|`number` - The identifier of the category definition of interest
+[discrete]
+==== Arguments
-|`from`
-|`number` - skips a number of categories
+* *Request (object):*
+** *`user` (Optional, string)*: Username
+** *`application` (Optional, { application, privileges, resources }[])*
+** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_stats" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of the cluster privileges that you want to check.
+** *`index` (Optional, { names, privileges, allow_restricted_indices }[])*
-|`size`
-|`number` - specifies a max number of categories to get
+[discrete]
+==== has_privileges_user_profile
+Check user profile privileges.
-|`body`
-|`object` - Category selection details if not provided in URI
+Determine whether the users associated with the specified user profile IDs have all the requested privileges.
-|===
-=== ml.getDatafeedStats
-[source,js]
+{ref}/security-api-has-privileges-user-profile.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getDatafeedStats([params] [, options] [, callback])
+client.security.hasPrivilegesUserProfile({ uids, privileges })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeeds stats to fetch
-|`allow_no_datafeeds` or `allowNoDatafeeds`
-|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+[discrete]
+==== Arguments
-|===
-=== ml.getDatafeeds
-[source,js]
-----
-client.ml.getDatafeeds([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeeds to fetch
+* *Request (object):*
+** *`uids` (string[])*: A list of profile IDs. The privileges are checked for associated users of the profiles.
+** *`privileges` ({ application, cluster, index })*
+
+[discrete]
+==== invalidate_api_key
+Invalidate API keys.
-|`allow_no_datafeeds` or `allowNoDatafeeds`
-|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+This API invalidates API keys created by the create API key or grant API key APIs.
+Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.
+The `manage_api_key` privilege allows deleting any API keys.
+The `manage_own_api_key` only allows deleting API keys that are owned by the user.
+In addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats:
+- Set the parameter `owner=true`.
+- Or, set both `username` and `realm_name` to match the user’s identity.
+- Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the `ids` field.
-|===
-=== ml.getFilters
-[source,js]
+{ref}/security-api-invalidate-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getFilters([params] [, options] [, callback])
+client.security.invalidateApiKey({ ... })
----
-[cols=2*]
-|===
-|`filter_id` or `filterId`
-|`string` - The ID of the filter to fetch
+[discrete]
+==== Arguments
-|`from`
-|`number` - skips a number of filters
+* *Request (object):*
+** *`id` (Optional, string)*
+** *`ids` (Optional, string[])*: A list of API key ids.
+This parameter cannot be used with any of `name`, `realm_name`, or `username`.
+** *`name` (Optional, string)*: An API key name.
+This parameter cannot be used with any of `ids`, `realm_name` or `username`.
+** *`owner` (Optional, boolean)*: Can be used to query API keys owned by the currently authenticated user.
+The `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.
+** *`realm_name` (Optional, string)*: The name of an authentication realm.
+This parameter cannot be used with either `ids` or `name`, or when `owner` flag is set to `true`.
+** *`username` (Optional, string)*: The username of a user.
+This parameter cannot be used with either `ids` or `name`, or when `owner` flag is set to `true`.
-|`size`
-|`number` - specifies a max number of filters to get
+[discrete]
+==== invalidate_token
+Invalidate a token.
-|===
-=== ml.getInfluencers
-[source,js]
+The access tokens returned by the get token API have a finite period of time for which they are valid.
+After that time period, they can no longer be used.
+The time period is defined by the `xpack.security.authc.token.timeout` setting.
+
+The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once.
+If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
+
+{ref}/security-api-invalidate-token.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getInfluencers([params] [, options] [, callback])
+client.security.invalidateToken({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - undefined
-|`exclude_interim` or `excludeInterim`
-|`boolean` - Exclude interim results
+[discrete]
+==== Arguments
-|`from`
-|`number` - skips a number of influencers
+* *Request (object):*
+** *`token` (Optional, string)*
+** *`refresh_token` (Optional, string)*
+** *`realm_name` (Optional, string)*
+** *`username` (Optional, string)*
-|`size`
-|`number` - specifies a max number of influencers to get
+[discrete]
+==== oidc_authenticate
+Exchanges an OpenID Connection authentication response message for an Elasticsearch access token and refresh token pair
-|`start`
-|`string` - start timestamp for the requested influencers
+{ref}/security-api-oidc-authenticate.html[Endpoint documentation]
+[source,ts]
+----
+client.security.oidcAuthenticate()
+----
-|`end`
-|`string` - end timestamp for the requested influencers
-|`influencer_score` or `influencerScore`
-|`number` - influencer score threshold for the requested influencers
+[discrete]
+==== oidc_logout
+Invalidates a refresh token and access token that was generated from the OpenID Connect Authenticate API
-|`sort`
-|`string` - sort field for the requested influencers
+{ref}/security-api-oidc-logout.html[Endpoint documentation]
+[source,ts]
+----
+client.security.oidcLogout()
+----
-|`desc`
-|`boolean` - whether the results should be sorted in decending order
-|`body`
-|`object` - Influencer selection criteria
+[discrete]
+==== oidc_prepare_authentication
+Creates an OAuth 2.0 authentication request as a URL string
-|===
-=== ml.getJobStats
-[source,js]
+{ref}/security-api-oidc-prepare-authentication.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getJobStats([params] [, options] [, callback])
+client.security.oidcPrepareAuthentication()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the jobs stats to fetch
-|`allow_no_jobs` or `allowNoJobs`
-|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
-|===
-=== ml.getJobs
-[source,js]
+[discrete]
+==== put_privileges
+Create or update application privileges.
+
+{ref}/security-api-put-privileges.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getJobs([params] [, options] [, callback])
+client.security.putPrivileges({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the jobs to fetch
-|`allow_no_jobs` or `allowNoJobs`
-|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`privileges` (Optional, Record>)*
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+
+[discrete]
+==== put_role
+Create or update roles.
-|===
-=== ml.getModelSnapshots
-[source,js]
+The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.
+The create or update roles API cannot update roles that are defined in roles files.
+File-based role management is not available in Elastic Serverless.
+
+{ref}/security-api-put-role.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getModelSnapshots([params] [, options] [, callback])
+client.security.putRole({ name })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to fetch
-|`snapshot_id` or `snapshotId`
-|`string` - The ID of the snapshot to fetch
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`name` (string)*: The name of the role.
+** *`applications` (Optional, { application, privileges, resources }[])*: A list of application privilege entries.
+** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_stats" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role.
+** *`global` (Optional, Record)*: An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.
+** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries.
+** *`remote_indices` (Optional, { clusters, field_security, names, privileges, query, allow_restricted_indices }[])*: A list of remote indices permissions entries.
+** *`remote_cluster` (Optional, { clusters, privileges }[])*: A list of remote cluster permissions entries.
+** *`metadata` (Optional, Record)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.
+** *`run_as` (Optional, string[])*: A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.
+** *`description` (Optional, string)*: Optional description of the role descriptor
+** *`transient_metadata` (Optional, Record)*: Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+
+[discrete]
+==== put_role_mapping
+Create or update role mappings.
-|`from`
-|`number` - Skips a number of documents
+Role mappings define which roles are assigned to each user.
+Each mapping has rules that identify users and a list of roles that are granted to those users.
+The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.
-|`size`
-|`number` - The default number of documents returned in queries as a string.
+This API does not create roles. Rather, it maps users to existing roles.
+Roles can be created by using the create or update roles API or roles files.
-|`start`
-|`string` - The filter 'start' query parameter
+{ref}/security-api-put-role-mapping.html[Endpoint documentation]
+[source,ts]
+----
+client.security.putRoleMapping({ name })
+----
-|`end`
-|`string` - The filter 'end' query parameter
+[discrete]
+==== Arguments
-|`sort`
-|`string` - Name of the field to sort on
+* *Request (object):*
+** *`name` (string)*: Role-mapping name
+** *`enabled` (Optional, boolean)*
+** *`metadata` (Optional, Record)*
+** *`roles` (Optional, string[])*
+** *`role_templates` (Optional, { format, template }[])*
+** *`rules` (Optional, { any, all, field, except })*
+** *`run_as` (Optional, string[])*
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`desc`
-|`boolean` - True if the results should be sorted in descending order
+[discrete]
+==== put_user
+Create or update users.
-|`body`
-|`object` - Model snapshot selection criteria
+A password is required for adding a new user but is optional when updating an existing user.
+To change a user’s password without updating any other fields, use the change password API.
-|===
-=== ml.getOverallBuckets
-[source,js]
+{ref}/security-api-put-user.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getOverallBuckets([params] [, options] [, callback])
+client.security.putUser({ username })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The job IDs for which to calculate overall bucket results
-|`top_n` or `topN`
-|`number` - The number of top job bucket scores to be used in the overall_score calculation
+[discrete]
+==== Arguments
-|`bucket_span` or `bucketSpan`
-|`string` - The span of the overall buckets. Defaults to the longest job bucket_span
+* *Request (object):*
+** *`username` (string)*: The username of the User
+** *`email` (Optional, string | null)*
+** *`full_name` (Optional, string | null)*
+** *`metadata` (Optional, Record)*
+** *`password` (Optional, string)*
+** *`password_hash` (Optional, string)*
+** *`roles` (Optional, string[])*
+** *`enabled` (Optional, boolean)*
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+
+[discrete]
+==== query_api_keys
+Find API keys with a query.
+
+Get a paginated list of API keys and their information. You can optionally filter the results with a query.
+
+{ref}/security-api-query-api-key.html[Endpoint documentation]
+[source,ts]
+----
+client.security.queryApiKeys({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`aggregations` (Optional, Record)*: Any aggregations to run over the corpus of returned API keys.
+Aggregations and queries work together. Aggregations are computed only on the API keys that match the query.
+This supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,
+`cardinality`, `value_count`, `composite`, `filter`, and `filters`.
+Additionally, aggregations only run over the same subset of fields that query works with.
+** *`query` (Optional, { bool, exists, ids, match, match_all, prefix, range, simple_query_string, term, terms, wildcard })*: A query to filter which API keys to return.
+If the query parameter is missing, it is equivalent to a `match_all` query.
+The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
+`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
+You can query the following public information associated with an API key: `id`, `type`, `name`,
+`creation`, `expiration`, `invalidated`, `invalidation`, `username`, `realm`, and `metadata`.
+** *`from` (Optional, number)*: Starting document offset.
+By default, you cannot page through more than 10,000 hits using the from and size parameters.
+To page through more hits, use the `search_after` parameter.
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: Other than `id`, all public fields of an API key are eligible for sorting.
+In addition, sort can also be applied to the `_doc` field to sort by index order.
+** *`size` (Optional, number)*: The number of hits to return.
+By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
+To page through more hits, use the `search_after` parameter.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Search after definition
+** *`with_limited_by` (Optional, boolean)*: Return the snapshot of the owner user's role descriptors associated with the API key.
+An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
+** *`with_profile_uid` (Optional, boolean)*: Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
+** *`typed_keys` (Optional, boolean)*: Determines whether aggregation names are prefixed by their respective types in the response.
-|`overall_score` or `overallScore`
-|`number` - Returns overall buckets with overall scores higher than this value
+[discrete]
+==== query_role
+Find roles with a query.
+
+Get roles in a paginated manner. You can optionally filter the results with a query.
-|`exclude_interim` or `excludeInterim`
-|`boolean` - If true overall buckets that include interim buckets will be excluded
+{ref}/security-api-query-role.html[Endpoint documentation]
+[source,ts]
+----
+client.security.queryRole({ ... })
+----
-|`start`
-|`string` - Returns overall buckets with timestamps after this time
+[discrete]
+==== Arguments
-|`end`
-|`string` - Returns overall buckets with timestamps earlier than this time
+* *Request (object):*
+** *`query` (Optional, { bool, exists, ids, match, match_all, prefix, range, simple_query_string, term, terms, wildcard })*: A query to filter which roles to return.
+If the query parameter is missing, it is equivalent to a `match_all` query.
+The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
+`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
+You can query the following information associated with roles: `name`, `description`, `metadata`,
+`applications.application`, `applications.privileges`, `applications.resources`.
+** *`from` (Optional, number)*: Starting document offset.
+By default, you cannot page through more than 10,000 hits using the from and size parameters.
+To page through more hits, use the `search_after` parameter.
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: All public fields of a role are eligible for sorting.
+In addition, sort can also be applied to the `_doc` field to sort by index order.
+** *`size` (Optional, number)*: The number of hits to return.
+By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
+To page through more hits, use the `search_after` parameter.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Search after definition
-|`allow_no_jobs` or `allowNoJobs`
-|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
+[discrete]
+==== query_user
+Find users with a query.
-|`body`
-|`object` - Overall bucket selection details if not provided in URI
+Get information for users in a paginated manner.
+You can optionally filter the results with a query.
-|===
-=== ml.getRecords
-[source,js]
+{ref}/security-api-query-user.html[Endpoint documentation]
+[source,ts]
----
-client.ml.getRecords([params] [, options] [, callback])
+client.security.queryUser({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - undefined
-|`exclude_interim` or `excludeInterim`
-|`boolean` - Exclude interim results
+[discrete]
+==== Arguments
-|`from`
-|`number` - skips a number of records
+* *Request (object):*
+** *`query` (Optional, { ids, bool, exists, match, match_all, prefix, range, simple_query_string, term, terms, wildcard })*: A query to filter which users to return.
+If the query parameter is missing, it is equivalent to a `match_all` query.
+The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
+`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
+You can query the following information associated with user: `username`, `roles`, `enabled`
+** *`from` (Optional, number)*: Starting document offset.
+By default, you cannot page through more than 10,000 hits using the from and size parameters.
+To page through more hits, use the `search_after` parameter.
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: Fields eligible for sorting are: username, roles, enabled
+In addition, sort can also be applied to the `_doc` field to sort by index order.
+** *`size` (Optional, number)*: The number of hits to return.
+By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
+To page through more hits, use the `search_after` parameter.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Search after definition
+** *`with_profile_uid` (Optional, boolean)*: If true will return the User Profile ID for the users in the query result, if any.
-|`size`
-|`number` - specifies a max number of records to get
+[discrete]
+==== saml_authenticate
+Authenticate SAML.
-|`start`
-|`string` - Start time filter for records
+Submits a SAML response message to Elasticsearch for consumption.
-|`end`
-|`string` - End time filter for records
+{ref}/security-api-saml-authenticate.html[Endpoint documentation]
+[source,ts]
+----
+client.security.samlAuthenticate({ content, ids })
+----
-|`record_score` or `recordScore`
-|`number` - undefined
+[discrete]
+==== Arguments
-|`sort`
-|`string` - Sort records by a particular field
+* *Request (object):*
+** *`content` (string)*: The SAML response as it was sent by the user’s browser, usually a Base64 encoded XML document.
+** *`ids` (string | string[])*: A json array with all the valid SAML Request Ids that the caller of the API has for the current user.
+** *`realm` (Optional, string)*: The name of the realm that should authenticate the SAML response. Useful in cases where many SAML realms are defined.
-|`desc`
-|`boolean` - Set the sort direction
+[discrete]
+==== saml_complete_logout
+Logout of SAML completely.
-|`body`
-|`object` - Record selection criteria
+Verifies the logout response sent from the SAML IdP.
-|===
-=== ml.info
-[source,js]
+{ref}/security-api-saml-complete-logout.html[Endpoint documentation]
+[source,ts]
----
-client.ml.info([params] [, options] [, callback])
+client.security.samlCompleteLogout({ realm, ids })
----
-[cols=2*]
-|===
-|===
-=== ml.openJob
-[source,js]
-----
-client.ml.openJob([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to open
+[discrete]
+==== Arguments
-|`ignore_downtime` or `ignoreDowntime`
-|`boolean` - Controls if gaps in data are treated as anomalous or as a maintenance window after a job re-start
+* *Request (object):*
+** *`realm` (string)*: The name of the SAML realm in Elasticsearch for which the configuration is used to verify the logout response.
+** *`ids` (string | string[])*: A json array with all the valid SAML Request Ids that the caller of the API has for the current user.
+** *`query_string` (Optional, string)*: If the SAML IdP sends the logout response with the HTTP-Redirect binding, this field must be set to the query string of the redirect URI.
+** *`content` (Optional, string)*: If the SAML IdP sends the logout response with the HTTP-Post binding, this field must be set to the value of the SAMLResponse form parameter from the logout response.
-|`timeout`
-|`string` - Controls the time to wait until a job has opened. Default to 30 minutes
+[discrete]
+==== saml_invalidate
+Invalidate SAML.
-|===
-=== ml.postCalendarEvents
-[source,js]
+Submits a SAML LogoutRequest message to Elasticsearch for consumption.
+
+{ref}/security-api-saml-invalidate.html[Endpoint documentation]
+[source,ts]
----
-client.ml.postCalendarEvents([params] [, options] [, callback])
+client.security.samlInvalidate({ query_string })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to modify
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`query_string` (string)*: The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout.
+This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded.
+If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself.
+In order for Elasticsearch to be able to verify the IdP’s signature, the value of the query_string field must be an exact match to the string provided by the browser.
+The client application must not attempt to parse or process the string in any way.
+** *`acs` (Optional, string)*: The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter.
+** *`realm` (Optional, string)*: The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter.
+
+[discrete]
+==== saml_logout
+Logout of SAML.
-|`body`
-|`object` - A list of events
+Submits a request to invalidate an access token and refresh token.
-|===
-=== ml.postData
-[source,js]
+{ref}/security-api-saml-logout.html[Endpoint documentation]
+[source,ts]
----
-client.ml.postData([params] [, options] [, callback])
+client.security.samlLogout({ token })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The name of the job receiving the data
-|`reset_start` or `resetStart`
-|`string` - Optional parameter to specify the start of the bucket resetting range
+[discrete]
+==== Arguments
-|`reset_end` or `resetEnd`
-|`string` - Optional parameter to specify the end of the bucket resetting range
+* *Request (object):*
+** *`token` (string)*: The access token that was returned as a response to calling the SAML authenticate API.
+Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token.
+** *`refresh_token` (Optional, string)*: The refresh token that was returned as a response to calling the SAML authenticate API.
+Alternatively, the most recent refresh token that was received after refreshing the original access token.
-|`body`
-|`object` - The data to process
+[discrete]
+==== saml_prepare_authentication
+Prepare SAML authentication.
-|===
-=== ml.previewDatafeed
-[source,js]
-----
-client.ml.previewDatafeed([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeed to preview
+Creates a SAML authentication request (``) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.
-|===
-=== ml.putCalendar
-[source,js]
+{ref}/security-api-saml-prepare-authentication.html[Endpoint documentation]
+[source,ts]
----
-client.ml.putCalendar([params] [, options] [, callback])
+client.security.samlPrepareAuthentication({ ... })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to create
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`acs` (Optional, string)*: The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch.
+The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter.
+** *`realm` (Optional, string)*: The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request.
+You must specify either this parameter or the acs parameter.
+** *`relay_state` (Optional, string)*: A string that will be included in the redirect URL that this API returns as the RelayState query parameter.
+If the Authentication Request is signed, this value is used as part of the signature computation.
-|`body`
-|`object` - The calendar details
+[discrete]
+==== saml_service_provider_metadata
+Create SAML service provider metadata.
-|===
-=== ml.putCalendarJob
-[source,js]
+Generate SAML metadata for a SAML 2.0 Service Provider.
+
+{ref}/security-api-saml-sp-metadata.html[Endpoint documentation]
+[source,ts]
----
-client.ml.putCalendarJob([params] [, options] [, callback])
+client.security.samlServiceProviderMetadata({ realm_name })
----
-[cols=2*]
-|===
-|`calendar_id` or `calendarId`
-|`string` - The ID of the calendar to modify
+[discrete]
+==== Arguments
-|`job_id` or `jobId`
-|`string` - The ID of the job to add to the calendar
+* *Request (object):*
+** *`realm_name` (string)*: The name of the SAML realm in Elasticsearch.
-|===
-=== ml.putDatafeed
-[source,js]
-----
-client.ml.putDatafeed([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeed to create
+[discrete]
+==== suggest_user_profiles
+Suggest a user profile.
-|`body`
-|`object` - The datafeed config
+Get suggestions for user profiles that match specified search criteria.
-|===
-=== ml.putFilter
-[source,js]
+{ref}/security-api-suggest-user-profile.html[Endpoint documentation]
+[source,ts]
----
-client.ml.putFilter([params] [, options] [, callback])
+client.security.suggestUserProfiles({ ... })
----
-[cols=2*]
-|===
-|`filter_id` or `filterId`
-|`string` - The ID of the filter to create
+[discrete]
+==== Arguments
-|`body`
-|`object` - The filter details
+* *Request (object):*
+** *`name` (Optional, string)*: Query string used to match name-related fields in user profile documents.
+Name-related fields are the user's `username`, `full_name`, and `email`.
+** *`size` (Optional, number)*: Number of profiles to return.
+** *`data` (Optional, string | string[])*: List of filters for the `data` field of the profile document.
+To return all content use `data=*`. To return a subset of content
+use `data=` to retrieve content nested under the specified ``.
+By default returns no `data` content.
+** *`hint` (Optional, { uids, labels })*: Extra search criteria to improve relevance of the suggestion result.
+Profiles matching the spcified hint are ranked higher in the response.
+Profiles not matching the hint don't exclude the profile from the response
+as long as the profile matches the `name` field query.
-|===
-=== ml.putJob
-[source,js]
-----
-client.ml.putJob([params] [, options] [, callback])
-----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to create
+[discrete]
+==== update_api_key
+Update an API key.
-|`body`
-|`object` - The job
+Updates attributes of an existing API key.
+Users can only update API keys that they created or that were granted to them.
+Use this API to update API keys created by the create API Key or grant API Key APIs.
+If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead.
+It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key.
+This API supports updates to an API key’s access scope and metadata.
+The access scope of an API key is derived from the `role_descriptors` you specify in the request, and a snapshot of the owner user’s permissions at the time of the request.
+The snapshot of the owner’s permissions is updated automatically on every call.
+If you don’t specify `role_descriptors` in the request, a call to this API might still change the API key’s access scope.
+This change can occur if the owner user’s permissions have changed since the API key was created or last modified.
+To update another user’s API key, use the `run_as` feature to submit a request on behalf of another user.
+IMPORTANT: It’s not possible to use an API key as the authentication credential for this API.
+To update an API key, the owner user’s credentials are required.
-|===
-=== ml.revertModelSnapshot
-[source,js]
+{ref}/security-api-update-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ml.revertModelSnapshot([params] [, options] [, callback])
+client.security.updateApiKey({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to fetch
-|`snapshot_id` or `snapshotId`
-|`string` - The ID of the snapshot to revert to
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: The ID of the API key to update.
+** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
+** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.
+** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key.
-|`delete_intervening_results` or `deleteInterveningResults`
-|`boolean` - Should we reset the results back to the time of the snapshot?
+[discrete]
+==== update_cross_cluster_api_key
+Update a cross-cluster API key.
-|`body`
-|`object` - Reversion options
+Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
-|===
-=== ml.setUpgradeMode
-[source,js]
+{ref}/security-api-update-cross-cluster-api-key.html[Endpoint documentation]
+[source,ts]
----
-client.ml.setUpgradeMode([params] [, options] [, callback])
+client.security.updateCrossClusterApiKey({ id, access })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html
-[cols=2*]
-|===
-|`enabled`
-|`boolean` - Whether to enable upgrade_mode ML setting or not. Defaults to false.
-|`timeout`
-|`string` - Controls the time to wait before action times out. Defaults to 30 seconds
+[discrete]
+==== Arguments
-|===
-=== ml.startDatafeed
-[source,js]
+* *Request (object):*
+** *`id` (string)*: The ID of the cross-cluster API key to update.
+** *`access` ({ replication, search })*: The access to be granted to this API key.
+The access is composed of permissions for cross cluster search and cross cluster replication.
+At least one of them must be specified.
+When specified, the new access assignment fully replaces the previously assigned access.
+** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key.
+By default, API keys never expire. This property can be omitted to leave the value unchanged.
+** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key.
+It supports nested data structure.
+Within the metadata object, keys beginning with `_` are reserved for system usage.
+When specified, this information fully replaces metadata previously associated with the API key.
+
+[discrete]
+==== update_settings
+Update settings for the security system index
+
+{ref}/security-api-update-settings.html[Endpoint documentation]
+[source,ts]
----
-client.ml.startDatafeed([params] [, options] [, callback])
+client.security.updateSettings()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeed to start
-
-|`start`
-|`string` - The start time from where the datafeed should begin
-|`end`
-|`string` - The end time when the datafeed should stop. When not set, the datafeed continues in real time
-|`timeout`
-|`string` - Controls the time to wait until a datafeed has started. Default to 20 seconds
+[discrete]
+==== update_user_profile_data
+Update user profile data.
-|`body`
-|`object` - The start datafeed parameters
+Update specific data for the user profile that is associated with a unique ID.
-|===
-=== ml.stopDatafeed
-[source,js]
+{ref}/security-api-update-user-profile-data.html[Endpoint documentation]
+[source,ts]
----
-client.ml.stopDatafeed([params] [, options] [, callback])
+client.security.updateUserProfileData({ uid })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeed to stop
-|`allow_no_datafeeds` or `allowNoDatafeeds`
-|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
+[discrete]
+==== Arguments
-|`force`
-|`boolean` - True if the datafeed should be forcefully stopped.
+* *Request (object):*
+** *`uid` (string)*: A unique identifier for the user profile.
+** *`labels` (Optional, Record)*: Searchable data that you want to associate with the user profile. This
+field supports a nested data structure.
+** *`data` (Optional, Record)*: Non-searchable data that you want to associate with the user profile.
+This field supports a nested data structure.
+** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
+** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
+** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation
+visible to search, if 'wait_for' then wait for a refresh to make this operation
+visible to search, if 'false' do nothing with refreshes.
-|`timeout`
-|`string` - Controls the time to wait until a datafeed has stopped. Default to 20 seconds
+[discrete]
+=== shutdown
+[discrete]
+==== delete_node
+Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
-|===
-=== ml.updateDatafeed
-[source,js]
+https://www.elastic.co/guide/en/elasticsearch/reference/current[Endpoint documentation]
+[source,ts]
----
-client.ml.updateDatafeed([params] [, options] [, callback])
+client.shutdown.deleteNode({ node_id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
-[cols=2*]
-|===
-|`datafeed_id` or `datafeedId`
-|`string` - The ID of the datafeed to update
-|`body`
-|`object` - The datafeed update settings
+[discrete]
+==== Arguments
-|===
-=== ml.updateFilter
-[source,js]
+* *Request (object):*
+** *`node_id` (string)*: The node id of node to be removed from the shutdown state
+** *`master_timeout` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== get_node
+Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
+
+https://www.elastic.co/guide/en/elasticsearch/reference/current[Endpoint documentation]
+[source,ts]
----
-client.ml.updateFilter([params] [, options] [, callback])
+client.shutdown.getNode({ ... })
----
-[cols=2*]
-|===
-|`filter_id` or `filterId`
-|`string` - The ID of the filter to update
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`node_id` (Optional, string | string[])*: Which node for which to retrieve the shutdown status
+** *`master_timeout` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-|`body`
-|`object` - The filter update
+[discrete]
+==== put_node
+Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
-|===
-=== ml.updateJob
-[source,js]
+https://www.elastic.co/guide/en/elasticsearch/reference/current[Endpoint documentation]
+[source,ts]
----
-client.ml.updateJob([params] [, options] [, callback])
+client.shutdown.putNode({ node_id, type, reason })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to create
-|`body`
-|`object` - The job update settings
+[discrete]
+==== Arguments
-|===
-=== ml.updateModelSnapshot
-[source,js]
+* *Request (object):*
+** *`node_id` (string)*: The node id of node to be shut down
+** *`type` (Enum("restart" | "remove" | "replace"))*: Valid values are restart, remove, or replace.
+Use restart when you need to temporarily shut down a node to perform an upgrade, make configuration changes, or perform other maintenance.
+Because the node is expected to rejoin the cluster, data is not migrated off of the node.
+Use remove when you need to permanently remove a node from the cluster.
+The node is not marked ready for shutdown until data is migrated off of the node Use replace to do a 1:1 replacement of a node with another node.
+Certain allocation decisions will be ignored (such as disk watermarks) in the interest of true replacement of the source node with the target node.
+During a replace-type shutdown, rollover and index creation may result in unassigned shards, and shrink may fail until the replacement is complete.
+** *`reason` (string)*: A human-readable reason that the node is being shut down.
+This field provides information for other cluster operators; it does not affect the shut down process.
+** *`allocation_delay` (Optional, string)*: Only valid if type is restart.
+Controls how long Elasticsearch will wait for the node to restart and join the cluster before reassigning its shards to other nodes.
+This works the same as delaying allocation with the index.unassigned.node_left.delayed_timeout setting.
+If you specify both a restart allocation delay and an index-level allocation delay, the longer of the two is used.
+** *`target_node_name` (Optional, string)*: Only valid if type is replace.
+Specifies the name of the node that is replacing the node being shut down.
+Shards from the shut down node are only allowed to be allocated to the target node, and no other data will be allocated to the target node.
+During relocation of data certain allocation rules are ignored, such as disk watermarks or user attribute filtering rules.
+** *`master_timeout` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+=== simulate
+[discrete]
+==== ingest
+Simulates running ingest with example documents.
+
+{ref}/simulate-ingest-api.html[Endpoint documentation]
+[source,ts]
----
-client.ml.updateModelSnapshot([params] [, options] [, callback])
+client.simulate.ingest()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html
-[cols=2*]
-|===
-|`job_id` or `jobId`
-|`string` - The ID of the job to fetch
-|`snapshot_id` or `snapshotId`
-|`string` - The ID of the snapshot to update
-|`body`
-|`object` - The model snapshot properties to update
+[discrete]
+=== slm
+[discrete]
+==== delete_lifecycle
+Deletes an existing snapshot lifecycle policy.
-|===
-=== ml.validate
-[source,js]
+{ref}/slm-api-delete-policy.html[Endpoint documentation]
+[source,ts]
----
-client.ml.validate([params] [, options] [, callback])
+client.slm.deleteLifecycle({ policy_id })
----
-[cols=2*]
-|===
-|`body`
-|`object` - The job config
+[discrete]
+==== Arguments
-|===
-=== ml.validateDetector
-[source,js]
-----
-client.ml.validateDetector([params] [, options] [, callback])
-----
+* *Request (object):*
+** *`policy_id` (string)*: The id of the snapshot lifecycle policy to remove
-[cols=2*]
-|===
-|`body`
-|`object` - The detector
+[discrete]
+==== execute_lifecycle
+Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.
-|===
-=== monitoring.bulk
-[source,js]
+{ref}/slm-api-execute-lifecycle.html[Endpoint documentation]
+[source,ts]
----
-client.monitoring.bulk([params] [, options] [, callback])
+client.slm.executeLifecycle({ policy_id })
----
-http://www.elastic.co/guide/en/monitoring/current/appendix-api-bulk.html
-[cols=2*]
-|===
-|`type`
-|`string` - Default document type for items which don't provide one
-
-|`system_id` or `systemId`
-|`string` - Identifier of the monitored system
-|`system_api_version` or `systemApiVersion`
-|`string` - API Version of the monitored system
+[discrete]
+==== Arguments
-|`interval`
-|`string` - Collection interval (e.g., '10s' or '10000ms') of the payload
+* *Request (object):*
+** *`policy_id` (string)*: The id of the snapshot lifecycle policy to be executed
-|`body`
-|`object` - The operation definition and data (action-data pairs), separated by newlines
+[discrete]
+==== execute_retention
+Deletes any snapshots that are expired according to the policy's retention rules.
-|===
-=== security.authenticate
-[source,js]
+{ref}/slm-api-execute-retention.html[Endpoint documentation]
+[source,ts]
----
-client.security.authenticate([params] [, options] [, callback])
+client.slm.executeRetention()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html
-[cols=2*]
-|===
-|===
-=== security.changePassword
-[source,js]
+
+
+[discrete]
+==== get_lifecycle
+Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.
+
+{ref}/slm-api-get-policy.html[Endpoint documentation]
+[source,ts]
----
-client.security.changePassword([params] [, options] [, callback])
+client.slm.getLifecycle({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html
-[cols=2*]
-|===
-|`username`
-|`string` - The username of the user to change the password for
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`policy_id` (Optional, string | string[])*: List of snapshot lifecycle policies to retrieve
-|`body`
-|`object` - the new password for the user
+[discrete]
+==== get_stats
+Returns global and policy-level statistics about actions taken by snapshot lifecycle management.
-|===
-=== security.clearCachedRealms
-[source,js]
+{ref}/slm-api-get-stats.html[Endpoint documentation]
+[source,ts]
----
-client.security.clearCachedRealms([params] [, options] [, callback])
+client.slm.getStats()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html
-[cols=2*]
-|===
-|`realms`
-|`string, string[]` - Comma-separated list of realms to clear
-|`usernames`
-|`string, string[]` - Comma-separated list of usernames to clear from the cache
-|===
-=== security.clearCachedRoles
-[source,js]
+[discrete]
+==== get_status
+Retrieves the status of snapshot lifecycle management (SLM).
+
+{ref}/slm-api-get-status.html[Endpoint documentation]
+[source,ts]
----
-client.security.clearCachedRoles([params] [, options] [, callback])
+client.slm.getStatus()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html
-[cols=2*]
-|===
-|`name`
-|`string, string[]` - Role name
-|===
-=== security.createApiKey
-[source,js]
+
+[discrete]
+==== put_lifecycle
+Creates or updates a snapshot lifecycle policy.
+
+{ref}/slm-api-put-policy.html[Endpoint documentation]
+[source,ts]
----
-client.security.createApiKey([params] [, options] [, callback])
+client.slm.putLifecycle({ policy_id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
-[cols=2*]
-|===
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`body`
-|`object` - The api key request to create an API key
+[discrete]
+==== Arguments
-|===
-=== security.deletePrivileges
-[source,js]
+* *Request (object):*
+** *`policy_id` (string)*: ID for the snapshot lifecycle policy you want to create or update.
+** *`config` (Optional, { ignore_unavailable, indices, include_global_state, feature_states, metadata, partial })*: Configuration for each snapshot created by the policy.
+** *`name` (Optional, string)*: Name automatically assigned to each snapshot created by the policy. Date math is supported. To prevent conflicting snapshot names, a UUID is automatically appended to each snapshot name.
+** *`repository` (Optional, string)*: Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API.
+** *`retention` (Optional, { expire_after, max_count, min_count })*: Retention rules used to retain and delete snapshots created by the policy.
+** *`schedule` (Optional, string)*: Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== start
+Turns on snapshot lifecycle management (SLM).
+
+{ref}/slm-api-start.html[Endpoint documentation]
+[source,ts]
----
-client.security.deletePrivileges([params] [, options] [, callback])
+client.slm.start()
----
-TODO
-[cols=2*]
-|===
-|`application`
-|`string` - Application name
-|`name`
-|`string` - Privilege name
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== stop
+Turns off snapshot lifecycle management (SLM).
-|===
-=== security.deleteRole
-[source,js]
+{ref}/slm-api-stop.html[Endpoint documentation]
+[source,ts]
----
-client.security.deleteRole([params] [, options] [, callback])
+client.slm.stop()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html
-[cols=2*]
-|===
-|`name`
-|`string` - Role name
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|===
-=== security.deleteRoleMapping
-[source,js]
+[discrete]
+=== snapshot
+[discrete]
+==== cleanup_repository
+Triggers the review of a snapshot repository’s contents and deletes any stale data not referenced by existing snapshots.
+
+{ref}/clean-up-snapshot-repo-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.deleteRoleMapping([params] [, options] [, callback])
+client.snapshot.cleanupRepository({ repository })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html
-[cols=2*]
-|===
-|`name`
-|`string` - Role-mapping name
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
-|===
-=== security.deleteUser
-[source,js]
+* *Request (object):*
+** *`repository` (string)*: Snapshot repository to clean up.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+
+[discrete]
+==== clone
+Clones indices from one snapshot into another snapshot in the same repository.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.deleteUser([params] [, options] [, callback])
+client.snapshot.clone({ repository, snapshot, target_snapshot, indices })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html
-[cols=2*]
-|===
-|`username`
-|`string` - username
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (string)*: A repository name
+** *`snapshot` (string)*: The name of the snapshot to clone from
+** *`target_snapshot` (string)*: The name of the cloned snapshot to create
+** *`indices` (string)*
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`timeout` (Optional, string | -1 | 0)*
-|===
-=== security.disableUser
-[source,js]
+[discrete]
+==== create
+Creates a snapshot in a repository.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.disableUser([params] [, options] [, callback])
+client.snapshot.create({ repository, snapshot })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html
-[cols=2*]
-|===
-|`username`
-|`string` - The username of the user to disable
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (string)*: Repository for the snapshot.
+** *`snapshot` (string)*: Name of the snapshot. Must be unique in the repository.
+** *`ignore_unavailable` (Optional, boolean)*: If `true`, the request ignores data streams and indices in `indices` that are missing or closed. If `false`, the request returns an error for any data stream or index that is missing or closed.
+** *`include_global_state` (Optional, boolean)*: If `true`, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`).
+** *`indices` (Optional, string | string[])*: Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default.
+** *`feature_states` (Optional, string[])*: Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If `include_global_state` is `true`, all current feature states are included by default. If `include_global_state` is `false`, no feature states are included by default.
+** *`metadata` (Optional, Record)*: Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch.
+** *`partial` (Optional, boolean)*: If `true`, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns a response when the snapshot initializes.
+
+[discrete]
+==== create_repository
+Creates a repository.
-|===
-=== security.enableUser
-[source,js]
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.enableUser([params] [, options] [, callback])
+client.snapshot.createRepository({ repository })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html
-[cols=2*]
-|===
-|`username`
-|`string` - The username of the user to enable
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
-|===
-=== security.getApiKey
-[source,js]
+* *Request (object):*
+** *`repository` (string)*: A repository name
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
+** *`verify` (Optional, boolean)*: Whether to verify the repository after creation
+
+[discrete]
+==== delete
+Deletes one or more snapshots.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getApiKey([params] [, options] [, callback])
+client.snapshot.delete({ repository, snapshot })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
-[cols=2*]
-|===
-|`id`
-|`string` - API key id of the API key to be retrieved
-|`name`
-|`string` - API key name of the API key to be retrieved
+[discrete]
+==== Arguments
-|`username`
-|`string` - user name of the user who created this API key to be retrieved
+* *Request (object):*
+** *`repository` (string)*: A repository name
+** *`snapshot` (string)*: A list of snapshot names
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
-|`realm_name` or `realmName`
-|`string` - realm name of the user who created this API key to be retrieved
+[discrete]
+==== delete_repository
+Deletes a repository.
-|===
-=== security.getPrivileges
-[source,js]
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getPrivileges([params] [, options] [, callback])
+client.snapshot.deleteRepository({ repository })
----
-TODO
-[cols=2*]
-|===
-|`application`
-|`string` - Application name
-|`name`
-|`string` - Privilege name
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (string | string[])*: Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
-|===
-=== security.getRole
-[source,js]
+[discrete]
+==== get
+Returns information about a snapshot.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getRole([params] [, options] [, callback])
+client.snapshot.get({ repository, snapshot })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html
-[cols=2*]
-|===
-|`name`
-|`string` - Role name
-|===
-=== security.getRoleMapping
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (string)*: List of snapshot repository names used to limit the request. Wildcard (*) expressions are supported.
+** *`snapshot` (string | string[])*: List of snapshot names to retrieve. Also accepts wildcards (*).
+- To get information about all snapshots in a registered repository, use a wildcard (*) or _all.
+- To get information about any snapshots that are currently running, use _current.
+** *`ignore_unavailable` (Optional, boolean)*: If false, the request returns an error for any snapshots that are unavailable.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`verbose` (Optional, boolean)*: If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted.
+** *`index_details` (Optional, boolean)*: If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted.
+** *`index_names` (Optional, boolean)*: If true, returns the name of each index in each snapshot.
+** *`include_repository` (Optional, boolean)*: If true, returns the repository name in each snapshot.
+** *`sort` (Optional, Enum("start_time" | "duration" | "name" | "index_count" | "repository" | "shard_count" | "failed_shard_count"))*: Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp.
+** *`size` (Optional, number)*: Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit.
+** *`order` (Optional, Enum("asc" | "desc"))*: Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order.
+** *`after` (Optional, string)*: Offset identifier to start pagination from as returned by the next field in the response body.
+** *`offset` (Optional, number)*: Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0.
+** *`from_sort_value` (Optional, string)*: Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count.
+** *`slm_policy_filter` (Optional, string)*: Filter snapshots by a list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy.
+
+[discrete]
+==== get_repository
+Returns information about a repository.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getRoleMapping([params] [, options] [, callback])
+client.snapshot.getRepository({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html
-[cols=2*]
-|===
-|`name`
-|`string` - Role-Mapping name
-|===
-=== security.getToken
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (Optional, string | string[])*: A list of repository names
+** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false)
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+
+[discrete]
+==== repository_analyze
+Analyzes a repository for correctness and performance
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getToken([params] [, options] [, callback])
+client.snapshot.repositoryAnalyze()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html
-[cols=2*]
-|===
-|`body`
-|`object` - The token request to get
-|===
-=== security.getUser
-[source,js]
+
+[discrete]
+==== restore
+Restores a snapshot.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getUser([params] [, options] [, callback])
+client.snapshot.restore({ repository, snapshot })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html
-[cols=2*]
-|===
-|`username`
-|`string, string[]` - A comma-separated list of usernames
-|===
-=== security.getUserPrivileges
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (string)*: A repository name
+** *`snapshot` (string)*: A snapshot name
+** *`feature_states` (Optional, string[])*
+** *`ignore_index_settings` (Optional, string[])*
+** *`ignore_unavailable` (Optional, boolean)*
+** *`include_aliases` (Optional, boolean)*
+** *`include_global_state` (Optional, boolean)*
+** *`index_settings` (Optional, { index, mode, routing_path, soft_deletes, sort, number_of_shards, number_of_replicas, number_of_routing_shards, check_on_startup, codec, routing_partition_size, load_fixed_bitset_filters_eagerly, hidden, auto_expand_replicas, merge, search, refresh_interval, max_result_window, max_inner_result_window, max_rescore_window, max_docvalue_fields_search, max_script_fields, max_ngram_diff, max_shingle_diff, blocks, max_refresh_listeners, analyze, highlight, max_terms_count, max_regex_length, routing, gc_deletes, default_pipeline, final_pipeline, lifecycle, provided_name, creation_date, creation_date_string, uuid, version, verified_before_close, format, max_slices_per_scroll, translog, query_string, priority, top_metrics_max_size, analysis, settings, time_series, queries, similarity, mapping, indexing.slowlog, indexing_pressure, store })*
+** *`indices` (Optional, string | string[])*
+** *`partial` (Optional, boolean)*
+** *`rename_pattern` (Optional, string)*
+** *`rename_replacement` (Optional, string)*
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`wait_for_completion` (Optional, boolean)*: Should this request wait until the operation has completed before returning
+
+[discrete]
+==== status
+Returns information about the status of a snapshot.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.getUserPrivileges([params] [, options] [, callback])
+client.snapshot.status({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html
-[cols=2*]
-|===
-|===
-=== security.hasPrivileges
-[source,js]
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (Optional, string)*: A repository name
+** *`snapshot` (Optional, string | string[])*: A list of snapshot names
+** *`ignore_unavailable` (Optional, boolean)*: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+
+[discrete]
+==== verify_repository
+Verifies a repository.
+
+{ref}/modules-snapshots.html[Endpoint documentation]
+[source,ts]
----
-client.security.hasPrivileges([params] [, options] [, callback])
+client.snapshot.verifyRepository({ repository })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html
-[cols=2*]
-|===
-|`user`
-|`string` - Username
-|`body`
-|`object` - The privileges to test
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`repository` (string)*: A repository name
+** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
+** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
-|===
-=== security.invalidateApiKey
-[source,js]
+[discrete]
+=== sql
+[discrete]
+==== clear_cursor
+Clear an SQL search cursor.
+
+{ref}/clear-sql-cursor-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.invalidateApiKey([params] [, options] [, callback])
+client.sql.clearCursor({ cursor })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
-[cols=2*]
-|===
-|`body`
-|`object` - The api key request to invalidate API key(s)
-|===
-=== security.invalidateToken
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`cursor` (string)*: Cursor to clear.
+
+[discrete]
+==== delete_async
+Delete an async SQL search.
+Delete an async SQL search or a stored synchronous SQL search.
+If the search is still running, the API cancels it.
+
+{ref}/delete-async-sql-search-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.invalidateToken([params] [, options] [, callback])
+client.sql.deleteAsync({ id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html
-[cols=2*]
-|===
-|`body`
-|`object` - The token to invalidate
-|===
-=== security.putPrivileges
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the search.
+
+[discrete]
+==== get_async
+Get async SQL search results.
+Get the current status and available results for an async SQL search or stored synchronous SQL search.
+
+{ref}/get-async-sql-search-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.putPrivileges([params] [, options] [, callback])
+client.sql.getAsync({ id })
----
-TODO
-[cols=2*]
-|===
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
-|`body`
-|`object` - The privilege(s) to add
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Identifier for the search.
+** *`delimiter` (Optional, string)*: Separator for CSV results. The API only supports this parameter for CSV responses.
+** *`format` (Optional, string)*: Format for the response. You must specify a format using this parameter or the
+Accept HTTP header. If you specify both, the API uses this parameter.
+** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for the search and its results. Defaults
+to the `keep_alive` period for the original SQL search.
+** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Period to wait for complete results. Defaults to no timeout,
+meaning the request waits for complete search results.
+
+[discrete]
+==== get_async_status
+Get the async SQL search status.
+Get the current status of an async SQL search or a stored synchronous SQL search.
-|===
-=== security.putRole
-[source,js]
+{ref}/get-async-sql-search-status-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.putRole([params] [, options] [, callback])
+client.sql.getAsyncStatus({ id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html
-[cols=2*]
-|===
-|`name`
-|`string` - Role name
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
-|`body`
-|`object` - The role to add
+* *Request (object):*
+** *`id` (string)*: Identifier for the search.
-|===
-=== security.putRoleMapping
-[source,js]
+[discrete]
+==== query
+Get SQL search results.
+Run an SQL request.
+
+{ref}/sql-search-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.putRoleMapping([params] [, options] [, callback])
+client.sql.query({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html
-[cols=2*]
-|===
-|`name`
-|`string` - Role-mapping name
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`catalog` (Optional, string)*: Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.
+** *`columnar` (Optional, boolean)*: If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results.
+** *`cursor` (Optional, string)*: Cursor used to retrieve a set of paginated results.
+If you specify a cursor, the API only uses the `columnar` and `time_zone` request body parameters.
+It ignores other request body parameters.
+** *`fetch_size` (Optional, number)*: The maximum number of rows (or entries) to return in one response
+** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Elasticsearch query DSL for additional filtering.
+** *`query` (Optional, string)*: SQL query to run.
+** *`request_timeout` (Optional, string | -1 | 0)*: The timeout before the request fails.
+** *`page_timeout` (Optional, string | -1 | 0)*: The timeout before a pagination request fails.
+** *`time_zone` (Optional, string)*: ISO-8601 time zone ID for the search.
+** *`field_multi_value_leniency` (Optional, boolean)*: Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order).
+** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take
+precedence over mapped fields with the same name.
+** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async.
+** *`params` (Optional, Record)*: Values for parameters in the query.
+** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for an async or saved synchronous search.
+** *`keep_on_completion` (Optional, boolean)*: If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout.
+** *`index_using_frozen` (Optional, boolean)*: If true, the search can run on frozen indices. Defaults to false.
+** *`format` (Optional, Enum("csv" | "json" | "tsv" | "txt" | "yaml" | "cbor" | "smile"))*: Format for the response.
-|`body`
-|`object` - The role to add
+[discrete]
+==== translate
+Translate SQL into Elasticsearch queries.
+Translate an SQL search into a search API request containing Query DSL.
-|===
-=== security.putUser
-[source,js]
+{ref}/sql-translate-api.html[Endpoint documentation]
+[source,ts]
----
-client.security.putUser([params] [, options] [, callback])
+client.sql.translate({ query })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html
-[cols=2*]
-|===
-|`username`
-|`string` - The username of the User
-|`refresh`
-|`'true', 'false', 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`query` (string)*: SQL query to run.
+** *`fetch_size` (Optional, number)*: The maximum number of rows (or entries) to return in one response.
+** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Elasticsearch query DSL for additional filtering.
+** *`time_zone` (Optional, string)*: ISO-8601 time zone ID for the search.
+
+[discrete]
+=== ssl
+[discrete]
+==== certificates
+Get SSL certificates.
+
+Get information about the X.509 certificates that are used to encrypt communications in the cluster.
+The API returns a list that includes certificates from all TLS contexts including:
+
+- Settings for transport and HTTP interfaces
+- TLS settings that are used within authentication realms
+- TLS settings for remote monitoring exporters
-|`body`
-|`object` - The user to add
+The list includes certificates that are used for configuring trust, such as those configured in the `xpack.security.transport.ssl.truststore` and `xpack.security.transport.ssl.certificate_authorities` settings.
+It also includes certificates that are used for configuring server identity, such as `xpack.security.http.ssl.keystore` and `xpack.security.http.ssl.certificate settings`.
-|===
-=== ssl.certificates
-[source,js]
+The list does not include certificates that are sourced from the default SSL context of the Java Runtime Environment (JRE), even if those certificates are in use within Elasticsearch.
+
+NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the API returns all the certificates that are included in the PKCS#11 token irrespective of whether these are used in the Elasticsearch TLS configuration.
+
+If Elasticsearch is configured to use a keystore or truststore, the API output includes all certificates in that store, even though some of the certificates might not be in active use within the cluster.
+
+{ref}/security-api-ssl.html[Endpoint documentation]
+[source,ts]
----
-client.ssl.certificates([params] [, options] [, callback])
+client.ssl.certificates()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html
-[cols=2*]
-|===
-|===
-=== xpack.graph.explore
-[source,js]
+
+
+[discrete]
+=== synonyms
+[discrete]
+==== delete_synonym
+Delete a synonym set.
+
+{ref}/delete-synonyms-set.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.graph.explore([params] [, options] [, callback])
+client.synonyms.deleteSynonym({ id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
-|`type`
-|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types
+[discrete]
+==== Arguments
-|`routing`
-|`string` - Specific routing value
+* *Request (object):*
+** *`id` (string)*: The id of the synonyms set to be deleted
-|`timeout`
-|`string` - Explicit operation timeout
+[discrete]
+==== delete_synonym_rule
+Delete a synonym rule.
+Delete a synonym rule from a synonym set.
-|`body`
-|`object` - Graph Query DSL
-
-|===
-=== xpack.info
-[source,js]
+{ref}/delete-synonym-rule.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.info([params] [, options] [, callback])
+client.synonyms.deleteSynonymRule({ set_id, rule_id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html
-[cols=2*]
-|===
-|`categories`
-|`string, string[]` - Comma-separated list of info categories. Can be any of: build, license, features
-|===
-=== xpack.license.delete
-[source,js]
-----
-client.xpack.license.delete([params] [, options] [, callback])
-----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|===
-=== xpack.license.get
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`set_id` (string)*: The id of the synonym set to be updated
+** *`rule_id` (string)*: The id of the synonym rule to be deleted
+
+[discrete]
+==== get_synonym
+Get a synonym set.
+
+{ref}/get-synonyms-set.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.license.get([params] [, options] [, callback])
+client.synonyms.getSynonym({ id })
----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|`local`
-|`boolean` - Return local information, do not retrieve the state from master node (default: false)
-|===
-=== xpack.license.getBasicStatus
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: "The id of the synonyms set to be retrieved
+** *`from` (Optional, number)*: Starting offset for query rules to be retrieved
+** *`size` (Optional, number)*: specifies a max number of query rules to retrieve
+
+[discrete]
+==== get_synonym_rule
+Get a synonym rule.
+Get a synonym rule from a synonym set.
+
+{ref}/get-synonym-rule.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.license.getBasicStatus([params] [, options] [, callback])
+client.synonyms.getSynonymRule({ set_id, rule_id })
----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|===
-=== xpack.license.getTrialStatus
-[source,js]
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`set_id` (string)*: The id of the synonym set to retrieve the synonym rule from
+** *`rule_id` (string)*: The id of the synonym rule to retrieve
+
+[discrete]
+==== get_synonyms_sets
+Get all synonym sets.
+Get a summary of all defined synonym sets.
+
+{ref}/list-synonyms-sets.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.license.getTrialStatus([params] [, options] [, callback])
+client.synonyms.getSynonymsSets({ ... })
----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|===
-=== xpack.license.post
-[source,js]
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`from` (Optional, number)*: Starting offset
+** *`size` (Optional, number)*: specifies a max number of results to get
+
+[discrete]
+==== put_synonym
+Create or update a synonym set.
+Synonyms sets are limited to a maximum of 10,000 synonym rules per set.
+If you need to manage more synonym rules, you can create multiple synonym sets.
+
+{ref}/put-synonyms-set.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.license.post([params] [, options] [, callback])
+client.synonyms.putSynonym({ id, synonyms_set })
----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|`acknowledge`
-|`boolean` - whether the user has acknowledged acknowledge messages (default: false)
-|`body`
-|`object` - licenses to be installed
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: The id of the synonyms set to be created or updated
+** *`synonyms_set` ({ id, synonyms } | { id, synonyms }[])*: The synonym set information to update
-|===
-=== xpack.license.postStartBasic
-[source,js]
+[discrete]
+==== put_synonym_rule
+Create or update a synonym rule.
+Create or update a synonym rule in a synonym set.
+
+{ref}/put-synonym-rule.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.license.postStartBasic([params] [, options] [, callback])
+client.synonyms.putSynonymRule({ set_id, rule_id, synonyms })
----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|`acknowledge`
-|`boolean` - whether the user has acknowledged acknowledge messages (default: false)
-|===
-=== xpack.license.postStartTrial
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`set_id` (string)*: The id of the synonym set to be updated with the synonym rule
+** *`rule_id` (string)*: The id of the synonym rule to be updated or created
+** *`synonyms` (string)*
+
+[discrete]
+=== tasks
+[discrete]
+==== cancel
+Cancels a task, if it can be cancelled through an API.
+
+{ref}/tasks.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.license.postStartTrial([params] [, options] [, callback])
+client.tasks.cancel({ ... })
----
-https://www.elastic.co/guide/en/x-pack/current/license-management.html
-[cols=2*]
-|===
-|`type`
-|`string` - The type of trial license to generate (default: "trial")
-|`acknowledge`
-|`boolean` - whether the user has acknowledged acknowledge messages (default: false)
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`task_id` (Optional, string | number)*: ID of the task.
+** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request.
+** *`nodes` (Optional, string[])*: List of node IDs or names used to limit the request.
+** *`parent_task_id` (Optional, string)*: Parent task ID used to limit the tasks.
+** *`wait_for_completion` (Optional, boolean)*: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false
+
+[discrete]
+==== get
+Get task information.
+Returns information about the tasks currently executing in the cluster.
-|===
-=== xpack.migration.deprecations
-[source,js]
+{ref}/tasks.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.migration.deprecations([params] [, options] [, callback])
+client.tasks.get({ task_id })
----
-http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html
-[cols=2*]
-|===
-|`index`
-|`string` - Index pattern
-|===
-=== xpack.migration.getAssistance
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`task_id` (string)*: ID of the task.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
+If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the task has completed.
+
+[discrete]
+==== list
+The task management API returns information about tasks currently executing on one or more nodes in the cluster.
+
+{ref}/tasks.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.migration.getAssistance([params] [, options] [, callback])
+client.tasks.list({ ... })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html
-[cols=2*]
-|===
-|`index`
-|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
-|`allow_no_indices` or `allowNoIndices`
-|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
+[discrete]
+==== Arguments
-|`expand_wildcards` or `expandWildcards`
-|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
- _Default:_ `open`
+* *Request (object):*
+** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request.
+** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
+** *`group_by` (Optional, Enum("nodes" | "parents" | "none"))*: Key used to group tasks in the response.
+** *`nodes` (Optional, string | string[])*: List of node IDs or names used to limit returned information.
+** *`parent_task_id` (Optional, string)*: Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`.
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the operation is complete.
-|`ignore_unavailable` or `ignoreUnavailable`
-|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
+[discrete]
+=== text_structure
+[discrete]
+==== find_field_structure
+Finds the structure of a text field in an index.
-|===
-=== xpack.migration.upgrade
-[source,js]
+{ref}/find-field-structure.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.migration.upgrade([params] [, options] [, callback])
+client.textStructure.findFieldStructure()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html
-[cols=2*]
-|===
-|`index`
-|`string` - The name of the index
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - Should the request block until the upgrade operation is completed +
- _Default:_ `true`
-|===
-=== xpack.rollup.deleteJob
-[source,js]
+[discrete]
+==== find_message_structure
+Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch.
+
+{ref}/find-message-structure.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.deleteJob([params] [, options] [, callback])
+client.textStructure.findMessageStructure()
----
-[cols=2*]
-|===
-|`id`
-|`string` - The ID of the job to delete
-|===
-=== xpack.rollup.getJobs
-[source,js]
+[discrete]
+==== find_structure
+Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch.
+
+{ref}/find-structure.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.getJobs([params] [, options] [, callback])
+client.textStructure.findStructure({ ... })
----
-[cols=2*]
-|===
-|`id`
-|`string` - The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`text_files` (Optional, TJsonDocument[])*
+** *`charset` (Optional, string)*: The text’s character set. It must be a character set that is supported by the JVM that Elasticsearch uses. For example, UTF-8, UTF-16LE, windows-1252, or EUC-JP. If this parameter is not specified, the structure finder chooses an appropriate character set.
+** *`column_names` (Optional, string)*: If you have set format to delimited, you can specify the column names in a list. If this parameter is not specified, the structure finder uses the column names from the header row of the text. If the text does not have a header role, columns are named "column1", "column2", "column3", etc.
+** *`delimiter` (Optional, string)*: If you have set format to delimited, you can specify the character used to delimit the values in each row. Only a single character is supported; the delimiter cannot have multiple characters. By default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (|). In this default scenario, all rows must have the same number of fields for the delimited format to be detected. If you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row.
+** *`ecs_compatibility` (Optional, string)*: The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled).
+** *`explain` (Optional, boolean)*: If this parameter is set to true, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result.
+** *`format` (Optional, string)*: The high level structure of the text. Valid values are ndjson, xml, delimited, and semi_structured_text. By default, the API chooses the format. In this default scenario, all rows must have the same number of fields for a delimited format to be detected. If the format is set to delimited and the delimiter is not set, however, the API tolerates up to 5% of rows that have a different number of columns than the first row.
+** *`grok_pattern` (Optional, string)*: If you have set format to semi_structured_text, you can specify a Grok pattern that is used to extract fields from every message in the text. The name of the timestamp field in the Grok pattern must match what is specified in the timestamp_field parameter. If that parameter is not specified, the name of the timestamp field in the Grok pattern must match "timestamp". If grok_pattern is not specified, the structure finder creates a Grok pattern.
+** *`has_header_row` (Optional, boolean)*: If you have set format to delimited, you can use this parameter to indicate whether the column names are in the first row of the text. If this parameter is not specified, the structure finder guesses based on the similarity of the first row of the text to other rows.
+** *`line_merge_size_limit` (Optional, number)*: The maximum number of characters in a message when lines are merged to form messages while analyzing semi-structured text. If you have extremely long messages you may need to increase this, but be aware that this may lead to very long processing times if the way to group lines into messages is misdetected.
+** *`lines_to_sample` (Optional, number)*: The number of lines to include in the structural analysis, starting from the beginning of the text. The minimum is 2; If the value of this parameter is greater than the number of lines in the text, the analysis proceeds (as long as there are at least two lines in the text) for all of the lines.
+** *`quote` (Optional, string)*: If you have set format to delimited, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character. Only a single character is supported. If this parameter is not specified, the default value is a double quote ("). If your delimited text format does not use quoting, a workaround is to set this argument to a character that does not appear anywhere in the sample.
+** *`should_trim_fields` (Optional, boolean)*: If you have set format to delimited, you can specify whether values between delimiters should have whitespace trimmed from them. If this parameter is not specified and the delimiter is pipe (|), the default value is true. Otherwise, the default value is false.
+** *`timeout` (Optional, string | -1 | 0)*: Sets the maximum amount of time that the structure analysis make take. If the analysis is still running when the timeout expires then it will be aborted.
+** *`timestamp_field` (Optional, string)*: Optional parameter to specify the timestamp field in the file
+** *`timestamp_format` (Optional, string)*: The Java time format of the timestamp field in the text.
-|===
-=== xpack.rollup.getRollupCaps
-[source,js]
+[discrete]
+==== test_grok_pattern
+Tests a Grok pattern on some text.
+
+{ref}/test-grok-pattern.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.getRollupCaps([params] [, options] [, callback])
+client.textStructure.testGrokPattern({ grok_pattern, text })
----
-[cols=2*]
-|===
-|`id`
-|`string` - The ID of the index to check rollup capabilities on, or left blank for all jobs
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`grok_pattern` (string)*: Grok pattern to run on the text.
+** *`text` (string[])*: Lines of text to run the Grok pattern on.
+** *`ecs_compatibility` (Optional, string)*: The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled).
+
+[discrete]
+=== transform
+[discrete]
+==== delete_transform
+Delete a transform.
+Deletes a transform.
-|===
-=== xpack.rollup.getRollupIndexCaps
-[source,js]
+{ref}/delete-transform.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.getRollupIndexCaps([params] [, options] [, callback])
+client.transform.deleteTransform({ transform_id })
----
-[cols=2*]
-|===
-|`index`
-|`string` - The rollup index or index pattern to obtain rollup capabilities from.
+[discrete]
+==== Arguments
-|===
-=== xpack.rollup.putJob
-[source,js]
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform.
+** *`force` (Optional, boolean)*: If this value is false, the transform must be stopped before it can be deleted. If true, the transform is
+deleted regardless of its current state.
+** *`delete_dest_index` (Optional, boolean)*: If this value is true, the destination index is deleted together with the transform. If false, the destination
+index will not be deleted
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== get_node_stats
+Retrieves transform usage information for transform nodes.
+[source,ts]
----
-client.xpack.rollup.putJob([params] [, options] [, callback])
+client.transform.getNodeStats()
----
-[cols=2*]
-|===
-|`id`
-|`string` - The ID of the job to create
-|`body`
-|`object` - The job configuration
+[discrete]
+==== get_transform
+Get transforms.
+Retrieves configuration information for transforms.
-|===
-=== xpack.rollup.rollupSearch
-[source,js]
+{ref}/get-transform.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.rollupSearch([params] [, options] [, callback])
+client.transform.getTransform({ ... })
----
-[cols=2*]
-|===
-|`index`
-|`string` - The index or index-pattern (containing rollup or regular data) that should be searched
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (Optional, string | string[])*: Identifier for the transform. It can be a transform identifier or a
+wildcard expression. You can get information for all transforms by using
+`_all`, by specifying `*` as the ``, or by omitting the
+``.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no transforms that match.
+2. Contains the _all string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+If this parameter is false, the request returns a 404 status code when
+there are no matches or only partial matches.
+** *`from` (Optional, number)*: Skips the specified number of transforms.
+** *`size` (Optional, number)*: Specifies the maximum number of transforms to obtain.
+** *`exclude_generated` (Optional, boolean)*: Excludes fields that were automatically added when creating the
+transform. This allows the configuration to be in an acceptable format to
+be retrieved and then added to another cluster.
+
+[discrete]
+==== get_transform_stats
+Get transform stats.
+Retrieves usage information for transforms.
+
+{ref}/get-transform-stats.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.getTransformStats({ transform_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string | string[])*: Identifier for the transform. It can be a transform identifier or a
+wildcard expression. You can get information for all transforms by using
+`_all`, by specifying `*` as the ``, or by omitting the
+``.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request:
+
+1. Contains wildcard expressions and there are no transforms that match.
+2. Contains the _all string or no identifiers and there are no matches.
+3. Contains wildcard expressions and there are only partial matches.
+
+If this parameter is false, the request returns a 404 status code when
+there are no matches or only partial matches.
+** *`from` (Optional, number)*: Skips the specified number of transforms.
+** *`size` (Optional, number)*: Specifies the maximum number of transforms to obtain.
+** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the stats
+
+[discrete]
+==== preview_transform
+Preview a transform.
+Generates a preview of the results that you will get when you create a transform with the same configuration.
+
+It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also
+generates a list of mappings and settings for the destination index. These values are determined based on the field
+types of the source index and the transform aggregations.
+
+{ref}/preview-transform.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.previewTransform({ ... })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (Optional, string)*: Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform
+configuration details in the request body.
+** *`dest` (Optional, { index, op_type, pipeline, routing, version_type })*: The destination for the transform.
+** *`description` (Optional, string)*: Free text description of the transform.
+** *`frequency` (Optional, string | -1 | 0)*: The interval between checks for changes in the source indices when the
+transform is running continuously. Also determines the retry interval in
+the event of transient failures while the transform is searching or
+indexing. The minimum value is 1s and the maximum is 1h.
+** *`pivot` (Optional, { aggregations, group_by })*: The pivot method transforms the data by aggregating and grouping it.
+These objects define the group by fields and the aggregation to reduce
+the data.
+** *`source` (Optional, { index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source of the data for the transform.
+** *`settings` (Optional, { align_checkpoints, dates_as_epoch_millis, deduce_mappings, docs_per_second, max_page_search_size, unattended })*: Defines optional transform settings.
+** *`sync` (Optional, { time })*: Defines the properties transforms require to run continuously.
+** *`retention_policy` (Optional, { time })*: Defines a retention policy for the transform. Data that meets the defined
+criteria is deleted from the destination index.
+** *`latest` (Optional, { sort, unique_key })*: The latest method transforms the data by finding the latest document for
+each unique key.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the
+timeout expires, the request fails and returns an error.
+
+[discrete]
+==== put_transform
+Create a transform.
+Creates a transform.
+
+A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as
+a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a
+unique row per entity.
+
+You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If
+you choose to use the pivot method for your transform, the entities are defined by the set of `group_by` fields in
+the pivot object. If you choose to use the latest method, the entities are defined by the `unique_key` field values
+in the latest object.
+
+You must have `create_index`, `index`, and `read` privileges on the destination index and `read` and
+`view_index_metadata` privileges on the source indices. When Elasticsearch security features are enabled, the
+transform remembers which roles the user that created it had at the time of creation and uses those same roles. If
+those roles do not have the required privileges on the source and destination indices, the transform fails when it
+attempts unauthorized operations.
+
+NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any
+`.transform-internal*` indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do
+not give users any privileges on `.transform-internal*` indices. If you used transforms prior to 7.5, also do not
+give users any privileges on `.data-frame-internal*` indices.
+
+{ref}/put-transform.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.putTransform({ transform_id, dest, source })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
+hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.
+** *`dest` ({ index, op_type, pipeline, routing, version_type })*: The destination for the transform.
+** *`source` ({ index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source of the data for the transform.
+** *`description` (Optional, string)*: Free text description of the transform.
+** *`frequency` (Optional, string | -1 | 0)*: The interval between checks for changes in the source indices when the transform is running continuously. Also
+determines the retry interval in the event of transient failures while the transform is searching or indexing.
+The minimum value is `1s` and the maximum is `1h`.
+** *`latest` (Optional, { sort, unique_key })*: The latest method transforms the data by finding the latest document for each unique key.
+** *`_meta` (Optional, Record)*: Defines optional transform metadata.
+** *`pivot` (Optional, { aggregations, group_by })*: The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields
+and the aggregation to reduce the data.
+** *`retention_policy` (Optional, { time })*: Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the
+destination index.
+** *`settings` (Optional, { align_checkpoints, dates_as_epoch_millis, deduce_mappings, docs_per_second, max_page_search_size, unattended })*: Defines optional transform settings.
+** *`sync` (Optional, { time })*: Defines the properties transforms require to run continuously.
+** *`defer_validation` (Optional, boolean)*: When the transform is created, a series of validations occur to ensure its success. For example, there is a
+check for the existence of the source indices and a check that the destination index is not part of the source
+index pattern. You can use this parameter to skip the checks, for example when the source index does not exist
+until after the transform is created. The validations are always run when you start the transform, however, with
+the exception of privilege checks.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+
+[discrete]
+==== reset_transform
+Reset a transform.
+Resets a transform.
+Before you can reset it, you must stop it; alternatively, use the `force` query parameter.
+If the destination index was created by the transform, it is deleted.
+
+{ref}/reset-transform.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.resetTransform({ transform_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
+hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.
+** *`force` (Optional, boolean)*: If this value is `true`, the transform is reset regardless of its current state. If it's `false`, the transform
+must be stopped before it can be reset.
+
+[discrete]
+==== schedule_now_transform
+Schedule a transform to start now.
+Instantly runs a transform to process data.
+
+If you _schedule_now a transform, it will process the new data instantly,
+without waiting for the configured frequency interval. After _schedule_now API is called,
+the transform will be processed again at now + frequency unless _schedule_now API
+is called again in the meantime.
+
+{ref}/schedule-now-transform.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.scheduleNowTransform({ transform_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform.
+** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the scheduling to take place
+
+[discrete]
+==== start_transform
+Start a transform.
+Starts a transform.
+
+When you start a transform, it creates the destination index if it does not already exist. The `number_of_shards` is
+set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, it deduces the mapping
+definitions for the destination index from the source indices and the transform aggregations. If fields in the
+destination index are derived from scripts (as in the case of `scripted_metric` or `bucket_script` aggregations),
+the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce
+mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you
+start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings
+in a pivot transform.
+
+When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you
+created the transform, they occur when you start the transform—with the exception of privilege checks. When
+Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the
+time of creation and uses those same roles. If those roles do not have the required privileges on the source and
+destination indices, the transform fails when it attempts unauthorized operations.
+
+{ref}/start-transform.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.startTransform({ transform_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
+** *`from` (Optional, string)*: Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms.
+
+[discrete]
+==== stop_transform
+Stop transforms.
+Stops one or more transforms.
+
+{ref}/stop-transform.html[Endpoint documentation]
+[source,ts]
+----
+client.transform.stopTransform({ transform_id })
+----
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform. To stop multiple transforms, use a list or a wildcard expression.
+To stop all transforms, use `_all` or `*` as the identifier.
+** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: contains wildcard expressions and there are no transforms that match;
+contains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there
+are only partial matches.
-|`type`
-|`string` - The doc type inside the index
+If it is true, the API returns a successful acknowledgement message when there are no matches. When there are
+only partial matches, the API stops the appropriate transforms.
-|`typed_keys` or `typedKeys`
-|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response
+If it is false, the request returns a 404 status code when there are no matches or only partial matches.
+** *`force` (Optional, boolean)*: If it is true, the API forcefully stops the transforms.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response when `wait_for_completion` is `true`. If no response is received before the
+timeout expires, the request returns a timeout exception. However, the request continues processing and
+eventually moves the transform to a STOPPED state.
+** *`wait_for_checkpoint` (Optional, boolean)*: If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false,
+the transform stops as soon as possible.
+** *`wait_for_completion` (Optional, boolean)*: If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns
+immediately and the indexer is stopped asynchronously in the background.
-|`rest_total_hits_as_int` or `restTotalHitsAsInt`
-|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response
+[discrete]
+==== update_transform
+Update a transform.
+Updates certain properties of a transform.
-|`body`
-|`object` - The search request body
+All updated properties except `description` do not take effect until after the transform starts the next checkpoint,
+thus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata`
+privileges for the source indices. You must also have `index` and `read` privileges for the destination index. When
+Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the
+time of update and runs with those privileges.
-|===
-=== xpack.rollup.startJob
-[source,js]
+{ref}/update-transform.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.startJob([params] [, options] [, callback])
+client.transform.updateTransform({ transform_id })
----
-[cols=2*]
-|===
-|`id`
-|`string` - The ID of the job to start
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`transform_id` (string)*: Identifier for the transform.
+** *`dest` (Optional, { index, op_type, pipeline, routing, version_type })*: The destination for the transform.
+** *`description` (Optional, string)*: Free text description of the transform.
+** *`frequency` (Optional, string | -1 | 0)*: The interval between checks for changes in the source indices when the
+transform is running continuously. Also determines the retry interval in
+the event of transient failures while the transform is searching or
+indexing. The minimum value is 1s and the maximum is 1h.
+** *`_meta` (Optional, Record)*: Defines optional transform metadata.
+** *`source` (Optional, { index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source of the data for the transform.
+** *`settings` (Optional, { align_checkpoints, dates_as_epoch_millis, deduce_mappings, docs_per_second, max_page_search_size, unattended })*: Defines optional transform settings.
+** *`sync` (Optional, { time })*: Defines the properties transforms require to run continuously.
+** *`retention_policy` (Optional, { time } | null)*: Defines a retention policy for the transform. Data that meets the defined
+criteria is deleted from the destination index.
+** *`defer_validation` (Optional, boolean)*: When true, deferrable validations are not run. This behavior may be
+desired if the source index does not exist until after the transform is
+created.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the
+timeout expires, the request fails and returns an error.
-|===
-=== xpack.rollup.stopJob
-[source,js]
+[discrete]
+==== upgrade_transforms
+Upgrades all transforms.
+This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. It
+also cleans up the internal data structures that store the transform state and checkpoints. The upgrade does not
+affect the source and destination indices. The upgrade also does not affect the roles that transforms use when
+Elasticsearch security features are enabled; the role used to read source data and write to the destination index
+remains unchanged.
+
+{ref}/upgrade-transforms.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.rollup.stopJob([params] [, options] [, callback])
+client.transform.upgradeTransforms({ ... })
----
-[cols=2*]
-|===
-|`id`
-|`string` - The ID of the job to stop
+[discrete]
+==== Arguments
-|`wait_for_completion` or `waitForCompletion`
-|`boolean` - True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
+* *Request (object):*
+** *`dry_run` (Optional, boolean)*: When true, the request checks for updates but does not run them.
+** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and
+returns an error.
-|`timeout`
-|`string` - Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.
+[discrete]
+=== watcher
+[discrete]
+==== ack_watch
+Acknowledges a watch, manually throttling the execution of the watch's actions.
-|===
-=== xpack.sql.clearCursor
-[source,js]
+{ref}/watcher-api-ack-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.sql.clearCursor([params] [, options] [, callback])
+client.watcher.ackWatch({ watch_id })
----
-Clear SQL cursor
-[cols=2*]
-|===
-|`body`
-|`object` - Specify the cursor value in the `cursor` element to clean the cursor.
-|===
-=== xpack.sql.query
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`watch_id` (string)*: Watch ID
+** *`action_id` (Optional, string | string[])*: A list of the action ids to be acked
+
+[discrete]
+==== activate_watch
+Activates a currently inactive watch.
+
+{ref}/watcher-api-activate-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.sql.query([params] [, options] [, callback])
+client.watcher.activateWatch({ watch_id })
----
-Execute SQL
-[cols=2*]
-|===
-|`format`
-|`string` - a short version of the Accept header, e.g. json, yaml
-|`body`
-|`object` - Use the `query` element to start a query. Use the `cursor` element to continue a query.
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`watch_id` (string)*: Watch ID
+
+[discrete]
+==== deactivate_watch
+Deactivates a currently active watch.
-|===
-=== xpack.sql.translate
-[source,js]
+{ref}/watcher-api-deactivate-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.sql.translate([params] [, options] [, callback])
+client.watcher.deactivateWatch({ watch_id })
----
-Translate SQL into Elasticsearch queries
-[cols=2*]
-|===
-|`body`
-|`object` - Specify the query in the `query` element.
-|===
-=== xpack.usage
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`watch_id` (string)*: Watch ID
+
+[discrete]
+==== delete_watch
+Removes a watch from Watcher.
+
+{ref}/watcher-api-delete-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.usage([params] [, options] [, callback])
+client.watcher.deleteWatch({ id })
----
-Retrieve information about xpack features usage
-[cols=2*]
-|===
-|`master_timeout` or `masterTimeout`
-|`string` - Specify timeout for watch write operation
-|===
-=== xpack.watcher.ackWatch
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Watch ID
+
+[discrete]
+==== execute_watch
+This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.
+For testing and debugging purposes, you also have fine-grained control on how the watch runs. You can execute the watch without executing all of its actions or alternatively by simulating them. You can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after execution.
+
+{ref}/watcher-api-execute-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.ackWatch([params] [, options] [, callback])
+client.watcher.executeWatch({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html
-[cols=2*]
-|===
-|`watch_id` or `watchId`
-|`string` - Watch ID
-|`action_id` or `actionId`
-|`string, string[]` - A comma-separated list of the action ids to be acked
+[discrete]
+==== Arguments
-|===
-=== xpack.watcher.activateWatch
-[source,js]
+* *Request (object):*
+** *`id` (Optional, string)*: Identifier for the watch.
+** *`action_modes` (Optional, Record)*: Determines how to handle the watch actions as part of the watch execution.
+** *`alternative_input` (Optional, Record)*: When present, the watch uses this object as a payload instead of executing its own input.
+** *`ignore_condition` (Optional, boolean)*: When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.
+** *`record_execution` (Optional, boolean)*: When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time. In addition, the status of the watch is updated, possibly throttling subsequent executions. This can also be specified as an HTTP parameter.
+** *`simulated_actions` (Optional, { actions, all, use_all })*
+** *`trigger_data` (Optional, { scheduled_time, triggered_time })*: This structure is parsed as the data of the trigger event that will be used during the watch execution
+** *`watch` (Optional, { actions, condition, input, metadata, status, throttle_period, throttle_period_in_millis, transform, trigger })*: When present, this watch is used instead of the one specified in the request. This watch is not persisted to the index and record_execution cannot be set.
+** *`debug` (Optional, boolean)*: Defines whether the watch runs in debug mode.
+
+[discrete]
+==== get_settings
+Retrieve settings for the watcher system index
+
+{ref}/watcher-api-get-settings.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.activateWatch([params] [, options] [, callback])
+client.watcher.getSettings()
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html
-[cols=2*]
-|===
-|`watch_id` or `watchId`
-|`string` - Watch ID
-|===
-=== xpack.watcher.deactivateWatch
-[source,js]
+
+[discrete]
+==== get_watch
+Retrieves a watch by its ID.
+
+{ref}/watcher-api-get-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.deactivateWatch([params] [, options] [, callback])
+client.watcher.getWatch({ id })
----
-https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html
-[cols=2*]
-|===
-|`watch_id` or `watchId`
-|`string` - Watch ID
-|===
-=== xpack.watcher.deleteWatch
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Watch ID
+
+[discrete]
+==== put_watch
+Creates a new watch, or updates an existing one.
+
+{ref}/watcher-api-put-watch.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.deleteWatch([params] [, options] [, callback])
+client.watcher.putWatch({ id })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html
-[cols=2*]
-|===
-|`id`
-|`string` - Watch ID
-|===
-=== xpack.watcher.executeWatch
-[source,js]
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`id` (string)*: Watch ID
+** *`actions` (Optional, Record)*
+** *`condition` (Optional, { always, array_compare, compare, never, script })*
+** *`input` (Optional, { chain, http, search, simple })*
+** *`metadata` (Optional, Record)*
+** *`throttle_period` (Optional, string)*
+** *`transform` (Optional, { chain, script, search })*
+** *`trigger` (Optional, { schedule })*
+** *`active` (Optional, boolean)*: Specify whether the watch is in/active by default
+** *`if_primary_term` (Optional, number)*: only update the watch if the last operation that has changed the watch has the specified primary term
+** *`if_seq_no` (Optional, number)*: only update the watch if the last operation that has changed the watch has the specified sequence number
+** *`version` (Optional, number)*: Explicit version number for concurrency control
+
+[discrete]
+==== query_watches
+Retrieves stored watches.
+
+{ref}/watcher-api-query-watches.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.executeWatch([params] [, options] [, callback])
+client.watcher.queryWatches({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html
-[cols=2*]
-|===
-|`id`
-|`string` - Watch ID
-|`debug`
-|`boolean` - indicates whether the watch should execute in debug mode
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`from` (Optional, number)*: The offset from the first result to fetch. Needs to be non-negative.
+** *`size` (Optional, number)*: The number of hits to return. Needs to be non-negative.
+** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Optional, query filter watches to be returned.
+** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: Optional sort definition.
+** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Optional search After to do pagination using last hit’s sort values.
-|`body`
-|`object` - Execution control
+[discrete]
+==== start
+Starts Watcher if it is not already running.
-|===
-=== xpack.watcher.getWatch
-[source,js]
+{ref}/watcher-api-start.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.getWatch([params] [, options] [, callback])
+client.watcher.start()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html
-[cols=2*]
-|===
-|`id`
-|`string` - Watch ID
-|===
-=== xpack.watcher.putWatch
-[source,js]
+
+[discrete]
+==== stats
+Retrieves the current Watcher metrics.
+
+{ref}/watcher-api-stats.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.putWatch([params] [, options] [, callback])
+client.watcher.stats({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html
-[cols=2*]
-|===
-|`id`
-|`string` - Watch ID
-|`active`
-|`boolean` - Specify whether the watch is in/active by default
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`metric` (Optional, Enum("_all" | "queued_watches" | "current_watches" | "pending_watches") | Enum("_all" | "queued_watches" | "current_watches" | "pending_watches")[])*: Defines which additional metrics are included in the response.
+** *`emit_stacktraces` (Optional, boolean)*: Defines whether stack traces are generated for each watch that is running.
-|`version`
-|`number` - Explicit version number for concurrency control
+[discrete]
+==== stop
+Stops Watcher if it is running.
-|`if_seq_no` or `ifSeqNo`
-|`number` - only update the watch if the last operation that has changed the watch has the specified sequence number
+{ref}/watcher-api-stop.html[Endpoint documentation]
+[source,ts]
+----
+client.watcher.stop()
+----
-|`if_primary_term` or `ifPrimaryTerm`
-|`number` - only update the watch if the last operation that has changed the watch has the specified primary term
-|`body`
-|`object` - The watch
+[discrete]
+==== update_settings
+Update settings for the watcher system index
-|===
-=== xpack.watcher.start
-[source,js]
+{ref}/watcher-api-update-settings.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.start([params] [, options] [, callback])
+client.watcher.updateSettings()
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html
-[cols=2*]
-|===
-|===
-=== xpack.watcher.stats
-[source,js]
+
+
+[discrete]
+=== xpack
+[discrete]
+==== info
+Provides general information about the installed X-Pack features.
+
+{ref}/info-api.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.stats([params] [, options] [, callback])
+client.xpack.info({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html
-[cols=2*]
-|===
-|`metric`
-|`'_all', 'queued_watches', 'current_watches', 'pending_watches'` - Controls what additional stat metrics should be include in the response
-|`metric`
-|`'_all', 'queued_watches', 'current_watches', 'pending_watches'` - Controls what additional stat metrics should be include in the response
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`categories` (Optional, Enum("build" | "features" | "license")[])*: A list of the information categories to include in the response. For example, `build,license,features`.
+** *`accept_enterprise` (Optional, boolean)*: If this param is used it must be set to true
+** *`human` (Optional, boolean)*: Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line.
-|`emit_stacktraces` or `emitStacktraces`
-|`boolean` - Emits stack traces of currently running watches
+[discrete]
+==== usage
+This API provides information about which features are currently enabled and available under the current license and some usage statistics.
-|===
-=== xpack.watcher.stop
-[source,js]
+{ref}/usage-api.html[Endpoint documentation]
+[source,ts]
----
-client.xpack.watcher.stop([params] [, options] [, callback])
+client.xpack.usage({ ... })
----
-http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html
-[cols=2*]
-|===
-|===
\ No newline at end of file
+
+[discrete]
+==== Arguments
+
+* *Request (object):*
+** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
+
diff --git a/docs/testing.asciidoc b/docs/testing.asciidoc
new file mode 100644
index 000000000..35b937474
--- /dev/null
+++ b/docs/testing.asciidoc
@@ -0,0 +1,158 @@
+[[client-testing]]
+=== Testing
+
+Testing is one of the most important parts of developing an application.
+The client is very flexible when it comes to testing and is compatible with
+most testing frameworks (such as https://www.npmjs.com/package/ava[`ava`],
+which is used in the examples below).
+
+If you are using this client, you are most likely working with {es}, and one of
+the first issues you face is how to test your application. A perfectly valid
+solution is to use the real {es} instance for testing your application, but you
+would be doing an integration test, while you want a unit test. There are many
+ways to solve this problem, you could create the database with Docker, or use an
+in-memory compatible one, but if you are writing unit tests that can be easily
+parallelized this becomes quite uncomfortable. A different way of improving your
+testing experience while doing unit tests is to use a mock.
+
+The client is designed to be easy to extend and adapt to your needs. Thanks to
+its internal architecture it allows you to change some specific components while
+keeping the rest of it working as usual. Each {es} official client is composed
+of the following components:
+
+* `API layer`: every {es} API that you can call.
+* `Transport`: a component that takes care of preparing a request before sending
+ it and handling all the retry and sniffing strategies.
+* `ConnectionPool`: {es} is a cluster and might have multiple nodes, the
+ `ConnectionPool` takes care of them.
+* `Serializer`: A class with all the serialization strategies, from the basic
+ JSON to the new line delimited JSON.
+* `Connection`: The actual HTTP library.
+
+The best way to mock {es} with the official clients is to replace the
+`Connection` component since it has very few responsibilities and it does not
+interact with other internal components other than getting requests and
+returning responses.
+
+
+[discrete]
+==== `@elastic/elasticsearch-mock`
+
+Writing each time a mock for your test can be annoying and error-prone, so we
+have built a simple yet powerful mocking library specifically designed for this
+client, and you can install it with the following command:
+
+[source,sh]
+----
+npm install @elastic/elasticsearch-mock --save-dev
+----
+
+With this library you can create custom mocks for any request you can send to
+{es}. It offers a simple and intuitive API and it mocks only the HTTP layer,
+leaving the rest of the client working as usual.
+
+Before showing all of its features, and what you can do with it, let’s see an
+example:
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const Mock = require('@elastic/elasticsearch-mock')
+
+const mock = new Mock()
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' },
+ Connection: mock.getConnection()
+})
+
+mock.add({
+ method: 'GET',
+ path: '/'
+}, () => {
+ return { status: 'ok' }
+})
+
+client.info().then(console.log, console.log)
+----
+
+As you can see it works closely with the client itself, once you have created a
+new instance of the mock library you just need to call the mock.getConnection()
+method and pass its result to the Connection option of the client. From now on,
+every request is handled by the mock library, and the HTTP layer will never be
+touched. As a result, your test is significantly faster and you are able to
+easily parallelize them!
+
+The library allows you to write both “strict” and “loose” mocks, which means
+that you can write a mock that handles a very specific request or be looser and
+handle a group of request, let’s see this in action:
+
+[source,js]
+----
+mock.add({
+ method: 'POST',
+ path: '/indexName/_search'
+}, () => {
+ return {
+ hits: {
+ total: { value: 1, relation: 'eq' },
+ hits: [{ _source: { baz: 'faz' } }]
+ }
+ }
+})
+
+mock.add({
+ method: 'POST',
+ path: '/indexName/_search',
+ body: { query: { match: { foo: 'bar' } } }
+}, () => {
+ return {
+ hits: {
+ total: { value: 0, relation: 'eq' },
+ hits: []
+ }
+ }
+})
+----
+
+In the example above, every search request gets the first response, while every
+search request that uses the query described in the second mock gets the second
+response.
+
+You can also specify dynamic paths:
+
+[source,js]
+----
+mock.add({
+ method: 'GET',
+ path: '/:index/_count'
+}, () => {
+ return { count: 42 }
+})
+
+client.count({ index: 'foo' }).then(console.log, console.log) // => { count: 42 }
+client.count({ index: 'bar' }).then(console.log, console.log) // => { count: 42 }
+----
+
+And wildcards are supported as well.
+
+Another very interesting use case is the ability to create a test that randomly
+fails to see how your code reacts to failures:
+
+[source,js]
+----
+mock.add({
+ method: 'GET',
+ path: '/:index/_count'
+}, () => {
+ if (Math.random() > 0.8) {
+ return ResponseError({ body: {}, statusCode: 500 })
+ } else {
+ return { count: 42 }
+ }
+})
+----
+
+We have seen how simple is mocking {es} and testing your application, you can
+find many more features and examples in the
+https://github.com/elastic/elasticsearch-js-mock[module documentation].
\ No newline at end of file
diff --git a/docs/timeout-best-practices.asciidoc b/docs/timeout-best-practices.asciidoc
new file mode 100644
index 000000000..0d2fb4772
--- /dev/null
+++ b/docs/timeout-best-practices.asciidoc
@@ -0,0 +1,10 @@
+[[timeout-best-practices]]
+=== Timeout best practices
+
+This client is configured by default to operate like many HTTP client libraries do, by using a relatively short (30 second) timeout on all requests sent to {es}, raising a `TimeoutError` when that time period has elapsed without receiving a response. However, {es} will always eventually respond to any request, even if it takes several minutes. The {ref}/modules-network.html#_http_client_configuration[official {es} recommendation] is to disable response timeouts entirely by default.
+
+Since changing this default would be a breaking change, we won't do that until the next major release. In the meantime, here is our recommendation for properly configuring your client:
+
+* Ensure keep-alive is enabled; this is the default, so no settings need to be changed, unless you have set `agent` to `false` or provided an alternate `agent` that disables keep-alive
+* If using the default `UndiciConnection`, disable request timeouts by setting `timeout` to `0`
+* If using the legacy `HttpConnection`, set `timeout` to a very large number (e.g. `86400000`, or one day)
diff --git a/docs/transport.asciidoc b/docs/transport.asciidoc
new file mode 100644
index 000000000..d32606b63
--- /dev/null
+++ b/docs/transport.asciidoc
@@ -0,0 +1,73 @@
+[[transport]]
+=== Transport
+
+This class is responsible for performing the request to {es} and handling
+errors, it also handles sniffing.
+
+[source,js]
+----
+const { Client } = require('@elastic/elasticsearch')
+const { Transport } = require('@elastic/transport')
+
+class MyTransport extends Transport {
+ request (params, options, callback) {
+ // your code
+ }
+}
+
+const client = new Client({
+ Transport: MyTransport
+})
+----
+
+Sometimes you need to inject a small snippet of your code and then continue to
+use the usual client code. In such cases, call `super.method`:
+
+[source,js]
+----
+class MyTransport extends Transport {
+ request (params, options, callback) {
+ // your code
+ return super.request(params, options, callback)
+ }
+}
+----
+
+==== Supported content types
+
+Depending on the `content-type` of the response, the transport will return the body as different types:
+
+[cols="1,1"]
+|===
+|Content-Type |JavaScript type
+
+|`application/json`
+|`object`
+
+|`text/plain`
+|`string`
+
+|`application/vnd.elasticsearch+json`
+|`object`
+
+|`application/vnd.mapbox-vector-tile`
+|`Buffer`
+
+|`application/vnd.apache.arrow.stream`
+|`Buffer`
+
+|`application/vnd.elasticsearch+arrow+stream`
+|`Buffer`
+
+|`application/smile`
+|`Buffer`
+
+|`application/vnd.elasticsearch+smile`
+|`Buffer`
+
+|`application/cbor`
+|`Buffer`
+
+|`application/vnd.elasticsearch+cbor`
+|`Buffer`
+|===
diff --git a/docs/typescript.asciidoc b/docs/typescript.asciidoc
index 94148a5cd..07534d733 100644
--- a/docs/typescript.asciidoc
+++ b/docs/typescript.asciidoc
@@ -1,59 +1,91 @@
-= TypeScript support
+[[typescript]]
+=== TypeScript support
-The client offers a first-class support for TypeScript, since it ships the type definitions for every exposed API.
+The client offers a first-class support for TypeScript, shipping a complete set
+of type definitions of Elasticsearch's API surface.
-While the client offers type definitions for Request parameters, Request bodies and responses are shipped with `any` because there is not an official spec that defines them, so we cannot make guarantees over them (but since they are shipped with `any`, you can easily override them with your own typing definitions).
+The types are not 100% complete yet. Some APIs are missing (the newest ones, e.g. EQL),
+and others may contain some errors, but we are continuously pushing fixes & improvements.
+Contribute type fixes and improvements to https://github.com/elastic/elasticsearch-specification[elasticsearch-specification github repository].
-NOTE: If you are using TypeScript you will be required to use _snake_case_ style to define the API parameters instead of _camelCase_.
+NOTE: The client is developed against the https://www.npmjs.com/package/typescript?activeTab=versions[latest]
+version of TypeScript. Furthermore, unless you have set `skipLibCheck` to `true`,
+you should configure `esModuleInterop` to `true`.
+
+[discrete]
+==== Example
-== How to extend the provided typings?
-Extend the provided typings is very straightforward, you should declare a custom `.d.ts` file and then write inside your type extensions, following there is an example of how do it.
[source,ts]
----
-declare module '@elastic/elasticsearch' {
- export interface ShardsResponse {
- total: number;
- successful: number;
- failed: number;
- skipped: number;
- }
-
- export interface Explanation {
- value: number;
- description: string;
- details: Explanation[];
- }
-
- export interface SearchResponse {
- took: number;
- timed_out: boolean;
- _scroll_id?: string;
- _shards: ShardsResponse;
- hits: {
- total: number;
- max_score: number;
- hits: Array<{
- _index: string;
- _type: string;
- _id: string;
- _score: number;
- _source: T;
- _version?: number;
- _explanation?: Explanation;
- fields?: any;
- highlight?: any;
- inner_hits?: any;
- matched_queries?: string[];
- sort?: string[];
- }>;
- };
- aggregations?: any;
- }
-
- export interface MSearchResponse {
- responses?: Array>;
- }
+import { Client } from '@elastic/elasticsearch'
+
+const client = new Client({
+ cloud: { id: '' },
+ auth: { apiKey: 'base64EncodedKey' }
+})
+
+interface Document {
+ character: string
+ quote: string
+}
+
+async function run () {
+ // Let's start by indexing some data
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Ned Stark',
+ quote: 'Winter is coming.'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ character: 'Daenerys Targaryen',
+ quote: 'I am the blood of the dragon.'
+ }
+ })
+
+ await client.index({
+ index: 'game-of-thrones',
+ document: {
+ 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 result= await client.search({
+ index: 'game-of-thrones',
+ query: {
+ match: { quote: 'winter' }
+ }
+ })
+
+ console.log(result.hits.hits)
}
-export {};
+run().catch(console.log)
+----
+
+[discrete]
+==== Request & Response types
+
+You can import the full TypeScript requests & responses definitions as it follows:
+
+[source,ts]
+----
+import { estypes } from '@elastic/elasticsearch'
+----
+
+If you need the legacy definitions with the body, you can do the following:
+
+[source,ts]
----
+import { estypesWithBody } from '@elastic/elasticsearch'
+----
\ No newline at end of file
diff --git a/docs/usage.asciidoc b/docs/usage.asciidoc
deleted file mode 100644
index 07441e78d..000000000
--- a/docs/usage.asciidoc
+++ /dev/null
@@ -1,304 +0,0 @@
-= Usage
-
-Use the client is pretty straightforward, it supports all the public APIs of Elasticsearch, and every method exposes the same signature.
-
-[source,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:
-
-[source,ts]
-----
-{
- body: object | boolean
- statusCode: number
- headers: object
- warnings: [string],
- meta: object
-}
-----
-
-NOTE: The body will be a boolean value when using `HEAD` APIs.
-
-The above value will be returned even if there is an error during the execution of the request, this means that you can safely use the https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment[destructuring assignment].
-
-The `meta` key contains all the information regarding the request, such as attempt, options, and the connection that has been used.
-
-[source,js]
-----
-// promise API
-const { body } = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-})
-
-// callback API
-client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, (err, { body }) => {
- if (err) console.log(err)
-})
-----
-
-=== Aborting a request
-
-When using the callback style API, the function will also return an object that allows you to abort the API request.
-
-[source,js]
-----
-// calback API
-const requesty = client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404],
- maxRetries: 3
-}, (err, { body }) => {
- if (err) console.log(err)
-})
-
-request.abort()
-----
-
-Aborting a request with the promise style API is not supported, but you can easily achieve that with convenience wrapper.
-
-[source,js]
-----
-function abortableRequest (params, options) {
- var request = null
- const promise = new Promise((resolve, reject) => {
- request = client.search(params, options, (err, result) => {
- err ? reject(err) : resolve(res)
- })
- })
- return {
- promise,
- abort: () => request.abort()
- }
-}
-
-const request = abortableRequest({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404],
- maxRetries: 3
-})
-
-request.abort()
-// access the promise with `request.promise.[method]`
-----
-
-=== Request specific options
-If needed you can pass request specific options in a second object:
-[source,js]
-----
-// promise API
-const result = await client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404],
- maxRetries: 3
-})
-
-// calback API
-client.search({
- index: 'my-index',
- body: { foo: 'bar' }
-}, {
- ignore: [404],
- maxRetries: 3
-}, (err, { body }) => {
- if (err) console.log(err)
-})
-----
-
-The supported request specific options are:
-[cols=2*]
-|===
-|`ignore`
-|`[number]` - HTTP status codes which should not be considered errors for this request. +
-_Default:_ `null`
-
-|`requestTimeout`
-|`number` - Max request timeout for the request, it overrides the client default. +
-_Default:_ `30000`
-
-|`maxRetries`
-|`number` - Max number of retries for the request, it overrides the client default. +
-_Default:_ `3`
-
-|`compression`
-|`string, boolean` - Enables body compression for the request. +
-_Options:_ `false`, `'gzip'` +
-_Default:_ `false`
-
-|`asStream`
-|`boolean` - Instead of getting the parsed body back, you will get the raw Node.js stream of data. +
-_Default:_ `false`
-
-|`headers`
-|`object` - Custom headers for the request. +
-_Default:_ `null`
-
-|`querystring`
-|`object` - Custom querystring for the request. +
-_Default:_ `null`
-|===
-
-=== Error handling
-The client exposes a variety of error objects, that you can use to enhance your error handling. +
-You can find all the error objects inside the `errors` key in the client.
-
-[source,js]
-----
-const { errors } = require('@elastic/elasticsearch')
-console.log(errors)
-----
-
-Following you can find the errors exported by the client.
-[cols=2*]
-|===
-|`ElasticsearchClientErrors`
-|Every error inherits from this class, it is the basic error generated by the client.
-
-|`TimeoutError`
-|Generated when a request exceeds the `requestTimeout` option.
-
-|`ConnectionError`
-|Generated when an error occurs during the reequest, it can be a connection error or a malformed stream of data.
-
-|`NoLivingConnectionsError`
-|Generated in case of all connections present in the connection pool are dead.
-
-|`SerializationError`
-|Generated if the serialization fails.
-
-|`DeserializationError`
-|Generated if the deserialization fails.
-
-|`ConfigurationError`
-|Generated if there is a malformed configuration or parameter.
-
-|`ResponseError`
-|Generated when in case of a `4xx` or `5xx` response.
-|===
-
-=== Events
-The client is an event emitter, this means that you can listen for its event and add additional logic to your code, without need to change the client internals or your normal usage. +
-You can find the events names by access the `events` key of the client.
-
-[source,js]
-----
-const { events } = require('@elastic/elasticsearch')
-console.log(events)
-----
-
-The event emitter functionality can be useful if you want to log every request, response and error that is happening during the use of the client.
-
-[source,js]
-----
-const logger = require('my-logger')()
-const { Client } = require('@elastic/elasticsearch')
-const client = new Client({ node: 'http://localhost:9200' })
-
-client.on('response', (err, req) => {
- if (err) {
- logger.error(err)
- } else {
- logger.info(req)
- }
-})
-----
-
-The client emits the following events:
-[cols=2*]
-|===
-|`request`
-a|Emitted before to send the actual request to Elasticsearch.
-[source,js]
-----
-client.on('request', (err, req) => {
- console.log(err, req)
-})
-----
-
-|`response`
-a|Emitted before to send the actual request to Elasticsearch.
-[source,js]
-----
-client.on('response', (err, req) => {
- console.log(err, req)
-})
-----
-
-|`sniff`
-a|Emitted before to send the actual request to Elasticsearch.
-[source,js]
-----
-client.on('sniff', (err, req) => {
- console.log(err, req)
-})
-----
-
-|`resurrect`
-a|Emitted before to send the actual request to Elasticsearch.
-[source,js]
-----
-client.on('resurrect', (err, req) => {
- console.log(err, req)
-})
-----
-
-|===
-
-The values of `req` in `request`, `response` and `sniff` will be:
-[source,ts]
-----
- body: any;
- statusCode: number | null;
- headers: anyObject | null;
- warnings: string[] | null;
- meta: {
- request: {
- params: TransportRequestParams;
- options: TransportRequestOptions;
- };
- connection: Connection;
- attempts: number;
- aborted: boolean;
- sniff?: {
- hosts: any[];
- reason: string;
- };
- };
-----
-
-While the `req` value in `resurrect` will be:
-[source,ts]
-----
-export interface ResurrectEvent {
- strategy: string;
- isAlive: boolean;
- connection: Connection;
-}
-----
\ No newline at end of file
diff --git a/index.d.ts b/index.d.ts
index dd7a4244f..89be0131c 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -17,559 +17,11 @@
* under the License.
*/
-///
-
-import { EventEmitter } from 'events';
-import { SecureContextOptions } from 'tls';
-import Transport, {
- ApiResponse,
- RequestEvent,
- TransportRequestParams,
- TransportRequestOptions,
- nodeFilterFn,
- nodeSelectorFn
-} from './lib/Transport';
-import Connection, { AgentOptions } from './lib/Connection';
-import ConnectionPool, { ResurrectEvent } from './lib/ConnectionPool';
-import Serializer from './lib/Serializer';
-import * as RequestParams from './api/requestParams';
-import * as errors from './lib/errors';
-
-declare type anyObject = {
- [key: string]: any;
-};
-declare type callbackFn = (err: Error | null, result: ApiResponse) => void;
-
-interface ApiMethod {
- (callback?: callbackFn): any;
- (params: T, callback?: callbackFn): any;
- (params: T, options: TransportRequestOptions, callback?: callbackFn): any;
-}
-
-// Extend API
-interface ClientExtendsCallbackOptions {
- ConfigurationError: errors.ConfigurationError,
- makeRequest(params: TransportRequestParams, options?: TransportRequestOptions): Promise | void;
- result: {
- body: null,
- statusCode: null,
- headers: null,
- warnings: null
- }
-}
-declare type extendsCallback = (options: ClientExtendsCallbackOptions) => any;
-interface ClientExtends {
- (method: string, fn: extendsCallback): void;
- (method: string, opts: { force: boolean }, fn: extendsCallback): void;
-}
-// /Extend API
-
-interface ClientOptions {
- node?: string | string[];
- nodes?: string | string[];
- Connection?: typeof Connection;
- ConnectionPool?: typeof ConnectionPool;
- Transport?: typeof Transport;
- Serializer?: typeof Serializer;
- maxRetries?: number;
- requestTimeout?: number;
- pingTimeout?: number;
- sniffInterval?: number;
- sniffOnStart?: boolean;
- sniffEndpoint?: string;
- sniffOnConnectionFault?: boolean;
- resurrectStrategy?: 'ping' | 'optimistic' | 'none';
- suggestCompression?: boolean;
- compression?: 'gzip';
- ssl?: SecureContextOptions;
- agent?: AgentOptions;
- nodeFilter?: nodeFilterFn;
- nodeSelector?: nodeSelectorFn | string;
- headers?: anyObject;
- cloud?: {
- id: string;
- username: string;
- password: string;
- }
-}
-
-declare class Client extends EventEmitter {
- constructor(opts?: ClientOptions);
- connectionPool: ConnectionPool;
- transport: Transport;
- serializer: Serializer;
- extend: ClientExtends;
- child(opts?: ClientOptions): Client;
- close(callback?: Function): Promise | void;
- bulk: ApiMethod
- cat: {
- aliases: ApiMethod
- allocation: ApiMethod
- count: ApiMethod
- fielddata: ApiMethod
- health: ApiMethod
- help: ApiMethod