Creating a Collection
collection_name = "new_collection"
hyperspace_client.create_collection('schema.json', collection_name)String collectionName = "new_collection";
JsonObject schema = (JsonObject)
JsonParser.parseReader(new FileReader("schema.json"));
client.createCollection(collectionName, schema);const collection_name = 'new_collection';
await hyperspaceClient.indices.create({
index: collectionName,
body: 'schema.json'
})config_schema = {
"configuration": {
"budget": {
"type": "integer"
},
"genres": {
"struct_type": "list",
"type": "keyword"
},
"id": {
"type": "keyword",
"id": True
},
"popularity": {
"type": "float"
},
"rating": {
"type": "float"
},
"release_date_unix_time": {
"type": "date"
},
"embedded_overview": {
"type": "dense_vector",
"dim": 384,
"index_type": "brute_force",
"metric": "IP"
}
}
}
collection_name = 'new_collrction"
hyperspace_client.create_collection(config_schema, collection_name)Last updated