Record Class SearchValue
java.lang.Object
java.lang.Record
io.fluxzero.common.api.search.SearchValue
Explicit minimum or maximum selection for range filters and ordering.
An annotated document without a minimum retains maximum semantics until the application reindexes it.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchValue(String path, ValueSelection selection) Creates an instance of aSearchValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionCompares the selected value against an inclusive lower bound.Compares the selected value against an exclusive upper bound.Compares the selected value against an inclusive lower and exclusive upper bound.final booleanIndicates whether some other object is "equal to" this one.static SearchValuefromSortPath(String path) Decodes an explicit collection-value ordering key, or returns null for an ordinary key.final inthashCode()Returns a hash code value for this object.key(SerializedDocument document) Resolves a response-only continuation key, falling back to the complete document's field values.Computes the selected value from sortable entries, with maximum fallback for legacy entries, or raw unannotated values.static SearchValueSelects the highest non-null field value.static SearchValueSelects the lowest non-null field value.path()Returns the value of thepathrecord component.static SerializedDocumentproject(SerializedDocument source, List<String> sorting, Predicate<Document.Path> pathFilter) Projects a response while transporting its ordering values independently of stored document bytes.Returns the value of theselectionrecord component.sortPath()Internal wire spelling; the path is encoded to preserve arbitrary delimiters.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SearchValue
Creates an instance of aSearchValuerecord class.- Parameters:
path- the value for thepathrecord componentselection- the value for theselectionrecord component
-
-
Method Details
-
min
Selects the lowest non-null field value. -
max
Selects the highest non-null field value. -
between
Compares the selected value against an inclusive lower and exclusive upper bound. -
below
Compares the selected value against an exclusive upper bound. -
atLeast
Compares the selected value against an inclusive lower bound. -
sortPath
Internal wire spelling; the path is encoded to preserve arbitrary delimiters. -
fromSortPath
Decodes an explicit collection-value ordering key, or returns null for an ordinary key. -
key
-
key
Resolves a response-only continuation key, falling back to the complete document's field values. -
project
public static SerializedDocument project(SerializedDocument source, List<String> sorting, Predicate<Document.Path> pathFilter) Projects a response while transporting its ordering values independently of stored document bytes. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
selection
Returns the value of theselectionrecord component.- Returns:
- the value of the
selectionrecord component
-