Class SearchDocuments
- All Implemented Interfaces:
JsonType
This class is sent to the Fluxzero Runtime and supports a rich query mechanism, pagination, sorting, and selective field filtering.
Query: The query field specifies the main search criteria (document type, text query,
constraints, etc.).
Sorting: Use sorting to specify the fields used for ordering results. Each entry should
refer to a field name, optionally prefixed with - to indicate descending order (e.g., -timestamp).
Pagination: Use skip to offset the result window. The maxSize limits the
number of results returned. If lastHit is provided, the search will continue from the given last result
(useful for deep pagination).
Path filtering: The pathFilters field lets you restrict which fields are included in
each search hit, using glob-like syntax (e.g., details/name, -private/** to exclude sensitive paths).
Filtering is applied using computePathFilter().
-
Constructor Details
-
SearchDocuments
public SearchDocuments()
-
-
Method Details
-
computePathFilter
Computes a path-level filter based on thepathFilterslist.Each entry in the list can be a glob pattern for inclusion (e.g.,
details/name) or exclusion (e.g.,-details/private/**).Patterns are matched against both the short and long form of a
Document.Path, depending on the structure of the pattern.- Returns:
- a
Predicatethat returnstruefor paths that should be included in search hits.
-