I am trying to create a Vector index to find the top nearest neighbors given an input embedding Vector.
Following Firestore’s tutorial on this they provide the command to create the Vector index.
“To create a vector index, use gcloud alpha firestore indexes composite create:”
gcloud alpha firestore indexes composite create
--collection-group=collection-group
--query-scope=COLLECTION
--field-config field-path=vector-field,vector-config='vector-configuration'
--database=database-id
If I accomodate this command to my case following the examples they provide:
gcloud alpha firestore indexes composite create
--collection-group=cars
--query-scope=COLLECTION
--field-config field-path=embedding,vector-config='{"dimension": "768", "flat": "{}"}'
And every time I get an error saying:
argument –field-config: invalid <googlecloudsdk.command_lib.util.apis.yaml_command_schema_util._MessageFieldType object at 0x000001761A469250> value: “field-path=embedding,vector-config='{dimension:”
and if I remove the whitespace in the dictionary in vector-config I get:
argument –field-config: Expecting {dimension:768,flat:{}} to be json or arg_dict format
So I am unsure if this is a bug on my end or if the documentation is not accurate.
Diego Barreiro Clemente is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.