1

Is there any way to do bulk insert the documents into the collection and bulk insert for vertex and edge in graph

please share the best way to do bulk insert documents into collection and graph

using java driver 4.1.0 or 4.1.3

0

1 Answer 1

2

the best way to bulk insert documents is the method insertDocuments(Collection<T>) or importDocuments(Collection<T>) in the class ArangoCollection.

The key difference between the two methods is, that with importDocuments you can decide what happens with duplicate documents (e.g. update, replace existing document)

final ArangoDB arangoDB = new ArangoDB.Builder().build();
Collection<MyDocument> docs = new ArrayList<MyDocument>();
// add documents to docs

arangoDB.db().collection("myCollection").insertDocuments(docs);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.