diff --git a/client.go b/client.go index 7e3e297..959b98d 100644 --- a/client.go +++ b/client.go @@ -792,7 +792,7 @@ func (c *Client) IndexCreate( Params: params, Labels: labels, Storage: storage, - Type: ptr(protos.IndexType_HNSW), + Type: nil, // defaults to protos.IndexType_HNSW } return c.IndexCreateFromIndexDef(ctx, indexDef) diff --git a/integration_single_node_test.go b/integration_single_node_test.go index c0a178b..6bf4849 100644 --- a/integration_single_node_test.go +++ b/integration_single_node_test.go @@ -268,7 +268,6 @@ func (suite *SingleNodeTestSuite) TestIndexCreate() { }, Dimensions: uint32(10), VectorDistanceMetric: ptr(protos.VectorDistanceMetric_SQUARED_EUCLIDEAN), - Type: ptr(protos.IndexType_HNSW), SetFilter: nil, Field: "vector", }, @@ -297,7 +296,6 @@ func (suite *SingleNodeTestSuite) TestIndexCreate() { }, Dimensions: uint32(10), VectorDistanceMetric: ptr(protos.VectorDistanceMetric_COSINE), - Type: ptr(protos.IndexType_HNSW), SetFilter: ptr("testset"), Field: "vector", Storage: &protos.IndexStorage{ @@ -378,7 +376,6 @@ func (suite *SingleNodeTestSuite) TestIndexUpdate() { }, Dimensions: uint32(10), VectorDistanceMetric: ptr(protos.VectorDistanceMetric_COSINE), - Type: ptr(protos.IndexType_HNSW), SetFilter: ptr("testset"), Field: "vector", Storage: &protos.IndexStorage{ @@ -442,7 +439,6 @@ func (suite *SingleNodeTestSuite) TestIndexUpdate() { }, Dimensions: uint32(10), VectorDistanceMetric: ptr(protos.VectorDistanceMetric_COSINE), - Type: ptr(protos.IndexType_HNSW), SetFilter: ptr("testset"), Field: "vector", Storage: &protos.IndexStorage{ diff --git a/testutils.go b/testutils.go index ee822a4..7081853 100644 --- a/testutils.go +++ b/testutils.go @@ -218,7 +218,7 @@ func (idb *indexDefinitionBuilder) Build() *protos.IndexDefinition { Dimensions: uint32(idb.dimension), VectorDistanceMetric: &idb.vectorDistanceMetric, Field: idb.vectorField, - Type: ptr(protos.IndexType_HNSW), + Type: nil, // defaults to protos.IndexType_HNSW Storage: &protos.IndexStorage{ Namespace: &idb.namespace, Set: &idb.indexName,