-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
When creating a new vector field through Schema.AddVectorField
the generated command has a wrong number of parameters.
Example:
var schema = new Schema().AddVectorField("fieldTest", Schema.VectorField.VectorAlgo.HNSW, new Dictionary<string, object>()
{
["TYPE"] = "FLOAT32",
["DIM"] = "128",
["DISTANCE_METRIC"] = "COSINE"
});
which generates the following:
FT.CREATE test SCHEMA fieldTest VECTOR HNSW 3 TYPE FLOAT32 DIM 128 DISTANCE_METRIC COSINE
and it should be
FT.CREATE test SCHEMA fieldTest VECTOR HNSW 6 TYPE FLOAT32 DIM 128 DISTANCE_METRIC COSINE
The error in the code is at this line which only takes into account dictionary's keys while should consider also values (i.e.: Attributes.Count()
should be doubled).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers