Compare commits
48 Commits
backport-2
...
v8.16.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ef1754623 | |||
| be2fe317f2 | |||
| 1d2d934b50 | |||
| d0f5ada03d | |||
| 47de886973 | |||
| 1e103baec1 | |||
| 7d5f622506 | |||
| 8377b58af3 | |||
| c150efbd21 | |||
| e7663aabde | |||
| c9615dc0ef | |||
| bb5fb24d73 | |||
| 38358e20ab | |||
| 9479d82644 | |||
| 18df52feb4 | |||
| f72f9e9a5a | |||
| c4151ceb35 | |||
| f3aedc7ad0 | |||
| 586c42161d | |||
| 9947b0e365 | |||
| 52b7264b45 | |||
| fceebae8ae | |||
| e45ed28c05 | |||
| 58b457eedc | |||
| 132d6d6062 | |||
| 9e08aaebe2 | |||
| 889fee2316 | |||
| 83b32f7ef4 | |||
| 60aa521b7e | |||
| 608b517d64 | |||
| bf4c57f7bc | |||
| 715292b501 | |||
| 1042a02733 | |||
| 9c959971a5 | |||
| e2745b4c75 | |||
| 4b8969cc78 | |||
| d62d8c9831 | |||
| 77e2f613f2 | |||
| 69b243171b | |||
| 37b8a33209 | |||
| 99cefe8b19 | |||
| 84ab2a787d | |||
| f737290d10 | |||
| 94da0d241a | |||
| 384debee9e | |||
| 94bf5b2aa7 | |||
| f34bb6aa28 | |||
| 1f9db892ea |
@ -11,6 +11,6 @@ RUN apt-get clean -y && \
|
|||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
RUN npm install --production=false
|
RUN npm install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@ -24,7 +24,7 @@ USER ${BUILDER_UID}:${BUILDER_GID}
|
|||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
RUN npm install --production=false
|
RUN npm install
|
||||||
|
|
||||||
# copy project files
|
# copy project files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@ -6,7 +6,7 @@ steps:
|
|||||||
env:
|
env:
|
||||||
NODE_VERSION: "{{ matrix.nodejs }}"
|
NODE_VERSION: "{{ matrix.nodejs }}"
|
||||||
TEST_SUITE: "{{ matrix.suite }}"
|
TEST_SUITE: "{{ matrix.suite }}"
|
||||||
STACK_VERSION: 8.15.0
|
STACK_VERSION: 8.16.0
|
||||||
matrix:
|
matrix:
|
||||||
setup:
|
setup:
|
||||||
suite:
|
suite:
|
||||||
|
|||||||
@ -5,3 +5,4 @@ elasticsearch
|
|||||||
.git
|
.git
|
||||||
lib
|
lib
|
||||||
junit-output
|
junit-output
|
||||||
|
.tap
|
||||||
|
|||||||
50
.github/ISSUE_TEMPLATE/bug.md
vendored
50
.github/ISSUE_TEMPLATE/bug.md
vendored
@ -1,50 +0,0 @@
|
|||||||
---
|
|
||||||
name: 🐛 Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
labels: ["Category: Bug"]
|
|
||||||
---
|
|
||||||
|
|
||||||
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.**
|
|
||||||
|
|
||||||
## 🐛 Bug Report
|
|
||||||
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
## To Reproduce
|
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
|
|
||||||
Paste your code here:
|
|
||||||
|
|
||||||
```js
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
<!--
|
|
||||||
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.
|
|
||||||
The repository also contains a preconfigured client instance that you can use to reproduce the issue.
|
|
||||||
https://github.com/delvedor/es-reproduce-issue
|
|
||||||
--->
|
|
||||||
|
|
||||||
## 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*
|
|
||||||
66
.github/ISSUE_TEMPLATE/bug.yaml
vendored
Normal file
66
.github/ISSUE_TEMPLATE/bug.yaml
vendored
Normal file
@ -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
|
||||||
23
.github/ISSUE_TEMPLATE/feature.md
vendored
23
.github/ISSUE_TEMPLATE/feature.md
vendored
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
name: 🚀 Feature Proposal
|
|
||||||
about: Submit a proposal for a new feature
|
|
||||||
labels: ["Category: 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 `Category: Not an issue` 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.
|
|
||||||
33
.github/ISSUE_TEMPLATE/feature.yaml
vendored
Normal file
33
.github/ISSUE_TEMPLATE/feature.yaml
vendored
Normal file
@ -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.
|
||||||
11
.github/ISSUE_TEMPLATE/question.md
vendored
11
.github/ISSUE_TEMPLATE/question.md
vendored
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
name: 💬 Questions / Help
|
|
||||||
about: If you have questions, please check our Gitter or Help repo
|
|
||||||
labels: ["Category: Question"]
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💬 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.
|
|
||||||
21
.github/ISSUE_TEMPLATE/question.yaml
vendored
Normal file
21
.github/ISSUE_TEMPLATE/question.yaml
vendored
Normal file
@ -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
|
||||||
6
.github/ISSUE_TEMPLATE/security.md
vendored
6
.github/ISSUE_TEMPLATE/security.md
vendored
@ -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).
|
|
||||||
8
.github/ISSUE_TEMPLATE/security.yaml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/security.yaml
vendored
Normal file
@ -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).
|
||||||
22
.github/make.sh
vendored
22
.github/make.sh
vendored
@ -37,7 +37,7 @@ product="elastic/elasticsearch-js"
|
|||||||
output_folder=".buildkite/output"
|
output_folder=".buildkite/output"
|
||||||
codegen_folder=".buildkite/output"
|
codegen_folder=".buildkite/output"
|
||||||
OUTPUT_DIR="$repo/${output_folder}"
|
OUTPUT_DIR="$repo/${output_folder}"
|
||||||
NODE_JS_VERSION=18
|
NODE_JS_VERSION=22
|
||||||
WORKFLOW=${WORKFLOW-staging}
|
WORKFLOW=${WORKFLOW-staging}
|
||||||
mkdir -p "$OUTPUT_DIR"
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
|
||||||
@ -46,13 +46,13 @@ 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"
|
echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m"
|
||||||
|
|
||||||
case $CMD in
|
case $CMD in
|
||||||
clean)
|
clean)
|
||||||
echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
|
echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
|
||||||
rm -rf "$output_folder"
|
rm -rf "$output_folder"
|
||||||
echo -e "\033[32;1mdone.\033[0m"
|
echo -e "\033[32;1mdone.\033[0m"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
assemble)
|
assemble)
|
||||||
if [ -v $VERSION ]; then
|
if [ -v $VERSION ]; then
|
||||||
echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m"
|
echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m"
|
||||||
exit 1
|
exit 1
|
||||||
@ -61,7 +61,7 @@ case $CMD in
|
|||||||
TASK=release
|
TASK=release
|
||||||
TASK_ARGS=("$VERSION" "$output_folder")
|
TASK_ARGS=("$VERSION" "$output_folder")
|
||||||
;;
|
;;
|
||||||
codegen)
|
codegen)
|
||||||
if [ -v "$VERSION" ] || [[ -z "$VERSION" ]]; then
|
if [ -v "$VERSION" ] || [[ -z "$VERSION" ]]; then
|
||||||
# fall back to branch name or `main` if no VERSION is set
|
# fall back to branch name or `main` if no VERSION is set
|
||||||
branch_name=$(git rev-parse --abbrev-ref HEAD)
|
branch_name=$(git rev-parse --abbrev-ref HEAD)
|
||||||
@ -82,7 +82,7 @@ case $CMD in
|
|||||||
TASK=codegen
|
TASK=codegen
|
||||||
TASK_ARGS=("$VERSION")
|
TASK_ARGS=("$VERSION")
|
||||||
;;
|
;;
|
||||||
docsgen)
|
docsgen)
|
||||||
if [ -v $VERSION ]; then
|
if [ -v $VERSION ]; then
|
||||||
echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m"
|
echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m"
|
||||||
exit 1
|
exit 1
|
||||||
@ -91,12 +91,12 @@ case $CMD in
|
|||||||
TASK=codegen
|
TASK=codegen
|
||||||
TASK_ARGS=("$VERSION" "$codegen_folder")
|
TASK_ARGS=("$VERSION" "$codegen_folder")
|
||||||
;;
|
;;
|
||||||
examplesgen)
|
examplesgen)
|
||||||
echo -e "\033[36;1mTARGET: generate examples\033[0m"
|
echo -e "\033[36;1mTARGET: generate examples\033[0m"
|
||||||
TASK=codegen
|
TASK=codegen
|
||||||
TASK_ARGS=("$VERSION" "$codegen_folder")
|
TASK_ARGS=("$VERSION" "$codegen_folder")
|
||||||
;;
|
;;
|
||||||
bump)
|
bump)
|
||||||
if [ -v $VERSION ]; then
|
if [ -v $VERSION ]; then
|
||||||
echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m"
|
echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m"
|
||||||
exit 1
|
exit 1
|
||||||
@ -105,7 +105,7 @@ case $CMD in
|
|||||||
TASK=bump
|
TASK=bump
|
||||||
TASK_ARGS=("$VERSION")
|
TASK_ARGS=("$VERSION")
|
||||||
;;
|
;;
|
||||||
bumpmatrix)
|
bumpmatrix)
|
||||||
if [ -v $VERSION ]; then
|
if [ -v $VERSION ]; then
|
||||||
echo -e "\033[31;1mTARGET: bumpmatrix -> missing version parameter\033[0m"
|
echo -e "\033[31;1mTARGET: bumpmatrix -> missing version parameter\033[0m"
|
||||||
exit 1
|
exit 1
|
||||||
@ -114,16 +114,16 @@ case $CMD in
|
|||||||
TASK=bumpmatrix
|
TASK=bumpmatrix
|
||||||
TASK_ARGS=("$VERSION")
|
TASK_ARGS=("$VERSION")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -e "\n'$CMD' is not supported right now\n"
|
echo -e "\n'$CMD' is not supported right now\n"
|
||||||
echo -e "\nUsage:"
|
echo -e "\nUsage:"
|
||||||
echo -e "\t $0 release \$VERSION\n"
|
echo -e "\t $0 release \$VERSION\n"
|
||||||
echo -e "\t $0 bump \$VERSION"
|
echo -e "\t $0 bump \$VERSION"
|
||||||
echo -e "\t $0 codegen \$VERSION"
|
echo -e "\t $0 codegen \$VERSION"
|
||||||
exit 1
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------- #
|
# ------------------------------------------------------- #
|
||||||
# Build Container
|
# Build Container
|
||||||
# ------------------------------------------------------- #
|
# ------------------------------------------------------- #
|
||||||
@ -179,7 +179,7 @@ fi
|
|||||||
# ------------------------------------------------------- #
|
# ------------------------------------------------------- #
|
||||||
|
|
||||||
if [[ "$CMD" == "assemble" ]]; then
|
if [[ "$CMD" == "assemble" ]]; then
|
||||||
if compgen -G ".buildkite/output/*" > /dev/null; then
|
if compgen -G ".buildkite/output/*" >/dev/null; then
|
||||||
echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
|
echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
|
||||||
else
|
else
|
||||||
echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
|
echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
|
||||||
|
|||||||
18
.github/workflows/auto-merge.yml
vendored
18
.github/workflows/auto-merge.yml
vendored
@ -1,18 +0,0 @@
|
|||||||
name: Automerge
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_review:
|
|
||||||
types:
|
|
||||||
- submitted
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
automerge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event.review.state == 'approved'
|
|
||||||
steps:
|
|
||||||
- uses: reitermarkus/automerge@v2
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
merge-method: squash
|
|
||||||
pull-request-author-associations: OWNER
|
|
||||||
review-author-associations: OWNER,CONTRIBUTOR
|
|
||||||
50
.github/workflows/nodejs.yml
vendored
50
.github/workflows/nodejs.yml
vendored
@ -12,7 +12,9 @@ jobs:
|
|||||||
src-only: "${{ steps.changes.outputs.src-only }}"
|
src-only: "${{ steps.changes.outputs.src-only }}"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dorny/paths-filter/@v2.11.1
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: dorny/paths-filter/@v3.0.2
|
||||||
id: changes
|
id: changes
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
@ -30,11 +32,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [18.x, 20.x, 22.x]
|
node-version: [18.x, 20.x, 22.x, 23.x]
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@ -53,12 +57,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm run test:unit
|
npm run test:unit
|
||||||
|
|
||||||
|
- name: ECMAScript module test
|
||||||
|
run: |
|
||||||
|
npm run test:esm
|
||||||
|
|
||||||
license:
|
license:
|
||||||
name: License check
|
name: License check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@ -73,6 +83,42 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm run license-checker
|
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@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Use Bun
|
||||||
|
uses: oven-sh/setup-bun@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
|
||||||
|
|
||||||
auto-approve:
|
auto-approve:
|
||||||
name: Auto-approve
|
name: Auto-approve
|
||||||
needs: [test, license]
|
needs: [test, license]
|
||||||
|
|||||||
7
.github/workflows/npm-publish.yml
vendored
7
.github/workflows/npm-publish.yml
vendored
@ -9,15 +9,16 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
id-token: write
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
persist-credentials: false
|
||||||
ref: ${{ github.event.inputs.branch }}
|
ref: ${{ github.event.inputs.branch }}
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20.x"
|
node-version: "22.x"
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
- run: npm install -g npm
|
- run: npm install -g npm
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|||||||
10
.github/workflows/serverless-patch.yml
vendored
10
.github/workflows/serverless-patch.yml
vendored
@ -28,12 +28,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
persist-credentials: false
|
||||||
repository: elastic/elasticsearch-js
|
repository: elastic/elasticsearch-js
|
||||||
ref: main
|
ref: main
|
||||||
path: stack
|
path: stack
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
persist-credentials: false
|
||||||
repository: elastic/elasticsearch-serverless-js
|
repository: elastic/elasticsearch-serverless-js
|
||||||
ref: main
|
ref: main
|
||||||
path: serverless
|
path: serverless
|
||||||
@ -44,8 +46,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
path: serverless
|
path: serverless
|
||||||
title: 'Apply patch from elastic/elasticsearch-js#${{ github.event.pull_request.number }}'
|
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 }}'
|
commit-message: "Apply patch from elastic/elasticsearch-js#${{ github.event.pull_request.number }}"
|
||||||
body-path: /tmp/pr_body
|
body-path: /tmp/pr_body
|
||||||
draft: '${{ steps.apply-patch.outputs.PR_DRAFT }}'
|
draft: "${{ steps.apply-patch.outputs.PR_DRAFT }}"
|
||||||
add-paths: ':!*.rej'
|
add-paths: ":!*.rej"
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -64,3 +64,7 @@ test/bundlers/parcel-test/.parcel-cache
|
|||||||
|
|
||||||
lib
|
lib
|
||||||
junit-output
|
junit-output
|
||||||
|
bun.lockb
|
||||||
|
test-results
|
||||||
|
processinfo
|
||||||
|
.tap
|
||||||
|
|||||||
@ -72,3 +72,5 @@ CODE_OF_CONDUCT.md
|
|||||||
CONTRIBUTING.md
|
CONTRIBUTING.md
|
||||||
|
|
||||||
src
|
src
|
||||||
|
bun.lockb
|
||||||
|
.tap
|
||||||
|
|||||||
@ -252,8 +252,8 @@ const client = new Client({
|
|||||||
----
|
----
|
||||||
|
|
||||||
|`disablePrototypePoisoningProtection`
|
|`disablePrototypePoisoningProtection`
|
||||||
|`boolean`, `'proto'`, `'constructor'` - By the default the client will 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. If needed you can disable prototype poisoning protection entirely or one of the two checks. Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more. +
|
|`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:_ `false`
|
_Default:_ `true`
|
||||||
|
|
||||||
|`caFingerprint`
|
|`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. +
|
|`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. +
|
||||||
|
|||||||
@ -1,6 +1,96 @@
|
|||||||
[[changelog-client]]
|
[[changelog-client]]
|
||||||
== Release notes
|
== Release notes
|
||||||
|
|
||||||
|
[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 <<esql-helper>> 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]
|
[discrete]
|
||||||
=== 8.15.0
|
=== 8.15.0
|
||||||
|
|
||||||
|
|||||||
@ -7,5 +7,6 @@ section, you can see the possible options that you can use to configure it.
|
|||||||
|
|
||||||
* <<basic-config>>
|
* <<basic-config>>
|
||||||
* <<advanced-config>>
|
* <<advanced-config>>
|
||||||
|
* <<timeout-best-practices>>
|
||||||
* <<child>>
|
* <<child>>
|
||||||
* <<client-testing>>
|
* <<client-testing>>
|
||||||
|
|||||||
@ -349,7 +349,7 @@ In this case, the result will be:
|
|||||||
body: object | boolean
|
body: object | boolean
|
||||||
statusCode: number
|
statusCode: number
|
||||||
headers: object
|
headers: object
|
||||||
warnings: [string],
|
warnings: string[],
|
||||||
meta: object
|
meta: object
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -410,19 +410,23 @@ The supported request specific options are:
|
|||||||
[cols=2*]
|
[cols=2*]
|
||||||
|===
|
|===
|
||||||
|`ignore`
|
|`ignore`
|
||||||
|`[number]` - HTTP status codes which should not be considered errors for this request. +
|
|`number[]` - HTTP status codes which should not be considered errors for this request. +
|
||||||
_Default:_ `null`
|
_Default:_ `null`
|
||||||
|
|
||||||
|`requestTimeout`
|
|`requestTimeout`
|
||||||
|`number` - Max request timeout for the request in milliseconds, it overrides the client default. +
|
|`number | string` - Max request timeout for the request in milliseconds, it overrides the client default. +
|
||||||
_Default:_ `30000`
|
_Default:_ `30000`
|
||||||
|
|
||||||
|
|`retryOnTimeout`
|
||||||
|
|`boolean` - Retry requests that have timed out.
|
||||||
|
_Default:_ `false`
|
||||||
|
|
||||||
|`maxRetries`
|
|`maxRetries`
|
||||||
|`number` - Max number of retries for the request, it overrides the client default. +
|
|`number` - Max number of retries for the request, it overrides the client default. +
|
||||||
_Default:_ `3`
|
_Default:_ `3`
|
||||||
|
|
||||||
|`compression`
|
|`compression`
|
||||||
|`string, boolean` - Enables body compression for the request. +
|
|`string | boolean` - Enables body compression for the request. +
|
||||||
_Options:_ `false`, `'gzip'` +
|
_Options:_ `false`, `'gzip'` +
|
||||||
_Default:_ `false`
|
_Default:_ `false`
|
||||||
|
|
||||||
@ -446,6 +450,10 @@ _Default:_ `null`
|
|||||||
|`any` - Custom object per request. _(you can use it to pass data to the clients events)_ +
|
|`any` - Custom object per request. _(you can use it to pass data to the clients events)_ +
|
||||||
_Default:_ `null`
|
_Default:_ `null`
|
||||||
|
|
||||||
|
|`opaqueId`
|
||||||
|
|`string` - Set the `X-Opaque-Id` HTTP header. See {ref}/api-conventions.html#x-opaque-id
|
||||||
|
_Default:_ `null`
|
||||||
|
|
||||||
|`maxResponseSize`
|
|`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 +
|
|`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`
|
_Default:_ `null`
|
||||||
@ -458,6 +466,17 @@ _Default:_ `null`
|
|||||||
|`AbortSignal` - The AbortSignal instance to allow request abortion. +
|
|`AbortSignal` - The AbortSignal instance to allow request abortion. +
|
||||||
_Default:_ `null`
|
_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 <<redaction>>.
|
||||||
|
|
||||||
|
|`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]
|
[discrete]
|
||||||
|
|||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
kwd: {
|
kwd: {
|
||||||
type: "keyword",
|
type: "keyword",
|
||||||
@ -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);
|
||||||
|
----
|
||||||
15
docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc
Normal file
15
docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -4,14 +4,12 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.search({
|
const response = await client.search({
|
||||||
index: "my-index",
|
index: "cooking_blog",
|
||||||
query: {
|
query: {
|
||||||
semantic: {
|
match: {
|
||||||
field: "inference_field",
|
title: {
|
||||||
query: "mountain lake",
|
query: "fluffy pancakes breakfast",
|
||||||
inner_hits: {
|
minimum_should_match: 2,
|
||||||
from: 1,
|
|
||||||
size: 1,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -9,7 +9,7 @@ const response = await client.connector.put({
|
|||||||
name: "My Connector",
|
name: "My Connector",
|
||||||
description: "My Connector to sync data to Elastic index from Google Drive",
|
description: "My Connector to sync data to Elastic index from Google Drive",
|
||||||
service_type: "google_drive",
|
service_type: "google_drive",
|
||||||
language: "english",
|
language: "en",
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
21
docs/doc_examples/0e31b8ad176b31028becf9500989bcbd.asciidoc
Normal file
21
docs/doc_examples/0e31b8ad176b31028becf9500989bcbd.asciidoc
Normal file
@ -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: "<api_key>",
|
||||||
|
url: "<url>",
|
||||||
|
model_id: "ibm/slate-30m-english-rtrvr",
|
||||||
|
project_id: "<project_id>",
|
||||||
|
api_version: "2024-03-14",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -5,7 +5,11 @@
|
|||||||
----
|
----
|
||||||
const response = await client.transport.request({
|
const response = await client.transport.request({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
path: "/_ingest/geoip/database/my-database-id",
|
path: "/_connector/_sync_job",
|
||||||
|
querystring: {
|
||||||
|
connector_id: "my-connector-id",
|
||||||
|
size: "1",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
18
docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc
Normal file
18
docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
19
docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc
Normal file
19
docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
28
docs/doc_examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc
Normal file
28
docs/doc_examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
15
docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc
Normal file
15
docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
26
docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc
Normal file
26
docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
55
docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc
Normal file
55
docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc
Normal file
@ -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: {
|
||||||
|
"category.keyword": "Main Course",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
term: {
|
||||||
|
tags: "vegetarian",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
range: {
|
||||||
|
rating: {
|
||||||
|
gte: 4.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
should: [
|
||||||
|
{
|
||||||
|
multi_match: {
|
||||||
|
query: "curry spicy",
|
||||||
|
fields: ["title^2", "description"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
range: {
|
||||||
|
date: {
|
||||||
|
gte: "now-1M/d",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
must_not: [
|
||||||
|
{
|
||||||
|
term: {
|
||||||
|
"category.keyword": "Dessert",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -4,12 +4,7 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "books",
|
||||||
mappings: {
|
|
||||||
_source: {
|
|
||||||
mode: "synthetic",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
@ -4,14 +4,16 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.index({
|
const response = await client.index({
|
||||||
index: "my-index",
|
index: "mv",
|
||||||
id: "lake_tahoe",
|
refresh: "true",
|
||||||
document: {
|
document: {
|
||||||
inference_field: [
|
a: [2, null, 1],
|
||||||
"Lake Tahoe is the largest alpine lake in North America",
|
|
||||||
"When hiking in the area, please be on alert for bears",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|
||||||
|
const response1 = await client.esql.query({
|
||||||
|
query: "FROM mv | LIMIT 1",
|
||||||
|
});
|
||||||
|
console.log(response1);
|
||||||
----
|
----
|
||||||
@ -4,7 +4,7 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "my-index-000003",
|
index: "my-index-000002",
|
||||||
mappings: {
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
metrics: {
|
metrics: {
|
||||||
@ -29,7 +29,7 @@ const response = await client.indices.create({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
|
|
||||||
const response1 = await client.indices.getMapping({
|
const response1 = await client.indices.getMapping({
|
||||||
index: "my-index-000003",
|
index: "my-index-000002",
|
||||||
});
|
});
|
||||||
console.log(response1);
|
console.log(response1);
|
||||||
----
|
----
|
||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.cluster.reroute({
|
const response = await client.indices.delete({
|
||||||
metric: "none",
|
index: "music",
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
33
docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc
Normal file
33
docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -5,7 +5,7 @@
|
|||||||
----
|
----
|
||||||
const response = await client.ingest.putPipeline({
|
const response = await client.ingest.putPipeline({
|
||||||
id: "geoip",
|
id: "geoip",
|
||||||
description: "Add geoip info",
|
description: "Add ip geolocation info",
|
||||||
processors: [
|
processors: [
|
||||||
{
|
{
|
||||||
geoip: {
|
geoip: {
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
card: {
|
card: {
|
||||||
type: "wildcard",
|
type: "wildcard",
|
||||||
77
docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc
Normal file
77
docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
28
docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc
Normal file
28
docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
25
docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc
Normal file
25
docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
43
docs/doc_examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc
Normal file
43
docs/doc_examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -5,7 +5,7 @@
|
|||||||
----
|
----
|
||||||
const response = await client.ingest.putPipeline({
|
const response = await client.ingest.putPipeline({
|
||||||
id: "geoip",
|
id: "geoip",
|
||||||
description: "Add geoip info",
|
description: "Add ip geolocation info",
|
||||||
processors: [
|
processors: [
|
||||||
{
|
{
|
||||||
geoip: {
|
geoip: {
|
||||||
52
docs/doc_examples/339c4e5af9f9069ad9912aa574488b59.asciidoc
Normal file
52
docs/doc_examples/339c4e5af9f9069ad9912aa574488b59.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -29,6 +29,7 @@ const response = await client.indices.create({
|
|||||||
"arabic_normalization",
|
"arabic_normalization",
|
||||||
"persian_normalization",
|
"persian_normalization",
|
||||||
"persian_stop",
|
"persian_stop",
|
||||||
|
"persian_stem",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
16
docs/doc_examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc
Normal file
16
docs/doc_examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
23
docs/doc_examples/44198781d164a15be633d4469485a544.asciidoc
Normal file
23
docs/doc_examples/44198781d164a15be633d4469485a544.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
42
docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
Normal file
42
docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
14
docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc
Normal file
14
docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
38
docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc
Normal file
38
docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
31
docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc
Normal file
31
docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -1,11 +0,0 @@
|
|||||||
// This 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: "/_ingest/geoip/database/example-database-id",
|
|
||||||
});
|
|
||||||
console.log(response);
|
|
||||||
----
|
|
||||||
15
docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc
Normal file
15
docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
32
docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc
Normal file
32
docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
agg_metric: {
|
agg_metric: {
|
||||||
type: "aggregate_metric_double",
|
type: "aggregate_metric_double",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
my_range: {
|
my_range: {
|
||||||
type: "long_range",
|
type: "long_range",
|
||||||
@ -4,12 +4,13 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.search({
|
const response = await client.search({
|
||||||
index: "my-index",
|
index: "cooking_blog",
|
||||||
query: {
|
query: {
|
||||||
semantic: {
|
range: {
|
||||||
field: "inference_field",
|
date: {
|
||||||
query: "mountain lake",
|
gte: "2023-05-01",
|
||||||
inner_hits: {},
|
lte: "2023-05-31",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
22
docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc
Normal file
22
docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc
Normal file
@ -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: "semantic-embeddings",
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
semantic_text: {
|
||||||
|
type: "semantic_text",
|
||||||
|
inference_id: "my-elser-endpoint",
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: "text",
|
||||||
|
copy_to: "semantic_text",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
15
docs/doc_examples/5bba213a7f543190139d1a69ab2ed076.asciidoc
Normal file
15
docs/doc_examples/5bba213a7f543190139d1a69ab2ed076.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
23
docs/doc_examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc
Normal file
23
docs/doc_examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -4,12 +4,13 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "my-index-000002",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
properties: {
|
index: {
|
||||||
datetime: {
|
mapping: {
|
||||||
type: "date",
|
source: {
|
||||||
format: "uuuu/MM/dd HH:mm:ss||uuuu/MM/dd||epoch_millis",
|
mode: "synthetic",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
flattened: {
|
flattened: {
|
||||||
type: "flattened",
|
type: "flattened",
|
||||||
@ -4,7 +4,7 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.security.putRole({
|
const response = await client.security.putRole({
|
||||||
name: "role_with_remote_indices",
|
name: "only_remote_access_role",
|
||||||
remote_indices: [
|
remote_indices: [
|
||||||
{
|
{
|
||||||
clusters: ["my_remote"],
|
clusters: ["my_remote"],
|
||||||
@ -12,6 +12,12 @@ const response = await client.security.putRole({
|
|||||||
privileges: ["read", "read_cross_cluster", "view_index_metadata"],
|
privileges: ["read", "read_cross_cluster", "view_index_metadata"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
remote_cluster: [
|
||||||
|
{
|
||||||
|
clusters: ["my_remote"],
|
||||||
|
privileges: ["monitor_stats"],
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
10
docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc
Normal file
10
docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// This file 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);
|
||||||
|
----
|
||||||
20
docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc
Normal file
20
docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
10
docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc
Normal file
10
docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// This 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);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
text: {
|
text: {
|
||||||
type: "text",
|
type: "text",
|
||||||
10
docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc
Normal file
10
docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// This 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);
|
||||||
|
----
|
||||||
10
docs/doc_examples/7163346755400594d1dd7e445aa19ff0.asciidoc
Normal file
10
docs/doc_examples/7163346755400594d1dd7e445aa19ff0.asciidoc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// This file is 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);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
versions: {
|
versions: {
|
||||||
type: "version",
|
type: "version",
|
||||||
@ -4,7 +4,6 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.cluster.reroute({
|
const response = await client.cluster.reroute({
|
||||||
metric: "none",
|
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
allocate_empty_primary: {
|
allocate_empty_primary: {
|
||||||
52
docs/doc_examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc
Normal file
52
docs/doc_examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
18
docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc
Normal file
18
docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
49
docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc
Normal file
49
docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
50
docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc
Normal file
50
docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -1,23 +0,0 @@
|
|||||||
// This file 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: "my-index-000001",
|
|
||||||
alias: "my-index",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
add: {
|
|
||||||
index: "my-index-000002",
|
|
||||||
alias: "my-index",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
console.log(response);
|
|
||||||
----
|
|
||||||
22
docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc
Normal file
22
docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -1,51 +0,0 @@
|
|||||||
// This file is autogenerated, 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-000004",
|
|
||||||
mappings: {
|
|
||||||
properties: {
|
|
||||||
metrics: {
|
|
||||||
subobjects: "auto",
|
|
||||||
properties: {
|
|
||||||
time: {
|
|
||||||
type: "object",
|
|
||||||
properties: {
|
|
||||||
min: {
|
|
||||||
type: "long",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
to: {
|
|
||||||
type: "object",
|
|
||||||
properties: {
|
|
||||||
inner_metrics: {
|
|
||||||
type: "object",
|
|
||||||
subobjects: "auto",
|
|
||||||
properties: {
|
|
||||||
time: {
|
|
||||||
type: "object",
|
|
||||||
properties: {
|
|
||||||
max: {
|
|
||||||
type: "long",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
console.log(response);
|
|
||||||
|
|
||||||
const response1 = await client.indices.getMapping({
|
|
||||||
index: "my-index-000004",
|
|
||||||
});
|
|
||||||
console.log(response1);
|
|
||||||
----
|
|
||||||
23
docs/doc_examples/7b9691bd34a02dd859562eb927f175e0.asciidoc
Normal file
23
docs/doc_examples/7b9691bd34a02dd859562eb927f175e0.asciidoc
Normal file
@ -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: 10,
|
||||||
|
},
|
||||||
|
num_threads: 1,
|
||||||
|
model_id: ".elser_model_2",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
|
mapping: {
|
||||||
|
source: {
|
||||||
mode: "synthetic",
|
mode: "synthetic",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
flattened: {
|
flattened: {
|
||||||
type: "flattened",
|
type: "flattened",
|
||||||
18
docs/doc_examples/7db09cab02d71f3a10d91071216d80fc.asciidoc
Normal file
18
docs/doc_examples/7db09cab02d71f3a10d91071216d80fc.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
17
docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
Normal file
17
docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
34
docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc
Normal file
34
docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -3,9 +3,10 @@
|
|||||||
|
|
||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.indices.putSettings({
|
const response = await client.transport.request({
|
||||||
index: ".watches",
|
method: "PUT",
|
||||||
settings: {
|
path: "/_watcher/settings",
|
||||||
|
body: {
|
||||||
"index.routing.allocation.include.role": "watcher",
|
"index.routing.allocation.include.role": "watcher",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
27
docs/doc_examples/828f0045747fde4888a947bb99e190e3.asciidoc
Normal file
27
docs/doc_examples/828f0045747fde4888a947bb99e190e3.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.snapshot.create({
|
const response = await client.snapshot.repositoryVerifyIntegrity({
|
||||||
repository: "my_repository",
|
name: "my_repository",
|
||||||
snapshot: "_verify_integrity",
|
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
|
|||||||
15
docs/doc_examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc
Normal file
15
docs/doc_examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
42
docs/doc_examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc
Normal file
42
docs/doc_examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
17
docs/doc_examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc
Normal file
17
docs/doc_examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
31
docs/doc_examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc
Normal file
31
docs/doc_examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
61
docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
Normal file
61
docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
13
docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc
Normal file
13
docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
10
docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc
Normal file
10
docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// This 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);
|
||||||
|
----
|
||||||
35
docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc
Normal file
35
docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc
Normal file
@ -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);
|
||||||
|
----
|
||||||
@ -4,7 +4,6 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.cluster.reroute({
|
const response = await client.cluster.reroute({
|
||||||
metric: "none",
|
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
move: {
|
move: {
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user