Support retrieved_from: :doc_values for direct leaf fields#1110
Draft
jwils wants to merge 2 commits intojoshauw/fetchable-false-prototypefrom
Draft
Support retrieved_from: :doc_values for direct leaf fields#1110jwils wants to merge 2 commits intojoshauw/fetchable-false-prototypefrom
retrieved_from: :doc_values for direct leaf fields#1110jwils wants to merge 2 commits intojoshauw/fetchable-false-prototypefrom
Conversation
retrieved_from: :doc_values for direct leaf fields
ad363a5 to
a2b2407
Compare
8e9b12f to
bde522d
Compare
a2b2407 to
fdf2582
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a narrow secondary retrieval path for fields that should stay returnable in GraphQL while being excluded from stored
_source.When a field is marked
retrieved_from: :doc_values, ElasticGraph:_sourcevia_source.excludesdocvalue_fieldsfieldsin datastore hits when_sourceomits itImplementation
The change is intentionally narrow:
name_in_indexpaths are rejecteddocvalue_fieldswhen every participating index definition agrees on the retrieval methodThe runtime metadata now records how an index field is retrieved, the GraphQL datastore query can split requested fields between
_sourceanddocvalue_fields, and datastore response helpers can read direct leaf values back from hitfieldswhen needed.Tests
Updated unit specs cover:
retrieved_from: :doc_valuesfields in GraphQL output types_source.excludesand runtime metadata for those fieldsdocvalue_fieldsand falling back to_sourcewhen index definitions disagreefieldsretrieved_fromusagesI was not able to run the RSpec files in this local environment because Bundler is missing required gems/native extensions.
Stack Info: Stacked on #1108