Open assembly-winston opened 3 months ago
@jseldess Would you be able to take a look?
Sure, @anawishnoff. I'll take a look soon.
@assembly-winston, thanks for reporting this gap in our docs. We'll work on adding SDK-specific filtering examples, but in the meantime, this should work for your example above:
queryMetadataMap := map[string]interface{}{
"$and": []interface{}{
map[string]interface{}{
"genre": map[string]interface{}{
"$eq": "comedy",
},
},
map[string]interface{}{
"genre": map[string]interface{}{
"$eq": "documentary",
},
},
},
}
metadataFilter, err := structpb.NewStruct(queryMetadataMap)
if err != nil {
log.Fatalf("Failed to create metadata filter: %v", err)
}
There is no example for how to do these filters in the docs. When doing the suggested example from the general pinecone example and translating to Go, structpb package complains that
[]map[string]any
is not a valid type: