diff --git a/chromadb/proto/query_executor_pb2.py b/chromadb/proto/query_executor_pb2.py index 8131f121198b..80c322489d39 100644 --- a/chromadb/proto/query_executor_pb2.py +++ b/chromadb/proto/query_executor_pb2.py @@ -14,7 +14,7 @@ from chromadb.proto import chroma_pb2 as chromadb_dot_proto_dot_chroma__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#chromadb/proto/query_executor.proto\x12\x06\x63hroma\x1a\x1b\x63hromadb/proto/chroma.proto\"\xd0\x01\n\x0cScanOperator\x12&\n\ncollection\x18\x01 \x01(\x0b\x32\x12.chroma.Collection\x12\x0e\n\x06knn_id\x18\x02 \x01(\t\x12\x13\n\x0bmetadata_id\x18\x03 \x01(\t\x12\x11\n\trecord_id\x18\x04 \x01(\t\x12\x1c\n\x03knn\x18\x05 \x01(\x0b\x32\x0f.chroma.Segment\x12!\n\x08metadata\x18\x06 \x01(\x0b\x32\x0f.chroma.Segment\x12\x1f\n\x06record\x18\x07 \x01(\x0b\x32\x0f.chroma.Segment\"\xaf\x01\n\x0e\x46ilterOperator\x12!\n\x03ids\x18\x01 \x01(\x0b\x32\x0f.chroma.UserIdsH\x00\x88\x01\x01\x12!\n\x05where\x18\x02 \x01(\x0b\x32\r.chroma.WhereH\x01\x88\x01\x01\x12\x32\n\x0ewhere_document\x18\x03 \x01(\x0b\x32\x15.chroma.WhereDocumentH\x02\x88\x01\x01\x42\x06\n\x04_idsB\x08\n\x06_whereB\x11\n\x0f_where_document\"@\n\x0bKNNOperator\x12\"\n\nembeddings\x18\x01 \x03(\x0b\x32\x0e.chroma.Vector\x12\r\n\x05\x66\x65tch\x18\x02 \x01(\r\";\n\rLimitOperator\x12\x0c\n\x04skip\x18\x01 \x01(\r\x12\x12\n\x05\x66\x65tch\x18\x02 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_fetch\"K\n\x12ProjectionOperator\x12\x10\n\x08\x64ocument\x18\x01 \x01(\x08\x12\x11\n\tembedding\x18\x02 \x01(\x08\x12\x10\n\x08metadata\x18\x03 \x01(\x08\"Y\n\x15KNNProjectionOperator\x12.\n\nprojection\x18\x01 \x01(\x0b\x32\x1a.chroma.ProjectionOperator\x12\x10\n\x08\x64istance\x18\x02 \x01(\x08\"/\n\tCountPlan\x12\"\n\x04scan\x18\x01 \x01(\x0b\x32\x14.chroma.ScanOperator\"\x1c\n\x0b\x43ountResult\x12\r\n\x05\x63ount\x18\x01 \x01(\r\"\xab\x01\n\x07GetPlan\x12\"\n\x04scan\x18\x01 \x01(\x0b\x32\x14.chroma.ScanOperator\x12&\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x16.chroma.FilterOperator\x12$\n\x05limit\x18\x03 \x01(\x0b\x32\x15.chroma.LimitOperator\x12.\n\nprojection\x18\x04 \x01(\x0b\x32\x1a.chroma.ProjectionOperator\"\xb4\x01\n\x10ProjectionRecord\x12\n\n\x02id\x18\x01 \x01(\t\x12\x15\n\x08\x64ocument\x18\x02 \x01(\tH\x00\x88\x01\x01\x12&\n\tembedding\x18\x03 \x01(\x0b\x32\x0e.chroma.VectorH\x01\x88\x01\x01\x12-\n\x08metadata\x18\x04 \x01(\x0b\x32\x16.chroma.UpdateMetadataH\x02\x88\x01\x01\x42\x0b\n\t_documentB\x0c\n\n_embeddingB\x0b\n\t_metadata\"6\n\tGetResult\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.chroma.ProjectionRecord\"\xaa\x01\n\x07KNNPlan\x12\"\n\x04scan\x18\x01 \x01(\x0b\x32\x14.chroma.ScanOperator\x12&\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x16.chroma.FilterOperator\x12 \n\x03knn\x18\x03 \x01(\x0b\x32\x13.chroma.KNNOperator\x12\x31\n\nprojection\x18\x04 \x01(\x0b\x32\x1d.chroma.KNNProjectionOperator\"c\n\x13KNNProjectionRecord\x12(\n\x06record\x18\x01 \x01(\x0b\x32\x18.chroma.ProjectionRecord\x12\x15\n\x08\x64istance\x18\x02 \x01(\x02H\x00\x88\x01\x01\x42\x0b\n\t_distance\"9\n\tKNNResult\x12,\n\x07records\x18\x01 \x03(\x0b\x32\x1b.chroma.KNNProjectionRecord\"4\n\x0eKNNBatchResult\x12\"\n\x07results\x18\x01 \x03(\x0b\x32\x11.chroma.KNNResult2\xa1\x01\n\rQueryExecutor\x12\x31\n\x05\x43ount\x12\x11.chroma.CountPlan\x1a\x13.chroma.CountResult\"\x00\x12+\n\x03Get\x12\x0f.chroma.GetPlan\x1a\x11.chroma.GetResult\"\x00\x12\x30\n\x03KNN\x12\x0f.chroma.KNNPlan\x1a\x16.chroma.KNNBatchResult\"\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#chromadb/proto/query_executor.proto\x12\x06\x63hroma\x1a\x1b\x63hromadb/proto/chroma.proto\"\xaa\x01\n\x0cScanOperator\x12&\n\ncollection\x18\x01 \x01(\x0b\x32\x12.chroma.Collection\x12\x1c\n\x03knn\x18\x05 \x01(\x0b\x32\x0f.chroma.Segment\x12!\n\x08metadata\x18\x06 \x01(\x0b\x32\x0f.chroma.Segment\x12\x1f\n\x06record\x18\x07 \x01(\x0b\x32\x0f.chroma.SegmentJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"\xaf\x01\n\x0e\x46ilterOperator\x12!\n\x03ids\x18\x01 \x01(\x0b\x32\x0f.chroma.UserIdsH\x00\x88\x01\x01\x12!\n\x05where\x18\x02 \x01(\x0b\x32\r.chroma.WhereH\x01\x88\x01\x01\x12\x32\n\x0ewhere_document\x18\x03 \x01(\x0b\x32\x15.chroma.WhereDocumentH\x02\x88\x01\x01\x42\x06\n\x04_idsB\x08\n\x06_whereB\x11\n\x0f_where_document\"@\n\x0bKNNOperator\x12\"\n\nembeddings\x18\x01 \x03(\x0b\x32\x0e.chroma.Vector\x12\r\n\x05\x66\x65tch\x18\x02 \x01(\r\";\n\rLimitOperator\x12\x0c\n\x04skip\x18\x01 \x01(\r\x12\x12\n\x05\x66\x65tch\x18\x02 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_fetch\"K\n\x12ProjectionOperator\x12\x10\n\x08\x64ocument\x18\x01 \x01(\x08\x12\x11\n\tembedding\x18\x02 \x01(\x08\x12\x10\n\x08metadata\x18\x03 \x01(\x08\"Y\n\x15KNNProjectionOperator\x12.\n\nprojection\x18\x01 \x01(\x0b\x32\x1a.chroma.ProjectionOperator\x12\x10\n\x08\x64istance\x18\x02 \x01(\x08\"/\n\tCountPlan\x12\"\n\x04scan\x18\x01 \x01(\x0b\x32\x14.chroma.ScanOperator\"\x1c\n\x0b\x43ountResult\x12\r\n\x05\x63ount\x18\x01 \x01(\r\"\xab\x01\n\x07GetPlan\x12\"\n\x04scan\x18\x01 \x01(\x0b\x32\x14.chroma.ScanOperator\x12&\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x16.chroma.FilterOperator\x12$\n\x05limit\x18\x03 \x01(\x0b\x32\x15.chroma.LimitOperator\x12.\n\nprojection\x18\x04 \x01(\x0b\x32\x1a.chroma.ProjectionOperator\"\xb4\x01\n\x10ProjectionRecord\x12\n\n\x02id\x18\x01 \x01(\t\x12\x15\n\x08\x64ocument\x18\x02 \x01(\tH\x00\x88\x01\x01\x12&\n\tembedding\x18\x03 \x01(\x0b\x32\x0e.chroma.VectorH\x01\x88\x01\x01\x12-\n\x08metadata\x18\x04 \x01(\x0b\x32\x16.chroma.UpdateMetadataH\x02\x88\x01\x01\x42\x0b\n\t_documentB\x0c\n\n_embeddingB\x0b\n\t_metadata\"6\n\tGetResult\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.chroma.ProjectionRecord\"\xaa\x01\n\x07KNNPlan\x12\"\n\x04scan\x18\x01 \x01(\x0b\x32\x14.chroma.ScanOperator\x12&\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x16.chroma.FilterOperator\x12 \n\x03knn\x18\x03 \x01(\x0b\x32\x13.chroma.KNNOperator\x12\x31\n\nprojection\x18\x04 \x01(\x0b\x32\x1d.chroma.KNNProjectionOperator\"c\n\x13KNNProjectionRecord\x12(\n\x06record\x18\x01 \x01(\x0b\x32\x18.chroma.ProjectionRecord\x12\x15\n\x08\x64istance\x18\x02 \x01(\x02H\x00\x88\x01\x01\x42\x0b\n\t_distance\"9\n\tKNNResult\x12,\n\x07records\x18\x01 \x03(\x0b\x32\x1b.chroma.KNNProjectionRecord\"4\n\x0eKNNBatchResult\x12\"\n\x07results\x18\x01 \x03(\x0b\x32\x11.chroma.KNNResult2\xa1\x01\n\rQueryExecutor\x12\x31\n\x05\x43ount\x12\x11.chroma.CountPlan\x1a\x13.chroma.CountResult\"\x00\x12+\n\x03Get\x12\x0f.chroma.GetPlan\x1a\x11.chroma.GetResult\"\x00\x12\x30\n\x03KNN\x12\x0f.chroma.KNNPlan\x1a\x16.chroma.KNNBatchResult\"\x00\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,35 +23,35 @@ DESCRIPTOR._options = None _globals['_SCANOPERATOR']._serialized_start=77 - _globals['_SCANOPERATOR']._serialized_end=285 - _globals['_FILTEROPERATOR']._serialized_start=288 - _globals['_FILTEROPERATOR']._serialized_end=463 - _globals['_KNNOPERATOR']._serialized_start=465 - _globals['_KNNOPERATOR']._serialized_end=529 - _globals['_LIMITOPERATOR']._serialized_start=531 - _globals['_LIMITOPERATOR']._serialized_end=590 - _globals['_PROJECTIONOPERATOR']._serialized_start=592 - _globals['_PROJECTIONOPERATOR']._serialized_end=667 - _globals['_KNNPROJECTIONOPERATOR']._serialized_start=669 - _globals['_KNNPROJECTIONOPERATOR']._serialized_end=758 - _globals['_COUNTPLAN']._serialized_start=760 - _globals['_COUNTPLAN']._serialized_end=807 - _globals['_COUNTRESULT']._serialized_start=809 - _globals['_COUNTRESULT']._serialized_end=837 - _globals['_GETPLAN']._serialized_start=840 - _globals['_GETPLAN']._serialized_end=1011 - _globals['_PROJECTIONRECORD']._serialized_start=1014 - _globals['_PROJECTIONRECORD']._serialized_end=1194 - _globals['_GETRESULT']._serialized_start=1196 - _globals['_GETRESULT']._serialized_end=1250 - _globals['_KNNPLAN']._serialized_start=1253 - _globals['_KNNPLAN']._serialized_end=1423 - _globals['_KNNPROJECTIONRECORD']._serialized_start=1425 - _globals['_KNNPROJECTIONRECORD']._serialized_end=1524 - _globals['_KNNRESULT']._serialized_start=1526 - _globals['_KNNRESULT']._serialized_end=1583 - _globals['_KNNBATCHRESULT']._serialized_start=1585 - _globals['_KNNBATCHRESULT']._serialized_end=1637 - _globals['_QUERYEXECUTOR']._serialized_start=1640 - _globals['_QUERYEXECUTOR']._serialized_end=1801 + _globals['_SCANOPERATOR']._serialized_end=247 + _globals['_FILTEROPERATOR']._serialized_start=250 + _globals['_FILTEROPERATOR']._serialized_end=425 + _globals['_KNNOPERATOR']._serialized_start=427 + _globals['_KNNOPERATOR']._serialized_end=491 + _globals['_LIMITOPERATOR']._serialized_start=493 + _globals['_LIMITOPERATOR']._serialized_end=552 + _globals['_PROJECTIONOPERATOR']._serialized_start=554 + _globals['_PROJECTIONOPERATOR']._serialized_end=629 + _globals['_KNNPROJECTIONOPERATOR']._serialized_start=631 + _globals['_KNNPROJECTIONOPERATOR']._serialized_end=720 + _globals['_COUNTPLAN']._serialized_start=722 + _globals['_COUNTPLAN']._serialized_end=769 + _globals['_COUNTRESULT']._serialized_start=771 + _globals['_COUNTRESULT']._serialized_end=799 + _globals['_GETPLAN']._serialized_start=802 + _globals['_GETPLAN']._serialized_end=973 + _globals['_PROJECTIONRECORD']._serialized_start=976 + _globals['_PROJECTIONRECORD']._serialized_end=1156 + _globals['_GETRESULT']._serialized_start=1158 + _globals['_GETRESULT']._serialized_end=1212 + _globals['_KNNPLAN']._serialized_start=1215 + _globals['_KNNPLAN']._serialized_end=1385 + _globals['_KNNPROJECTIONRECORD']._serialized_start=1387 + _globals['_KNNPROJECTIONRECORD']._serialized_end=1486 + _globals['_KNNRESULT']._serialized_start=1488 + _globals['_KNNRESULT']._serialized_end=1545 + _globals['_KNNBATCHRESULT']._serialized_start=1547 + _globals['_KNNBATCHRESULT']._serialized_end=1599 + _globals['_QUERYEXECUTOR']._serialized_start=1602 + _globals['_QUERYEXECUTOR']._serialized_end=1763 # @@protoc_insertion_point(module_scope) diff --git a/chromadb/proto/query_executor_pb2.pyi b/chromadb/proto/query_executor_pb2.pyi index 33b8bb63e1ab..aa800835e857 100644 --- a/chromadb/proto/query_executor_pb2.pyi +++ b/chromadb/proto/query_executor_pb2.pyi @@ -7,22 +7,16 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class ScanOperator(_message.Message): - __slots__ = ["collection", "knn_id", "metadata_id", "record_id", "knn", "metadata", "record"] + __slots__ = ["collection", "knn", "metadata", "record"] COLLECTION_FIELD_NUMBER: _ClassVar[int] - KNN_ID_FIELD_NUMBER: _ClassVar[int] - METADATA_ID_FIELD_NUMBER: _ClassVar[int] - RECORD_ID_FIELD_NUMBER: _ClassVar[int] KNN_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] RECORD_FIELD_NUMBER: _ClassVar[int] collection: _chroma_pb2.Collection - knn_id: str - metadata_id: str - record_id: str knn: _chroma_pb2.Segment metadata: _chroma_pb2.Segment record: _chroma_pb2.Segment - def __init__(self, collection: _Optional[_Union[_chroma_pb2.Collection, _Mapping]] = ..., knn_id: _Optional[str] = ..., metadata_id: _Optional[str] = ..., record_id: _Optional[str] = ..., knn: _Optional[_Union[_chroma_pb2.Segment, _Mapping]] = ..., metadata: _Optional[_Union[_chroma_pb2.Segment, _Mapping]] = ..., record: _Optional[_Union[_chroma_pb2.Segment, _Mapping]] = ...) -> None: ... + def __init__(self, collection: _Optional[_Union[_chroma_pb2.Collection, _Mapping]] = ..., knn: _Optional[_Union[_chroma_pb2.Segment, _Mapping]] = ..., metadata: _Optional[_Union[_chroma_pb2.Segment, _Mapping]] = ..., record: _Optional[_Union[_chroma_pb2.Segment, _Mapping]] = ...) -> None: ... class FilterOperator(_message.Message): __slots__ = ["ids", "where", "where_document"] diff --git a/idl/chromadb/proto/query_executor.proto b/idl/chromadb/proto/query_executor.proto index 53aa37a8b528..f434070c9cd2 100644 --- a/idl/chromadb/proto/query_executor.proto +++ b/idl/chromadb/proto/query_executor.proto @@ -6,12 +6,8 @@ import "chromadb/proto/chroma.proto"; message ScanOperator { Collection collection = 1; - // Deprecated - string knn_id = 2; - // Deprecated - string metadata_id = 3; - // Deprecated - string record_id = 4; + // Reserve for deprecated fields + reserved 2, 3, 4; Segment knn = 5; Segment metadata = 6; Segment record = 7; diff --git a/rust/worker/src/server.rs b/rust/worker/src/server.rs index 27e20cd2c4a1..6e68734be5d5 100644 --- a/rust/worker/src/server.rs +++ b/rust/worker/src/server.rs @@ -455,12 +455,6 @@ mod tests { log_position: 0, version: 0, }), - // Deprecated - knn_id: "".to_string(), - // Deprecated - metadata_id: "".to_string(), - // Deprecated - record_id: "".to_string(), knn: Some(chroma_proto::Segment { id: Uuid::new_v4().to_string(), r#type: "urn:chroma:segment/vector/hnsw-distributed".to_string(),