The VectorizedSearchAsync method allows searching using data that has already been vectorized.
This method takes a vector and an optional VectorSearchOptions class as input. This method is available on the following interfaces:
IVectorizedSearch<TRecord>
IVectorStoreRecordCollection<TKey, TRecord>
Note that IVectorStoreRecordCollection<TKey, TRecord> inherits from IVectorizedSearch<TRecord>.
And this unit test confirms that by grabbing IVectorSearch off the collection interface:
var collection = kernel.Services.GetRequiredService<IVectorStoreRecordCollection<ulong, TestRecord>>();
Assert.NotNull(collection);
Assert.IsType<QdrantVectorStoreRecordCollection<TestRecord>>(collection);
var vectorizedSearch = kernel.Services.GetRequiredService<IVectorizedSearch<TestRecord>>();
However, I'm using Microsoft.SemanticKernel.Connectors.Qdrant version 1.22.0-alpha and the reference is not resolved:
And the source does not show IVectorStoreRecordCollection inheriting from IVectorizedSearch:
[Experimental("SKEXP0001")]
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
public interface IVectorStoreRecordCollection<TKey, TRecord>
#pragma warning restore CA1711 // Identifiers should not have incorrect suffix
where TKey : notnull
where TRecord : class
{
This page states:
And this unit test confirms that by grabbing
IVectorSearch
off the collection interface:However, I'm using
Microsoft.SemanticKernel.Connectors.Qdrant
version1.22.0-alpha
and the reference is not resolved:And the source does not show
IVectorStoreRecordCollection
inheriting fromIVectorizedSearch
: