Class Document
java.lang.Object
io.fluxzero.common.search.Document
Represents a structured, searchable, and indexable document within a Fluxzero collection.
A Document encapsulates metadata (such as ID, type, revision, timestamps) and document content structured as
a map of Document.Entry values associated with one or more Document.Paths.
Documents are typically constructed from user-defined data and then serialized via SerializedDocument for
indexing, querying, or audit purposes.
Components
- entries: the core field/value content of the document, including support for multiple path aliases
- facets: fast lookup values, commonly used in
FacetStats - indexes: normalized and sortable values (e.g. timestamps, numbers) used for filtering and sorting
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<Document> createComparator(SearchDocuments searchDocuments) Constructs aComparatorto sort documents based on the sorting options inSearchDocuments.filterPaths(Predicate<Document.Path> pathFilter) Filters document entries by aDocument.Pathpredicate.getEnd()getEntryAtPath(String queryPath) Retrieves the first matchingDocument.Entryfor a given query path.getMatchingEntries(Predicate<Document.Path> pathPredicate) Retrieves a stream of entries that match the provided path predicate.getSortableEntries(Predicate<Document.Path> pathPredicate) Retrieves a stream ofSortableEntryobjects from the document's indexes that match the provided path predicate.Retrieves the summary of the document ornullif no summary is available.
-
Field Details
-
identityFunction
-
-
Constructor Details
-
Document
public Document()
-
-
Method Details
-
getSummary
Retrieves the summary of the document ornullif no summary is available.A summary describes the document contents as a single string concatenating all property values.
-
getEntryAtPath
Retrieves the first matchingDocument.Entryfor a given query path. -
getMatchingEntries
Retrieves a stream of entries that match the provided path predicate. -
getSortableEntries
Retrieves a stream ofSortableEntryobjects from the document's indexes that match the provided path predicate. -
filterPaths
Filters document entries by aDocument.Pathpredicate. -
getEnd
-
createComparator
Constructs aComparatorto sort documents based on the sorting options inSearchDocuments.
-