1 type derived from VectorStoreCollection
Microsoft.Extensions.VectorData.ConformanceTests (1)
DependencyInjectionTests.cs (1)
281
private sealed class FakeVectorStoreRecordCollection :
VectorStoreCollection
<TKey, TRecord>
82 references to VectorStoreCollection
Microsoft.Extensions.DataIngestion (3)
Writers\VectorStoreWriter.cs (3)
30
private
VectorStoreCollection
<object, Dictionary<string, object?>>? _vectorStoreCollection;
48
/// Gets the underlying <see cref="
VectorStoreCollection
{TKey,TRecord}"/> used to store the chunks.
55
public
VectorStoreCollection
<object, Dictionary<string, object?>> VectorStoreCollection
Microsoft.Extensions.VectorData.Abstractions (12)
FilteredRecordRetrievalOptions.cs (1)
13
/// Defines options for calling <see cref="
VectorStoreCollection
{TKey, TRecord}.GetAsync(Expression{Func{TRecord, bool}}, int, FilteredRecordRetrievalOptions{TRecord}, CancellationToken)"/>.
RecordRetrievalOptions.cs (2)
10
/// Defines options for calling <see cref="
VectorStoreCollection
{TKey, TRecord}.GetAsync(TKey, RecordRetrievalOptions?, CancellationToken)"/>
11
/// or <see cref="
VectorStoreCollection
{TKey, TRecord}.GetAsync(IEnumerable{TKey}, RecordRetrievalOptions?, CancellationToken)"/>.
VectorSearchOptions.cs (2)
11
/// Defines options for vector search via <see cref="
VectorStoreCollection
{TKey, TRecord}.SearchAsync{TInput}"/>.
26
/// If this property isn't set provided, <see cref="
VectorStoreCollection
{TKey, TRecord}.SearchAsync{TInput}"/> checks if there is a vector property to use by default, and
VectorStore.cs (4)
28
/// <returns>A new <see cref="
VectorStoreCollection
{TKey, TRecord}"/> instance for managing the records in the collection.</returns>
38
public abstract
VectorStoreCollection
<TKey, TRecord> GetCollection<TKey, TRecord>(string name, VectorStoreCollectionDefinition? definition = null)
47
/// <returns>A new <see cref="
VectorStoreCollection
{TKey, TRecord}"/> instance for managing the records in the collection.</returns>
48
public abstract
VectorStoreCollection
<object, Dictionary<string, object?>> GetDynamicCollection(string name, VectorStoreCollectionDefinition definition);
VectorStoreCollection.cs (2)
177
/// Implementations of <see cref="
VectorStoreCollection
{TKey,TRecord}"/> should implement this method in a way which performs embedding generation once for the batch, rather than
192
/// Disposes the <see cref="
VectorStoreCollection
{TKey, TRecord}"/> and releases any resources it holds.
VectorStoreCollectionMetadata.cs (1)
6
/// <summary>Provides metadata about an <see cref="
VectorStoreCollection
{TKey, TRecord}"/>.</summary>
Microsoft.Extensions.VectorData.ConformanceTests (67)
CollectionManagementTests.cs (7)
19
var
collection = GetCollection();
34
var
collection = GetCollection();
45
var
collection = GetCollection();
56
var
collection = GetCollection();
67
var
collection = GetCollection();
80
var
collection = GetCollection();
99
public virtual
VectorStoreCollection
<TKey, Record> GetCollection()
DependencyInjectionTests.cs (5)
21
where TCollection :
VectorStoreCollection
<TKey, TRecord>
101
Verify<
VectorStoreCollection
<TKey, TRecord>>(serviceProvider, lifetime, serviceKey);
146
services.Add(new ServiceDescriptor(typeof(
VectorStoreCollection
<TKey, TRecord>), serviceKey, (sp, key) => new FakeVectorStoreRecordCollection(), lifetime));
271
public override
VectorStoreCollection
<TKey1, TRecord1> GetCollection<TKey1, TRecord1>(string name, VectorStoreCollectionDefinition? definition = null)
273
public override
VectorStoreCollection
<object, Dictionary<string, object?>> GetDynamicCollection(string name, VectorStoreCollectionDefinition? definition)
DistanceFunctionTests.cs (3)
52
using
var
collection = fixture.CreateCollection(distanceFunction);
122
protected virtual async Task TestScoreThreshold(
VectorStoreCollection
<TKey, SearchRecord> collection)
172
public virtual
VectorStoreCollection
<TKey, SearchRecord> CreateCollection(string distanceFunction)
EmbeddingGenerationTests.cs (24)
26
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
37
var
collection = GetDynamicCollection(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
48
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: false);
59
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: false, propertyGenerator: false);
79
var
collection = vectorStore.GetCollection<TKey, Record>(stringVectorFixture.CollectionName, stringVectorFixture.CreateRecordDefinition());
99
var
collection = serviceProvider.GetRequiredService<
VectorStoreCollection
<TKey, RecordWithAttributes>>();
123
var
collection = stringVectorFixture.GetCollection<RecordWithCustomerVectorProperty>(
136
var
collection = romOfFloatVectorFixture.GetCollection<RecordWithRomOfFloatVectorProperty>(
151
var
collection = stringVectorFixture.GetCollection<RawRecord>(stringVectorFixture.TestStore.DefaultVectorStore, stringVectorFixture.CollectionName + "withoutgenerator");
171
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
197
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
221
var
collection = GetDynamicCollection(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
254
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
290
var
collection = GetDynamicCollection(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
310
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
320
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
330
var
collection = GetCollection<Record>(storeGenerator: true, collectionGenerator: true, propertyGenerator: true);
391
private
VectorStoreCollection
<TKey, TRecord> GetCollection<TRecord>(
402
private
VectorStoreCollection
<object, Dictionary<string, object?>> GetDynamicCollection(
486
public virtual
VectorStoreCollection
<TKey, TRecord> GetCollection<TRecord>(
493
public virtual
VectorStoreCollection
<object, Dictionary<string, object?>> GetDynamicCollection(
557
public virtual
VectorStoreCollection
<TKey, TRecord> GetCollection<TRecord>(
564
public virtual
VectorStoreCollection
<object, Dictionary<string, object?>> GetDynamicCollection(
FilterTests.cs (1)
570
public virtual
VectorStoreCollection
<object, Dictionary<string, object?>> DynamicCollection { get; protected set; } = null!;
IndexKindTests.cs (2)
19
using
var
collection = fixture.CreateCollection(indexKind);
62
public virtual
VectorStoreCollection
<TKey, SearchRecord> CreateCollection(string indexKind)
ModelTests\BasicModelTests.cs (1)
463
protected
VectorStoreCollection
<TKey, Record> Collection => fixture.Collection;
ModelTests\DynamicModelTests.cs (2)
386
protected
VectorStoreCollection
<object, Dictionary<string, object?>> Collection => fixture.Collection;
394
protected override
VectorStoreCollection
<object, Dictionary<string, object?>> GetCollection()
ModelTests\MultiVectorModelTests.cs (1)
78
protected
VectorStoreCollection
<TKey, MultiVectorRecord> Collection => fixture.Collection;
ModelTests\NoDataModelTests.cs (1)
53
protected
VectorStoreCollection
<TKey, NoDataRecord> Collection => fixture.Collection;
ModelTests\NoVectorModelTests.cs (1)
54
protected
VectorStoreCollection
<TKey, NoVectorRecord> Collection => fixture.Collection;
Support\TestStore.cs (3)
102
public virtual
VectorStoreCollection
<TKey, TRecord> CreateCollection<TKey, TRecord>(
115
public virtual
VectorStoreCollection
<object, Dictionary<string, object?>> CreateDynamicCollection(
124
VectorStoreCollection
<TKey, TRecord> collection,
Support\VectorStoreCollectionFixtureBase.cs (2)
35
protected virtual
VectorStoreCollection
<TKey, TRecord> GetCollection()
53
public virtual
VectorStoreCollection
<TKey, TRecord> Collection { get; private set; } = null!;
Support\VectorStoreFixture.cs (2)
37
public virtual
VectorStoreCollection
<TKey, TRecord> CreateCollection<TKey, TRecord>(string name, VectorStoreCollectionDefinition definition)
48
public virtual
VectorStoreCollection
<object, Dictionary<string, object?>> CreateDynamicCollection(string name, VectorStoreCollectionDefinition definition)
TypeTests\DataTypeTests.cs (4)
200
var
dynamicCollection = fixture.CreateDynamicCollection(fixture.CollectionName, fixture.CreateRecordDefinition());
283
VectorStoreCollection
<object, Dictionary<string, object?>> dynamicCollection,
343
VectorStoreCollection
<TKey, TRecord> collection,
383
VectorStoreCollection
<object, Dictionary<string, object?>> dynamicCollection,
TypeTests\EmbeddingTypeTests.cs (3)
53
var
collection = fixture.CreateCollection<TKey, Record<TVector>>(fixture.CollectionName, fixture.CreateRecordDefinition<TVector>(embeddingGenerator: null, distanceFunction, dimensions));
96
var
dynamicCollection = fixture.CreateDynamicCollection(fixture.CollectionName, fixture.CreateRecordDefinition<TVector>(embeddingGenerator, distanceFunction, dimensions));
145
var
collection2 = fixture.CreateCollection<TKey, RecordWithString>(fixture.CollectionName, fixture.CreateRecordDefinition<string>(embeddingGenerator, distanceFunction, dimensions));
TypeTests\KeyTypeTests.cs (5)
50
using
var
collection = fixture.CreateCollection<TKey>(withAutoGeneration: false);
101
using (
var
dynamicCollection = fixture.CreateDynamicCollection<TKey>(withAutoGeneration: false))
152
using
var
collectionWithAutoGeneration = fixture.CreateCollection<TKey>(withAutoGeneration: null);
223
public virtual
VectorStoreCollection
<TKey, Record<TKey>> CreateCollection<TKey>(bool? withAutoGeneration)
227
public virtual
VectorStoreCollection
<object, Dictionary<string, object?>> CreateDynamicCollection<TKey>(bool withAutoGeneration)