Package io.fluxcapacitor.common.search
Class Document
java.lang.Object
io.fluxcapacitor.common.search.Document
Represents a structured, searchable, and indexable document within a Flux Capacitor 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.Path
s.
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 aComparator
to sort documents based on the sorting options inSearchDocuments
.filterPaths
(Predicate<Document.Path> pathFilter) Filters document entries by aDocument.Path
predicate.getEnd()
getEntryAtPath
(String queryPath) Retrieves the first matchingDocument.Entry
for 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 ofSortableEntry
objects from the document's indexes that match the provided path predicate.
-
Field Details
-
identityFunction
-
-
Constructor Details
-
Document
public Document()
-
-
Method Details
-
getEntryAtPath
Retrieves the first matchingDocument.Entry
for a given query path. -
getMatchingEntries
Retrieves a stream of entries that match the provided path predicate. -
getSortableEntries
Retrieves a stream ofSortableEntry
objects from the document's indexes that match the provided path predicate. -
filterPaths
Filters document entries by aDocument.Path
predicate. -
getEnd
-
createComparator
Constructs aComparator
to sort documents based on the sorting options inSearchDocuments
.
-