Class CollectionValues

java.lang.Object
io.fluxzero.common.search.CollectionValues

public final class CollectionValues extends Object
Collection intervals using the existing sortable encoding and per-document legacy fallback.
  • Method Details

    • compare

      public static int compare(String left, String right)
      Compares normalized keys in Unicode codepoint order, matching PostgreSQL's binary C collation.
    • key

      public static String key(Object value)
      Uses existing sortable numeric precision and normalization. Uppercase UTC ISO timestamp text, as emitted by Instant JSON serialization, uses the existing fixed-millisecond timestamp encoding. The document text is unchanged. Literal strings with this exact syntax are indistinguishable from serialized Instants here.
    • key

      public static String key(Document.Entry entry)
      Encodes a raw document scalar with the same rules as annotated values.
    • values

      public static Stream<String> values(Document document, String path)
      Streams comparison keys at one path. Nulls and internal metadata are excluded.
    • extremum

      public static String extremum(Document document, String path, ValueSelection selection)
      Returns the requested extremum, or null for missing, empty or null-only values.
    • overlaps

      public static boolean overlaps(Document document, String path, String lower, String upper)
      Tests interval overlap; old annotated documents without a minimum retain their maximum-only interval.
    • indexedValues

      public static Map<String, List<String>> indexedValues(Document document)
      Materializes at most two extrema per annotated path, in one pass over the document entries.
    • indexedValues

      public static Map<String, List<String>> indexedValues(Document document, Collection<String> pathsToIndex)
      Collects requested canonical extrema; empty means missing, singleton means minimum equals maximum.