Skip to content

Breaking changes (combined) #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<SuppressTfmSupportBuildErrors>true</SuppressTfmSupportBuildErrors>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<AssemblyOriginatorKeyFile>../../NRedisStack.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<IsWindows>$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::get_Windows())))</IsWindows>
</PropertyGroup>
Expand Down
Binary file added NRedisStack.snk
Binary file not shown.
34 changes: 17 additions & 17 deletions src/NRedisStack/PublicAPI/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ virtual NRedisStack.Search.Aggregation.Reducer.AddOwnArgs(System.Collections.Gen
virtual NRedisStack.Search.Aggregation.Reducer.GetOwnArgsCount() -> int
NRedisStack.Search.Schema.AddFlatVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> NRedisStack.Search.Schema!
NRedisStack.Search.Schema.AddHnswVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, int maxOutgoingConnections = 16, int maxConnectedNeighbors = 200, int maxTopCandidates = 10, double boundaryFactor = 0.01, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> NRedisStack.Search.Schema!
NRedisStack.Search.Schema.AddSvsVanamaVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, NRedisStack.Search.Schema.VectorField.VectorCompressionAlgorithm compressionAlgorithm = NRedisStack.Search.Schema.VectorField.VectorCompressionAlgorithm.NotSpecified, int constructionWindowSize = 200, int graphMaxDegree = 32, int searchWindowSize = 10, double rangeSearchApproximationFactor = 0.01, int trainingThreshold = 0, int reducedDimensions = 0, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> NRedisStack.Search.Schema!
NRedisStack.Search.Schema.AddSvsVamanaVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, NRedisStack.Search.Schema.VectorField.VectorCompressionAlgorithm compressionAlgorithm = NRedisStack.Search.Schema.VectorField.VectorCompressionAlgorithm.NotSpecified, int constructionWindowSize = 200, int graphMaxDegree = 32, int searchWindowSize = 10, double rangeSearchApproximationFactor = 0.01, int trainingThreshold = 0, int reducedDimensions = 0, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> NRedisStack.Search.Schema!
NRedisStack.Search.Schema.FlatVectorField
NRedisStack.Search.Schema.FlatVectorField.FlatVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> void
NRedisStack.Search.Schema.HnswVectorField
Expand All @@ -1365,22 +1365,22 @@ NRedisStack.Search.Schema.HnswVectorField.MaxOutgoingConnections.get -> int
NRedisStack.Search.Schema.HnswVectorField.MaxOutgoingConnections.set -> void
NRedisStack.Search.Schema.HnswVectorField.MaxTopCandidates.get -> int
NRedisStack.Search.Schema.HnswVectorField.MaxTopCandidates.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField
NRedisStack.Search.Schema.SvsVanamaVectorField.CompressionAlgorithm.get -> NRedisStack.Search.Schema.VectorField.VectorCompressionAlgorithm
NRedisStack.Search.Schema.SvsVanamaVectorField.CompressionAlgorithm.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.ConstructionWindowSize.get -> int
NRedisStack.Search.Schema.SvsVanamaVectorField.ConstructionWindowSize.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.GraphMaxDegree.get -> int
NRedisStack.Search.Schema.SvsVanamaVectorField.GraphMaxDegree.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.RangeSearchApproximationFactor.get -> double
NRedisStack.Search.Schema.SvsVanamaVectorField.RangeSearchApproximationFactor.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.ReducedDimensions.get -> int
NRedisStack.Search.Schema.SvsVanamaVectorField.ReducedDimensions.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.SearchWindowSize.get -> int
NRedisStack.Search.Schema.SvsVanamaVectorField.SearchWindowSize.set -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.SvsVanamaVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> void
NRedisStack.Search.Schema.SvsVanamaVectorField.TrainingThreshold.get -> int
NRedisStack.Search.Schema.SvsVanamaVectorField.TrainingThreshold.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField
NRedisStack.Search.Schema.SvsVamanaVectorField.CompressionAlgorithm.get -> NRedisStack.Search.Schema.VectorField.VectorCompressionAlgorithm
NRedisStack.Search.Schema.SvsVamanaVectorField.CompressionAlgorithm.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.ConstructionWindowSize.get -> int
NRedisStack.Search.Schema.SvsVamanaVectorField.ConstructionWindowSize.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.GraphMaxDegree.get -> int
NRedisStack.Search.Schema.SvsVamanaVectorField.GraphMaxDegree.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.RangeSearchApproximationFactor.get -> double
NRedisStack.Search.Schema.SvsVamanaVectorField.RangeSearchApproximationFactor.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.ReducedDimensions.get -> int
NRedisStack.Search.Schema.SvsVamanaVectorField.ReducedDimensions.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.SearchWindowSize.get -> int
NRedisStack.Search.Schema.SvsVamanaVectorField.SearchWindowSize.set -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.SvsVamanaVectorField(NRedisStack.Search.FieldName! name, NRedisStack.Search.Schema.VectorField.VectorType type, int dimensions, NRedisStack.Search.Schema.VectorField.VectorDistanceMetric distanceMetric, System.Collections.Generic.Dictionary<string!, object!>? attributes = null, bool missingIndex = false) -> void
NRedisStack.Search.Schema.SvsVamanaVectorField.TrainingThreshold.get -> int
NRedisStack.Search.Schema.SvsVamanaVectorField.TrainingThreshold.set -> void
NRedisStack.Search.Schema.VectorField.Dimensions.get -> int
NRedisStack.Search.Schema.VectorField.Dimensions.set -> void
NRedisStack.Search.Schema.VectorField.DistanceMetric.get -> NRedisStack.Search.Schema.VectorField.VectorDistanceMetric
Expand Down
2 changes: 1 addition & 1 deletion src/NRedisStack/PublicAPI/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#nullable enable
#nullable enable
14 changes: 7 additions & 7 deletions src/NRedisStack/Search/Schema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ internal override void AddDirectAttributes(List<object> args)
/// <summary>
/// A <see cref="VectorField"/> that uses the <see cref="VectorField.VectorAlgo.SVS_VAMANA"/> algorithm.
/// </summary>
public class SvsVanamaVectorField(
public class SvsVamanaVectorField(
FieldName name,
VectorType type,
int dimensions,
Expand Down Expand Up @@ -890,17 +890,17 @@ public Schema AddHnswVectorField(FieldName name, VectorType type, int dimensions
/// Add a <see href="VectorAlgo.SVS_VAMANA"/> vector to the schema.
/// </summary>
/// <remarks>Note that <c>reducedDimensions</c> is only applicable when using LeanVec compression.</remarks>
public Schema AddSvsVanamaVectorField(FieldName name, VectorType type, int dimensions, VectorDistanceMetric distanceMetric,
public Schema AddSvsVamanaVectorField(FieldName name, VectorType type, int dimensions, VectorDistanceMetric distanceMetric,
VectorCompressionAlgorithm compressionAlgorithm = VectorCompressionAlgorithm.NotSpecified,
int constructionWindowSize = SvsVanamaVectorField.DEFAULT_CONSTRUCTION_WINDOW_SIZE,
int graphMaxDegree = SvsVanamaVectorField.DEFAULT_GRAPH_MAX_DEGREE,
int searchWindowSize = SvsVanamaVectorField.DEFAULT_SEARCH_WINDOW_SIZE,
double rangeSearchApproximationFactor = SvsVanamaVectorField.DEFAULT_EPSILON,
int constructionWindowSize = SvsVamanaVectorField.DEFAULT_CONSTRUCTION_WINDOW_SIZE,
int graphMaxDegree = SvsVamanaVectorField.DEFAULT_GRAPH_MAX_DEGREE,
int searchWindowSize = SvsVamanaVectorField.DEFAULT_SEARCH_WINDOW_SIZE,
double rangeSearchApproximationFactor = SvsVamanaVectorField.DEFAULT_EPSILON,
int trainingThreshold = 0,
int reducedDimensions = 0,
Dictionary<string, object>? attributes = null, bool missingIndex = false)
{
Fields.Add(new SvsVanamaVectorField(name, type, dimensions, distanceMetric, attributes, missingIndex)
Fields.Add(new SvsVamanaVectorField(name, type, dimensions, distanceMetric, attributes, missingIndex)
{
CompressionAlgorithm = compressionAlgorithm,
ConstructionWindowSize = constructionWindowSize,
Expand Down
12 changes: 6 additions & 6 deletions tests/NRedisStack.Tests/Search/IndexCreationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ public void TestCreate_Float16_Int32_VectorField_Svs(string endpointId)
IDatabase db = GetCleanDatabase(endpointId);
// ReSharper disable once RedundantArgumentDefaultValue
var ft = db.FT(2);
var schema = new Schema().AddSvsVanamaVectorField("v", Schema.VectorField.VectorType.FLOAT16, 5,
var schema = new Schema().AddSvsVamanaVectorField("v", Schema.VectorField.VectorType.FLOAT16, 5,
Schema.VectorField.VectorDistanceMetric.EuclideanDistance)
.AddSvsVanamaVectorField("v2", Schema.VectorField.VectorType.FLOAT32, 4,
.AddSvsVamanaVectorField("v2", Schema.VectorField.VectorType.FLOAT32, 4,
Schema.VectorField.VectorDistanceMetric.EuclideanDistance);

var cmd = SearchCommandBuilder.Create("idx", FTCreateParams.CreateParams(), schema).ToString();
Expand Down Expand Up @@ -350,10 +350,10 @@ public void TestCreate_Float16_Int32_VectorField_Svs_WithCompression(string endp
IDatabase db = GetCleanDatabase(endpointId);
// ReSharper disable once RedundantArgumentDefaultValue
var ft = db.FT(2);
var schema = new Schema().AddSvsVanamaVectorField("v", Schema.VectorField.VectorType.FLOAT16, 5,
var schema = new Schema().AddSvsVamanaVectorField("v", Schema.VectorField.VectorType.FLOAT16, 5,
Schema.VectorField.VectorDistanceMetric.EuclideanDistance,
reducedDimensions: 2, compressionAlgorithm: Schema.VectorField.VectorCompressionAlgorithm.LeanVec4x8)
.AddSvsVanamaVectorField("v2", Schema.VectorField.VectorType.FLOAT32, 4,
.AddSvsVamanaVectorField("v2", Schema.VectorField.VectorType.FLOAT32, 4,
Schema.VectorField.VectorDistanceMetric.EuclideanDistance,
compressionAlgorithm: Schema.VectorField.VectorCompressionAlgorithm.LVQ4);

Expand Down Expand Up @@ -387,7 +387,7 @@ public void TestIndexingCreation_Default()
Schema.VectorField.VectorDistanceMetric.EuclideanDistance, missingIndex: true)
.AddHnswVectorField("vector2", Schema.VectorField.VectorType.FLOAT64, 3,
Schema.VectorField.VectorDistanceMetric.CosineDistance, missingIndex: false)
.AddSvsVanamaVectorField("vector3", Schema.VectorField.VectorType.FLOAT16, 4,
.AddSvsVamanaVectorField("vector3", Schema.VectorField.VectorType.FLOAT16, 4,
Schema.VectorField.VectorDistanceMetric.InnerProduct, missingIndex: true);

var ftCreateParams = FTCreateParams.CreateParams();
Expand Down Expand Up @@ -430,7 +430,7 @@ public void TestIndexingCreation_Custom_Everything()
Schema.VectorField.VectorDistanceMetric.CosineDistance,
maxOutgoingConnections: 10, maxConnectedNeighbors: 20, maxTopCandidates: 30, boundaryFactor: 0.7,
missingIndex: false)
.AddSvsVanamaVectorField("vector3", Schema.VectorField.VectorType.FLOAT16, 4,
.AddSvsVamanaVectorField("vector3", Schema.VectorField.VectorType.FLOAT16, 4,
Schema.VectorField.VectorDistanceMetric.InnerProduct,
compressionAlgorithm: Schema.VectorField.VectorCompressionAlgorithm.LeanVec4x8,
constructionWindowSize: 35, graphMaxDegree: 17, searchWindowSize: 30,
Expand Down
Loading