-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 docs for the fields retrieval API. #58787
Add docs for the fields retrieval API. #58787
Conversation
Pinging @elastic/es-docs (>docs) |
Pinging @elastic/es-search (:Search/Search) |
There are so many options to load fields now, it will be important to simplify this in a follow-up effort. Some ideas (not for this PR, just giving context):
|
c18087b
to
fa97ad0
Compare
fa97ad0
to
9317815
Compare
The `fields` parameter consults both a document's `_source` and the index | ||
mappings to load and return values. Because it makes use of the mappings, | ||
`fields` has some advantages over referencing the `_source` directly: it | ||
accepts <<multi-fields, multi-fields>> and <<alias, field aliases>>, and |
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 think if we're going to tell people to use this API we should compare everything to it. In other words, I think this information belongs in a section on _source
.
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 you explain a bit more what you mean here?
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'm not sure I can express it super well. How would you feel about merging as is and I can open a follow up at some point?
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.
That works for me -- we could also chat offline if it's helpful. I do think that if we advocate always using the fields
API, we should stop presenting it as an alternative to _source
(and maybe stop returning the _source
by default)? We can think about this when considering follow-ups.
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.
LGTM
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the `fields` parameter. We now present `fields` as the preferred way to load specific fields in a search, with `docvalue_fields` and `stored_fields` as other options to look into. Source filtering is no longer featured prominently, and its section is moved to the end.
This PR adds docs for the
fields
parameter. We now presentfields
as thepreferred way to load specific fields in a search, with
docvalue_fields
andstored_fields
as other options to look into. Source filtering is no longerfeatured prominently, and its section is moved to the end.
Relates to #55363.