Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,51 @@ public class VectorFieldArgs<K> extends FieldArgs<K> {
* Vector similarity index algorithms.
*/
public enum Algorithm {

/**
* Brute force algorithm.
*/
FLAT,
/**
* Hierarchical, navigable, small world algorithm.
*/
HNSW
HNSW,
/**
* SVS-VAMANA algorithm provides high-performance approximate vector search optimized for specific use cases with
* advanced compression and optimization features.
*
* <p>
* Characteristics:
* <ul>
* <li>High-performance approximate search</li>
* <li>Support for vector compression (LVQ, LeanVec)</li>
* <li>Configurable graph construction and search parameters</li>
* <li>Optimized for Intel platforms with fallback support</li>
* </ul>
*
* <p>
* Note: This algorithm may have specific requirements and limitations. Consult the Redis documentation for detailed
* usage guidelines.
*
* @since Redis 8.2
*/
SVS_VAMANA("SVS-VAMANA");

private final String redisName;

Algorithm() {
this.redisName = name();
}

Algorithm(String redisName) {
this.redisName = redisName;
}

@Override
public String toString() {
return redisName;
}

}

/**
Expand Down Expand Up @@ -169,13 +206,32 @@ public Builder<K> flat() {

/**
* Use the HNSW (hierarchical, navigable, small world) algorithm.
*
*
* @return the instance of the {@link Builder} for the purpose of method chaining
*/
public Builder<K> hnsw() {
return algorithm(Algorithm.HNSW);
}

/**
* Use the SVS-VAMANA algorithm for high-performance approximate vector search.
*
* <p>
* SVS-VAMANA provides advanced features including:
* <ul>
* <li>Vector compression support (LVQ, LeanVec)</li>
* <li>Configurable graph construction parameters</li>
* <li>Runtime search optimization</li>
* <li>Intel platform optimizations</li>
* </ul>
*
* @return the instance of the {@link Builder} for the purpose of method chaining
* @since Redis 8.2
*/
public Builder<K> svsVamana() {
return algorithm(Algorithm.SVS_VAMANA);
}

/**
* Set the vector data type.
*
Expand Down Expand Up @@ -211,7 +267,7 @@ public Builder<K> distanceMetric(DistanceMetric metric) {

/**
* Add a custom attribute.
*
*
* @param name the attribute name
* @param value the attribute value
* @return the instance of the {@link Builder} for the purpose of method chaining
Expand Down
Loading