-
Notifications
You must be signed in to change notification settings - Fork 8
[v17] MB-27666: Nested Fields #70
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR introduces support for nested document structures by adding new interfaces and methods for handling hierarchical relationships between documents. The changes enable segments to expose ancestor and descendant document relationships while maintaining backward compatibility with flat segments.
Key changes:
- Added NestedReader interface with Ancestors method for retrieving parent documents
- Introduced NestedDocument interface for documents containing other documents
- Added utility methods for IndexInternalID conversion and manipulation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| index.go | Adds NestedReader interface, IndexInternalID utility methods, and imports for binary encoding |
| document.go | Introduces NestedDocument interface for hierarchical document structures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
79b501f to
c63531c
Compare
0a16a95 to
d0117e5
Compare
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
NestedDocumentinterface which extends theDocumentinterface, allowing users to visit any sub-documents that may be nested within the parent document.NewIndexInternalIDmethod to create anIndexInternalIDand also extends the API to enable getting the integer value of theIndexInternalIDfrom it.IndexReaderinterface to support theAncestorsmethod, which allows the user to fetch the ancestry chain of any document ID given. If the document does not have any ancestors (it is a root document), an ancestry chain containing only the input document is returned.