Uploading Data to a Collection
Uploading a Single Document
document = { "category": "product",
"vec1" : [0,1]
}
hyperspace_client.add_document(document, collection_name)Document document = new Document();
document.putAdditionalProperty("category", "product");
document.putAdditionalProperty("vec1", [0,0,1]);
document.putAdditionalProperty("vec2", [0,1,0]);
client.addDocument(collectionName, document, true, false);const document = {"category": "product",
"vec1" : [0,0,1],
"vec2" : [0,1,0]};
await hyperspaceClient.index({
index: collectionName,
body: document
});Assigning Id to a Document
document = {"_id": "1",
"category": "product",
"vec1" : [0,1]
}
hyperspace_client.add_document(document, collection_name)Document document = new Document();
document.setId("1");
document.putAdditionalProperty("category", "product");
document.putAdditionalProperty("vec1", [0,0,1]);
document.putAdditionalProperty("vec2", [0,1,0]);
client.addDocument(collectionName, document, true, false);const document = {"category": "product",
"vec1" : [0,0,1],
"vec2" : [0,1,0]};
await hyperspaceClient.index({
id: "1",
index: collectionName,
body: document
});Uploading a Batch of Documents
Last updated