Skip to content

[DOCS] Add link to stored fields example #4576

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions specification/_global/get/GetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export interface Request extends RequestBase {
query_parameters: {
/**
* Indicates whether the request forces synthetic `_source`.
* Use this paramater to test if the mapping supports synthetic `_source` and to get a sense of the worst case performance.
* Use this parameter to test if the mapping supports synthetic `_source` and to get a sense of the worst case performance.
* Fetches with this parameter enabled will be slower than enabling synthetic source natively in the index.
* @availability stack since=8.4.0 visibility=feature_flag feature_flag=es.index_mode_feature_flag_registered
*/
Expand Down Expand Up @@ -163,8 +163,9 @@ export interface Request extends RequestBase {
* A comma-separated list of stored fields to return as part of a hit.
* If no fields are specified, no stored fields are included in the response.
* If this field is specified, the `_source` parameter defaults to `false`.
* Only leaf fields can be retrieved with the `stored_field` option.
* Object fields can't be returned;​if specified, the request fails.
* Only leaf fields can be retrieved with the `stored_fields` option.
* Object fields can't be returned; if specified, the request fails.
* For an example, refer to [Retrieve stored fields](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields).
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I didn't mention it earlier, we can use ext_doc_id here. Please add the next line to the table.csv file as part of this PR, so we can keep track the links we are adding:
retrieve-stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields
and then refer to the ID as the suggestions shows below, please.

Suggested change
* For an example, refer to [Retrieve stored fields](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields).
* @ext_doc_id retrieve-stored-fields

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't think this was a good case for ext_doc_id because it's a section-specific thing that's not likely to be reused. Or is it required?

Copy link
Contributor

@szabosteve szabosteve Jun 17, 2025

Choose a reason for hiding this comment

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

No problem if it's not reused. The spec has a lot of ext_doc_id in param level, which might never be reused elsewhere. We try to avoid adding markdown links to the API docs description – at least when we can avoid it – because they are not tracked, and it makes them much harder to redirect. As a description field has only one ext_doc_id, sometimes we forced to add MD links to descriptions if there is already an external doc link in it, but otherwise, it's better to use the ext_doc_id. I know it's far from ideal, so for this reason, we'd like to expand the external documentation property, so we could add more links to a single object. But that's something for the future. LMKWYT, please.

*/
stored_fields?: Fields
/**
Expand Down