[Docs] ESQL - Add _source details in the search tutorial#144052
[Docs] ESQL - Add _source details in the search tutorial#144052carlosdelest wants to merge 4 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
🔍 Preview links for changed docs |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
|
As you suggested Carlos, I'd lean towards putting the "when to use / when not to use" lists in the metadata fields page and linking there from the final sentence in the tutorial: "Using _source or selecting fields are both valid options, but can have performance and data format implications that you should consider based on your use case. To learn more, refer to Sort results by search score. You could keep a brief line in the tutorial about "You should consider using _source when foo bar baz" |
|
I added the original criteria in the metadata page, and summarized in the search tutorial. LMKWYT @leemthompo @jimczi ! |
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
| Using _`source` is useful when you want to retrieve most or all fields from a document. | ||
|
|
||
| You should consider retrieving `_source` instead of individual fields when: | ||
| - You need several fields from a document, and most of them are text fields. |
There was a problem hiding this comment.
geo fields suffer the same, maybe would be worthy to add them here, in particular big geo_shape fields.
This PR adds a section to the ES|QL search tutorial that includes when it would be useful to use
_sourceinstead of selecting individual fields.@jimczi how does this look like from the technical PoV?
@leemthompo I'm thinking to add some / all of this to the metadata fields section. WDYT? Should we add all details there and put a link to that on the search tutorial?