-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net MEVD: Filter-only search API (without vector similarity) #11112
.Net MEVD: Filter-only search API (without vector similarity) #11112
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
…o queryAsync # Conflicts: # dotnet/src/Connectors/Connectors.Memory.Postgres/PostgresVectorStoreDbClient.cs # dotnet/src/Connectors/Connectors.Memory.Postgres/SqlBuilder.cs # dotnet/src/Connectors/Connectors.Postgres.UnitTests/PostgresVectorStoreCollectionSqlBuilderTests.cs # dotnet/src/VectorDataIntegrationTests/AzureAISearchIntegrationTests/Support/AzureAISearchTestStore.cs
…o queryAsync # Conflicts: # dotnet/src/Connectors/VectorData/VectorStorage/LoggingVectorStoreRecordCollection.cs
...src/Connectors/Connectors.Memory.Weaviate/WeaviateVectorStoreRecordCollectionQueryBuilder.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
…o queryAsync # Conflicts: # dotnet/samples/Concepts/Memory/VectorStoreEmbeddingGeneration/TextEmbeddingVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.AzureAISearch/AzureAISearchVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.AzureCosmosDBNoSQL/AzureCosmosDBNoSQLVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.MongoDB/MongoDBVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.Qdrant/QdrantVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.Weaviate/WeaviateVectorStoreRecordCollection.cs
dotnet/src/Connectors/Connectors.Memory.Pinecone/PineconeVectorStoreRecordCollection.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome to see this, am really happy we'll have this capability!
...s/Concepts/Memory/VectorStoreEmbeddingGeneration/TextEmbeddingVectorStoreRecordCollection.cs
Outdated
Show resolved
Hide resolved
{ | ||
IsFilterable = dataProperty.IsFilterable, | ||
// Sometimes the users ask to also OrderBy given filterable property, so we make it sortable. | ||
IsSortable = dataProperty.IsFilterable && !fieldType.IsCollection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think this is one of the reasons we thought about renaming IsFilterable to IsIndexable indeed... In the future, we can have an Azure AI-specific IsSortable flag too.
...t/src/Connectors/Connectors.Memory.AzureAISearch/AzureAISearchVectorStoreRecordCollection.cs
Show resolved
Hide resolved
public VectorStoreRecordPropertyModel GetDataOrKeyProperty<TRecord>(Expression<Func<TRecord, object?>> expression) | ||
=> this.GetMatchingProperty<TRecord, VectorStoreRecordPropertyModel>(expression, data: true); | ||
|
||
private TProperty GetMatchingProperty<TRecord, TProperty>(Expression<Func<TRecord, object?>> expression, bool data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting that this parameter is mainly there because of VectorStoreGenericDataModel, which has different dictionaries for data/vectors; that's going away with the transition to Dictionary<string, object?>
tracked by #10802 (PR should be out this weekend).
In other words, I think this is super temporary and will be gone soon (so should be OK to merge as-is for now). We'd also rename GetDataOrKeyProperty to something like BindProperty (I'm already thinking about this also in relation to the filter translators...).
dotnet/src/Connectors/VectorData.Abstractions/VectorStorage/IVectorStoreRecordCollection.cs
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.Memory.Qdrant/QdrantVectorStoreRecordCollection.cs
Outdated
Show resolved
Hide resolved
foreach (var property in model.Properties) | ||
{ | ||
if (options.IncludeVectors || property is not VectorStoreRecordVectorPropertyModel) | ||
{ | ||
query.AppendFormat("\"{0}\",", property.StorageName); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we should definitely do some passes to consolidate/refactor.
dotnet/src/Connectors/Connectors.Memory.MongoDB/MongoDBVectorStoreRecordCollection.cs
Outdated
Show resolved
Hide resolved
.../Connectors.Memory.AzureCosmosDBNoSQL/AzureCosmosDBNoSQLVectorStoreCollectionQueryBuilder.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Connectors/VectorData.Abstractions/RecordOptions/FilterOptions.cs
Outdated
Show resolved
Hide resolved
…o queryAsync # Conflicts: # dotnet/src/Connectors/Connectors.Memory.AzureCosmosDBMongoDB/AzureCosmosDBMongoDBVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.InMemory/InMemoryVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.Pinecone/PineconeVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.Postgres/PostgresVectorStoreDbClient.cs # dotnet/src/Connectors/Connectors.Memory.Postgres/PostgresVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.Redis/RedisHashSetVectorStoreRecordCollection.cs # dotnet/src/Connectors/Connectors.Memory.Redis/RedisJsonVectorStoreRecordCollection.cs # dotnet/src/Connectors/VectorData.Abstractions/CompatibilitySuppressions.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, there seem to be a few more unresolved comments, but nothing that looks blocking - LGTM. Thanks @adamsitnik!
dotnet/src/Connectors/VectorData.Abstractions/RecordOptions/FilterOptions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Connectors/VectorData.Abstractions/RecordOptions/FilterOptions.cs
Outdated
Show resolved
Hide resolved
…o queryAsync # Conflicts: # dotnet/src/Connectors/Connectors.Memory.AzureAISearch/AzureAISearchVectorStoreRecordCollection.cs
- rename FilterOptions to GetFilteredRecordOptions - rename Sort to OrderBy - remove the limitation to select Key as the Redis ordeby field
747531c
into
microsoft:feature-vector-data-preb2
Implemented with tests for:
fixes #10295