-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script documentation. #1016
Add script documentation. #1016
Conversation
Signed-off-by: Steve Murphy <[email protected]>
|
||
#### Sample request | ||
|
||
The following request deletes the `books` index.: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be deleting the script, not the whole index.
The following request deletes the `books` index.: | ||
|
||
````json | ||
DELETE /books |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DELETE _scripts/my-first-script
|
||
#### Sample response | ||
|
||
The `DELETE /books` request returns the following field: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be delete script
|
||
### Response fields | ||
|
||
The <HTTP METHOD> <endpoint> request returns the following response fields: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete script request
|
||
| Field | Data Type | Description | | ||
:--- | :--- | :--- | ||
| name | String | Mthod name. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method
|
||
The `GET _scripts/my-script` request returns the following fields: | ||
|
||
````json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get an actual response from your my-first-script for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made this change.
The script APIs allow you to work with stored scripts. Stored scripts are part of the cluster state and reduce compilation time and enhance search speed. The default scripting language is Painless. | ||
|
||
You perform the following operations on stored scripts: | ||
* create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make these links to pages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kolchfa-aws A list of links to pages is automatically generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the above list rendering as plain text. I suggest we make those links to the pages they refer to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Naarcha-AWS Ah, now I understand. A TABLE OF CONTENTS
section is generated that has links to the operations that I hard-coded. Given that, maybe remove the the hard-coded list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Naarcha-AWS, I looked at the production version and the links in the bulleted list (see attachment) are broken. They each include path segment script-apis
that needs to be changed to _script-apis
.
Signed-off-by: Steve Murphy <[email protected]>
* retrieve | ||
* delete | ||
|
||
You can also retrieve stored script contexts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the last sentence a list item in the list above.
PR moved to #1094 |
Merged on #1094 |
Signed-off-by: Steve Murphy [email protected]
Description
I added documentation for these script APIs:
I also added
index.md
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.