Skip to content

v0.4.0

Choose a tag to compare

@edwinkys edwinkys released this 03 Apr 17:29
· 404 commits to main since this release

What's Changed

  • CONDITIONAL BREAKING CHANGE: Add an option to configure distance for the vector collection via Config struct. The new field distance can be set using the Distance enum. 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 the Config::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 relevancy threshold 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 the relevancy field in the Collection struct.

    ...
    let mut collection = Collection::new(&config)?;
    collection.relevancy = 3.0;
  • Add a new method Collection::insert_many to insert multiple vector records into the collection at once. This method is more optimized than using the Collection::insert method in a loop.

Contributors

Full Changelog

v0.3.0...v0.4.0