Skip to content

Conversation

@jrodewig
Copy link
Contributor

@jrodewig jrodewig commented Jul 19, 2021

Adds formal API docs for the following APIs:

  • Clear SQL cursor
  • SQL search
  • SQL translate

Other changes:

  • Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
  • Updates a few related xrefs.

Closes #75085

Preview

@sethmlarson sethmlarson added the Team:Clients Meta label for clients team label Jul 19, 2021
@jrodewig jrodewig added :Analytics/SQL SQL querying >docs General docs changes v7.14.1 v7.15.0 labels Jul 20, 2021
@jrodewig jrodewig marked this pull request as ready for review July 20, 2021 16:26
@elasticmachine elasticmachine added Team:QL (Deprecated) Meta label for query languages team Team:Docs Meta label for docs team labels Jul 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/clients-team (Team:Clients)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@jrodewig jrodewig requested a review from bpintea July 20, 2021 16:26
Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL updates in API specs LGTM with one nit.

Copy link
Contributor

@bpintea bpintea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, thank you, I've left some minor notes, just one omission that should be corrected.

`false`.

`keep_alive`::
(Optional, <<time-units,time value>>) Retention period for the search and its
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth mentioning that this is an async search parameter? Not to have the user assume that any result will be stored by simply providing this parameter alone; or at least mention the required tandem with wait_for_completion_timeout.
And maybe same for keep_on_completion and wait_for_completion_timeout[*]; like for id, is_running.

[*] As implementation detail also when attempting to "store a sync search", that search is actually turned async internally.

Copy link
Contributor Author

@jrodewig jrodewig Jul 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for calling this out. For the keep_alive parameter, I reworded to:

Retention period for an async or saved synchronous search. Defaults to 5d (five days).

Both the async and saved synchronous search copy have xrefs.

I added similar xrefs to the keep_on_completion and wait_for_completion_timeout parameter definitions.

`keep_alive`::
(Optional, <<time-units,time value>>) Retention period for the search and its
results. Defaults to `5d` (five days).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep_on_completion is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this.

Comment on lines 51 to 52
both this parameter and the `Accept` HTTP header, the API only uses this
parameter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a proposal: ", this parameter takes precedence."? Your formulation is easy to understand, the proposal might be more established in case of overlapping specs.

Copy link
Contributor Author

@jrodewig jrodewig Jul 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll use:

If you specify both this parameter and the `Accept` HTTP header, this parameter take precedence.

<<sql-pagination,pagination request>> fails. Defaults to `45s` (45 seconds).

`params`::
(Optional, array) Values for variables in the `query`. For variable syntax, see
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(Optional, array) Values for variables in the `query`. For variable syntax, see
(Optional, array) Values for parameters in the `query`. For variable syntax, see

Some SQL implementations allow for variables in procedural extensions -- I'd avoid this term.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out.

Comment on lines +38 to +41
[[clear-sql-cursor-api-limitations]]
===== Limitations

See <<sql-limitations>>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we (currently) have any limitations specifically targeting clear cursor and the async-specific APIs. They are mostly about the SQL implementation and interaction with Elasticsearch concepts. It seems futer-safer to have the limitation section on these pages, but we can also add them if/when we introduce them. Just FYI, in case this section isn't added preventively on all pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out. This is largely here for future-proofing. I'll leave it in for now as it's consistent with our EQL docs.

@jrodewig
Copy link
Contributor Author

Thanks, @bpintea!

@jrodewig
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Contributor

@bpintea bpintea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jrodewig jrodewig merged commit ea635d6 into elastic:master Jul 21, 2021
@jrodewig jrodewig deleted the docs__sql-apis branch July 21, 2021 12:04
@jrodewig jrodewig removed the v7.13.5 label Jul 21, 2021
elasticsearchmachine pushed a commit that referenced this pull request Jul 21, 2021
Adds formal API docs for the following APIs:

* Clear SQL cursor
* SQL search
* SQL translate

Other changes:

* Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
* Updates a few related xrefs.

Closes #75085
# Conflicts:
#	docs/reference/redirects.asciidoc
elasticsearchmachine pushed a commit that referenced this pull request Jul 21, 2021
Adds formal API docs for the following APIs:

* Clear SQL cursor
* SQL search
* SQL translate

Other changes:

* Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
* Updates a few related xrefs.

Closes #75085
# Conflicts:
#	docs/reference/redirects.asciidoc
jrodewig added a commit that referenced this pull request Jul 21, 2021
Adds formal API docs for the following APIs:

* Clear SQL cursor
* SQL search
* SQL translate

Other changes:

* Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
* Updates a few related xrefs.

Closes #75085
ywangd pushed a commit to ywangd/elasticsearch that referenced this pull request Jul 30, 2021
Adds formal API docs for the following APIs:

* Clear SQL cursor
* SQL search
* SQL translate

Other changes:

* Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
* Updates a few related xrefs.

Closes elastic#75085
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/SQL SQL querying >docs General docs changes Team:Clients Meta label for clients team Team:Docs Meta label for docs team Team:QL (Deprecated) Meta label for query languages team v7.13.5 v7.14.0 v7.15.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Move SQL APIs to REST APIs section

7 participants