Skip to content

Commit 07f0fa8

Browse files
authored
Merge pull request #5 from elastic/bugfixes
Minor bugfixes
2 parents 364f9c4 + f0ee4b0 commit 07f0fa8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Elastic.SemanticKernel.Connectors.Elasticsearch/ElasticsearchVectorStoreCollectionCreateMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private static DenseVectorIndexOptionsType GetIndexKind(VectorStoreRecordVectorP
8080
return DenseVectorIndexOptionsType.Int8Hnsw;
8181
}
8282

83-
return vectorProperty.DistanceFunction switch
83+
return vectorProperty.IndexKind switch
8484
{
8585
IndexKind.Hnsw => DenseVectorIndexOptionsType.Hnsw,
8686
int8HnswIndexKind => DenseVectorIndexOptionsType.Int8Hnsw,

Elastic.SemanticKernel.Connectors.Elasticsearch/ElasticsearchVectorStoreRecordCollection.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ internal ElasticsearchVectorStoreRecordCollection(MockableElasticsearchClient el
149149

150150
// Validate property types.
151151
_propertyReader.VerifyKeyProperties(SupportedKeyTypes);
152-
VectorStoreRecordPropertyVerification.VerifyPropertyTypes(_propertyReader.VectorProperties, [typeof(ReadOnlyMemory<float>)], [typeof(float)], "Vector");
152+
VectorStoreRecordPropertyVerification.VerifyPropertyTypes(_propertyReader.VectorProperties,
153+
[typeof(ReadOnlyMemory<float>), typeof(ReadOnlyMemory<float>?)],
154+
[typeof(float)],
155+
"Vector");
153156
}
154157

155158
/// <inheritdoc />

0 commit comments

Comments
 (0)