Add docs for the fields retrieval API.#58787
Add docs for the fields retrieval API.#58787jtibshirani merged 2 commits intoelastic:field-retrievalfrom
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.
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.
Could you explain a bit more what you mean here?
There was a problem hiding this comment.
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.
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.
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
fieldsparameter. We now presentfieldsas thepreferred way to load specific fields in a search, with
docvalue_fieldsandstored_fieldsas other options to look into. Source filtering is no longerfeatured prominently, and its section is moved to the end.
Relates to #55363.