[Feature Request]: A filter_include
argument for Collection.get
and Collection.query
#1622
Labels
enhancement
New feature or request
Describe the problem
The semantics of the output of
Collection.get
andCollection.query
are not clear.This, and other related matters, were already discussed in the issue Improve message on collection.get empty embeddings.
Consider this example. When doing a
Collection.get
withinclude=["metadatas", "documents"]
we get:The
None
of "uris" means "you didn't ask for it".The
[None, None]
of the "metadatas" means "you asked for it, but there wereNone
.I'd argue that:
might be less confusing.
Describe the proposed solution
Include a
filter_include
argument inCollection.get
andCollection.query
, which (ifTrue
) will have the effect of filtering in only those fields that were requested (plus "ids").I propose to set the default of
filter_include
to beFalse
for now, controlled via aDFLT_FILTER_INCLUDE
variable.This is so that the current behavior doesn't change, so we have minimal disruption.
Later, if worth it, we can switch to a
DFLT_FILTER_INCLUDE=True
default.We can also consider letting users control this via some settings/configs mechanism.
Alternatives considered
Alternatives can be found in issue 300.
Importance
would make my life easier
Additional Information
I intend on doing a PR on this.
The text was updated successfully, but these errors were encountered: