22 instantiations of VectorSearchOptions
Microsoft.Extensions.VectorData.ConformanceTests (22)
DistanceFunctionTests.cs (2)
132new() { ScoreThreshold = 0.9 }) 150new() { ScoreThreshold = threshold })
EmbeddingGenerationTests.cs (1)
312var exception = await Assert.ThrowsAsync<NotSupportedException>(() => collection.SearchAsync("[1, 0, 0]", top: 1, new() { IncludeVectors = true }).ToListAsync().AsTask());
FilterTests.cs (3)
53new() { Filter = r => r["String = \"not\"; DROP TABLE FilterTests;"] == "" }).ToListAsync()); 515new() { Filter = filter }) 535new() { Filter = dynamicFilter })
ModelTests\BasicModelTests.cs (3)
427new() { IncludeVectors = includeVectors }) 440new() { Skip = 1 }) 453new() { Filter = r => r.Number == 2 })
ModelTests\DynamicModelTests.cs (3)
320new() { IncludeVectors = includeVectors }) 333new() { Skip = 1 }) 346new() { Filter = r => (int)r[IntegerPropertyName]! == 2 })
ModelTests\MultiVectorModelTests.cs (2)
59.SearchAsync(new ReadOnlyMemory<float>([1, 2, 3]), top: 1, new() { VectorProperty = r => r.Vector1, IncludeVectors = true }) 64.SearchAsync(new ReadOnlyMemory<float>([10, 2, 6]), top: 1, new() { VectorProperty = r => r.Vector2, IncludeVectors = true })
Support\TestStore.cs (1)
147new()
TypeTests\DataTypeTests.cs (4)
361var result = (await collection.SearchAsync(fixture.Vector, top: 100, new() { Filter = filter }).SingleAsync()).Record; 376result = (await collection.SearchAsync(fixture.Vector, top: 100, new() { Filter = filter }).SingleAsync()).Record; 402var result = (await dynamicCollection.SearchAsync(fixture.Vector, top: 100, new() { Filter = filter }).SingleAsync()).Record; 419result = (await dynamicCollection.SearchAsync(fixture.Vector, top: 100, new() { Filter = filter }).SingleAsync()).Record;
TypeTests\EmbeddingTypeTests.cs (3)
77var result2 = await collection.SearchAsync(value, top: 1, new() { IncludeVectors = true, Filter = r => r.Int == 42 }).SingleAsync(); 124var dynamicResult2 = await dynamicCollection.SearchAsync(value, top: 1, new() { IncludeVectors = true, Filter = r => (int)r["Int"]! == 43 }).SingleAsync(); 171var result4 = await collection2.SearchAsync("does not matter", top: 1, new() { Filter = r => r.Int == 44 }).SingleAsync();
4 references to VectorSearchOptions
Microsoft.Extensions.VectorData.Abstractions (3)
IVectorSearchable.cs (1)
59VectorSearchOptions<TRecord>? options = default,
ProviderServices\CollectionModel.cs (1)
121public VectorPropertyModel GetVectorPropertyOrSingle<TRecord>(VectorSearchOptions<TRecord> searchOptions)
VectorStoreCollection.cs (1)
185public abstract IAsyncEnumerable<VectorSearchResult<TRecord>> SearchAsync<TInput>(TInput searchValue, int top, VectorSearchOptions<TRecord>? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.VectorData.ConformanceTests (1)
DependencyInjectionTests.cs (1)
306VectorSearchOptions<TRecord>? options = null,