Skip to content
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

feat(datastore): vector search #11084

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bhshkh
Copy link
Contributor

@bhshkh bhshkh commented Nov 4, 2024

This PR is similar to #10548
The feature is not yet GA. This PR will be merged after GA

@quartzmo quartzmo changed the title Feature/ds vector search bigtable/datastore/firestore: Feature/ds vector search Nov 6, 2024
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Nov 7, 2024
@bhshkh bhshkh changed the title bigtable/datastore/firestore: Feature/ds vector search feat(datastore): vector search Nov 11, 2024
@bhshkh bhshkh marked this pull request as ready for review November 12, 2024 17:12
@bhshkh bhshkh requested review from a team as code owners November 12, 2024 17:12
@bhshkh bhshkh added api: datastore Issues related to the Datastore API. and removed api: bigtable Issues related to the Bigtable API. labels Nov 13, 2024
@bhshkh bhshkh requested a review from jba November 13, 2024 21:02
@@ -59,7 +59,9 @@ func typeMismatchReason(p Property, v reflect.Value) string {
case []byte:
entityType = "[]byte"
}

if p.Meaning == 31 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meaningVector

@@ -163,6 +165,12 @@ func (l *propertyLoader) loadOneElement(codec fields.List, structValue reflect.V

// If the element is a slice, we need to accommodate it.
if v.Kind() == reflect.Slice && v.Type() != typeOfByteSlice {
// Check whether Vector is being loaded into appropriate field type
if field.Type != reflect.TypeOf(Vector32{}) && field.Type != reflect.TypeOf(Vector64{}) &&
p.Meaning == meaningVector {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it makes more sense to me if the first test is p.Meaning == meaningVector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants