We are calculating term frequency (tf-idf) of some documents. We are representing the terms as nodes, related to some documents (more nodes).
The thing is that I have to fill our Neo4j database with weighted relationships between terms and documents, and that is a lot of data.
We have been working with HTTP REST services, my team mate is telling me he will make a matrix that I can use to populate the graph with the relationships, I think that would be wrong because it will turn out into an O (N^2).
I think it would be best to use a json structure and send that through HTTP, then insert relationships one by one.
Which is the best way to handle this kind of data structures?