feat: add nested access for document array#956
Merged
JoanFM merged 26 commits intofeat-rewrite-v2from Dec 23, 2022
Merged
Conversation
47 tasks
added 9 commits
December 20, 2022 15:00
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
ed1eab8 to
fd0f954
Compare
added 9 commits
December 20, 2022 15:14
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
…ct array Signed-off-by: anna-charlotte <[email protected]>
added 4 commits
December 22, 2022 18:00
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
JoanFM
requested changes
Dec 23, 2022
Signed-off-by: anna-charlotte <[email protected]>
JoanFM
reviewed
Dec 23, 2022
added 3 commits
December 23, 2022 11:42
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
|
📝 Docs are deployed on https://ft-feat-nested-access--jina-docs.netlify.app 🎉 |
Member
|
In the v1, we decided to hide traverse flat behind the [@] accessors, are we expecting to expose this now? |
Contributor
Author
|
@Joan We haven't made the final decision for this yet. For now, we decided on exposing it, but want to reevaluate this when Sami and Johannes are back. |
JoanFM
approved these changes
Dec 23, 2022
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.
Signed-off-by: anna-charlotte [email protected]
Nested access in V2 is possible by calling the nested attributes you want to access on a DocumentArray, e.g.
da.image.title. This does not work for nested DocumentArrays though:traverse_flattakes the access path and returns a list of those attributes, flattened on the first level.da.traverse_flat(access_path='authors.name')therefore returns a list of 20 strings instead of list of ten lists of 2 names each.