v0.4.0
What's Changed
-
CONDITIONAL BREAKING CHANGE: Add an option to configure distance for the vector collection via
Configstruct. The new fielddistancecan be set using theDistanceenum. This includes Euclidean, Cosine, and Dot distance metrics. The default distance metric is Euclidean. This change is backward compatible if you are creating a config using theConfig::default()method. Otherwise, you need to update the config to include the distance metric.let config = Config { ... distance: Distance::Cosine, };
-
With the new distance metric feature, now, you can set a
relevancythreshold for the search results. This will filter out the results that are below or above the threshold depending on the distance metric used. This feature is disabled by default which is set to -1.0. To enable this feature, you can set therelevancyfield in theCollectionstruct.... let mut collection = Collection::new(&config)?; collection.relevancy = 3.0;
-
Add a new method
Collection::insert_manyto insert multiple vector records into the collection at once. This method is more optimized than using theCollection::insertmethod in a loop.