The documentation for managing indexes in Vertex ai says that the following metadata is required to create an index.
metadata
{
"contentsDeltaUri": "INPUT_DIR",
"config": {
"dimensions": 100,
"approximateNeighborsCount": 150,
"distanceMeasureType": "DOT_PRODUCT_DISTANCE",
"algorithm_config": {
"treeAhConfig": {
"leafNodeEmbeddingCount": 500,
"leafNodesToSearchPercent": 7
}
}
}
}
However, when indexing from a node.js library, the method requires the following in the request, which does not match the document metadata type
ICreateIndexRequest
{
index?:{
metadata?: {
boolValue?: (boolean|null);
listValue?: (google.protobuf.IListValue|null);
nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null);
numberValue?: (number|null);
stringValue?: (string|null);
structValue?: (google.protobuf.IStruct|null)
}
}
}
ICreateIndexRequest
ICreateIndexRequest.index
ICreateIndexRequest.index.metadata
The documentation says that metadata must be passed, and in fact, if you run createIndex without metadata, you get a “metadata required” error
Please tell me how to pass metadata?