Skip to content

.Net MEVD: Consider obsoleting VectorSearchOptions.VectorPropertyName in favor of a strongly-typed lambda VectorPropertySelector #10420

Closed

Description

@roji

VectorSearchOptions currently has VectorPropertyName, allowing the user to specify which vector property is to be searched (for cases where there are multiple vector properties). The property is a string representing the storage name.

However, in most (ideally all) APIs on MEVD, the interaction with the record is via strongly-typed property accesses on the user .NET type, rather than weakly-typed storage property names. For example, we're moving away from the current filter mechanism - which relies on storage string properties - to using LINQ expressions, which allow referencing .NET properties; this proposes that we do the same for selecting the vector property:

// Current API:
var results = await fixture.Collection.VectorizedSearchAsync(
    new ReadOnlyMemory<float>([1, 2, 3]),
    new() { VectorPropertyName = "some_vector_prop" });

// New API:
var results = await fixture.Collection.VectorizedSearchAsync(
    new ReadOnlyMemory<float>([1, 2, 3]),
    new() { VectorProperty = r => r.SomeVectorProp });

/cc westey (@westey-m)

Activity

  1. added
    sk team issueA tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
    on Feb 10, 2025
  2. added a commit that references this issue on Mar 7, 2025
    a14ad8c
  3. adamsitnik commented on Mar 11, 2025

    @adamsitnik
    Member

    Implemented in #10850

  4. moved this from Sprint: Planned to Sprint: Done in Semantic Kernelon Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencememorymemory connectormsft.ext.vectordataRelated to Microsoft.Extensions.VectorDatask team issueA tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions