jvector
jvector copied to clipboard
Clean up to index builder api
The GraphIndexBuilder
api can be used in two ways: for live indexing or bulk indexing.
We should enforce checks in the api such that users don't call it incorrectly or just keep the existing builder as internal and publish two public builder apis for IncrementalBuilder
and BulkBuilder
.
An example of wrong usage is calling addGraphNode
directly, followed by build
Calling build() multiple times is also bad. Should we just have build() check to make sure the graph is empty and throw if not?