Skip to content

Conversation

@leemthompo
Copy link
Contributor

@leemthompo leemthompo commented Jun 24, 2025

Fixes #129905

esql-metadata-fields.md

  • restructured from bullet list to table format for metadata fields
  • added _index_mode and _source fields to available metadata
  • improved field descriptions (more detailed)
  • added "usage and limitations" section
  • reorganized examples into subsections with headers
  • added _score sorting example
  • added tip box linking to search documentation

Also made some drive by updates to search functions ref page in 3c13c68

See URL previews

**esql-metadata-fields.md:**
- restructured from bullet list to table format for metadata fields
- added `_index_mode` and `_source` fields to available metadata
- improved field descriptions (more detailed)
- added "usage and limitations" section
- reorganized examples into subsections with headers
- added `_score` sorting example
- added tip box linking to search documentation
moved tutorial link into tip box at top
added cross-reference to search overview documentation
minor text flow improvements and punctuation fixes
@leemthompo leemthompo self-assigned this Jun 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 24, 2025

🔍 Preview links for changed docs:

🔔 The preview site may take up to 3 minutes to finish building. These links will become live once it completes.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.1.0 labels Jun 24, 2025
@leemthompo leemthompo added >docs General docs changes :Analytics/ES|QL AKA ESQL Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Jun 24, 2025
@leemthompo leemthompo requested review from alex-spies and bpintea June 24, 2025 15:34
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Jun 24, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Jun 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

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!

- The `_source` field is not supported by functions
- Only the `FROM` command supports the `METADATA` directive
- Once enabled, metadata fields work like regular index fields
- Fields are dropped after aggregations unless used for grouping ([example](#metadata-fields-and-aggregations))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this is true, but this is not metadata fields-specific.

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'll remove 👍

| [`_id`](/reference/elasticsearch/mapping-reference/mapping-id-field.md) | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | Unique document ID. |
| [`_ignored`](/reference/elasticsearch/mapping-reference/mapping-ignored-field.md) | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | Names every field in a document that was ignored when the document was indexed. |
| [`_index`](/reference/elasticsearch/mapping-reference/mapping-index-field.md) | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | Index name. |
| `_index_mode` | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | [Index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting). For example: `standard`, `lookup`, or `logsdb`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Co-authored-by: Bogdan Pintea <[email protected]>
@leemthompo
Copy link
Contributor Author

thx @bpintea!

@leemthompo leemthompo merged commit 4df0e99 into elastic:main Jun 25, 2025
9 checks passed
@leemthompo leemthompo deleted the esql_source-docs branch June 25, 2025 10:00
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jun 25, 2025
* [DOCS] Update ESQL metadata fields page

**esql-metadata-fields.md:**
- restructured from bullet list to table format for metadata fields
- added `_index_mode` and `_source` fields to available metadata
- improved field descriptions (more detailed)
- added "usage and limitations" section
- reorganized examples into subsections with headers
- added `_score` sorting example
- added tip box linking to search documentation

* 🚙Drive by updates to search functions ref page

moved tutorial link into tip box at top
added cross-reference to search overview documentation
minor text flow improvements and punctuation fixes

* Fix id typo

* Apply suggestions from review

Co-authored-by: Bogdan Pintea <[email protected]>
@leemthompo leemthompo changed the title [DOCS] Update ESQL metadata fields page [DOCS][9.x] Update ESQL metadata fields page Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >docs General docs changes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Docs Meta label for docs team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESQL: _source metadata field docs got lost

3 participants