Builder
Java-friendly builder for DocumentWithMetadata.
Usage from Java:
DocumentWithMetadata doc = new DocumentWithMetadata.Builder("Hello world")
.metadata("author", "Alice")
.metadata("year", 2024)
.id("doc-1")
.build();Content copied to clipboard
Functions
Link copied to clipboard
Builds the DocumentWithMetadata instance.
Link copied to clipboard
Sets the document id.
Link copied to clipboard
Replaces all metadata with the given map.
Adds a single metadata entry.