Closed robalexclark closed 3 weeks ago
The pull request introduces modifications primarily to the SearchByMetadata
method across various classes implementing the IVectorCollection
interface. The return type of this method has been changed from Task<List<Vector>>
to Task<IReadOnlyList<Vector>>
, enhancing its immutability. Additionally, new methods have been added to some classes, such as IsValidJsonKey
in VectorCollection
, and several asynchronous methods in MongoVectorCollection
. Overall, the changes focus on refining method signatures and improving type safety without altering existing functionalities significantly.
File Path | Change Summary |
---|---|
src/Abstractions/src/IVectorCollection.cs |
Updated method signature: SearchByMetadata from Task<List<Vector>> to Task<IReadOnlyList<Vector>> . |
src/Abstractions/src/PublicAPI.Unshipped.txt |
Updated SearchByMetadata return type to IReadOnlyList<Vector> ; added IsValidJsonKey method. |
src/Abstractions/src/VectorCollection.cs |
Added protected static bool IsValidJsonKey(string input) method for JSON key validation. |
src/Chroma/src/ChromaVectorCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> . |
src/Elasticsearch/src/ElasticsearchVectorCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> ; added async methods with NotImplementedException . |
src/InMemory/src/InMemoryVectorCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> . |
src/Mongo/src/MongoVectorCollection.cs |
Added several async methods: AddAsync , DeleteAsync , GetAsync , IsEmptyAsync , SearchAsync ; updated SearchByMetadata return type. |
src/OpenSearch/src/OpenSearchVectorCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> . |
src/Postgres/src/PostgresVectorCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> ; added validation for filter keys. |
src/SemanticKernel/src/SemanticKernelMemoryStoreCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> . |
src/Sqlite/src/SqLiteVectorCollection.cs |
Updated SearchByMetadata return type to IReadOnlyList<Vector> ; removed IsValidJsonKey method. |
SearchByMetadata
method to the IVectorCollection
interface, which is directly related to the changes made in the main PR regarding the return type of the SearchByMetadata
method.SearchByMetadata
method in the ChromaVectorCollection
class, changing its access modifier and updating the exception message, which is relevant to the overall context of the SearchByMetadata
method's implementation.SearchByMetadata
method in the PostgresVectorCollection
class, changing its access modifier and providing a functional implementation, which aligns with the changes made in the main PR regarding the method's return type.🐇 In the code we hop and play,
With vectors in a new array.
Read-only lists, we cheer with glee,
Valid keys for JSON, oh so free!
Asynchronous methods, a joyful tune,
In our rabbit hole, we’ll code till noon! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Release Notes
New Features
MongoVectorCollection
class for adding, deleting, retrieving, and searching vectors in MongoDB.Improvements
SearchByMetadata
method across multiple collections toIReadOnlyList<Vector>
, enhancing immutability and type safety.IsValidJsonKey
method in theVectorCollection
class.Bug Fixes
SearchByMetadata
method by validating filter keys inPostgresVectorCollection
.