This PR introduces a "include_metadata" field to the MetadataReader across the local and distributed implementations. This way the filter step can only transmit ids, and only final hydration requests all data. This reduces overall payload sizes.
I chose this pattern to mirror what is done by the VectorReader with the "include_embeddings" flag
The correct solution for this is push the query down to one node instead of roundtripping.
New functionality
None
Test plan
How are these changes tested?
I extended the tests for the metadata segment
[x] Tests pass locally with pytest for python, yarn test for js, cargo test for rust
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested? I extended the tests for the metadata segment
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?